Ignore:
Timestamp:
2009-06-26T16:18:44+12:00 (15 years ago)
Author:
oranfry
Message:

it's all good stuff

File:
1 edited

Legend:

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

    r19901 r19935  
    152152    <target name="compile-binary-installer">
    153153
    154         <copy file="installer/antinstall-config.xml" tofile="installer/antinstall-config-binary.xml"/>
    155         <dcff file="installer/antinstall-config-binary.xml" startTag=".*&lt;!-- start source release --&gt;.*" endTag=".*&lt;!-- end source release --&gt;.*" />
     154        <copy file="installer/antinstall-config.xml" tofile="installer/antinstall-config-binary.xml" overwrite="true"/>
    156155        <dcff file="installer/antinstall-config-binary.xml" startTag=".*&lt;!-- start cdrom --&gt;.*" endTag=".*&lt;!-- end cdrom --&gt;.*" />
    157156
    158         <copy file="installer/build.xml" tofile="installer/build-binary.xml"/>
     157        <copy file="installer/build.xml" tofile="installer/build-binary.xml" overwrite="true"/>
    159158        <dcff file="installer/build-binary.xml" startTag=".*&lt;!-- start cdrom --&gt;.*" endTag=".*&lt;!-- end cdrom --&gt;.*" />
    160159
     
    170169
    171170            <zipfileset dir="installer/classes" includes="**/*" />
    172             <zipfileset dir="components" includes="*.lzma" excludes="source-release.lzma" />
     171            <zipfileset dir="components" includes="*.lzma"/>
    173172
    174173        </installer>
     
    179178
    180179        <copy file="installer/antinstall-config.xml" tofile="installer/antinstall-config-cdrom.xml"/>
    181         <dcff file="installer/antinstall-config-cdrom.xml" startTag=".*&lt;!-- start source release --&gt;.*" endTag=".*&lt;!-- end source release --&gt;.*" />
    182180        <dcff file="installer/antinstall-config-cdrom.xml" startTag=".*&lt;!-- start web --&gt;.*" endTag=".*&lt;!-- end web --&gt;.*" />
    183181
     
    199197    </target>
    200198
    201     <target name="compile-minimal-installer">
    202    
    203         <copy file="${basedir}/installer/antinstall-config.xml" tofile="${basedir}/installer/antinstall-config-minimal.xml"/>
    204         <dcff file="${basedir}/installer/antinstall-config-minimal.xml" startTag=".*&lt;!-- start source release --&gt;.*" endTag=".*&lt;!-- end source release --&gt;.*" />
    205         <dcff file="${basedir}/installer/antinstall-config-minimal.xml" startTag=".*&lt;!-- start bundled components --&gt;.*" endTag=".*&lt;!-- end bundled components --&gt;.*" />
    206         <installer file="${basedir}/installer/Greenstone-${version}-${os.suffix}-minimal.jar"
    207             compress="true"
    208             extractType="NonExtractor"
    209             installConfig="${basedir}/installer/antinstall-config-minimal.xml"
    210             buildFile="${basedir}/installer/build.xml"
    211             antInstallLib="${rk.home}/core/ant-installer/lib"
    212             antLib="${rk.home}/core/ant/lib"
    213             validateConfig="true"
    214             icons="bluecurve">
    215            
    216             <zipfileset dir="${basedir}/installer/classes" includes="**/*" />
    217             <zipfileset dir="${basedir}/components" includes="core.lzma" />
    218         </installer>
    219        
    220     </target>
    221 
    222     <target name="compile-source-installer">
    223 
    224         <copy file="${basedir}/installer/antinstall-config.xml" tofile="${basedir}/installer/antinstall-config-source.xml"/>
    225         <dcff file="${basedir}/installer/antinstall-config-source.xml" startTag=".*&lt;!-- start binary release --&gt;.*" endTag=".*&lt;!-- end binary release --&gt;.*" />
    226 
    227         <installer file="${basedir}/installer/Greenstone-${version}-${os.suffix}-source.jar"
    228             compress="true"
    229             extractType="NonExtractor"
    230             installConfig="${basedir}/installer/antinstall-config-source.xml"
    231             buildFile="${basedir}/installer/build.xml"
    232             antInstallLib="${rk.home}/core/ant-installer/lib"
    233             antLib="${rk.home}/core/ant/lib"
    234             validateConfig="true"
    235             icons="bluecurve">
    236            
    237             <zipfileset dir="${basedir}/installer/classes" includes="**/*" />
    238             <zipfileset dir="${basedir}/components" includes="source-release.lzma" />
    239         </installer>
    240 
    241     </target>
    242 
    243     <!-- fork the web distribution to preserve a source release -->
    244     <target name="copy-web-to-source">
    245         <copy todir="distributions/source"><fileset dir="distributions/web"/></copy>
    246     </target>
    247 
    248199    <target name="copy-main-installer-files">
    249200
    250201        <mkdir dir="${basedir}/installer/classes"/>
    251 
    252         <!-- the installer descriptors -->
    253         <copy todir="${basedir}/installer" file="${rk.home}/installer/antinstall-config.xml" overwrite="true" />
    254         <copy todir="${basedir}/installer" file="${rk.home}/installer/build.xml" overwrite="true" />
    255202
    256203        <!-- the language bundle -->
     
    288235        <property name="component.size.core" value="${component.megabytesize.core} MB"/>
    289236
    290         <!-- sourcecode core -->
    291         <length property="component.bytesize.sourcecode-core" mode="all"><fileset file="${basedir}/components/sourcecode-core.comp"/></length>
    292         <math result="component.megabytesize.sourcecode-core" operand1="${component.bytesize.sourcecode-core}" operation="/" operand2="1048576" datatype="int"/>
    293         <property name="component.size.sourcecode-core" value="${component.megabytesize.sourcecode-core} MB"/>
    294 
    295         <!-- sourcecode -->
    296         <length property="component.bytesize.sourcecode" mode="all"><fileset file="${basedir}/components/sourcecode.comp"/></length>
    297         <math result="component.megabytesize.sourcecode" operand1="${component.bytesize.sourcecode}" operation="/" operand2="1048576" datatype="int"/>
    298         <property name="component.size.sourcecode" value="${component.megabytesize.sourcecode} MB"/>
    299 
    300237        <!-- imagemagick -->
    301238        <length property="component.bytesize.imagemagick" mode="all"><fileset file="${basedir}/components/imagemagick.comp"/></length>
     
    317254        <math result="component.megabytesize.ant" operand1="${component.bytesize.ant}" operation="/" operand2="1048576" datatype="int"/>
    318255        <property name="component.size.ant" value="${component.megabytesize.ant} MB"/>
     256
     257        <!-- make the installer descriptors relevant to the current os -->
     258        <dcff file="installer/antinstall-config.xml" startTag=".*&lt;!--\s*if\s*(?!.*${rk.os}).*--&gt;.*" endTag=".*&lt;!--\s*/if\s*--&gt;.*" />
     259        <dcff file="installer/build.xml" startTag=".*&lt;!--\s*if\s*(?!.*${rk.os}).*--&gt;.*" endTag=".*&lt;!--\s*/if\s*--&gt;.*" />
    319260
    320261        <!-- put the concrete values of things in the config -->
     
    323264            <job pattern="@version@" replacement="${version}"/>
    324265            <job pattern="@component.size.core@" replacement="${component.size.core}"/>
    325             <job pattern="@component.size.sourcecode-core@" replacement="${component.size.sourcecode-core}"/>
    326             <job pattern="@component.size.sourcecode@" replacement="${component.size.sourcecode}"/>
    327266            <job pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/>
    328267            <job pattern="@component.size.ant@" replacement="${component.size.ant}"/>
     
    381320    </target>
    382321
    383     <!-- create the zipped up binary release from the web distribution -->
    384     <target name="compress-zipped-binary-release">
    385         <mkdir dir="products"/>
    386         <if>
    387             <bool><equals arg1="zip" arg2="${format}"/></bool>
    388             <zip destfile="products/Greenstone-${version}-${os.suffix}-binary.zip" basedir="distributions" includes="Greenstone-${version}-${os.suffix}-binary/**/*" compress="true"/>
    389             <else>
    390                 <exec dir="distributions" executable="tar">
    391                     <arg line="-czf ../products/Greenstone-${version}-${os.suffix}-binary.tar.gz Greenstone-${version}-${os.suffix}-binary"/>
    392                 </exec>
    393             </else>
    394         </if>
    395     </target>
    396 
    397322    <!-- unzip windows perl into bin/windows of the given gsdl or gs2build -->
    398323    <target name="insert-windows-perl">
     
    402327    </target>
    403328
    404     <!-- targets all or selected intermediate files of the release -->
    405     <target name="erase">
    406         <antcall target="erase-compiled"/>
    407         <antcall target="erase-distribution"/>
    408         <antcall target="erase-components"/>
    409         <antcall target="erase-installer"/>
    410         <antcall target="erase-wrapped-installer"/>
    411     </target>
    412 
    413     <target name="erase-compiled">
    414         <delete dir="compiled"/>
    415     </target>
    416 
    417     <target name="erase-distribution">
    418         <delete dir="distributions"/>
    419     </target>
    420 
    421     <target name="erase-components">
    422         <delete dir="components"/>
    423     </target>
    424 
    425     <target name="erase-installer">
    426         <delete dir="installer"/>
    427     </target>
    428 
    429     <target name="erase-wrapped-installer">
    430         <delete dir="wrapped-installer"/>
     329    <target name="copy-compiled-to-dist">
     330
     331        <!-- windows -->
     332        <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
     333            <delete dir="distributions/web"/>
     334            <mkdir dir="distributions"/>
     335            <copy todir="distributions/web">
     336                <fileset dir="compiled" includes="**/*"/>
     337            </copy>
     338
     339        <!-- linux, mac -->
     340        <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
     341            <delete dir="distributions/web"/>
     342            <mkdir dir="distributions"/>
     343            <exec executable="cp"><arg line="-r compiled distributions/web"/></exec>
     344
     345        <!-- else fail -->
     346        <else>
     347            <fail>this target does not support the current os</fail>
     348
     349        </else></if></else></if>
     350
    431351    </target>
    432352
Note: See TracChangeset for help on using the changeset viewer.