Changeset 16738

Show
Ignore:
Timestamp:
13.08.2008 11:37:42 (11 years ago)
Author:
oranfry
Message:

changed the size calculation targets to fix a propagation problem

Files:
1 modified

Legend:

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

    r16682 r16738  
    1010<project name="rk3-targets"> 
    1111 
    12     <target name="calculate-component-sizes"> 
    13         <if><bool><istrue value="${execute}"/></bool> 
     12    <target name="make-installer-files-concrete"> 
    1413 
    15             <!-- calculate the size of some components --> 
    16             <echo>Calculating the size of some components</echo> 
     14        <!-- calculate the size of some components --> 
     15        <echo>Calculating the size of some components</echo> 
    1716 
    18             <!-- core greenstone3 system (keep in sync with installer build.xml files) --> 
    19             <length property="component.bytesize.core" mode="all"> 
    20                 <fileset dir="${basedir}/distribution/greenstone3" includes="bin/**/*,docs/**/*,gli/**/*,gs2build/**/*,lib/**/*,web/**/*,resources/**/*,winutil/**/*"/> 
    21             </length> 
    22             <math result="component.megabytesize.core" operand1="${component.bytesize.core}" operation="/" operand2="1048576" datatype="int"/> 
    23             <property name="component.size.core" value="${component.megabytesize.core} MB"/> 
     17        <!-- 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> 
     21        <math result="component.megabytesize.core" operand1="${component.bytesize.core}" operation="/" operand2="1048576" datatype="int"/> 
     22        <property name="component.size.core" value="${component.megabytesize.core} MB"/> 
    2423 
    25             <!-- source code (keep in sync with installer build.xml files) --> 
    26             <length property="component.bytesize.sourcecode" mode="all"><fileset dir="${basedir}/distribution/greenstone3" includes="src/**/*"/></length> 
    27             <math result="component.megabytesize.sourcecode" operand1="${component.bytesize.sourcecode}" operation="/" operand2="1048576" datatype="int"/> 
    28             <property name="component.size.sourcecode" value="${component.megabytesize.sourcecode} MB"/> 
     24        <!-- 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> 
     26        <math result="component.megabytesize.sourcecode" operand1="${component.bytesize.sourcecode}" operation="/" operand2="1048576" datatype="int"/> 
     27        <property name="component.size.sourcecode" value="${component.megabytesize.sourcecode} MB"/> 
    2928 
    30             <!-- tomcat --> 
    31             <length property="component.bytesize.tomcat" mode="all"><fileset dir="${basedir}/distribution/greenstone3" includes="packages/tomcat/**/*"/></length> 
    32             <math result="component.megabytesize.tomcat" operand1="${component.bytesize.tomcat}" operation="/" operand2="1048576" datatype="int"/> 
    33             <property name="component.size.tomcat" value="${component.megabytesize.tomcat} MB"/> 
     29        <!-- tomcat --> 
     30        <length property="component.bytesize.tomcat" mode="all"><fileset dir="${basedir}/distribution/greenstone3" includes="packages/tomcat/**/*"/></length> 
     31        <math result="component.megabytesize.tomcat" operand1="${component.bytesize.tomcat}" operation="/" operand2="1048576" datatype="int"/> 
     32        <property name="component.size.tomcat" value="${component.megabytesize.tomcat} MB"/> 
    3433 
    35             <!-- ant --> 
    36             <length property="component.bytesize.ant" mode="all"><fileset dir="${basedir}/distribution/greenstone3" includes="packages/ant/**/*"/></length> 
    37             <math result="component.megabytesize.ant" operand1="${component.bytesize.ant}" operation="/" operand2="1048576" datatype="int"/> 
    38             <property name="component.size.ant" value="${component.megabytesize.ant} MB"/> 
     34        <!-- ant --> 
     35        <length property="component.bytesize.ant" mode="all"><fileset dir="${basedir}/distribution/greenstone3" includes="packages/ant/**/*"/></length> 
     36        <math result="component.megabytesize.ant" operand1="${component.bytesize.ant}" operation="/" operand2="1048576" datatype="int"/> 
     37        <property name="component.size.ant" value="${component.megabytesize.ant} MB"/> 
    3938 
    40             <echo>component.size.core: ${component.size.core}</echo> 
    41             <echo>component.size.sourcecode: ${component.size.sourcecode}</echo> 
    42             <echo>component.size.tomcat: ${component.size.tomcat}</echo> 
    43             <echo>component.size.ant: ${component.size.ant}</echo> 
     39        <echo>component.size.core: ${component.size.core}</echo> 
     40        <echo>component.size.sourcecode: ${component.size.sourcecode}</echo> 
     41        <echo>component.size.tomcat: ${component.size.tomcat}</echo> 
     42        <echo>component.size.ant: ${component.size.ant}</echo> 
    4443 
    45             <if> 
    46                 <bool><equals arg1="windows" arg2="${rk.os}"/></bool> 
    47                 <echo>component.size.windows-java: ${component.size.windows-java}</echo> 
     44        <if> 
     45            <bool><equals arg1="windows" arg2="${rk.os}"/></bool> 
     46            <echo>component.size.windows-java: ${component.size.windows-java}</echo> 
    4847 
    49             <else><if> 
    50                 <bool><equals arg1="linux" arg2="${rk.os}"/></bool> 
    51                 <echo>component.size.linux-java: ${component.size.linux-java}</echo> 
     48        <else><if> 
     49            <bool><equals arg1="linux" arg2="${rk.os}"/></bool> 
     50            <echo>component.size.linux-java: ${component.size.linux-java}</echo> 
    5251 
    53                 </if></else> 
    54  
    55             </if> 
     52            </if></else> 
    5653 
    5754        </if> 
    58     </target> 
    5955 
    60     <target name="make-installer-files-concrete"> 
    61         <if><bool><istrue value="${execute}"/></bool> 
    6256 
    63             <echo>component.size.core: ${component.size.core}</echo> 
    64             <echo>component.size.sourcecode: ${component.size.sourcecode}</echo> 
    65             <echo>component.size.tomcat: ${component.size.tomcat}</echo> 
    66             <echo>component.size.ant: ${component.size.ant}</echo> 
     57        <!-- put the concrete values of things in the config --> 
     58        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/> 
     59        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.core@" replacement="${component.size.core}"/> 
     60        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.sourcecode@" replacement="${component.size.sourcecode}"/> 
     61        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.linux-java@" replacement="${component.size.linux-java}"/> 
     62        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.windows-java@" replacement="${component.size.windows-java}"/> 
     63        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/> 
     64        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.ant@" replacement="${component.size.ant}"/> 
    6765 
    68             <if> 
    69                 <bool><equals arg1="windows" arg2="${rk.os}"/></bool> 
    70                 <echo>component.size.windows-java: ${component.size.windows-java}</echo> 
     66        <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/> 
    7167 
    72             <else><if> 
    73                 <bool><equals arg1="linux" arg2="${rk.os}"/></bool> 
    74                 <echo>component.size.linux-java: ${component.size.linux-java}</echo> 
     68        <!-- put the concrete values of things in the text --> 
     69        <!-- default --> 
     70        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/> 
     71        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 
     72        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
     73        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
    7574 
    76                 </if></else> 
     75        <!-- chinese --> 
     76        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/> 
     77        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 
     78        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
     79        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
    7780 
    78             </if> 
     81        <!-- os specific replacements --> 
     82        <if> 
     83            <bool><equals arg1="windows" arg2="${rk.os}"/></bool> 
     84            <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/> 
     85            <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/> 
    7986 
    80             <!-- put the concrete values of things in the config --> 
    81             <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/> 
    82             <!--<rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.core@" replacement="${component.size.core}"/>--> 
    83             <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.sourcecode@" replacement="${component.size.sourcecode}"/> 
    84             <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.linux-java@" replacement="${component.size.linux-java}"/> 
    85             <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.windows-java@" replacement="${component.size.windows-java}"/> 
    86             <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/> 
    87             <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.ant@" replacement="${component.size.ant}"/> 
     87        <else><if> 
     88            <bool><equals arg1="linux" arg2="${rk.os}"/></bool> 
     89            <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/> 
     90            <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/> 
     91            <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/> 
    8892 
    89             <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/> 
    90  
    91             <!-- put the concrete values of things in the text --> 
    92             <!-- default --> 
    93             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/> 
    94             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 
    95             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
    96             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
    97  
    98             <!-- chinese --> 
    99             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/> 
    100             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 
    101             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
    102             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
    103  
    104             <!-- os specific replacements --> 
    105             <if> 
    106                 <bool><equals arg1="windows" arg2="${rk.os}"/></bool> 
    107                 <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/> 
    108                 <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/> 
    109  
    110             <else><if> 
    111                 <bool><equals arg1="linux" arg2="${rk.os}"/></bool> 
    112                 <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/> 
    113                 <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/> 
    114                 <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/> 
    115  
    116                 </if></else> 
    117  
    118             </if> 
     93            </if></else> 
    11994 
    12095        </if> 
     96 
    12197    </target> 
    12298