diff --git a/Build/build.xml b/Build/build.xml index 125b8084..cd357351 100644 --- a/Build/build.xml +++ b/Build/build.xml @@ -1,7 +1,7 @@ - + filesets[$num-1]; } - function main() { + function main() { if ($this->destinationFile === null || empty($this->filesets)) { throw new BuildException("You must specify a file or fileset(s) for the task."); } - + // compile a list of all files to add to the file, both file attrib and fileset elements // can be used. $files = array(); @@ -43,27 +43,27 @@ } catch (BuildException $be) { $this->log($be->getMessage(), Project::MSG_WARN); } - } + } } - + $objZip = new ZipArchive(); if ($objZip->open($this->destinationFile, ZIPARCHIVE::OVERWRITE) !== true) { throw new Exeption("Could not open " . $strResultingFile . " for writing!"); } - + $this->log("Creating ZIP archive of " . count($files) . " files..."); foreach($files as $file) { $this->log("Processing file " . $this->_cleanFileName($file) . " ..."); $contents = file_get_contents($file); $objZip->addFromString( $this->_cleanFileName($file), $contents ); - } - + } + $objZip->close(); - + $this->log("Created ZIP archive " . $this->destinationFile . '.'); } - + /** * Cleanup a filename * @@ -74,17 +74,17 @@ $strFile = str_replace('../', '', $strFile); $strFile = str_replace('.\\build\\', '', $strFile); $strFile = str_replace('WINDOWS', '', $strFile); - + while (preg_match('/\/\//i', $strFile)) { $strFile = str_replace('//', '/', $strFile); } - + return $strFile; } } ]]> - + @@ -99,7 +99,7 @@ - + @@ -107,14 +107,21 @@ - + + + + + + + + - + @@ -162,7 +169,7 @@ - + @@ -176,9 +183,9 @@ - + - + PHPExcel PHP Excel classes @@ -194,7 +201,7 @@ - data + data @@ -210,8 +217,16 @@ - + + + + + + + + + \ No newline at end of file