[zi-cvs] packages/com.zzoss.zic application_install.php,NONE,1.1 dev_plugin.php,NONE,1.1 application_done.php,1.10,1.11 application_profile.php,1.6,1.7 application_settings.php,1.8,1.9 applications.php,1.13,1.14 dev_bundle.php,1.4,1.5 dev_bundle_instant.php,1.6,1.7 dev_package_xml.php,1.4,1.5 log.php,1.3,1.4 package.xml,1.7,1.8 packages.php,1.9,1.10 packages_confirm.php,1.6,1.7 packages_dependencies.php,1.8,1.9 packages_process.php,1.6,1.7 packages_reset.php,1.2,1.3 plugins_process.php,1.5,1.6

Sandro Zic <[email protected]> Thu, 18 Mar 2004 09:41:41 +0000
Newsgroups gmane.comp.php.zzoss.installer.cvs
Message-ID <[email protected]>
Update of /cvsroot/zzossinstaller/packages/com.zzoss.zic
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15653/com.zzoss.zic

Modified Files:
	application_done.php application_profile.php 
	application_settings.php applications.php dev_bundle.php 
	dev_bundle_instant.php dev_package_xml.php log.php package.xml 
	packages.php packages_confirm.php packages_dependencies.php 
	packages_process.php packages_reset.php plugins_process.php 
Added Files:
	application_install.php dev_plugin.php 
Log Message:
quick install of dev apps

Index: application_settings.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/application_settings.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** application_settings.php	9 Mar 2004 06:06:15 -0000	1.8
--- application_settings.php	18 Mar 2004 09:41:39 -0000	1.9
***************
*** 26,29 ****
--- 26,35 ----
  	// execute init file
  	require_once 'inc/init.php';
+     
+     // check if this script is part of installation procedure
+     if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev' && !$zi_registry->isProcedure('settings')){
+         header('Location: application_profile.php'.zi_form_querystr());
+         exit;
+     }
  	
  	function zi_process()
***************
*** 107,111 ****
          
  	  	// if we had a previous installation, we get those values
! 		if($application_settings = $zi_registry->getApplicationSettingsById($_REQUEST['id'])){
              $_REQUEST['ZI_VALUES'] = $application_settings;
              if(!isset($_REQUEST['ZI_VALUES']['application_root'])){
--- 113,117 ----
          
  	  	// if we had a previous installation, we get those values
! 		if($application_settings = $zi_registry->getApplicationSettings()){
              $_REQUEST['ZI_VALUES'] = $application_settings;
              if(!isset($_REQUEST['ZI_VALUES']['application_root'])){
***************
*** 122,126 ****
      ***************************************************************************/   
  
! 	$application = $zi_registry->getApplicationById($_REQUEST['id']);
  	// show unlocked data
  	
--- 128,132 ----
      ***************************************************************************/   
  
! 	$application = $zi_registry->getApplication();
  	// show unlocked data
  	

Index: packages_reset.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/packages_reset.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** packages_reset.php	9 Mar 2004 06:06:15 -0000	1.2
--- packages_reset.php	18 Mar 2004 09:41:39 -0000	1.3
***************
*** 26,29 ****
--- 26,44 ----
  	// execute init file
  	require_once 'inc/init.php';
+     
+     $pkg_type = 'package';
+     if(isset($_REQUEST['type'])){
+         $pkg_type = $_REQUEST['type'];
+     }
+     
+     $remove_installed_pkgs = true;
+     
+     // check if this script is part of installation procedure
+     if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev' && !$zi_registry->isProcedure($pkg_type.'s_register')){
+         header('Location: packages.php'.zi_form_querystr());
+         exit;
+     } elseif($zi_registry->isProcedure($pkg_type.'s_register')){
+         $remove_installed_pkgs = false;
+     }
  
      function zi_default()
***************
*** 43,47 ****
      $application = $zi_registry->getApplication();
      
!     include 'themes/'.$GLOBALS['ZI']['theme'].'/header_popup.php';
      ?>
      <h1>Packages Sources</h1>
--- 58,70 ----
      $application = $zi_registry->getApplication();
      
!     $is_popup = false;
!     $widget_type = '';
!     
!     if(isset($_REQUEST['widget_type']) && $_REQUEST['widget_type'] == 'popup'){
!         $is_popup = true;
!         $widget_type = '_popup';
!     }
!     
!     include 'themes/'.$GLOBALS['ZI']['theme'].'/header'.$widget_type.'.php';
      ?>
      <h1>Packages Sources</h1>
***************
*** 49,56 ****
      <p>
      <?php
-     $pkg_type = 'package';
-     if(isset($_REQUEST['type'])){
-         $pkg_type = $_REQUEST['type'];
-     }
      $zi_registry->setPackageType($pkg_type);
      
--- 72,75 ----
***************
*** 74,84 ****
          }
          
!         // Remove previously installed packages and their registries
!         $dir_installed = $zi_registry->getApplicationPath().$pkg_type.'s_installed';
!         if(is_dir($dir_installed)){
!             System::rm(array('-rf', $dir_installed));
!             System::mkDir($dir_installed);
          }
!         //$zi_registry->unsetPackages();
  
          if($pkg_type == 'plugin'){
--- 93,105 ----
          }
          
!         if($remove_installed_pkgs){
!             // Remove previously installed packages and their registries
!             $dir_installed = $zi_registry->getApplicationPath().$pkg_type.'s_installed';
!             if(is_dir($dir_installed)){
!                 System::rm(array('-rf', $dir_installed));
!                 System::mkDir($dir_installed);
!             }
          }
!         $zi_registry->unsetPackages();
  
          if($pkg_type == 'plugin'){
***************
*** 90,94 ****
              $zi_registry->unsetPlugins();
          }
!             
          ?>
          <h2>Installed <?php echo ucfirst($pkg_type); ?>s</h2>
--- 111,117 ----
              $zi_registry->unsetPlugins();
          }
!         
!         $zi_registry->registerPackages('downloads');
!         
          ?>
          <h2>Installed <?php echo ucfirst($pkg_type); ?>s</h2>
***************
*** 118,123 ****
                  <?php
              }
!             
!             // If the package is not available locally, download it from the
              // location specified in the packages.xml.
              if($pkg_obj->hasUnprocessedPkgs()){
--- 141,145 ----
                  <?php
              }
!                         // If the package is not available locally, download it from the
              // location specified in the packages.xml.
              if($pkg_obj->hasUnprocessedPkgs()){
***************
*** 152,156 ****
      </p>
      <?php
!     $zi_buttons['reload_parent'] = true;
! 	include 'themes/'.$GLOBALS['ZI']['theme'].'/footer_popup.php';
  ?>
--- 174,182 ----
      </p>
      <?php
!     if($is_popup){
!         $zi_buttons['reload_parent'] = true;
!     } else {
!         $zi_buttons['next'] = 'packages.php'.zi_form_querystr();
!     }
! 	include 'themes/'.$GLOBALS['ZI']['theme'].'/footer'.$widget_type.'.php';
  ?>

Index: application_done.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/application_done.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** application_done.php	9 Mar 2004 06:06:15 -0000	1.10
--- application_done.php	18 Mar 2004 09:41:39 -0000	1.11
***************
*** 35,38 ****
--- 35,51 ----
      }
      
