Changeset 20532 for release-kits


Ignore:
Timestamp:
2009-09-07T09:54:30+12:00 (15 years ago)
Author:
oranfry
Message:

moved targets for preparing and compressing components to the fully shared area from greenstone3 shared area, and create a target to create the minimal distribution

Location:
release-kits/shared
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release-kits/shared/core/ant-scripts/init.xml

    r20337 r20532  
    485485    </target>
    486486
     487    <!-- prepare the component named in ${component} -->
     488    <target name="prepare-component">
     489        <mkdir dir="components"/>
     490        <zip destfile="components/${component}.comp" compress="false">
     491            <zipfileset dir="distributions/web">
     492                <patternset refid="greenstone${version.major}.${component}.component"/>
     493            </zipfileset>
     494        </zip>
     495    </target>   
     496
     497    <!-- compress the component named in ${component} -->
     498    <target name="compress-component">
     499        <!-- windows -->
     500        <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
     501            <exec executable="${rk.home}/windows/7za/7za.exe" dir="components"><arg line="a -t7z -mx=9 ${component}.lzma ${component}.comp"/></exec>
     502       
     503        <!-- linux, mac -->
     504        <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
     505            <sevenzip task="encode" input="components/${component}.comp" output="components/${component}.lzma" dictionnary="26"/>
     506
     507        <!-- else warn -->
     508        <else>
     509            <fail>this target does not support this os (was a new release-kit os added?)</fail>
     510
     511        </else></if></else></if>
     512    </target>
     513
     514
     515    <target name="create-minimal-distribution">
     516
     517        <property name="dist.name" value="Greenstone-${version}-${os.suffix}-minimal"/>
     518
     519        <!-- unzip the core component to a temporary space -->
     520        <mkdir dir="minimal-dist/${dist.name}"/>
     521        <unzip src="components/core.comp" dest="minimal-dist/${dist.name}"/>
     522
     523        <!-- under windows, create zip-->
     524        <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
     525            <zip destfile="products/${dist.name}.zip" basedir="minimal-dist"/>
     526        <!-- under unix, create tar.gz -->
     527        <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
     528            <exec dir="." executable="tar">
     529                <arg value="-czf"/><arg value="products/${dist.name}.tar.gz"/>
     530                <arg value="minimal-dist"/>
     531            </exec>
     532        </if></else></if>
     533           
     534
     535        </if>
     536    </target>
     537
    487538
    488539</project>
  • release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml

    r20337 r20532  
    200200    </target>
    201201
    202 
    203     <!-- prepare the component named in ${component} -->
    204     <target name="prepare-component">
    205         <mkdir dir="components"/>
    206         <zip destfile="components/${component}.comp" compress="false">
    207             <zipfileset dir="distributions/web">
    208                 <patternset refid="greenstone3.${component}.component"/>
    209             </zipfileset>
    210         </zip>
    211     </target>   
    212 
    213     <target name="compress-component">
    214         <!-- windows -->
    215         <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
    216             <exec executable="${rk.home}/windows/7za/7za.exe" dir="components"><arg line="a -t7z -mx=9 ${component}.lzma ${component}.comp"/></exec>
    217        
    218         <!-- linux, mac -->
    219         <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
    220             <sevenzip task="encode" input="components/${component}.comp" output="components/${component}.lzma" dictionnary="26"/>
    221 
    222         <!-- else warn -->
    223         <else>
    224             <fail>this target does not support this os (was a new release-kit os added?)</fail>
    225 
    226         </else></if></else></if>
    227     </target>
    228 
    229202    <target name="insert-windows-icon">
    230203        <copy
Note: See TracChangeset for help on using the changeset viewer.