Changeset 1683 for forge

Show
Ignore:
Timestamp:
07/06/08 20:37:23 (5 months ago)
Author:
mikey
Message:

made org::stubbles::star::StarClassRegistry? part of the preface, starReader is therefore not a star file anymore
remove org::stubbles::star::StarStreamWrapper? and org::stubbles::star::StarException? from distribution, not required anymore as content of starReader.php can now be used as preface
raised version number to 0.8.0

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • forge/star/VERSION

    r1681 r1683  
    1 0.7.1 
     10.8.0 
  • forge/star/build.xml

    r1679 r1683  
    11<?xml version="1.0" encoding="utf-8"?> 
    22<project name="star" basedir="." default="main"> 
    3   <property name="pkg.dir" value="src/main/php/org/stubbles/star" /> 
     3  <property name="pkg.dir" value="src/main/php/org/stubbles/star"/> 
    44  <property name="pkg.name" value="star-${version}"/> 
    55  <property name="build.src.dir" value="build/${pkg.name}"/> 
     
    2323    <echo>-----------------------------</echo> 
    2424    <delete dir="${build.src.dir}"/> 
    25     <copy file="${pkg.dir}/StarStreamWrapper.php" tofile="${build.src.dir}/StarStreamWrapper.php" /> 
    26     <copy file="${pkg.dir}/StarException.php" tofile="${build.src.dir}/StarException.php" /> 
    27     <copy file="LICENSE" tofile="${build.src.dir}/LICENSE" /> 
     25    <copy file="LICENSE" tofile="${build.src.dir}/LICENSE"/> 
    2826    <append destFile="${build.src.dir}/VERSION">star version ${version}</append> 
    2927  </target> 
     
    3331    <echo>| Creating star files       |</echo> 
    3432    <echo>-----------------------------</echo> 
    35     <exec command="php &quot;build.php&quot; -i &quot;src/main/resources/build/compile-writer-archive.ini&quot; -t &quot;${build.src.dir}/starWriter.php&quot; -r &quot;${pkg.dir}&quot;" passthru="true" /> 
    36     <exec command="php &quot;build.php&quot; -i &quot;src/main/resources/build/compile-writer-cli.ini&quot; -t &quot;${build.src.dir}/starWriter-cli.php&quot; -r &quot;${pkg.dir}&quot;" passthru="true" /> 
    37     <exec command="php &quot;build.php&quot; -i &quot;src/main/resources/build/compile-reader.ini&quot; -t &quot;${build.src.dir}/starReader.php&quot; -r &quot;${pkg.dir}&quot;" passthru="true" /> 
     33    <php function="file_get_contents" returnProperty="StarStreamWrapper"> 
     34      <param value="src/main/php/org/stubbles/star/StarStreamWrapper.php"/> 
     35    </php> 
     36    <php function="file_get_contents" returnProperty="StarException"> 
     37      <param value="src/main/php/org/stubbles/star/StarException.php"/> 
     38    </php> 
     39    <php function="file_get_contents" returnProperty="StarClassRegistry"> 
     40      <param value="src/main/php/org/stubbles/star/StarClassRegistry.php"/> 
     41    </php> 
     42    <php function="file_put_contents"> 
     43      <param value="${build.src.dir}/starReader.php"/> 
     44      <param value="${StarStreamWrapper}${StarException}${StarClassRegistry}&lt;?php StarStreamWrapper::register(); ?&gt;"/> 
     45    </php> 
     46    <exec command="php &quot;build.php&quot; -i &quot;src/main/resources/build/compile-writer-archive.ini&quot; -t &quot;${build.src.dir}/starWriter.php&quot; -r &quot;${pkg.dir}&quot;" passthru="true"/> 
     47    <exec command="php &quot;build.php&quot; -i &quot;src/main/resources/build/compile-writer-cli.ini&quot; -t &quot;${build.src.dir}/starWriter-cli.php&quot; -r &quot;${pkg.dir}&quot;" passthru="true"/> 
    3848  </target> 
    3949 
     
    4353    <echo>-----------------------------</echo> 
    4454    <property name="tgzfile" value="build/${pkg.name}.tgz"/> 
    45     <delete    file="${tgzfile}"/> 
     55    <delete file="${tgzfile}"/> 
    4656    <tar compression="gzip" destFile="${tgzfile}" basedir="build"> 
    4757      <fileset dir="build"> 
    48       <include name="${pkg.name}/**" /> 
     58       <include name="${pkg.name}/**"/> 
    4959      </fileset> 
    5060    </tar> 
  • forge/star/src/main/php/org/stubbles/star/StarArchive.php

    r1681 r1683  
    125125        if (strlen($this->preface) > 0) { 
    126126            $preFace = ''; 
    127             if (true == $this->prependStreamWrapper) { 
     127            if (true === $this->prependStreamWrapper) { 
    128128                $dirname = str_replace('star://', '', dirname(__FILE__)); 
    129                 $preFace .= file_get_contents($dirname . '/StarStreamWrapper.php'); 
    130                 $preFace .= file_get_contents($dirname . '/StarException.php'); 
    131                 $preFace .= "<?php StarStreamWrapper::register(); ?>"; 
     129                if (file_exists($dirname . '/starReader.php') === true) { 
     130                    $preFace .= file_get_contents($dirname . '/starReader.php'); 
     131                } else { 
     132                    $preFace .= file_get_contents($dirname . '/StarStreamWrapper.php'); 
     133                    $preFace .= file_get_contents($dirname . '/StarException.php'); 
     134                    $preFace .= file_get_contents($dirname . '/StarClassRegistry.php'); 
     135                    $preFace .= "<?php StarStreamWrapper::register(); ?>"; 
     136                } 
    132137            } 
    133138            $preFace .= trim($this->preface) . "<?php __halt_compiler();"; 
  • forge/star/src/main/php/org/stubbles/star/StarClassRegistry.php

    r1514 r1683  
    153153 
    154154        if (count(self::$libPathes) == 0) { 
    155             if (substr(__FILE__, 0, 7) === 'star://') { 
    156                 $path = str_replace('star://', '', str_replace('?org::stubbles::star::StarClassRegistry', '', __FILE__)); 
    157                 self::$libPathes[dirname($path)] = true; 
    158             } elseif (class_exists('stubConfig', false) === true) { 
    159                 self::$libPathes[stubConfig::getLibPath()] = true; 
    160             } else { 
    161                 self::$libPathes[realpath(getcwd() . '/../lib')] = true; 
    162             } 
     155            self::$libPathes[dirname(__FILE__)] = true; 
    163156        } 
    164157 
  • forge/star/src/main/resources/build/compile-writer-archive.ini

    r1681 r1683  
    66org::stubbles::star::StarWriter="src/main/php/org/stubbles/star/StarWriter.php" 
    77org::stubbles::star::StarArchive="src/main/php/org/stubbles/star/StarArchive.php" 
    8 org::stubbles::star::StarClassRegistry="src/main/php/org/stubbles/star/StarClassRegistry.php" 
    98org::stubbles::star::StarConsole="src/main/php/org/stubbles/star/StarConsole.php" 
    109 
     
    1514title = "Stubbles Archive Writer" 
    1615package = "org::stubbles::star" 
    17 version = "0.7.1
     16version = "0.8.0
    1817author = "Stubbles Development Team <http://stubbles.net> 
    1918copyright = "© 2007-2008 Stubbles Development Team" 
  • forge/star/src/main/resources/build/compile-writer-cli.ini

    r1681 r1683  
    66org::stubbles::star::StarWriter="src/main/php/org/stubbles/star/StarWriter.php" 
    77org::stubbles::star::StarArchive="src/main/php/org/stubbles/star/StarArchive.php" 
    8 org::stubbles::star::StarClassRegistry="src/main/php/org/stubbles/star/StarClassRegistry.php" 
    98org::stubbles::star::StarConsole="src/main/php/org/stubbles/star/StarConsole.php" 
    109 
     
    1615title = "Stubbles Archive CLI Writer" 
    1716package = "org::stubbles::star" 
    18 version = "0.7.1
     17version = "0.8.0
    1918author = "Stubbles Development Team <http://stubbles.net> 
    2019copyright = "© 2007-2008 Stubbles Development Team" 
  • forge/star/src/main/resources/build/preface-writer.php

    r1679 r1683  
    33require 'star://' . __FILE__ . '?org::stubbles::star::StarWriter'; 
    44require 'star://' . __FILE__ . '?org::stubbles::star::StarArchive'; 
    5 require 'star://' . __FILE__ . '?org::stubbles::star::StarClassRegistry'; 
    65require 'star://' . __FILE__ . '?org::stubbles::star::StarConsole'; 
    76?>