[zi-cvs] packages/com.zzoss.zic.plugin.config install_form.php,1.2,1.3 install_process.php,1.3,1.4 package.xml,1.3,1.4

[email protected] Fri, 05 Mar 2004 06:25:27 -0800
Newsgroups gmane.comp.php.zzoss.installer.cvs
Message-ID <[email protected]>
Update of /cvsroot/zzossinstaller/packages/com.zzoss.zic.plugin.config
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8129/com.zzoss.zic.plugin.config

Modified Files:
	install_form.php install_process.php package.xml 
Log Message:
new plugin architecture in installer

Index: install_form.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic.plugin.config/install_form.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** install_form.php	4 Jan 2004 13:26:55 -0000	1.2
--- install_form.php	5 Mar 2004 14:25:25 -0000	1.3
***************
*** 31,36 ****
  		// search and replace config files
  		// compose replace array from user input
! 		$values = $_REQUEST['ZI_VALUES'];
! 		if(is_array($values) && count($values)){
  			foreach($values as $key => $val){
  				//echo $key.' = '.$val.'<br/>';
--- 31,37 ----
  		// search and replace config files
  		// compose replace array from user input
! 		
! 		if(isset($_REQUEST['ZI_VALUES']) && is_array($_REQUEST['ZI_VALUES']) && count($_REQUEST['ZI_VALUES'])){
!             $values = $_REQUEST['ZI_VALUES'];
  			foreach($values as $key => $val){
  				//echo $key.' = '.$val.'<br/>';

Index: install_process.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic.plugin.config/install_process.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** install_process.php	14 Jan 2004 15:42:45 -0000	1.3
--- install_process.php	5 Mar 2004 14:25:25 -0000	1.4
***************
*** 26,30 ****
      $GLOBALS['ZI']['plugin_log'] .= "Processing config builds.\n";
      
! 	if(!is_array($replace_values)){
  		// compose replace array
          $values = array();
--- 26,30 ----
      $GLOBALS['ZI']['plugin_log'] .= "Processing config builds.\n";
      
! 	if(!isset($replace_values)){
  		// compose replace array
          $values = array();
***************
*** 50,53 ****
--- 50,55 ----
              }
          }
+         
+         $replace_values['{zi_directory_separator}'] = DIRECTORY_SEPARATOR;
  	}
  	
***************
*** 89,93 ****
          require_once 'ZZOSS_File/Replace.php';
          $replace = new ZZOSS_FileReplace;
!         System::mkdir(array('-p', $GLOBALS['ZI']['plugin_data_dir']));
          
          foreach($build_files as $build_file){
--- 91,98 ----
          require_once 'ZZOSS_File/Replace.php';
          $replace = new ZZOSS_FileReplace;
!         
!         echo $pkg_data_dir = $GLOBALS['ZI']['plugin_data_dir'].DIRECTORY_SEPARATOR.$GLOBALS['ZI']['package_name'].DIRECTORY_SEPARATOR;
!         $GLOBALS['ZI']['plugin_log'] .= "Creating data dir '$pkg_data_dir'\n";
!         System::mkdir(array('-p', $pkg_data_dir));
          
          foreach($build_files as $build_file){
***************
*** 96,101 ****
              
              // Compose destination path.
!             if(!strlen($build_file['@']['baseinstalldir'])){
!                 $dest_dir = $GLOBALS['ZI']['plugin_data_dir'].$GLOBALS['ZI']['plugin_params']['name'].DIRECTORY_SEPARATOR.$GLOBALS['ZI']['package_name'].DIRECTORY_SEPARATOR;
              } else {
                  $dest_dir = $GLOBALS['ZI']['application_baseinstalldir'].$build_file['@']['baseinstalldir'].DIRECTORY_SEPARATOR;
--- 101,109 ----
              
              // Compose destination path.
!             if(!isset($build_file['@']['baseinstalldir'])){
!                 if(!isset($GLOBALS['ZI']['plugin_params']['name'])){
!                     $GLOBALS['ZI']['plugin_params']['name'] = '';
!                 }
!                 $dest_dir = $pkg_data_dir.$GLOBALS['ZI']['plugin_params']['name'].DIRECTORY_SEPARATOR;
              } else {
                  $dest_dir = $GLOBALS['ZI']['application_baseinstalldir'].$build_file['@']['baseinstalldir'].DIRECTORY_SEPARATOR;
***************
*** 103,107 ****
              
              // Compose file name to write out.
!             if(!strlen($build_file['@']['save-as'])){
                  $dest_file = ZZOSS_InstallerUtils::fixPath($dest_dir.$build_file['@']['name']);
              } else {
--- 111,115 ----
              
              // Compose file name to write out.
!             if(!isset($build_file['@']['save-as'])){
                  $dest_file = ZZOSS_InstallerUtils::fixPath($dest_dir.$build_file['@']['name']);
              } else {

Index: package.xml
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic.plugin.config/package.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** package.xml	14 Jan 2004 15:42:45 -0000	1.3
--- package.xml	5 Mar 2004 14:25:25 -0000	1.4
***************
*** 20,24 ****
      </maintainers>
      <release>
!         <version>1.1.0</version>
          <date>{zi_release_date}</date>
          <license url="http://www.gnu.org/licenses/lgpl.txt" version="2.1">LGPL</license>
--- 20,24 ----
      </maintainers>
      <release>
!         <version>2.0.0</version>
          <date>{zi_release_date}</date>
          <license url="http://www.gnu.org/licenses/lgpl.txt" version="2.1">LGPL</license>
***************
*** 26,29 ****
--- 26,32 ----
          <notes>
  <![CDATA[
+ - ready for new plugin architecture
+ - added filelist
+ - files are installed to directory named like package name
  - introduced build.xml descriptor
  - added lower case prefix, so now placeholders are detected with ZI_ and zi_ prefix
***************
*** 34,42 ****
              <holder year="2003-{zi_copyright_year}" url="http://www.zzoss.com">ZZ/OSS</holder>
          </copyright>
!         <plugin default="yes">
              <filelist>
                  <file role="install" name="install.php"/>
-                 <file name="install_form.php"/>
-                 <file name="install_process.php"/>
                  <file role="remove" name="remove.php"/>
              </filelist>
--- 37,49 ----
              <holder year="2003-{zi_copyright_year}" url="http://www.zzoss.com">ZZ/OSS</holder>
          </copyright>
!         <filelist>
!             <file baseinstalldir="com.zzoss.zic.plugin.config" name="install.php"/>
!             <file baseinstalldir="com.zzoss.zic.plugin.config" name="install_form.php"/>
!             <file baseinstalldir="com.zzoss.zic.plugin.config" name="install_process.php"/>
!             <file baseinstalldir="com.zzoss.zic.plugin.config" name="remove.php"/>
!         </filelist>
!         <plugin>
              <filelist>
                  <file role="install" name="install.php"/>
                  <file role="remove" name="remove.php"/>
              </filelist>



-------------------------------------------------------
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