+     $application = $zi_registry->getApplication($_REQUEST['application']);
+     
+     // if this is a quick install of an already installed app in dev mode,
+     // we redirect to the installation script
+     if(
+         isset($_REQUEST['mode']) &&
+         $_REQUEST['mode'] == 'dev' &&
+         $application['installed'] == $application['release']['version']
+         ){
+         header('Location: application_install.php'.zi_form_querystr().'&msg='.rawurlencode('Installation executed'));
+         exit;
+     }
+         
      /***************************************************************************   
      * PAGE CONTENT                                                             *   
***************
*** 44,48 ****
      }
      
-     $application = $zi_registry->getApplication($_REQUEST['application']);
      //print_r($application);
      // Mark installation as installed.
--- 57,60 ----
***************
*** 69,73 ****
  
  <p><a href="<?php echo $app_settings['application_url']; ?>" target="_blank" title="<?php echo $application['summary'].'-'.$application['release']['version']; ?>"><img src="themes/share/icons/org.kde.icons.crystalsvg/16x16/window_new.png" border="0" alt="View Application" title="View Application" align="absmiddle"> View Application</a><br/>
! Take a look at the freshly installed application.</p>
  
  <p><a href="log.php<?php echo zi_form_querystr(); ?>" onclick="javascript:window.open('log.php<?php echo zi_form_querystr(); ?>', 'LogFile', 'width=500,height=500,resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,dependent=0');void(0);javascript:return(false);" target="_blank" title="Log File"><img src="themes/share/icons/org.kde.icons.crystalsvg/16x16/log.png" border="0" alt="Installation Log" title="Installation Log" align="absmiddle"> Log File</a><br/>
--- 81,85 ----
  
  <p><a href="<?php echo $app_settings['application_url']; ?>" target="_blank" title="<?php echo $application['summary'].'-'.$application['release']['version']; ?>"><img src="themes/share/icons/org.kde.icons.crystalsvg/16x16/window_new.png" border="0" alt="View Application" title="View Application" align="absmiddle"> View Application</a><br/>
! Take a look at the installed application.</p>
  
  <p><a href="log.php<?php echo zi_form_querystr(); ?>" onclick="javascript:window.open('log.php<?php echo zi_form_querystr(); ?>', 'LogFile', 'width=500,height=500,resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,dependent=0');void(0);javascript:return(false);" target="_blank" title="Log File"><img src="themes/share/icons/org.kde.icons.crystalsvg/16x16/log.png" border="0" alt="Installation Log" title="Installation Log" align="absmiddle"> Log File</a><br/>

Index: application_profile.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/application_profile.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** application_profile.php	5 Mar 2004 14:25:24 -0000	1.6
--- application_profile.php	18 Mar 2004 09:41:39 -0000	1.7
***************
*** 27,30 ****
--- 27,37 ----
  	require_once 'inc/init.php';
  	
+     // check if this script is part of installation procedure
+     if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev' && !$zi_registry->isProcedure('profile')){
+         $_REQUEST['type'] = 'plugin';
+         header('Location: packages_reset.php'.zi_form_querystr().'&type=plugin');
+         exit;
+     }
+     
  	/***************************************************************************   
      * INSTALLER FRAMEWORK FUNCTIONS                                       	   *   
***************
*** 45,50 ****
          $_REQUEST['profile'] = $_REQUEST['ZI_VALUES']['application_profile'];
          $_REQUEST['application'] = $application;
  		if($_REQUEST["mode"] == 'dev') {
! 			$_REQUEST["ZI_LOCATION_NEXT"] = "packages_sources.php".zi_form_querystr();
  		} else {
  			$_REQUEST["ZI_LOCATION_NEXT"] = 'packages.php'.zi_form_querystr();
--- 52,58 ----
          $_REQUEST['profile'] = $_REQUEST['ZI_VALUES']['application_profile'];
          $_REQUEST['application'] = $application;
+         $_REQUEST['type'] = 'plugin';
  		if($_REQUEST["mode"] == 'dev') {
! 			$_REQUEST["ZI_LOCATION_NEXT"] = "packages_reset.php".zi_form_querystr();
  		} else {
  			$_REQUEST["ZI_LOCATION_NEXT"] = 'packages.php'.zi_form_querystr();
***************
*** 83,87 ****
  	<h1>Installation Profile</h1>
  
! <h2><a href="info.php?mode=<?php echo $_REQUEST['mode']; ?>&type=application&distribution=<?php echo $_REQUEST['distribution']; ?>" onclick="javascript:window.open('info.php?mode=<?php echo $_REQUEST['mode']; ?>&type=application&distribution=<?php echo $_REQUEST['distribution']; ?>', 'ApplicationInformation', 'width=500,height=500,resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,dependent=0');void(0);javascript:return(false);" target="_blank" title="<?php echo $application["summary"].' '.$application['release']['version']; ?>"><?php echo $application["summary"].' '.$application['release']['version']; ?></a></h2>
  
  <table border="0" cellspacing="0" cellpadding="4">
--- 91,95 ----
  	<h1>Installation Profile</h1>
  
! <h2><a href="info.php?mode=<?php echo $_REQUEST['mode']; ?>&type=application&distribution=<?php echo $_REQUEST['distribution']; ?>&application=<?php echo $_REQUEST['application']; ?>" onclick="javascript:window.open('info.php?mode=<?php echo $_REQUEST['mode']; ?>&type=application&distribution=<?php echo $_REQUEST['distribution']; ?>&application=<?php echo $_REQUEST['application']; ?>', 'ApplicationInformation', 'width=500,height=500,resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,dependent=0');void(0);javascript:return(false);" target="_blank" title="<?php echo $application["summary"].' '.$application['release']['version']; ?>"><?php echo $application["summary"].' '.$application['release']['version']; ?></a></h2>
  
  <table border="0" cellspacing="0" cellpadding="4">

Index: packages_dependencies.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/packages_dependencies.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** packages_dependencies.php	5 Mar 2004 14:25:25 -0000	1.8
--- packages_dependencies.php	18 Mar 2004 09:41:39 -0000	1.9
***************
*** 27,31 ****
  	require_once 'inc/init.php';
  	
! 	/***************************************************************************   
      * SCRIPT SPECIFIC FUNCTIONS                                       	   	   *   
      ***************************************************************************/   
--- 27,31 ----
  	require_once 'inc/init.php';
  	
!     /***************************************************************************   
      * SCRIPT SPECIFIC FUNCTIONS                                       	   	   *   
      ***************************************************************************/   
***************
*** 61,64 ****
--- 61,93 ----
      $packages_resolve = $zi_registry->getPackagesResolve();
      $packages_versions = $zi_registry->getPackagesVersions();
+     
+     // check if we should install already installed packages
+     if(
+         isset($_REQUEST['mode']) &&
+         $_REQUEST['mode'] == 'dev' &&
+         $zi_registry->getProcedure($pkg_type.'s_deps') == 'installed'){
+         $actions = array();
+         // iterate packages and distill those that are already installed
+         foreach($packages as $package){
+             if(isset($package['installed']) && $package["installed"] == $package["release"]["version"]) {
+                 $actions[$package['id']] = 'I';
+             }
+         }
+         
+         // if no packages are supposed to be installed,
+         // we redirect.
+         if(!count($actions)){
+             $zi_registry->setProcedure($pkg_type.'s_manager');
+             $zi_registry->setProcedure($pkg_type.'s_confirm');
+             $url_next = 'packages.php'.zi_form_querystr();
+             header('Location: '.$url_next);
+             exit;
+         }
+         
+         $zi_registry->setPackagesActions($actions);
+     } else {
+         // load previous selection
+         $actions =  $zi_registry->getPackagesActions();
+     }
      /*
      echo '<h3>Packages Versions</h3>';
***************
*** 67,72 ****
      echo '</pre>';
      */
!     // load previous selection
! 	$actions =  $zi_registry->getPackagesActions();
      /*
      echo '<h3>Actions</h3>';
--- 96,100 ----
      echo '</pre>';
      */
