Changeset 830
- Timestamp:
- 08/14/07 22:07:49 (1 year ago)
- Files:
-
- trunk/build/stubbles/build.xml (modified) (2 diffs)
- trunk/src/main/php/info/phing/tasks/stubStarWriterTask.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build/stubbles/build.xml
r788 r830 143 143 <echo message="Base directory : ${project.basedir}"/> 144 144 <echo message="Source directory: ${build.src.dir}"/> 145 <buildStar version="${version}" buildPath="${build.src.dir}/lib"> 145 <php expression="file_get_contents('${project.basedir}/../../src/main/php/net/stubbles/stubClassLoader.php')" returnProperty="stubClassLoader"/> 146 <buildStar buildPath="${build.src.dir}/lib/stubbles.php" 147 version="${version}" 148 title="Stubbles" 149 package="net.stubbles" 150 author="Stubbles Development Team <http://stubbles.net>" 151 copyright="Stubbles Development Team" 152 preface="<?php require 'star://' . __FILE__ . '?net.stubbles.star.StarClassRegistry'; ?>${stubClassLoader}"> 146 153 <starDecorator starId="xsl/master.xsl" dir="${project.basedir}" class="MasterXslStarFile" /> 147 154 <fileset dir="${project.basedir}/../../src/main"> … … 149 156 <include name="**/*.xml" /> 150 157 <include name="**/*.xsl" /> 151 <exclude name="**/star/**" /> 158 <exclude name="**/star/StarArchive.php" /> 159 <include name="**/star/StarClassRegistry.php" /> 160 <exclude name="**/star/StarConsole.php" /> 161 <exclude name="**/star/StarException.php" /> 162 <exclude name="**/star/StarFile.php" /> 163 <exclude name="**/star/StarStreamWrapper.php" /> 164 <exclude name="**/star/StarWriter.php" /> 152 165 <exclude name="**/de/**" /> 153 166 <exclude name="**/examples/**" /> trunk/src/main/php/info/phing/tasks/stubStarWriterTask.php
r610 r830 7 7 * @subpackage phing 8 8 */ 9 10 9 /** 11 10 * Uses the Phing Task 12 11 */ 13 12 require_once 'phing/Task.php'; 14 15 13 /** 16 14 * Uses stubbles star classes … … 29 27 class stubStarWriterTask extends Task 30 28 { 31 /** 29 /** 30 * the title meta information 31 * 32 * @var string 33 */ 34 protected $title = ''; 35 /** 32 36 * version to create 33 37 * 34 38 * @var string 35 39 */ 36 protected $version; 40 protected $version = ''; 41 /** 42 * the package meta information 43 * 44 * @var string 45 */ 46 protected $package = ''; 47 /** 48 * the author meta information 49 * 50 * @var string 51 */ 52 protected $author = ''; 53 /** 54 * the copyright meta information 55 * 56 * @var string 57 */ 58 protected $copyright = ''; 59 /** 60 * the preface to add to the star file 61 * 62 * @var string 63 */ 64 protected $preface = null; 37 65 /** 38 66 * the path to put the star archive into … … 55 83 56 84 /** 57 * set the version number 85 * sets the title 86 * 87 * @param string $title 88 */ 89 public function setTitle($title) 90 { 91 $this->title = $title; 92 } 93 94 /** 95 * sets the version number 58 96 * 59 97 * @param string $version … … 62 100 { 63 101 $this->version = $version; 102 } 103 104 /** 105 * sets the package 106 * 107 * @param string $package 108 */ 109 public function setPackage($package) 110 { 111 $this->package = $package; 112 } 113 114 /** 115 * sets the author 116 * 117 * @param string $author 118 */ 119 public function setAuthor($author) 120 { 121 $this->author = $author; 122 } 123 124 /** 125 * sets the copyright 126 * 127 * @param string $copyright 128 */ 129 public function setCopyright($copyright) 130 { 131 $this->copyright = $copyright; 132 } 133 134 /** 135 * sets the preface 136 * 137 * @param string $preface 138 */ 139 public function setPreface($preface) 140 { 141 $this->preface = $preface; 64 142 } 65 143 … … 114 192 } 115 193 116 $starArchive = new StarArchive(new StarWriter($this->buildPath . '/stubbles.php'));194 $starArchive = new StarArchive(new StarWriter($this->buildPath)); 117 195 foreach($this->filesets as $fs) { 118 196 try { … … 153 231 } 154 232 155 $starArchive->add(new StarFile(stubConfig::getSourcePath() . '/php/net/stubbles/star/StarClassRegistry.php', stubConfig::getSourcePath() . '/php'), 'net.stubbles.star.StarClassRegistry'); 156 $preface = "<?php require 'star://' . __FILE__ . '?net.stubbles.star.StarClassRegistry'; ?>" . file_get_contents(stubConfig::getSourcePath() . '/php/net/stubbles/stubClassLoader.php'); 157 $starArchive->setPreface($preface); 158 $starArchive->addMetaData('title', 'Stubbles'); 159 $starArchive->addMetaData('package', 'net.stubbles'); 233 if (null != $this->preface) { 234 $starArchive->setPreface($this->preface); 235 } 236 237 $starArchive->addMetaData('title', $this->title); 238 $starArchive->addMetaData('package', $this->package); 160 239 $starArchive->addMetaData('version', $this->version); 161 $starArchive->addMetaData('author', 'Stubbles Development Team <http://stubbles.net>');162 $starArchive->addMetaData('copyright', '(c) ' . date('Y') . ' Stubbles Development Team');240 $starArchive->addMetaData('author', $this->author); 241 $starArchive->addMetaData('copyright', '(c) ' . date('Y') . ' ' . $this->copyright); 163 242 $starArchive->create(); 164 243 }
