root/release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml @ 16738

Revision 16738, 5.9 KB (checked in by oranfry, 12 years ago)

changed the size calculation targets to fix a propagation problem

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!--
3        ..........................................................
4        August 2008
5        Targets for Greenstone3 release kits
6        Oran Fry
7        ..........................................................
8-->
9
10<project name="rk3-targets">
11
12    <target name="make-installer-files-concrete">
13
14        <!-- calculate the size of some components -->
15        <echo>Calculating the size of some components</echo>
16
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"/>
23
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"/>
28
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"/>
33
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"/>
38
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>
43
44        <if>
45            <bool><equals arg1="windows" arg2="${rk.os}"/></bool>
46            <echo>component.size.windows-java: ${component.size.windows-java}</echo>
47
48        <else><if>
49            <bool><equals arg1="linux" arg2="${rk.os}"/></bool>
50            <echo>component.size.linux-java: ${component.size.linux-java}</echo>
51
52            </if></else>
53
54        </if>
55
56
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}"/>
65
66        <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/>
67
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}"/>
74
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}"/>
80
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}"/>
86
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}"/>
92
93            </if></else>
94
95        </if>
96
97    </target>
98
99</project>
Note: See TracBrowser for help on using the browser.