!     
      /*
      echo '<h3>Actions</h3>';

Index: applications.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/applications.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** applications.php	15 Mar 2004 07:44:01 -0000	1.13
--- applications.php	18 Mar 2004 09:41:39 -0000	1.14
***************
*** 48,52 ****
          }
  	}
! 	
      // Check for actions
      if(isset($_REQUEST['action']) && strlen($_REQUEST['action'])){
--- 48,52 ----
          }
  	}
! 
      // Check for actions
      if(isset($_REQUEST['action']) && strlen($_REQUEST['action'])){
***************
*** 55,59 ****
          switch($_REQUEST['action']){
              case  'install':
!                 $action_redirect = 'application_settings.php'.zi_form_querystr();
                  break;
              case  'remove':
--- 55,59 ----
          switch($_REQUEST['action']){
              case  'install':
!                 $action_redirect = 'application_install.php'.zi_form_querystr();
                  break;
              case  'remove':
***************
*** 64,70 ****
--- 64,87 ----
                  break;
              case 'plugins':
+                 $procedures = array(
+                     'plugins_manager' => 'on',
+                     'plugins_confirm' => 'on',
+                     'plugins_register' => 'on',
+                     'plugins_fileroles' => 'on',
+                     'plugins_build' => 'on'
+                     );
+                 $zi_registry->setProcedures($procedures);
                  $_REQUEST['type'] = 'plugin';
                  $action_redirect = 'packages.php'.zi_form_querystr();
+                 break;
              case 'packages':
+                 $procedures = array(
+                     'packages_manager' => 'on',
+                     'packages_confirm' => 'on',
+                     'packages_register' => 'on',
+                     'packages_fileroles' => 'on',
+                     'packages_build' => 'on'
+                     );
+                 $zi_registry->setProcedures($procedures);
                  $action_redirect = 'packages.php'.zi_form_querystr();
                  break;
***************
*** 221,225 ****
                                      }
                                      ?> <?php
!                                     if($zi_registry->isRegPlugins($application['name'].'-'.$application['release']['version'])){
                                          ?>
                                          <a href="<?php echo $_SERVER['PHP_SELF'].$querystr; ?>&action=plugins" title="Plugins">
--- 238,242 ----
                                      }
                                      ?> <?php
!                                     if($installed && ($is_dev || $zi_registry->isRegPlugins($application['name'].'-'.$application['release']['version']))){
                                          ?>
                                          <a href="<?php echo $_SERVER['PHP_SELF'].$querystr; ?>&action=plugins" title="Plugins">
***************
*** 276,280 ****
                  }
              }
!             $zi_buttons['next'] = "applications.php".zi_form_querystr();
          }
      }
--- 293,297 ----
                  }
              }
!            // $zi_buttons['next'] = "applications.php".zi_form_querystr();
          }
      }
***************
*** 291,295 ****
          </p>
          <?php
!          $zi_buttons['next'] = "applications.php".zi_form_querystr();
      }
          
--- 308,312 ----
          </p>
          <?php
!          //$zi_buttons['next'] = "applications.php".zi_form_querystr();
      }
          

Index: dev_bundle.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/dev_bundle.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** dev_bundle.php	5 Mar 2004 14:25:25 -0000	1.4
--- dev_bundle.php	18 Mar 2004 09:41:39 -0000	1.5
***************
*** 34,97 ****
      $instant_dir = $bundle_dir_dev.'instant'.DIRECTORY_SEPARATOR.$distribution['name'].'-'.$distribution['release']['version'].DIRECTORY_SEPARATOR;
      
!     switch($_REQUEST['action']){
!         case 'bundle':
!             $msg = '<p><span class="label">Download Bundle: </span><a href="'.$bundle_link.'">'.$bundle_tgz.'</a></p>';
!             break;
!         case 'instant':
!             System::mkdir(array('-p', $instant_dir));
!             
!             $instant_name = $application['name'].'-'.$application['release']['version'];
!             $instant_tgz = $instant_name.'.tgz';
!             $instant_link = $instant_dir.$instant_tgz;
!             
!             // Grab all installer files from the various installer directories.
!              /*
!             echo '<pre>';
!             print_r($dir_map);
!             echo '</pre>';
!             */
!             $filter_dirs = array('CVS', 'bundles');
!             // TODO: .bak
!             $filter_files = '/[~#]$/i';
!             
!             // Create tar file list.
!             require_once 'ZZOSS_File/Find.php';
!             $zi_filefind = new ZZOSS_FileFind;
!             $zi_filefind->setFilterDirs($filter_dirs);
!             $zi_filefind->setFilterFiles($filter_files);
!             $tar_list = $zi_filefind->listFiles('.');
!             /*
!             echo '<pre>';
!             print_r($tar_list);
!             echo '</pre>';
!             */
!             $tar = new Archive_Tar($instant_tgz);
!             //$tar->setErrorHandling(PEAR_ERROR_PRINT);
!             $tar->createModify($tar_list, $instant_name.'/installer/');
!             // WORKAROUND: Did not manage to have Archive_Tar add
!             // the bundle file from bundles/dev/, so we copy
!             // it to bundle/ and take care that we do not
!             // overwrite a production bundle with the same name.
!             if(file_exists($bundle_dir_prod.$bundle_tgz)){
!                 copy($bundle_dir_prod.$bundle_tgz, $bundle_dir_prod.$bundle_tgz.'.bak');
!                 $undo_backup = true;
!             }
!             
!             copy($bundle_dir_dev.$bundle_tgz, $bundle_dir_prod.$bundle_tgz);
!             
!             $tar->addModify('bundles'.DIRECTORY_SEPARATOR.$bundle_tgz, $instant_name.'/installer');
!             
!             if($undo_backup){
!                 copy($bundle_dir_prod.$bundle_tgz.'.bak', $bundle_dir_prod.$bundle_tgz);
!                 unlink($bundle_dir_prod.$bundle_tgz.'.bak');
!                 $backup = true;
!             }
!             
!             unlink($bundle_dir_prod.$bundle_tgz);
!             copy($instant_tgz, $instant_link);
!             unlink($instant_tgz);
!             
!             $msg = '<p><span class="label">Download Instant Bundle: </span><a href="'.$instant_link.'">'.$instant_tgz.'</a></p>';
!             break;
      }
      
--- 34,99 ----
      $instant_dir = $bundle_dir_dev.'instant'.DIRECTORY_SEPARATOR.$distribution['name'].'-'.$distribution['release']['version'].DIRECTORY_SEPARATOR;
      
!     if(isset($_REQUEST['action'])){
!         switch($_REQUEST['action']){
!             case 'bundle':
!                 $msg = '<p><span class="label">Download Bundle: </span><a href="'.$bundle_link.'">'.$bundle_tgz.'</a></p>';
!                 break;
!             case 'instant':
!                 System::mkdir(array('-p', $instant_dir));
!                 
!                 $instant_name = $application['name'].'-'.$application['release']['version'];
!                 $instant_tgz = $instant_name.'.tgz';
!                 $instant_link = $instant_dir.$instant_tgz;
!                 
!                 // Grab all installer files from the various installer directories.
!                  /*
!                 echo '<pre>';
!                 print_r($dir_map);
!                 echo '</pre>';
!                 */
!                 $filter_dirs = array('CVS', 'bundles');
!                 // TODO: .bak
!                 $filter_files = '/[~#]$/i';
!                 
!                 // Create tar file list.
!                 require_once 'ZZOSS_File/Find.php';
!                 $zi_filefind = new ZZOSS_FileFind;
!                 $zi_filefind->setFilterDirs($filter_dirs);
!                 $zi_filefind->setFilterFiles($filter_files);
!                 $tar_list = $zi_filefind->listFiles('.');
!                 /*
!                 echo '<pre>';
!                 print_r($tar_list);
!                 echo '</pre>';
!                 */
!                 $tar = new Archive_Tar($instant_tgz);
!                 //$tar->setErrorHandling(PEAR_ERROR_PRINT);
!                 $tar->createModify($tar_list, $instant_name.'/installer/');
!                 // WORKAROUND: Did not manage to have Archive_Tar add
!                 // the bundle file from bundles/dev/, so we copy
!                 // it to bundle/ and take care that we do not
!                 // overwrite a production bundle with the same name.
!                 if(file_exists($bundle_dir_prod.$bundle_tgz)){
!                     copy($bundle_dir_prod.$bundle_tgz, $bundle_dir_prod.$bundle_tgz.'.bak');
!                     $undo_backup = true;
!                 }
!                 
!                 copy($bundle_dir_dev.$bundle_tgz, $bundle_dir_prod.$bundle_tgz);
!                 
!                 $tar->addModify('bundles'.DIRECTORY_SEPARATOR.$bundle_tgz, $instant_name.'/installer');
!                 
!                 if($undo_backup){
!                     copy($bundle_dir_prod.$bundle_tgz.'.bak', $bundle_dir_prod.$bundle_tgz);
!                     unlink($bundle_dir_prod.$bundle_tgz.'.bak');
!                     $backup = true;
!                 }
!                 
!                 unlink($bundle_dir_prod.$bundle_tgz);
!                 copy($instant_tgz, $instant_link);
!                 unlink($instant_tgz);
!                 
!                 $msg = '<p><span class="label">Download Instant Bundle: </span><a href="'.$instant_link.'">'.$instant_tgz.'</a></p>';
!                 break;
!         }
      }
      
***************
*** 106,110 ****
      
      <?php
!     if(strlen($msg)){
          echo $msg;
      }
--- 108,112 ----
      
      <?php
!     if(isset($msg) && strlen($msg)){
          echo $msg;
      }

Index: packages_confirm.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/packages_confirm.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** packages_confirm.php	5 Mar 2004 14:25:25 -0000	1.6
--- packages_confirm.php	18 Mar 2004 09:41:39 -0000	1.7
***************
*** 26,29 ****
--- 26,39 ----
  	// execute init file
  	require_once 'inc/init.php';
+     
+     $pkg_type = 'package';
+     if(isset($_REQUEST['type'])){
+         $pkg_type = $_REQUEST['type'];
+     }
+     // check if this script is part of installation procedure
+     if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev' && !$zi_registry->isProcedure($pkg_type.'s_confirm')){
+         header('Location: packages_dependencies.php'.zi_form_querystr());
+         exit;
+     }
  	/*
      function zi_process()
***************
*** 67,74 ****
      }
  	
-     $pkg_type = 'package';
-     if(isset($_REQUEST['type'])){
-         $pkg_type = $_REQUEST['type'];
-     }
      /*
      $zi_registry->setPackageType($pkg_type);
--- 77,80 ----

--- NEW FILE: dev_plugin.php ---
<?php   
    /*
    Copyright (C) 2001-2004 ZZOSS GbR, http://www.zzoss.com

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
    
    /**
    @version $Id: dev_plugin.php,v 1.1 2004/03/18 09:41:39 ordnas Exp $
    @copyright Copyright &copy; 2001-2004 ZZ/OSS GbR, http://www.zzoss.com
    @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
    */

	// execute init file
	require_once 'inc/init.php';
    
    function zi_process()
    {
        global $zi_registry;
        
        $plugin_dev = array(
                        $_REQUEST['package'] => $_REQUEST['ZI_VALUES']
                        );
        $zi_registry->setPluginDev($plugin_dev);
    }

    // assign default values
	function zi_default()
	{
		global $zi_registry;
        
        if(!$_REQUEST['ZI_VALUES'] = $zi_registry->getPluginsDev($_REQUEST['package'])){
            
            $pkg_type = 'package';
            if(isset($_REQUEST['type'])){
                $pkg_type = $_REQUEST['type'];
            }
            
            // if we had a previous installation, we get those values
            $app_settings = $zi_registry->getApplicationSettings();
            $_REQUEST['ZI_VALUES']['install_dir'] = $app_settings['application_root'];
            $_REQUEST['ZI_VALUES']['data_dir'] = $zi_registry->getApplicationPath().'data'.DIRECTORY_SEPARATOR.$pkg_type.DIRECTORY_SEPARATOR;
            $_REQUEST['ZI_VALUES']['action'] = 'I';
        }
        return $_REQUEST;
	}

	include 'themes/'.$GLOBALS['ZI']['theme'].'/header.php';
    
    // installer widget class
	require_once 'ZZOSS_Installer/Widget.php';
	$zi_widget = new ZZOSS_InstallerWidget;
    if(isset($zi_errors)){
        $zi_widget->setErrors($zi_errors);
    }
    
    $application = $zi_registry->getApplication();
