Changeset 221
- Timestamp:
- 08/21/07 00:57:09 (1 year ago)
- Files:
-
- trunk/INSTALL.UNIX (modified) (1 diff)
- trunk/INSTALL.WIN32 (modified) (1 diff)
- trunk/classes/phing/Phing.php (modified) (13 diffs)
- trunk/classes/phing/listener/AnsiColorLogger.php (modified) (1 diff)
- trunk/classes/phing/listener/DefaultLogger.php (modified) (5 diffs)
- trunk/classes/phing/listener/NoBannerLogger.php (modified) (1 diff)
- trunk/classes/phing/system/io/BufferedWriter.php (modified) (1 diff)
- trunk/classes/phing/system/util/Properties.php (modified) (1 diff)
- trunk/classes/phing/tasks/ext/CreoleSQLExecTask.php (modified) (4 diffs)
- trunk/classes/phing/tasks/ext/PDOSQLExecTask.php (modified) (4 diffs)
- trunk/classes/phing/tasks/system/CvsPassTask.php (modified) (1 diff)
- trunk/classes/phing/tasks/system/CvsTask.php (modified) (1 diff)
- trunk/classes/phing/types/Commandline.php (modified) (1 diff)
- trunk/docs/phing_guide/book/chapters/Setup.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/INSTALL.UNIX
r123 r221 15 15 16 16 At this point we assume you have a running Linux or other UNIX dialect with 17 a properly installed release of PHP 5.0.1+. You need the CLI version of PHP,17 a properly installed release of PHP 5.0.2+. You need the CLI version of PHP, 18 18 since there is no WEB-Application for Phing provided, and the ISAPI module 19 19 will not work on command line. The PHP binary must have compiled-in XML trunk/INSTALL.WIN32
r123 r221 13 13 14 14 At this point we assume you have a running Windows NT/2000/XP system 15 running and you properly installed PHP 5.0.1+. Windows 9x versions will15 running and you properly installed PHP 5.0.2+. Windows 9x versions will 16 16 probably work, but are not supported. Make sure that XSL is enabled (e.g. 17 17 enable php_xsl.dll in your php.ini file) if you want to perform builds trunk/classes/phing/Phing.php
r218 r221 406 406 407 407 if ($filename !== null && self::$msgOutputLevel >= Project::MSG_VERBOSE) { 408 self::$out->write("Searching in $filename" . self::getProperty("line.separator"));408 self::$out->write("Searching in $filename" . PHP_EOL); 409 409 } 410 410 … … 428 428 private function _findBuildFile($start, $suffix) { 429 429 if (self::$msgOutputLevel >= Project::MSG_INFO) { 430 self::$out->write("Searching for $suffix ..." . self::getProperty("line.separator"));430 self::$out->write("Searching for $suffix ..." . PHP_EOL); 431 431 } 432 432 $startf = new PhingFile($start); … … 731 731 /** Prints the usage of how to use this class */ 732 732 public static function printUsage() { 733 $lSep = self::getProperty("line.separator");733 734 734 $msg = ""; 735 $msg .= "phing [options] [target [target2 [target3] ...]]" . $lSep;736 $msg .= "Options: " . $lSep;737 $msg .= " -h -help print this message" . $lSep;738 $msg .= " -l -list list available targets in this project" . $lSep;739 $msg .= " -v -version print the version information and exit" . $lSep;740 $msg .= " -q -quiet be extra quiet" . $lSep;741 $msg .= " -verbose be extra verbose" . $lSep;742 $msg .= " -debug print debugging information" . $lSep;743 $msg .= " -logfile <file> use given file for log" . $lSep;744 $msg .= " -logger <classname> the class which is to perform logging" . $lSep;745 $msg .= " -f -buildfile <file> use given buildfile" . $lSep;746 $msg .= " -D<property>=<value> use value for given property" . $lSep;747 $msg .= " -find <file> search for buildfile towards the root of the" . $lSep;748 $msg .= " filesystem and use it" . $lSep;749 //$msg .= " -recursive <file> search for buildfile downwards and use it" . $lSep;750 $msg .= $lSep;751 $msg .= "Report bugs to <dev@phing.tigris.org>". $lSep;735 $msg .= "phing [options] [target [target2 [target3] ...]]" . PHP_EOL; 736 $msg .= "Options: " . PHP_EOL; 737 $msg .= " -h -help print this message" . PHP_EOL; 738 $msg .= " -l -list list available targets in this project" . PHP_EOL; 739 $msg .= " -v -version print the version information and exit" . PHP_EOL; 740 $msg .= " -q -quiet be extra quiet" . PHP_EOL; 741 $msg .= " -verbose be extra verbose" . PHP_EOL; 742 $msg .= " -debug print debugging information" . PHP_EOL; 743 $msg .= " -logfile <file> use given file for log" . PHP_EOL; 744 $msg .= " -logger <classname> the class which is to perform logging" . PHP_EOL; 745 $msg .= " -f -buildfile <file> use given buildfile" . PHP_EOL; 746 $msg .= " -D<property>=<value> use value for given property" . PHP_EOL; 747 $msg .= " -find <file> search for buildfile towards the root of the" . PHP_EOL; 748 $msg .= " filesystem and use it" . PHP_EOL; 749 //$msg .= " -recursive <file> search for buildfile downwards and use it" . PHP_EOL; 750 $msg .= PHP_EOL; 751 $msg .= "Report bugs to <dev@phing.tigris.org>".PHP_EOL; 752 752 self::$err->write($msg); 753 753 } … … 757 757 */ 758 758 public static function printVersion() { 759 self::$out->write(self::getPhingVersion(). self::getProperty("line.separator"));759 self::$out->write(self::getPhingVersion().PHP_EOL); 760 760 } 761 761 … … 789 789 public static function printDescription(Project $project) { 790 790 if ($project->getDescription() !== null) { 791 self::$out->write($project->getDescription() . self::getProperty("line.separator"));791 self::$out->write($project->getDescription() . PHP_EOL); 792 792 } 793 793 } … … 871 871 */ 872 872 private function _printTargets($names, $descriptions, $heading, $maxlen) { 873 $lSep = self::getProperty("line.separator");873 874 874 $spaces = ' '; 875 875 while (strlen($spaces) < $maxlen) { … … 877 877 } 878 878 $msg = ""; 879 $msg .= $heading . $lSep;880 $msg .= str_repeat("-",79) . $lSep;879 $msg .= $heading . PHP_EOL; 880 $msg .= str_repeat("-",79) . PHP_EOL; 881 881 882 882 $total = count($names); … … 888 888 $msg .= $descriptions[$i]; 889 889 } 890 $msg .= $lSep;890 $msg .= PHP_EOL; 891 891 } 892 892 if ($total > 0) { 893 self::$out->write($msg . $lSep);893 self::$out->write($msg . PHP_EOL); 894 894 } 895 895 } … … 959 959 // really where speed matters more. 960 960 961 $curr_parts = explode(PATH_SEPARATOR, ini_get('include_path'));961 $curr_parts = explode(PATH_SEPARATOR, get_include_path()); 962 962 $add_parts = explode(PATH_SEPARATOR, $classpath); 963 963 $new_parts = array_diff($add_parts, $curr_parts); 964 964 if ($new_parts) { 965 ini_set('include_path',implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)));965 set_include_path(implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts))); 966 966 } 967 967 } … … 986 986 987 987 if (self::$importPaths === null) { 988 $paths = ini_get("include_path");988 $paths = get_include_path(); 989 989 self::$importPaths = explode(PATH_SEPARATOR, ini_get("include_path")); 990 990 } … … 1080 1080 self::setProperty('user.home', getenv('HOME')); 1081 1081 self::setProperty('application.startdir', getcwd()); 1082 self::setProperty('line.separator', "\n");1083 1082 1084 1083 // try to detect machine dependent information … … 1130 1129 /** 1131 1130 * Returns property value for a System property. 1132 * System properties are "global" properties like line.separator,1131 * System properties are "global" properties like application.startdir, 1133 1132 * and user.dir. Many of these correspond to similar properties in Java 1134 1133 * or Ant. … … 1180 1179 1181 1180 if (defined('PHP_CLASSPATH')) { 1182 $success = ini_set('include_path',PHP_CLASSPATH);1181 $success = set_include_path(PHP_CLASSPATH); 1183 1182 } else { 1184 1183 // don't do anything, just assume that include_path has been properly set. trunk/classes/phing/listener/AnsiColorLogger.php
r147 r221 229 229 } 230 230 231 $stream->write($message . $this->lSep);231 $stream->write($message . PHP_EOL); 232 232 } 233 233 } trunk/classes/phing/listener/DefaultLogger.php
r147 r221 55 55 */ 56 56 protected $startTime; 57 58 /**59 * Char that should be used to seperate lines. Default is the system60 * property <em>line.seperator</em>.61 * @var string62 */63 protected $lSep;64 57 65 58 /** … … 77 70 */ 78 71 public function __construct() { 79 $this->lSep = Phing::getProperty("line.separator");72 80 73 } 81 74 … … 148 141 $error = $event->getException(); 149 142 if ($error === null) { 150 $msg = $this->lSep . $this->getBuildSuccessfulMessage() . $this->lSep;143 $msg = PHP_EOL . $this->getBuildSuccessfulMessage() . PHP_EOL; 151 144 } else { 152 $msg = $this->lSep . $this->getBuildFailedMessage() . $this->lSep;145 $msg = PHP_EOL . $this->getBuildFailedMessage() . PHP_EOL; 153 146 if (Project::MSG_VERBOSE <= $this->msgOutputLevel || !($error instanceof BuildException)) { 154 $msg .= $error->__toString(). $this->lSep;147 $msg .= $error->__toString().PHP_EOL; 155 148 } else { 156 149 $msg .= $error->getMessage(); 157 150 } 158 151 } 159 $msg .= $this->lSep . "Total time: " .self::formatTime(Phing::currentTimeMillis() - $this->startTime) . $this->lSep;152 $msg .= PHP_EOL . "Total time: " .self::formatTime(Phing::currentTimeMillis() - $this->startTime) . PHP_EOL; 160 153 161 154 if ($error === null) { … … 191 184 public function targetStarted(BuildEvent $event) { 192 185 if (Project::MSG_INFO <= $this->msgOutputLevel) { 193 $msg = $this->lSep . $event->getProject()->getName() . ' > ' . $event->getTarget()->getName() . ':' . $this->lSep;186 $msg = PHP_EOL . $event->getProject()->getName() . ' > ' . $event->getTarget()->getName() . ':' . PHP_EOL; 194 187 $this->printMessage($msg, $this->out, $event->getPriority()); 195 188 } … … 281 274 */ 282 275 protected function printMessage($message, OutputStream $stream, $priority) { 283 $stream->write($message . $this->lSep);276 $stream->write($message . PHP_EOL); 284 277 } 285 278 } trunk/classes/phing/listener/NoBannerLogger.php
r147 r221 50 50 51 51 if ($this->targetName !== null) { 52 $msg = $this->lSep . $event->getProject()->getName() . ' > ' . $this->targetName . ':' . $this->lSep;52 $msg = PHP_EOL . $event->getProject()->getName() . ' > ' . $this->targetName . ':' . PHP_EOL; 53 53 $this->printMessage($msg, $this->out, $event->getPriority()); 54 54 $this->targetName = null; trunk/classes/phing/system/io/BufferedWriter.php
r147 r221 51 51 52 52 public function newLine() { 53 $this->write(P hing::getProperty('line.separator'));53 $this->write(PHP_EOL); 54 54 } 55 55 trunk/classes/phing/system/util/Properties.php
r147 r221 156 156 $fw = new FileWriter($file); 157 157 if ($header !== null) { 158 $fw->write( "# " . $header . P hing::getProperty("line.separator"));158 $fw->write( "# " . $header . PHP_EOL ); 159 159 } 160 160 $fw->write($this->toString()); trunk/classes/phing/tasks/ext/CreoleSQLExecTask.php
r144 r221 474 474 */ 475 475 protected function printResults($out = null) { 476 $lSep = Phing::getProperty('line.separator');476 477 477 $rs = null; 478 478 do { … … 500 500 $out->newLine(); 501 501 } else { 502 print($line. $lSep);502 print($line.PHP_EOL); 503 503 } 504 504 $line = ""; … … 525 525 $out->newLine(); 526 526 } else { 527 print($line . $lSep);527 print($line . PHP_EOL); 528 528 } 529 529 $line = ""; … … 532 532 } 533 533 } while ($this->statement->getMoreResults()); 534 print( $lSep);534 print(PHP_EOL); 535 535 if ($out !== null) $out->newLine(); 536 536 } trunk/classes/phing/tasks/ext/PDOSQLExecTask.php
r144 r221 449 449 */ 450 450 protected function printResults($out = null) { 451 $lSep = Phing::getProperty('line.separator'); 451 452 452 $rs = null; 453 453 … … 472 472 $out->newLine(); 473 473 } else { 474 print($line. $lSep);474 print($line.PHP_EOL); 475 475 } 476 476 $line = ""; … … 497 497 $out->newLine(); 498 498 } else { 499 print($line . $lSep);499 print($line . PHP_EOL); 500 500 } 501 501 $line = ""; … … 504 504 } 505 505 506 print( $lSep);506 print(PHP_EOL); 507 507 if ($out !== null) $out->newLine(); 508 508 } trunk/classes/phing/tasks/system/CvsPassTask.php
r144 r221 101 101 while (($line = $reader->readLine()) !== null) { 102 102 if (!StringHelper::startsWith($this->cvsRoot, $line)) { 103 $buf .= $line . P hing::getProperty("line.separator");103 $buf .= $line . PHP_EOL; 104 104 } 105 105 } trunk/classes/phing/tasks/system/CvsTask.php
r144 r221 209 209 throw new BuildException("cvs exited with error code " 210 210 . $retCode 211 . P hing::getProperty("line.separator")211 . PHP_EOL 212 212 . "Command line was [" 213 213 . $toExecute->describeCommand() . "]", $this->getLocation()); trunk/classes/phing/types/Commandline.php
r123 r221 358 358 $buf .= "s"; 359 359 } 360 $buf .= ":" . P hing::getProperty("line.separator");360 $buf .= ":" . PHP_EOL; 361 361 for ($i = $offset, $alen=count($args); $i < $alen; $i++) { 362 $buf .= "'" . $args[$i] . "'" . P hing::getProperty("line.separator");362 $buf .= "'" . $args[$i] . "'" . PHP_EOL; 363 363 } 364 364 $buf .= self::DISCLAIMER; trunk/docs/phing_guide/book/chapters/Setup.html
r214 r221 58 58 <tbody> 59 59 <tr> 60 <td>PHP 5.0. 1+</td>60 <td>PHP 5.0.2+</td> 61 61 <td>Execution</td> 62 62 <td><a href="http://www.php.net">http://www.php.net</a></td> … … 68 68 </tr> 69 69 <tr> 70 <td>Xdebug 2.0.0 b2+</td>70 <td>Xdebug 2.0.0+</td> 71 71 <td>Additional functionality</td> 72 72 <td><a href="http://www.xdebug.org">http://www.xdebug.org</a></td>
