Changeset 17372


Ignore:
Timestamp:
09/25/08 10:41:07 (12 years ago)
Author:
oranfry
Message:

work out sizes of components and do replacements in a better way

File:
1 edited

Legend:

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

    r17340 r17372  
    1616
    1717        <!-- core greenstone3 system (keep in sync with installer build.xml files) -->
    18         <length property="component.bytesize.core" mode="all">
    19             <fileset dir="${basedir}/distribution/greenstone3" includes="bin/**/*,docs/**/*,gli/**/*,gs2build/**/*,lib/**/*,web/**/*,resources/**/*,winutil/**/*"/>
    20         </length>
     18        <length property="component.bytesize.core" mode="all"><fileset file="${basedir}/components/core.comp"/></length>
    2119        <math result="component.megabytesize.core" operand1="${component.bytesize.core}" operation="/" operand2="1048576" datatype="int"/>
    2220        <property name="component.size.core" value="${component.megabytesize.core} MB"/>
    2321
    2422        <!-- source code (keep in sync with installer build.xml files) -->
    25         <length property="component.bytesize.sourcecode" mode="all"><fileset dir="${basedir}/distribution/greenstone3" includes="src/**/*"/></length>
     23        <length property="component.bytesize.sourcecode" mode="all"><fileset file="${basedir}/components/sourcecode.comp"/></length>
    2624        <math result="component.megabytesize.sourcecode" operand1="${component.bytesize.sourcecode}" operation="/" operand2="1048576" datatype="int"/>
    2725        <property name="component.size.sourcecode" value="${component.megabytesize.sourcecode} MB"/>
    2826
    2927        <!-- tomcat -->
    30         <length property="component.bytesize.tomcat" mode="all"><fileset dir="${basedir}/distribution/greenstone3" includes="packages/tomcat/**/*"/></length>
     28        <length property="component.bytesize.tomcat" mode="all"><fileset file="${basedir}/components/tomcat.comp"/></length>
    3129        <math result="component.megabytesize.tomcat" operand1="${component.bytesize.tomcat}" operation="/" operand2="1048576" datatype="int"/>
    3230        <property name="component.size.tomcat" value="${component.megabytesize.tomcat} MB"/>
    3331
    3432        <!-- ant -->
    35         <length property="component.bytesize.ant" mode="all"><fileset dir="${basedir}/distribution/greenstone3" includes="packages/ant/**/*"/></length>
     33        <length property="component.bytesize.ant" mode="all"><fileset file="${basedir}/components/ant.comp"/></length>
    3634        <math result="component.megabytesize.ant" operand1="${component.bytesize.ant}" operation="/" operand2="1048576" datatype="int"/>
    3735        <property name="component.size.ant" value="${component.megabytesize.ant} MB"/>
    3836
     37        <!-- imagemagick -->
     38        <length property="component.bytesize.imagemagick" mode="all"><fileset file="${basedir}/components/imagemagick.comp"/></length>
     39        <math result="component.megabytesize.imagemagick" operand1="${component.bytesize.imagemagick}" operation="/" operand2="1048576" datatype="int"/>
     40        <property name="component.size.imagemagick" value="${component.megabytesize.imagemagick} MB"/>
     41
     42        <!-- ghostscript -->
     43        <length property="component.bytesize.ghostscript" mode="all"><fileset file="${basedir}/components/ghostscript.comp"/></length>
     44        <math result="component.megabytesize.ghostscript" operand1="${component.bytesize.ghostscript}" operation="/" operand2="1048576" datatype="int"/>
     45        <property name="component.size.ghostscript" value="${component.megabytesize.ghostscript} MB"/>
     46
     47       
    3948        <!-- show the calculated sizes -->
    4049        <echo>component.size.core: ${component.size.core}</echo>
     
    4251        <echo>component.size.tomcat: ${component.size.tomcat}</echo>
    4352        <echo>component.size.ant: ${component.size.ant}</echo>
     53        <echo>component.size.imagemagick: ${component.size.imagemagick}</echo>
     54        <echo>component.size.ghostscript: ${component.size.ghostscript}</echo>
    4455        <if>
    4556            <bool><equals arg1="windows" arg2="${rk.os}"/></bool>
     
    5768            <job pattern="@component.size.core@" replacement="${component.size.core}"/>
    5869            <job pattern="@component.size.sourcecode@" replacement="${component.size.sourcecode}"/>
     70            <job pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/>
     71            <job pattern="@component.size.ant@" replacement="${component.size.ant}"/>
     72            <job pattern="@component.size.imagemagick@" replacement="${component.size.imagemagick}"/>
     73            <job pattern="@component.size.ghostscript@" replacement="${component.size.ghostscript}"/>
    5974            <job pattern="@component.size.linux-java@" replacement="${component.size.linux-java}"/>
    6075            <job pattern="@component.size.windows-java@" replacement="${component.size.windows-java}"/>
    61             <job pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/>
    62             <job pattern="@component.size.ant@" replacement="${component.size.ant}"/>
    6376        </rsr>
    6477
     
    6679            <job pattern="@version@" replacement="${version}"/>
    6780            <job pattern="@java.min.version@" replacement="${java.min.version}"/>
     81            <job pattern="@windows-java.extracted@" replacement="${windows-java.extracted}"/>
     82            <job pattern="@linux-java.extracted@" replacement="${linux-java.extracted}"/>
    6883        </rsr>
    6984
     
    7590            <job pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
    7691            <job pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
     92            <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/>
     93            <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/>
     94            <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/>
     95            <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/>
    7796        </rsr>
    7897
     
    83102            <job pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
    84103            <job pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
     104            <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/>
     105            <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/>
     106            <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/>
     107            <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/>
    85108        </rsr>
    86 
    87         <!-- os specific replacements -->
    88         <if>
    89             <bool><equals arg1="windows" arg2="${rk.os}"/></bool>
    90             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
    91             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
    92             <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${windows-java.extracted}"/>
    93 
    94         <else><if>
    95             <bool><equals arg1="linux" arg2="${rk.os}"/></bool>
    96             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/>
    97             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/>
    98             <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/>
    99 
    100             </if></else>
    101 
    102         </if>
    103109
    104110    </target>
Note: See TracChangeset for help on using the changeset viewer.