?>
<h1>Develop Plugin</h1>
<h2><a href="info.php?mode=<?php echo $_REQUEST['mode']; ?>&type=application&distribution=<?php echo $_REQUEST['distribution']; ?>&application=<?php echo $_REQUEST['application']; ?>" onclick="javascript:window.open('info.php?mode=<?php echo $_REQUEST['mode']; ?>&type=application&distribution=<?php echo $_REQUEST['distribution']; ?>&application=<?php echo $_REQUEST['application']; ?>', 'ApplicationInformation', 'width=500,height=500,resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,dependent=0');void(0);javascript:return(false);" target="_blank" title="<?php echo $application["summary"].' '.$application['release']['version']; ?>"><?php echo $application["summary"].' '.$application['release']['version']; ?></a></h2>
<h2>Plugin Environment</h2>
<table border="0" cellspacing="0" cellpadding="4">
<?php
    echo $zi_widget->add('select', 'Handler', 'handler', array('list' => 'role => Role, build => Build'));
    echo $zi_widget->add('select', 'Mode', 'mode', array('list' => '=> ---, pre => Pre-Install, post => Post-Install'));
    echo $zi_widget->add('select', 'Action', 'action', array('list' => 'I => Install, U => Update, R => Remove'));
?>
</table>
<h2>Test Package</h2>
<table border="0" cellspacing="0" cellpadding="4">
<?php    echo $zi_widget->add('path', 'Build Directory', 'build_dir', array('validation' => 'not empty'));
    echo $zi_widget->add('path', 'Install Directory', 'install_dir', array('validation' => 'not empty'));
    echo $zi_widget->add('path', 'Data Directory', 'data_dir', array('validation' => 'not empty'));
?>
</table>
<?php
if(isset($_REQUEST['posted'])){
    ?>
    <h2>Plugin Log</h2>
    <?php
    $pkg_type = 'package';
    if(isset($_REQUEST['type'])){
        $pkg_type = $_REQUEST['type'];
    }
    $zi_registry->setPackageType($pkg_type);
    
    // Create the install destination directory.
    $app_settings = $zi_registry->getApplicationSettings();
    //echo 'settings: '.$app_settings['application_root'];

    if(!$plugin_dev = $zi_registry->getPluginsDev($_REQUEST['package'])){
        PEAR::raiseError('No settings for plugin \''.$_REQUEST['package'].'\'');
    }
    $pkgs_root = $plugin_dev['install_dir'];
    // Location where plugins store their data
    $pkgs_data = $plugin_dev['data_dir'];
    if(!is_dir($pkgs_data)){
        System::mkdir(array('-p', $pkgs_data));
    }
    
    $_REQUEST["step"] = 0;
    
    require_once 'ZZOSS_Plugin/Plugin.php';
    $plugin = new ZZOSS_Plugin;
    $plugin->setDestDir($pkgs_root); 
    $plugin->setDataDir($pkgs_data);
    $plugin->setSource($zi_registry->getApplicationPath().DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR);
    $plugin->setRegistry($zi_registry);
    $plugin->loadPackage($plugin_dev['build_dir'].DIRECTORY_SEPARATOR.'package.xml', $plugin_dev['action']);
    $plugin->exec($plugin_dev['handler'], 0, $plugin_dev['mode']);
    ?>
    <textarea cols="54" rows="10" wrap="on"><?php echo $plugin->getLog(); ?></textarea>
    
    <h2>Plugin Output</h2>
    
    <?php echo $plugin->getOutput(); ?>
    <input type="hidden" name="step" value="<?php echo $_REQUEST["step"]; ?>">
    <a name="bottom"></a>
    <?php
}

    $zi_buttons['back'] = 'packages.php'.zi_form_querystr();
    if(isset($_REQUEST['posted'])){
        $zi_buttons['reload'] = $_SERVER['PHP_SELF'].zi_form_querystr().'&posted';
    } else {
        $zi_buttons['next'] = $_SERVER['PHP_SELF'].zi_form_querystr().'&posted';
    }
	include 'themes/'.$GLOBALS['ZI']['theme'].'/footer.php';
?>
Index: dev_bundle_instant.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/dev_bundle_instant.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** dev_bundle_instant.php	5 Mar 2004 14:25:25 -0000	1.6
--- dev_bundle_instant.php	18 Mar 2004 09:41:39 -0000	1.7
***************
*** 61,64 ****
--- 61,65 ----
          // compose replace array
          $values = $_REQUEST['ZI_VALUES'];
