Changeset 19979

Show
Ignore:
Timestamp:
09.07.2009 12:18:25 (10 years ago)
Author:
oranfry
Message:

generalised targets for preparing and compressing components

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml

    r19956 r19979  
    201201    </target> 
    202202 
     203 
     204    <!-- prepare the component named in ${component} --> 
     205    <target name="prepare-component"> 
     206        <!-- delete old stuff to create new components 
     207        <delete dir="components/tmp/${component}" quiet="true"/> 
     208        <mkdir dir="components/tmp/${component}"/> 
     209         
     210        <copy todir="components/tmp/${component}" overwrite="true"> 
     211            <fileset dir="distributions/web"> 
     212                <patternset refid="greenstone3.${component}.component"/> 
     213            </fileset> 
     214        </copy> 
     215        --> 
     216 
     217        <zip destfile="components/${component}.comp" compress="false"> 
     218                        <zipfileset dir="distributions/web"> 
     219                                <patternset refid="greenstone3.${component}.component"/> 
     220                        </zipfileset> 
     221        </zip> 
     222    </target>    
     223 
     224    <target name="compress-component"> 
     225        <!-- windows --> 
     226        <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
     227            <exec executable="${rk.home}/windows/7za/7za.exe" dir="components"><arg line="a -t7z -mx=9 ${component}.lzma ${component}.comp"/></exec> 
     228         
     229        <!-- linux, mac --> 
     230        <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 
     231            <sevenzip task="encode" input="components/${component}.comp" output="components/${component}.lzma" dictionnary="26"/> 
     232 
     233        <!-- else warn --> 
     234        <else> 
     235            <fail>this target does not support this os (was a new release-kit os added?)</fail> 
     236 
     237        </else></if></else></if> 
     238    </target> 
    203239     
     240 
    204241</project>