Changeset 17384

Show
Ignore:
Timestamp:
25.09.2008 12:23:09 (11 years ago)
Author:
oranfry
Message:

better way of checking component sizes and doing the replacements

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml

    r17309 r17384  
    1515        <echo>Calculating the size of some components</echo> 
    1616 
    17         <!-- core greenstone2 system (keep in sync with installer build.xml files) --> 
    18         <length property="component.bytesize.core" mode="all"> 
    19             <fileset dir="${basedir}/distributions/web" includes="gli/**/*,bin/**/*,cgi-bin/**/*,etc/**/*,mappings/**/*,images/**/*,perllib/**/*,indexers/**/*,macros/**/*,collect/**/*"/> 
    20         </length> 
     17        <!-- core greenstone2 system --> 
     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 
    24         <!-- source code (keep in sync with installer build.xml files) --> 
    25         <length property="component.bytesize.sourcecode" mode="all"> 
    26             <fileset dir="${basedir}/distributions/web" includes="common-src/**/*,runtime-src/**/*build-src/**/*,packages/**/*"/> 
    27         </length> 
     22        <!-- source code --> 
     23        <length property="component.bytesize.sourcecode" mode="all"><fileset file="${basedir}/components/sourcecode.comp"/></length> 
    2824        <math result="component.megabytesize.sourcecode" operand1="${component.bytesize.sourcecode}" operation="/" operand2="1048576" datatype="int"/> 
    2925        <property name="component.size.sourcecode" value="${component.megabytesize.sourcecode} MB"/> 
    30  
    31         <!-- show the calculated sizes --> 
    32         <echo>component.size.core: ${component.size.core}</echo> 
    33         <echo>component.size.sourcecode: ${component.size.sourcecode}</echo> 
    34         <if> 
    35             <bool><equals arg1="windows" arg2="${rk.os}"/></bool> 
    36             <echo>component.size.windows-java: ${component.size.windows-java}</echo> 
    37         <else><if> 
    38             <bool><equals arg1="linux" arg2="${rk.os}"/></bool> 
    39             <echo>component.size.linux-java: ${component.size.linux-java}</echo> 
    40             </if></else> 
    41         </if> 
    42  
     26         
     27        <!-- imagemagick --> 
     28        <length property="component.bytesize.imagemagick" mode="all"><fileset file="${basedir}/components/imagemagick.comp"/></length> 
     29        <math result="component.megabytesize.imagemagick" operand1="${component.bytesize.imagemagick}" operation="/" operand2="1048576" datatype="int"/> 
     30        <property name="component.size.imagemagick" value="${component.megabytesize.imagemagick} MB"/> 
     31         
     32        <!-- ghostscript --> 
     33        <length property="component.bytesize.ghostscript" mode="all"><fileset file="${basedir}/components/ghostscript.comp"/></length> 
     34        <math result="component.megabytesize.ghostscript" operand1="${component.bytesize.ghostscript}" operation="/" operand2="1048576" datatype="int"/> 
     35        <property name="component.size.ghostscript" value="${component.megabytesize.ghostscript} MB"/> 
     36         
    4337        <!-- put the concrete values of things in the config --> 
    4438        <rsr file="${basedir}/installer/antinstall-config.xml"> 
     
    4842            <job pattern="@component.size.linux-java@" replacement="${component.size.linux-java}"/> 
    4943            <job pattern="@component.size.windows-java@" replacement="${component.size.windows-java}"/> 
     44            <job pattern="@component.size.imagemagick@" replacement="${component.size.imagemagick}"/> 
     45            <job pattern="@component.size.ghostscript@" replacement="${component.size.ghostscript}"/> 
    5046        </rsr> 
    5147 
     
    5349            <job pattern="@version@" replacement="${version}"/> 
    5450            <job pattern="@java.min.version@" replacement="${java.min.version}"/> 
     51            <job pattern="@windows-java.extracted@" replacement="${windows-java.extracted}"/> 
     52            <job pattern="@linux-java.extracted@" replacement="${linux-java.extracted}"/> 
    5553        </rsr> 
    5654 
     
    6058            <job pattern="@version@" replacement="${version}"/> 
    6159            <job pattern="@java.min.version@" replacement="${java.min.version}"/> 
     60            <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/> 
     61            <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/> 
     62            <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/> 
     63            <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/> 
    6264        </rsr> 
     65 
    6366        <!-- chinese --> 
    6467        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties"> 
    6568            <job pattern="@version@" replacement="${version}"/> 
    6669            <job pattern="@java.min.version@" replacement="${java.min.version}"/> 
     70            <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/> 
     71            <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/> 
     72            <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/> 
     73            <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/> 
    6774        </rsr> 
    68  
    69         <!-- os specific replacements --> 
    70         <if> 
    71             <bool><equals arg1="windows" arg2="${rk.os}"/></bool> 
    72             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/> 
    73             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/> 
    74             <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${windows-java.extracted}"/> 
    75  
    76         <else><if> 
    77             <bool><equals arg1="linux" arg2="${rk.os}"/></bool> 
    78             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/> 
    79             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/> 
    80             <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/> 
    81  
    82             </if></else> 
    83  
    84         </if> 
    8575 
    8676    </target>