+         $query_str = '';
          if(is_array($values) && count($values)){
              foreach($values as $key => $val){
***************
*** 112,116 ****
          $tar->addModify('bundles'.DIRECTORY_SEPARATOR.$bundle_tgz, $_REQUEST['ZI_VALUES']['instant_name'].'/installer');
          
!         if($undo_backup){
              copy($bundle_dir_prod.$bundle_tgz.'~', $bundle_dir_prod.$bundle_tgz);
              unlink($bundle_dir_prod.$bundle_tgz.'~');
--- 113,120 ----
          $tar->addModify('bundles'.DIRECTORY_SEPARATOR.$bundle_tgz, $_REQUEST['ZI_VALUES']['instant_name'].'/installer');
          
!         if(isset($undo_backup) && $undo_backup){
!             if(!is_dir($bundle_dir_prod)){
!                 System::mkdir(array('-p', $bundle_dir_prod));
!             }
              copy($bundle_dir_prod.$bundle_tgz.'~', $bundle_dir_prod.$bundle_tgz);
              unlink($bundle_dir_prod.$bundle_tgz.'~');
***************
*** 142,146 ****
      
      <?php
!     if($_REQUEST['process'] == '1'){
          $bundle_dir_prod = 'bundles'.DIRECTORY_SEPARATOR;
          $bundle_dir_dev = $bundle_dir_prod.'dev'.DIRECTORY_SEPARATOR;
--- 146,150 ----
      
      <?php
!     if(isset($_REQUEST['process']) && $_REQUEST['process'] == '1'){
          $bundle_dir_prod = 'bundles'.DIRECTORY_SEPARATOR;
          $bundle_dir_dev = $bundle_dir_prod.'dev'.DIRECTORY_SEPARATOR;


--- NEW FILE: application_install.php ---
<?php   
    /*
    Copyright (C) 2001-2004 ZZOSS GbR, http://www.zzoss.com

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
    
    /**
    @version $Id: application_install.php,v 1.1 2004/03/18 09:41:39 ordnas Exp $
    @copyright Copyright &copy; 2001-2004 ZZ/OSS GbR, http://www.zzoss.com
    @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
    */
	
	// execute init file
	require_once 'inc/init.php';
    
    $is_installed = false;
    $application = $zi_registry->getApplication();
    if(
        isset($application["installed"]) &&
        $application["installed"] == $application["release"]["version"]
        ) {
        $is_installed = true;
    }
    
    if(!isset($_REQUEST['mode']) || $_REQUEST['mode'] != 'dev'){
        if($is_installed){
            $redirect = 'applications.php';
        } else {
            $redirect = 'application_settings.php';
        }
    } else {
        if(!$is_installed){
            $redirect = 'application_settings.php';
        }
    }
    
    if(isset($redirect)){
        $procedures = array(
                            'settings' => 'on',
                            'profile' => 'on',
                            'plugins_manager' => 'on',
                            'plugins_confirm' => 'on',
                            'plugins_register' => 'on',
                            'plugins_deps' => 'on',
                            'plugins_fileroles' => 'on',
                            'plugins_build' => 'on',
                            'packages_manager' => 'on',
                            'packages_confirm' => 'on',
                            'packages_register' => 'on',
                            'packages_deps' => 'on',
                            'packages_fileroles' => 'on',
                            'packages_build' => 'on'
                            );
        $zi_registry->setProcedures($procedures);
        header('Location: '.$redirect.zi_form_querystr());
        exit;
    }        
	
	function zi_process()
	{
        global $zi_registry;
        
        $procedures = array();
        
        if(isset($_REQUEST['ZI_VALUES'])){
            // installation action should be recomposed from
            // already installed packages to make them being
            // installed again, but only if the package manager
            // is not used beforehand.
            if(!isset($_REQUEST['ZI_VALUES']['plugins_manager'])){
                $_REQUEST['ZI_VALUES']['plugins_deps'] = 'installed';
            }
            if(!isset($_REQUEST['ZI_VALUES']['packages_manager'])){
                $_REQUEST['ZI_VALUES']['packages_deps'] = 'installed';
            }
            $procedures = $_REQUEST['ZI_VALUES'];
        }
        
        $zi_registry->setProcedures($procedures, 'quickinstall');
        $zi_registry->setProcedures($procedures);
	}
  
	// assign default values
	function zi_default()
	{
        global $zi_registry;
        
        if($procedures = $zi_registry->getProcedures('quickinstall')){
            $_REQUEST['ZI_VALUES'] = $procedures;
        }
	}
	
	/***************************************************************************   
    * STARTUP                                                             	   *   
    ***************************************************************************/
	
	// installer widget class
	require_once 'ZZOSS_Installer/Widget.php';
	$zi_widget = new ZZOSS_InstallerWidget;
    if(isset($zi_errors)){
        $zi_widget->setErrors($zi_errors);
    }

    /***************************************************************************   
    * PAGE CONTENT                                                             *   
    ***************************************************************************/   
	
  	// we ask for a new installer admin username and password
	include 'themes/'.$GLOBALS['ZI']['theme'].'/header.php';
?>
<h1>Install Application</h1>
<h2><a href="info.php?mode=<?php echo $_REQUEST['mode']; ?>&type=application&distribution=<?php echo $_REQUEST['distribution']; ?>&application=<?php echo $_REQUEST['application']; ?>" onclick="javascript:window.open('info.php?mode=<?php echo $_REQUEST['mode']; ?>&type=application&distribution=<?php echo $_REQUEST['distribution']; ?>&application=<?php echo $_REQUEST['application']; ?>', 'ApplicationInformation', 'width=500,height=500,resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,dependent=0');void(0);javascript:return(false);" target="_blank" title="<?php echo $application["summary"].' '.$application['release']['version']; ?>"><?php echo $application["summary"].' '.$application['release']['version']; ?></a></h2>
<?php
if(isset($_REQUEST['msg'])){
    $app_settings = $zi_registry->getApplicationSettings();
    ?>
    <div class="warning"><?php echo $_REQUEST['msg']; ?></div>
<p><a href="<?php echo $app_settings['application_url']; ?>" target="_blank" title="<?php echo $application['summary'].'-'.$application['release']['version']; ?>"><img src="themes/share/icons/org.kde.icons.crystalsvg/16x16/window_new.png" border="0" alt="View Application" title="View Application" align="absmiddle"> View Application</a><br/>
Take a look at the installed application.</p>

<p><a href="log.php<?php echo zi_form_querystr(); ?>" onclick="javascript:window.open('log.php<?php echo zi_form_querystr(); ?>', 'LogFile', 'width=500,height=500,resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,dependent=0');void(0);javascript:return(false);" target="_blank" title="Log File"><img src="themes/share/icons/org.kde.icons.crystalsvg/16x16/log.png" border="0" alt="Installation Log" title="Installation Log" align="absmiddle"> Log File</a><br/>
Read the installation log for detailed information on the executed tasks.</p>
    <?php
}
?>
<table border="0" cellspacing="0" cellpadding="4">
<?php
	// show widgets
    echo $zi_widget->add('checkbox', 'Installation Paths', 'settings', array('info' => 'Configure the application installation paths.'));
    echo $zi_widget->add('checkbox', 'Installation Profile', 'profile', array('info' => 'Choose the installation profile (full, minimum, custom, demo).'));
    //if($zi_registry->isRegPlugins()){
        echo $zi_widget->add('checkbox', 'Register Plugins', 'plugins_register', array('info' => 'If you have external sources (e.g. CVS), then the plugins will be freshly registered from these sources.'));
        echo $zi_widget->add('checkbox', 'Plugins Fileroles', 'plugins_fileroles', array('info' => 'Process the contained files according to their role.'));
        echo $zi_widget->add('checkbox', 'Build Plugins', 'plugins_build', array('info' => 'If checked, forms for configuration options will show up again if they are available. If unchecked, the configure options of the previous installation will be used.'));
    //}
    echo $zi_widget->add('checkbox', 'Register Packages', 'packages_register', array('info' => 'If you have external sources (e.g. CVS), then the packages will be freshly registered from these sources.'));
    echo $zi_widget->add('checkbox', 'Packages Fileroles', 'packages_fileroles', array('info' => 'Process the contained files according to their role.'));
    echo $zi_widget->add('checkbox', 'Build Packages', 'packages_build', array('info' => 'If checked, forms for configuration options will show up again if they are available. If unchecked, the configure options of the previous installation will be used.'));
?>
</table>
<?php
	$zi_buttons['back'] = 'applications.php'.zi_form_querystr();
    $zi_buttons['next'] = 'application_settings.php'.zi_form_querystr();

	include 'themes/'.$GLOBALS['ZI']['theme'].'/footer.php';
?>
Index: package.xml
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/package.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** package.xml	14 Jan 2004 15:41:27 -0000	1.7
--- package.xml	18 Mar 2004 09:41:39 -0000	1.8
***************
*** 41,127 ****
  ]]>
          </notes>
!         <filelist>
!             <file role="php" basinstalldir="" name="menu.php"/>
!             <file role="php" basinstalldir="" name="TODO"/>
!             <file role="php" basinstalldir="" name="dev_reset_data.php"/>
!             <file role="php" basinstalldir="" name="dev_import_xml.php"/>
!             <file role="php" basinstalldir="" name="packages.php"/>
!             <file role="php" basinstalldir="" name="dev_package.php"/>
!             <!--<file role="php" basinstalldir="" name="dev_index.php"/>-->
!             <file role="php" basinstalldir="" name="distribution_download.php"/>
!             <file role="php" basinstalldir="" name="dev_bundle_instant.php"/>
!             <file role="php" basinstalldir="" name="config_network_community.php"/>
!             <file role="php" basinstalldir="" name="packages_download.php"/>
!             <file role="php" basinstalldir="" name="LICENSE"/>
!             <file role="php" basinstalldir="" name="dev_package_xml.php"/>
!             <file role="php" basinstalldir="" name="setup_resume.php"/>
!             <file role="php" basinstalldir="" name="application_update_confirm.php"/>
!             <file role="php" basinstalldir="" name="application_update.php"/>
!             <file role="php" basinstalldir="" name="dev_application_import.php"/>
!             <file role="php" basinstalldir="" name="packages_confirm.php"/>
!             <file role="php" basinstalldir="" name="package.xml"/>
!             <file role="php" basinstalldir="" name="online_update.php"/>
!             <file role="php" basinstalldir="" name="online_update_process.php"/>
!             <file role="php" basinstalldir="" name="dev_bundle_process.php"/>
!             <file role="php" basinstalldir="" name="application_done.php"/>
!             <file role="php" basinstalldir="" name="log.php"/>
!             <file role="php" basinstalldir="" name="applications_download.php"/>
!             <file role="php" basinstalldir="" name="packages_config.php"/>
!             <file role="php" basinstalldir="" name="application_profile.php"/>
!             <file role="php" basinstalldir="" name="packages_sources.php"/>
!             <file role="php" basinstalldir="" name="packages_sources_downloads.php"/>
!             <file role="php" basinstalldir="" name="packages_auto.php"/>
!             <file role="php" basinstalldir="" name="setup.php"/>
!             <file role="php" basinstalldir="" name="plugins_process.php"/>
!             <file role="php" basinstalldir="" name="packages_dependencies.php"/>
!             <file role="php" basinstalldir="" name="applications.php"/>
!             <file role="php" basinstalldir="" name="index.php"/>
!             <file role="php" basinstalldir="" name="packages_process.php"/>
!             <file role="php" basinstalldir="" name="about.php"/>
!             <file role="php" basinstalldir="" name="online_update_confirm.php"/>
!             <file role="php" basinstalldir="" name="application_settings.php"/>
!             <file role="php" basinstalldir="" name="config_global_connector.php"/>
!             <file role="php" basinstalldir="" name="dev_bundle.php"/>
!             <file role="php" basinstalldir="" name="authentication.php"/>
!             <file role="php" basinstalldir="" name="info.php"/>
!             <file role="php" basinstalldir="" name="setup_datadir.php"/>
!             <file role="php" basinstalldir="" name="application_delete.php"/>
!             <file role="php" basinstalldir="" name="info_changelog.php"/>
!             <file role="php" basinstalldir="" name="config_components.php"/>
!             <file role="php" basinstalldir="" name="cancel.php"/>
!             <file role="php" basinstalldir="" name="help.php"/>
!             <!--<file role="php" basinstalldir="" name="inc/config_params.php-dist"/>-->
!             <file role="php" basinstalldir="" name="inc/form.php"/>
!             <file role="php" basinstalldir="" name="inc/config.php"/>
!             <file role="php" basinstalldir="" name="inc/config_input.xml"/>
!             <file role="php" basinstalldir="" name="inc/authentication.php"/>
!             <!--<file role="php" basinstalldir="" name="inc/config_params.php"/>-->
!             <file role="php" basinstalldir="" name="inc/info.php"/>
!             <file role="php" basinstalldir="" name="inc/init.php"/>
!             <file role="php" basinstalldir="" name="inc/registry.php"/>
!             <file role="php" basinstalldir="" name="help/application_profile.html"/>
!             <file role="php" basinstalldir="" name="help/change_config.html"/>
!             <file role="php" basinstalldir="" name="help/install_packages.html"/>
!             <file role="php" basinstalldir="" name="help/developer_build_packages.html"/>
!             <file role="php" basinstalldir="" name="help/packages.html"/>
!             <file role="php" basinstalldir="" name="help/applications.html"/>
!             <file role="php" basinstalldir="" name="help/new_dev_install.html"/>
!             <file role="php" basinstalldir="" name="help/add_application.html"/>
!             <file role="php" basinstalldir="" name="help/index.html"/>
!             <file role="php" basinstalldir="" name="help/developer_index.html"/>
!             <file role="php" basinstalldir="" name="help/update_install.html"/>
!             <file role="php" basinstalldir="" name="help/new_prod_install.html"/>
!             <file role="php" basinstalldir="" name="help/applications_install_dev_params.html"/>
!             <file role="php" basinstalldir="" name="help/additional_sources.html"/>
!             <file role="php" basinstalldir="" name="help/applications_download.html"/>
!             <file role="php" basinstalldir="" name="help/distribution_download.html"/>
!             <file role="php" basinstalldir="" name="help/permissions.html"/>
!             <file role="php" basinstalldir="" name="help/packages_confirm.html"/>
!             <file role="php" basinstalldir="" name="help/change_components_config.html"/>
!             <file role="php" basinstalldir="" name="help/packages_dependencies.html"/>
!             <file role="php" basinstalldir="" name="help/packages_config.html"/>
!             <file role="php" basinstalldir="" name="help/application_settings.html"/>
!             <file role="php" basinstalldir="" name="themes/README"/>
!         </filelist>
          <deps>
              <dep type="pkg" rel="ge" version="1.0">com.zzoss.zic.build</dep>
--- 41,138 ----
  ]]>
          </notes>
! <filelist>
!     <file role="php" baseinstalldir="" name="about.php"/>
!     <file role="php" baseinstalldir="" name="applications.php"/>
!     <file role="php" baseinstalldir="" name="applications_download.php"/>
!     <file role="php" baseinstalldir="" name="application_delete.php"/>
!     <file role="php" baseinstalldir="" name="application_done.php"/>
!     <file role="php" baseinstalldir="" name="application_profile.php"/>
!     <file role="php" baseinstalldir="" name="application_profile_auto.php"/>
!     <file role="php" baseinstalldir="" name="application_settings.php"/>
!     <file role="php" baseinstalldir="" name="application_update.php"/>
!     <file role="php" baseinstalldir="" name="application_update_confirm.php"/>
!     <file role="php" baseinstalldir="" name="authentication.php"/>
!     <file role="php" baseinstalldir="" name="bundle.php"/>
!     <file role="php" baseinstalldir="" name="cancel.php"/>
!     <file role="php" baseinstalldir="" name="config_components.php"/>
!     <file role="php" baseinstalldir="" name="config_global_connector.php"/>
!     <file role="php" baseinstalldir="" name="config_network_community.php"/>
!     <file role="php" baseinstalldir="" name="dev_application_import.php"/>
!     <file role="php" baseinstalldir="" name="dev_bundle.php"/>
!     <file role="php" baseinstalldir="" name="dev_bundle_instant.php"/>
!     <file role="php" baseinstalldir="" name="dev_bundle_process.php"/>
!     <file role="php" baseinstalldir="" name="dev_import_xml.php"/>
!     <file role="php" baseinstalldir="" name="dev_index.php"/>
!     <file role="php" baseinstalldir="" name="dev_package.php"/>
!     <file role="php" baseinstalldir="" name="dev_package_xml.php"/>
!     <file role="php" baseinstalldir="" name="dev_reset_data.php"/>
!     <file role="php" baseinstalldir="" name="distribution_download.php"/>
!     <file role="php" baseinstalldir="" name="help.php"/>
!     <file role="php" baseinstalldir="" name="index.php"/>
!     <file role="php" baseinstalldir="" name="info.php"/>
!     <file role="php" baseinstalldir="" name="info_changelog.php"/>
!     <file role="php" baseinstalldir="" name="installer.php"/>
!     <file role="php" baseinstalldir="" name="installer_remove.php"/>
!     <file role="php" baseinstalldir="" name="installer_user.php"/>
!     <file role="php" baseinstalldir="" name="LICENSE"/>
!     <file role="php" baseinstalldir="" name="log.php"/>
!     <file role="php" baseinstalldir="" name="menu.php"/>
!     <file role="php" baseinstalldir="" name="online_update.php"/>
!     <file role="php" baseinstalldir="" name="online_update_confirm.php"/>
!     <file role="php" baseinstalldir="" name="online_update_process.php"/>
!     <file role="php" baseinstalldir="" name="package.xml"/>
!     <file role="php" baseinstalldir="" name="packages.php"/>
!     <file role="php" baseinstalldir="" name="packages_auto.php"/>
!     <file role="php" baseinstalldir="" name="packages_config.php"/>
!     <file role="php" baseinstalldir="" name="packages_confirm.php"/>
!     <file role="php" baseinstalldir="" name="packages_dependencies.php"/>
!     <file role="php" baseinstalldir="" name="packages_download.php"/>
!     <file role="php" baseinstalldir="" name="packages_process.php"/>
!     <file role="php" baseinstalldir="" name="packages_reset.php"/>
!     <file role="php" baseinstalldir="" name="packages_sources.php"/>
!     <file role="php" baseinstalldir="" name="packages_sources_downloads.php"/>
!     <file role="php" baseinstalldir="" name="package_add.php"/>
!     <file role="php" baseinstalldir="" name="plugins_process.php"/>
!     <file role="php" baseinstalldir="" name="setup.php"/>
!     <file role="php" baseinstalldir="" name="setup_datadir.php"/>
!     <file role="php" baseinstalldir="" name="setup_resume.php"/>
!     <file role="php" baseinstalldir="" name="TODO"/>
!     <file role="php" baseinstalldir="" name="help\additional_sources.html"/>
!     <file role="php" baseinstalldir="" name="help\add_application.html"/>
!     <file role="php" baseinstalldir="" name="help\applications.html"/>
!     <file role="php" baseinstalldir="" name="help\applications_download.html"/>
!     <file role="php" baseinstalldir="" name="help\applications_install_dev_params.html"/>
!     <file role="php" baseinstalldir="" name="help\application_profile.html"/>
!     <file role="php" baseinstalldir="" name="help\application_settings.html"/>
!     <file role="php" baseinstalldir="" name="help\change_components_config.html"/>
!     <file role="php" baseinstalldir="" name="help\change_config.html"/>
!     <file role="php" baseinstalldir="" name="help\developer_build_packages.html"/>
!     <file role="php" baseinstalldir="" name="help\developer_index.html"/>
!     <file role="php" baseinstalldir="" name="help\distribution_download.html"/>
!     <file role="php" baseinstalldir="" name="help\index.html"/>
!     <file role="php" baseinstalldir="" name="help\install_packages.html"/>
!     <file role="php" baseinstalldir="" name="help\new_dev_install.html"/>
!     <file role="php" baseinstalldir="" name="help\new_prod_install.html"/>
!     <file role="php" baseinstalldir="" name="help\packages.html"/>
!     <file role="php" baseinstalldir="" name="help\packages_config.html"/>
!     <file role="php" baseinstalldir="" name="help\packages_confirm.html"/>
!     <file role="php" baseinstalldir="" name="help\packages_dependencies.html"/>
!     <file role="php" baseinstalldir="" name="help\permissions.html"/>
!     <file role="php" baseinstalldir="" name="help\update_install.html"/>
!     <file role="php" baseinstalldir="" name="inc\authentication.php"/>
!     <file role="php" baseinstalldir="" name="inc\config.php"/>
!     <file role="php" baseinstalldir="" name="inc\config_input.xml"/>
!     <file role="php" baseinstalldir="" name="inc\config_params.php"/>
!     <file role="php" baseinstalldir="" name="inc\config_params.php-dist"/>
!     <file role="php" baseinstalldir="" name="inc\form.php"/>
!     <file role="php" baseinstalldir="" name="inc\info.php"/>
!     <file role="php" baseinstalldir="" name="inc\init.php"/>
!     <file role="php" baseinstalldir="" name="inc\registry.php"/>
!     <file role="php" baseinstalldir="" name="inc\toolbar.php"/>
!     <file role="php" baseinstalldir="" name="inc\toolbar_apps.php"/>
!     <file role="php" baseinstalldir="" name="inc\toolbar_dev.php"/>
!     <file role="php" baseinstalldir="" name="inc\toolbar_installer.php"/>
!     <file role="php" baseinstalldir="" name="themes\README"/>
! </filelist>
          <deps>
              <dep type="pkg" rel="ge" version="1.0">com.zzoss.zic.build</dep>

Index: packages_process.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/packages_process.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** packages_process.php	5 Mar 2004 14:25:25 -0000	1.6
--- packages_process.php	18 Mar 2004 09:41:39 -0000	1.7
***************
*** 29,55 ****
  	require_once 'inc/init.php';
      
! 	/***************************************************************************   
!     * SCRIPT SPECIFIC FUNCTIONS                                       	   	   *   
!     ***************************************************************************/   
! 	
! 	/***************************************************************************   
!     * STARTUP                                                             	   *   
!     ***************************************************************************/   
! 	
! 	// check step
  	if(!isset($_REQUEST["step"])) {
  		$step = 0;
  		// remove old log file
! 		if(file_exists($zi_registry->getApplicationPath().'installer'.DIRECTORY_SEPARATOR.'packages.log')) {
  			unlink($zi_registry->getApplicationPath().'installer'.DIRECTORY_SEPARATOR.'packages.log');
! 		}
  	} else {
  		$step = $_REQUEST["step"];
  	}
!     
!     $pkg_type = 'package';
!     if(isset($_REQUEST['type'])){
!         $pkg_type = $_REQUEST['type'];
      }
      $zi_registry->setPackageType($pkg_type);
  
--- 29,58 ----
  	require_once 'inc/init.php';
      
!     $pkg_type = 'package';
!     if(isset($_REQUEST['type'])){
!         $pkg_type = $_REQUEST['type'];
!     }
!     
!  	// check step
  	if(!isset($_REQUEST["step"])) {
  		$step = 0;
  		// remove old log file
! 		/*if(file_exists($zi_registry->getApplicationPath().'installer'.DIRECTORY_SEPARATOR.'packages.log')) {
  			unlink($zi_registry->getApplicationPath().'installer'.DIRECTORY_SEPARATOR.'packages.log');
! 		}*/
  	} else {
  		$step = $_REQUEST["step"];
  	}
! 
!     // check if this script is part of installation procedure
!     if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev' && !$zi_registry->isProcedure($pkg_type.'s_fileroles')){
!         header('Location: plugins_process.php'.zi_form_querystr().'&step='.$step);
!         exit;
      }
+ 	
+ 	/***************************************************************************   
+     * STARTUP                                                             	   *   
+     ***************************************************************************/   
+ 	
      $zi_registry->setPackageType($pkg_type);
  

Index: packages.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/packages.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** packages.php	5 Mar 2004 14:25:25 -0000	1.9
--- packages.php	18 Mar 2004 09:41:39 -0000	1.10
***************
*** 27,30 ****
--- 27,43 ----
  	require_once 'inc/init.php';
  	
+     $pkg_type = 'package';
+     if(isset($_REQUEST['type'])){
+         $pkg_type = $_REQUEST['type'];
+     }
+     
+     // check if this script is part of installation procedure
+     if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev' && !$zi_registry->isProcedure($pkg_type.'s_manager')){
+         header('Location: packages_confirm.php'.zi_form_querystr());
+         exit;
+     } else {
+         $zi_registry->setProcedure($pkg_type.'s_deps', 'on');
+     }
+     
      if(isset($_REQUEST['profile']) && $_REQUEST["profile"] != 'custom') {
          header('Location: packages_auto.php'.zi_form_querystr());
***************
*** 104,108 ****
      if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev'){ 
          ?>&nbsp;
!         [<a href="packages_reset.php<?php echo zi_form_querystr(); ?>" onclick="javascript:if(confirm('This will undo all previous installation work. Are you sure you want to continue?')){window.open('packages_reset.php<?php echo zi_form_querystr(); ?>', 'ApplicationInformation', 'width=500,height=500,resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,dependent=0');}void(0);javascript:return(false);" target="_blank" title="<?php echo $application["summary"].' '.$application['release']['version']; ?>">Reset <?php echo ucfirst($pkg_type); ?>s</a>]
          <?php
      }
