Changeset 17704

Show
Ignore:
Timestamp:
05.11.2008 15:52:07 (11 years ago)
Author:
oranfry
Message:

the generalised make-installer-files-concrete

Files:
1 modified

Legend:

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

    r17654 r17704  
    231231    </target> 
    232232 
     233    <target name="copy-main-installer-files"> 
     234 
     235        <mkdir dir="${basedir}/installer/classes"/> 
     236 
     237        <!-- the installer descriptors --> 
     238        <copy todir="${basedir}/installer" file="${rk.home}/installer/antinstall-config.xml" overwrite="true" /> 
     239        <copy todir="${basedir}/installer" file="${rk.home}/installer/build.xml" overwrite="true" /> 
     240 
     241        <!-- the language bundle --> 
     242        <copy todir="${basedir}/installer/classes/resources" overwrite="true"> 
     243            <fileset dir="${rk.home}/language-strings"/> 
     244        </copy> 
     245 
     246        <!-- os- and major version-specific files --> 
     247        <copy todir="${basedir}/installer/classes" overwrite="true"> 
     248            <fileset dir="${rk.home}/linux/installer-classes" erroronmissingdir="false"/> 
     249            <fileset dir="${rk.home}/windows/installer-classes"  erroronmissingdir="false"/> 
     250            <fileset dir="${rk.home}/greenstone3/installer-classes" erroronmissingdir="false"/> 
     251            <fileset dir="${rk.home}/greenstone2/installer-classes" erroronmissingdir="false"/> 
     252        </copy> 
     253 
     254    </target> 
     255 
     256    <target name="make-installer-files-concrete"> 
     257 
     258        <!-- calculate the size of components --> 
     259        <echo>Calculating the size of some components</echo> 
     260 
     261        <!-- core --> 
     262        <length property="component.bytesize.core-without-jre" mode="all"><fileset file="${basedir}/components/core.comp"/></length> 
     263        <if><bool><equals arg1="${java.os}" arg2="windows"/></bool> 
     264            <math result="component.bytesize.core" operand1="${component.bytesize.core-without-jre}" operation="+" operand2="${component.bytesize.windows-java}" datatype="int"/> 
     265        <else><if><bool><equals arg1="${java.os}" arg2="linux"/></bool> 
     266            <math result="component.bytesize.core" operand1="${component.bytesize.core-without-jre}" operation="+" operand2="${component.bytesize.linux-java}" datatype="int"/> 
     267        <else> 
     268            <property name="component.bytesize.core" value="${component.bytesize.core-without-jre}"/> 
     269        </else></if></else></if> 
     270        <math result="component.megabytesize.core" operand1="${component.bytesize.core}" operation="/" operand2="1048576" datatype="int"/> 
     271        <property name="component.size.core" value="${component.megabytesize.core} MB"/> 
     272 
     273        <!-- sourcecode core --> 
     274        <length property="component.bytesize.sourcecode-core" mode="all"><fileset file="${basedir}/components/sourcecode-core.comp"/></length> 
     275        <math result="component.megabytesize.sourcecode-core" operand1="${component.bytesize.sourcecode-core}" operation="/" operand2="1048576" datatype="int"/> 
     276        <property name="component.size.sourcecode-core" value="${component.megabytesize.sourcecode-core} MB"/> 
     277 
     278        <!-- sourcecode --> 
     279        <length property="component.bytesize.sourcecode" mode="all"><fileset file="${basedir}/components/sourcecode.comp"/></length> 
     280        <math result="component.megabytesize.sourcecode" operand1="${component.bytesize.sourcecode}" operation="/" operand2="1048576" datatype="int"/> 
     281        <property name="component.size.sourcecode" value="${component.megabytesize.sourcecode} MB"/> 
     282 
     283        <!-- imagemagick --> 
     284        <length property="component.bytesize.imagemagick" mode="all"><fileset file="${basedir}/components/imagemagick.comp"/></length> 
     285        <math result="component.megabytesize.imagemagick" operand1="${component.bytesize.imagemagick}" operation="/" operand2="1048576" datatype="int"/> 
     286        <property name="component.size.imagemagick" value="${component.megabytesize.imagemagick} MB"/> 
     287 
     288        <!-- ghostscript --> 
     289        <length property="component.bytesize.ghostscript" mode="all"><fileset file="${basedir}/components/ghostscript.comp"/></length> 
     290        <math result="component.megabytesize.ghostscript" operand1="${component.bytesize.ghostscript}" operation="/" operand2="1048576" datatype="int"/> 
     291        <property name="component.size.ghostscript" value="${component.megabytesize.ghostscript} MB"/> 
     292 
     293        <!-- tomcat --> 
     294        <length property="component.bytesize.tomcat" mode="all"><fileset file="${basedir}/components/tomcat.comp"/></length> 
     295        <math result="component.megabytesize.tomcat" operand1="${component.bytesize.tomcat}" operation="/" operand2="1048576" datatype="int"/> 
     296        <property name="component.size.tomcat" value="${component.megabytesize.tomcat} MB"/> 
     297 
     298        <!-- ant --> 
     299        <length property="component.bytesize.ant" mode="all"><fileset file="${basedir}/components/ant.comp"/></length> 
     300        <math result="component.megabytesize.ant" operand1="${component.bytesize.ant}" operation="/" operand2="1048576" datatype="int"/> 
     301        <property name="component.size.ant" value="${component.megabytesize.ant} MB"/> 
     302         
     303        <!-- put the concrete values of things in the config --> 
     304        <rsr file="${basedir}/installer/antinstall-config.xml"> 
     305            <job pattern="@version@" replacement="${version}"/> 
     306            <job pattern="@component.size.core@" replacement="${component.size.core}"/> 
     307            <job pattern="@component.size.sourcecode-core@" replacement="${component.size.sourcecode-core}"/> 
     308            <job pattern="@component.size.sourcecode@" replacement="${component.size.sourcecode}"/> 
     309            <job pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/> 
     310            <job pattern="@component.size.ant@" replacement="${component.size.ant}"/> 
     311            <job pattern="@component.size.imagemagick@" replacement="${component.size.imagemagick}"/> 
     312            <job pattern="@component.size.ghostscript@" replacement="${component.size.ghostscript}"/> 
     313        </rsr> 
     314 
     315        <rsr file="${basedir}/installer/build.xml"> 
     316            <job pattern="@version@" replacement="${version}"/> 
     317            <job pattern="@java.min.version@" replacement="${java.min.version}"/> 
     318            <job pattern="@windows-java.extracted@" replacement="${windows-java.extracted}"/> 
     319            <job pattern="@linux-java.extracted@" replacement="${linux-java.extracted}"/> 
     320        </rsr> 
     321 
     322        <!-- put the concrete values of things in the text --> 
     323 
     324        <!-- default --> 
     325        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties"> 
     326            <job pattern="@version@" replacement="${version}"/> 
     327            <job pattern="@version.major@" replacement="${version.major}"/> 
     328            <job pattern="@java.min.version@" replacement="${java.min.version}"/> 
     329            <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/> 
     330            <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/> 
     331            <job pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
     332            <job pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
     333            <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/> 
     334            <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/> 
     335        </rsr> 
     336 
     337        <!-- es --> 
     338        <rsr file="${basedir}/installer/classes/resources/LanguagePack_es.properties"> 
     339            <job pattern="@version@" replacement="${version}"/> 
     340            <job pattern="@version.major@" replacement="${version.major}"/> 
     341            <job pattern="@java.min.version@" replacement="${java.min.version}"/> 
     342            <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/> 
     343            <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/> 
     344            <job pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
     345            <job pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
     346            <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/> 
     347            <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/> 
     348        </rsr> 
     349 
     350        <!-- es_EU --> 
     351        <rsr file="${basedir}/installer/classes/resources/LanguagePack_es_EU.properties"> 
     352            <job pattern="@version@" replacement="${version}"/> 
     353            <job pattern="@version.major@" replacement="${version.major}"/> 
     354            <job pattern="@java.min.version@" replacement="${java.min.version}"/> 
     355            <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/> 
     356            <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/> 
     357            <job pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
     358            <job pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
     359            <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/> 
     360            <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/> 
     361        </rsr> 
     362 
     363        <!-- de --> 
     364        <rsr file="${basedir}/installer/classes/resources/LanguagePack_de.properties"> 
     365            <job pattern="@version@" replacement="${version}"/> 
     366            <job pattern="@version.major@" replacement="${version.major}"/> 
     367            <job pattern="@java.min.version@" replacement="${java.min.version}"/> 
     368            <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/> 
     369            <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/> 
     370            <job pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
     371            <job pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
     372            <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/> 
     373            <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/> 
     374        </rsr> 
     375 
     376 
     377 
     378    </target> 
     379 
    233380</project>