[zi-cvs] packages/com.zzoss.installer.lib Registry.php,1.26,1.27 Utils.php,1.6,1.7
Sandro Zic <[email protected]> Sat, 03 Apr 2004 16:15:49 +0000
| Newsgroups | gmane.comp.php.zzoss.installer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/zzossinstaller/packages/com.zzoss.installer.lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28439/com.zzoss.installer.lib
Modified Files:
Registry.php Utils.php
Log Message:
make instant bundle work
Index: Utils.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.installer.lib/Utils.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Utils.php 23 Mar 2004 15:14:48 -0000 1.6
--- Utils.php 3 Apr 2004 16:15:47 -0000 1.7
***************
*** 204,229 ****
! function copy_rec($src, $dest, $recursive = true, $overwrite = true, $ignore_list = array()){
! //$CMD = 'mv '.$src.' '.$dest;
! //exec($CMD);
! //echo $src.' -> '.$dest.'<br/>';
! ZZOSS_InstallerUtils::mkdir($dest);
! $handle = opendir($src);
! while ($file = readdir($handle)){
! if(!in_array(strtolower($file), $ignore_list)) {
! $src_file = $src.$file;
! //echo ' -> ';
! $dest_file = $dest.$file;
! //echo '<br/>';
! if ($recursive && is_dir($src_file) && $file !="." && $file != "..")
! if (!ZZOSS_InstallerUtils::copy_rec($src_file.DIRECTORY_SEPARATOR, $dest_file.DIRECTORY_SEPARATOR,$recursive, $overwrite, $ignore_list))
! return false;
! if (is_file($src_file) && ($overwrite || !file_exists($dest_file)))
! if (!copy($src_file, $dest_file))
! return false;
! }
! }
! closedir($handle);
! return true;
}
--- 204,230 ----
! function copy_rec($src, $dest, $recursive = true, $overwrite = true, $ignore_list = array())
! {
! //$CMD = 'mv '.$src.' '.$dest;
! //exec($CMD);
! //echo $src.' -> '.$dest.'<br/>';
! ZZOSS_InstallerUtils::mkdir($dest);
! $handle = opendir($src);
! while ($file = readdir($handle)){
! if(!in_array(strtolower($file), $ignore_list)) {
! $src_file = $src.$file;
! //echo ' -> ';
! $dest_file = $dest.$file;
! //echo '<br/>';
! if ($recursive && is_dir($src_file) && $file !="." && $file != "..")
! if (!ZZOSS_InstallerUtils::copy_rec($src_file.DIRECTORY_SEPARATOR, $dest_file.DIRECTORY_SEPARATOR,$recursive, $overwrite, $ignore_list))
! return false;
! if (is_file($src_file) && ($overwrite || !file_exists($dest_file)))
! if (!copy($src_file, $dest_file))
! return false;
! }
! }
! closedir($handle);
! return true;
}
Index: Registry.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.installer.lib/Registry.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** Registry.php 1 Apr 2004 18:59:04 -0000 1.26
--- Registry.php 3 Apr 2004 16:15:46 -0000 1.27
***************
*** 715,720 ****
}
! $application = $this->getApplicationById($id);
! $file = $application["install"]["path"].'installer'.DIRECTORY_SEPARATOR.'application_settings.reg';
if(file_exists($file)) {
$old_settings = ZZOSS_InstallerUtils::unserializeFromFile( $file );
--- 715,720 ----
}
! //$application = $this->getApplicationById($id);
! $file = $this->getApplicationPath().'installer'.DIRECTORY_SEPARATOR.'application_settings.reg';
if(file_exists($file)) {
$old_settings = ZZOSS_InstallerUtils::unserializeFromFile( $file );
***************
*** 734,739 ****
}
! $application = $this->getApplication();
! $file = $application["install"]["path"].'installer'.DIRECTORY_SEPARATOR.'application_settings.reg';
if(file_exists($file)) {
$old_settings = ZZOSS_InstallerUtils::unserializeFromFile( $file );
--- 734,739 ----
}
! //$application = $this->getApplication();
! $file = $this->getApplicationPath().'installer'.DIRECTORY_SEPARATOR.'application_settings.reg';
if(file_exists($file)) {
$old_settings = ZZOSS_InstallerUtils::unserializeFromFile( $file );
***************
*** 750,755 ****
}
! $application = $this->getApplicationById($id);
! $file = $application["install"]["path"].'installer'.DIRECTORY_SEPARATOR.'application_settings.reg';
if(file_exists($file)){
return ZZOSS_InstallerUtils::unserializeFromFile( $file );
--- 750,755 ----
}
! //$application = $this->getApplicationById($id);
! $file = $this->getApplicationPath().'installer'.DIRECTORY_SEPARATOR.'application_settings.reg';
if(file_exists($file)){
return ZZOSS_InstallerUtils::unserializeFromFile( $file );
***************
*** 1011,1015 ****
// has something changed in the directory where we store installed packages?
$pkgs_installed_dir = $this->application_path.$this->package_type.'s_installed'.DIRECTORY_SEPARATOR;
! if(is_dir($pkgs_installed_dir) && filemtime($pkgs_installed_dir) > $pkgs_reg_mtime){
if(ZZOSS_INSTALLER_REGISTRY_DEBUG){
ZZOSS_Debug::log('ZZOSS_Registry', 'Package registry is old; checked filemtime: '.filemtime($pkgs_installed_dir.'.').'('.$pkgs_installed_dir.') > '.$pkgs_reg_mtime.'?', __FILE__, __LINE__, __FUNCTION__, __CLASS__);
--- 1011,1015 ----
// has something changed in the directory where we store installed packages?
$pkgs_installed_dir = $this->application_path.$this->package_type.'s_installed'.DIRECTORY_SEPARATOR;
! if(is_dir($pkgs_installed_dir) && filemtime($pkgs_installed_dir.'.') > $pkgs_reg_mtime){
if(ZZOSS_INSTALLER_REGISTRY_DEBUG){
ZZOSS_Debug::log('ZZOSS_Registry', 'Package registry is old; checked filemtime: '.filemtime($pkgs_installed_dir.'.').'('.$pkgs_installed_dir.') > '.$pkgs_reg_mtime.'?', __FILE__, __LINE__, __FUNCTION__, __CLASS__);
***************
*** 1891,1897 ****
}
! function setProcedures($procedure, $ident = '')
{
! ZZOSS_InstallerUtils::serializeToFile( $this->application_path.'installer'.DIRECTORY_SEPARATOR.'procedures'.$ident.'.reg', $procedure );
}
--- 1891,1907 ----
}
! function setProcedures($procedure, $ident = '', $application = NULL, $distribution = NULL)
{
! if(!is_null($distribution)){
! $this->setDistribution($distribution);
! }
! if(!is_null($application)){
! $this->setApplication($application);
! }
! $procedures_reg = $this->application_path.'installer'.DIRECTORY_SEPARATOR.'procedures'.$ident.'.reg';
! if(file_exists($procedures_reg)){
! unlink($procedures_reg);
! }
! ZZOSS_InstallerUtils::serializeToFile( $procedures_reg, $procedure );
}
-------------------------------------------------------
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