--- 117,121 ----
      if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev'){ 
          ?>&nbsp;
!         [<a href="packages_reset.php<?php echo zi_form_querystr(); ?>&widget_type=popup" onclick="javascript:if(confirm('This will undo all previous installation work. Are you sure you want to continue?')){window.open('packages_reset.php<?php echo zi_form_querystr(); ?>&widget_type=popup', 'ApplicationInformation', 'width=500,height=500,resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,dependent=0');}void(0);javascript:return(false);" target="_blank" title="<?php echo $application["summary"].' '.$application['release']['version']; ?>">Reset <?php echo ucfirst($pkg_type); ?>s</a>]
          <?php
      }

Index: log.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/log.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** log.php	11 Feb 2004 14:38:40 -0000	1.3
--- log.php	18 Mar 2004 09:41:39 -0000	1.4
***************
*** 32,36 ****
  <h1>Log File</h1>
  
! <textarea cols="54" rows="20" wrap="on">
  <?php
      $file = $zi_registry->getApplicationPath().'installer/packages.log';
--- 32,36 ----
  <h1>Log File</h1>
  
! <textarea cols="54" rows="20" wrap="off">
  <?php
      $file = $zi_registry->getApplicationPath().'installer/packages.log';

Index: plugins_process.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/plugins_process.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** plugins_process.php	5 Mar 2004 14:25:25 -0000	1.5
--- plugins_process.php	18 Mar 2004 09:41:39 -0000	1.6
***************
*** 28,31 ****
--- 28,73 ----
  	// execute init file
  	require_once 'inc/init.php';
+     
+     $pkg_type = 'package';
+     if(isset($_REQUEST['type'])){
+         $pkg_type = $_REQUEST['type'];
+     }
+     $zi_registry->setPackageType($pkg_type);
+     
+     $step = $_REQUEST["step"];
+     
+     // check if this script is part of installation procedure
+     if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev' && !$zi_registry->isProcedure($pkg_type.'s_build')){
+         // by default, no further installation steps are required
+         $has_step = false;
+         
+         // by default, we assume that instllation is done and redirect
+         $url_next = 'application_done.php'.zi_form_querystr();
+         
+         // see if we should process fileroles
+         if($zi_registry->isProcedure($pkg_type.'s_fileroles')){
+             // check if there's one more step, otherwise installation is done
+             $queue = $zi_registry->getPackagesQueue();
+             require_once 'ZZOSS_Plugin/Plugin.php';
+             $plugin = new ZZOSS_Plugin;
+             $plugin->setQueue($queue);
+             $step_next = $step + 1;
+             if($plugin->isStep($step_next)) {
+                 $has_step = true;
+                 $url_next = 'packages_process.php'.zi_form_querystr().'&step='.$step_next;
+             }
+         }
+         
+         // If there's no more step, and we process plugins, then
+         // go on and process packages.
+         if(!$has_step && $pkg_type == 'plugin'){
+             $_REQUEST['type'] = 'package';
+             $url_next = 'packages_reset.php'.zi_form_querystr();
+         }
+         
+         header('Location: '.$url_next);
+         exit;
+     }
+     
  	// plugin library
  	require_once 'ZZOSS_Plugin/Plugin.php';
***************
*** 49,66 ****
          //echo 'settings: '.$app_settings['application_root'];
          
!         if($pkg_type == 'plugin'){
!             // Location of plugins runtime environment
!             $pkgs_root = $zi_registry->getApplicationPath().'plugins_re'.DIRECTORY_SEPARATOR;
          } else {
!             $pkgs_root = $app_settings['application_root'];
          }
          
-         $queue = $zi_registry->getPackagesQueue();
          include_once 'ZZOSS_Plugin/Plugin.php';
          $plugin = new ZZOSS_Plugin;
          $plugin->setDestDir($pkgs_root);
          
-         // Location where plugins store their data
-         $pkgs_data = $zi_registry->getApplicationPath().'data'.DIRECTORY_SEPARATOR.$pkg_type.DIRECTORY_SEPARATOR;
          if(!is_dir($pkgs_data)){
              System::mkdir(array('-p', $pkgs_data));
--- 91,117 ----
          //echo 'settings: '.$app_settings['application_root'];
          
!         if(!isset($_REQUEST['package'])){
!             if($pkg_type == 'plugin'){
!                 // Location of plugins runtime environment
!                 $pkgs_root = $zi_registry->getApplicationPath().'plugins_re'.DIRECTORY_SEPARATOR;
!             } else {
!                 $pkgs_root = $app_settings['application_root'];
!             }
!             // Location where plugins store their data
!             $pkgs_data = $zi_registry->getApplicationPath().'data'.DIRECTORY_SEPARATOR.$pkg_type.DIRECTORY_SEPARATOR;
!             $queue = $zi_registry->getPackagesQueue();
          } else {
!             if(!$plugin_dev = $zi_registry->getPluginsDev($_REQUEST['package'])){
!                 PEAR::raiseError('No settings for plugin \''.$_REQUEST['package'].'\'');
!             }
!             $pkgs_root = $plugin_dev['install_dir'];
!             $pkgs_data = $plugin_dev['data_dir'];
!             $queue = array(0 => array($_REQUEST['package'] => $plugin_dev['action']));
          }
          
          include_once 'ZZOSS_Plugin/Plugin.php';
          $plugin = new ZZOSS_Plugin;
          $plugin->setDestDir($pkgs_root);
          
          if(!is_dir($pkgs_data)){
              System::mkdir(array('-p', $pkgs_data));
***************
*** 118,126 ****
      }
  	*/
-     $pkg_type = 'package';
-     if(isset($_REQUEST['type'])){
-         $pkg_type = $_REQUEST['type'];
-     }
-     $zi_registry->setPackageType($pkg_type);
      
      // Create the install destination directory.
--- 169,172 ----
***************
*** 128,173 ****
      //echo 'settings: '.$app_settings['application_root'];
      
!     if($pkg_type == 'plugin'){
!         // Location of plugins runtime environment
!         $pkgs_root = $zi_registry->getApplicationPath().'plugins_re'.DIRECTORY_SEPARATOR;
      } else {
!         $pkgs_root = $app_settings['application_root'];
      }
      
-     $queue = $zi_registry->getPackagesQueue();
      $plugin = new ZZOSS_Plugin;
      $plugin->setDestDir($pkgs_root);
      
      // Location where plugins store their data
!     $pkgs_data = $zi_registry->getApplicationPath().'data'.DIRECTORY_SEPARATOR.$pkg_type.DIRECTORY_SEPARATOR;
      if(!is_dir($pkgs_data)){
          System::mkdir(array('-p', $pkgs_data));
      }
      $plugin->setDataDir($pkgs_data);
      
!     if(isset($app_settings['source_1'])){
!         $plugin->setSource($app_settings['source_1']);
!     }
!     if(isset($app_settings['source_2'])){
!         $plugin->setSource($app_settings['source_2']);
!     }
!     if(isset($app_settings['source_3'])){
!         $plugin->setSource($app_settings['source_3']);
!     }
!     if(isset($app_settings['source_4'])){
!         $plugin->setSource($app_settings['source_4']);
!     }
!     if(isset($app_settings['source_5'])){
!         $plugin->setSource($app_settings['source_5']);
      }
      $plugin->setSource($zi_registry->getApplicationPath().DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR);
      $plugin->setQueue($queue);
      $plugin->setRegistry($zi_registry);
!     $plugin->exec('build', $_REQUEST["step"], 'pre');
      
!     // write installation log
!     $fp = fopen($zi_registry->getApplicationPath().'installer'.DIRECTORY_SEPARATOR.'packages.log',"a");
!     fputs($fp,$plugin->getLog());
!     fclose($fp);
      
  	$step = $_REQUEST["step"];
--- 174,241 ----
      //echo 'settings: '.$app_settings['application_root'];
      
!     if(!isset($_REQUEST['package'])){
!         if($pkg_type == 'plugin'){
!             // Location of plugins runtime environment
!             $pkgs_root = $zi_registry->getApplicationPath().'plugins_re'.DIRECTORY_SEPARATOR;
!         } else {
!             $pkgs_root = $app_settings['application_root'];
!         }
!         // Location where plugins store their data
!         $pkgs_data = $zi_registry->getApplicationPath().'data'.DIRECTORY_SEPARATOR.$pkg_type.DIRECTORY_SEPARATOR;
!         $queue = $zi_registry->getPackagesQueue();
      } else {
!         if(!$plugin_dev = $zi_registry->getPluginsDev($_REQUEST['package'])){
!             PEAR::raiseError('No settings for plugin \''.$_REQUEST['package'].'\'');
!         }
!         $pkgs_root = $plugin_dev['install_dir'];
!         // Location where plugins store their data
!         $pkgs_data = $plugin_dev['data_dir'];
!         $queue = array(0 => array($_REQUEST['package'] => $plugin_dev['action']));
!         $_REQUEST["step"] = 0;
      }
      
      $plugin = new ZZOSS_Plugin;
      $plugin->setDestDir($pkgs_root);
      
      // Location where plugins store their data
!     
      if(!is_dir($pkgs_data)){
          System::mkdir(array('-p', $pkgs_data));
      }
+     
      $plugin->setDataDir($pkgs_data);
      
!     if(!isset($_REQUEST['package'])){
!         if(isset($app_settings['source_1'])){
!             $plugin->setSource($app_settings['source_1']);
!         }
!         if(isset($app_settings['source_2'])){
!             $plugin->setSource($app_settings['source_2']);
!         }
!         if(isset($app_settings['source_3'])){
!             $plugin->setSource($app_settings['source_3']);
!         }
!         if(isset($app_settings['source_4'])){
!             $plugin->setSource($app_settings['source_4']);
!         }
!         if(isset($app_settings['source_5'])){
!             $plugin->setSource($app_settings['source_5']);
!         }
      }
      $plugin->setSource($zi_registry->getApplicationPath().DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR);
      $plugin->setQueue($queue);
      $plugin->setRegistry($zi_registry);
!     if(!isset($_REQUEST['package'])){
!         $plugin->exec('build', $_REQUEST["step"], 'pre');
!     } else {
!         $plugin->exec('build', 0, 'pre', $_REQUEST['package'], $plugin_dev['build_dir']);
!     }
      
!     if(!isset($_REQUEST['package'])){
!         // write installation log
!         $fp = fopen($zi_registry->getApplicationPath().'installer'.DIRECTORY_SEPARATOR.'packages.log',"a");
!         fputs($fp,$plugin->getLog());
!         fclose($fp);
!     }
      
  	$step = $_REQUEST["step"];
***************
*** 177,181 ****
  	} else {
          if(isset($_REQUEST['type']) && $_REQUEST['type'] == 'plugin'){
!             $url_next = 'packages.php'.zi_form_querystr();
          } else {
              $url_next = 'application_done.php'.zi_form_querystr();
--- 245,256 ----
  	} else {
          if(isset($_REQUEST['type']) && $_REQUEST['type'] == 'plugin'){
!             if(!isset($_REQUEST['package'])){
!                 $_REQUEST['type'] = 'package';
!                 $url_next = 'packages_reset.php'.zi_form_querystr();
!                 $_REQUEST['type'] = 'plugin';
!             } else {
!                 $zi_buttons['back'] = 'dev_plugin.php'.zi_form_querystr();
!                 $url_next = $_SERVER['PHP_SELF'].zi_form_querystr();
!             }
          } else {
              $url_next = 'application_done.php'.zi_form_querystr();
***************
*** 188,196 ****
  
  	// if nothing is there to configure post a message
! 	if(!strlen($plugin->getOutput())) {
  		// maybe some plugin just want to exec ...
  		zi_process();
  		header('Location: '.$url_next);
! 	} else {
  		include 'themes/'.$GLOBALS['ZI']['theme'].'/header.php';
          $application = $zi_registry->getApplication();
--- 263,272 ----
  
  	// if nothing is there to configure post a message
! 	if(!isset($_REQUEST['package']) && !strlen($plugin->getOutput())) {
  		// maybe some plugin just want to exec ...
  		zi_process();
  		header('Location: '.$url_next);
!         exit;
! 	} elseif(!isset($_REQUEST['package']) && strlen($plugin->getOutput())) {
  		include 'themes/'.$GLOBALS['ZI']['theme'].'/header.php';
          $application = $zi_registry->getApplication();
***************
*** 207,210 ****
  		$zi_buttons['next'] = $url_next;
  		include 'themes/'.$GLOBALS['ZI']['theme'].'/footer.php';
! 	}
  ?>
\ No newline at end of file
--- 283,301 ----
  		$zi_buttons['next'] = $url_next;
  		include 'themes/'.$GLOBALS['ZI']['theme'].'/footer.php';
! 	} else {
!         include 'themes/'.$GLOBALS['ZI']['theme'].'/header.php';
!         $application = $zi_registry->getApplication();
! 		?>
! 		<a name="top"></a>
! 		<h1>Build Package</h1>
!         
!         <h2><a href="info.php?mode=<?php echo $_REQUEST['mode']; ?>&type=application&distribution=<?php echo $_REQUEST['distribution']; ?>" onclick="javascript:window.open('info.php?mode=<?php echo $_REQUEST['mode']; ?>&type=application&distribution=<?php echo $_REQUEST['distribution']; ?>', 'ApplicationInformation', 'width=500,height=500,resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,dependent=0');void(0);javascript:return(false);" target="_blank" title="<?php echo $application["summary"].' '.$application['release']['version']; ?>"><?php echo $application["summary"].' '.$application['release']['version']; ?></a></h2>
!         <pre><?php echo $plugin->getLog(); ?></pre>
! 		<?php echo $plugin->getOutput(); ?>
! 		<input type="hidden" name="step" value="<?php echo $_REQUEST["step"]; ?>">
! 		<a name="bottom"></a>
! 		<?php
! 		$zi_buttons['reload'] = $url_next;
! 		include 'themes/'.$GLOBALS['ZI']['theme'].'/footer.php';
!     }
  ?>
\ No newline at end of file



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click