root/release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml @ 16833

Revision 16833, 4.3 KB (checked in by oranfry, 12 years ago)

correcting this file

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!--
3        ..........................................................
4        August 2008
5        Targets for Greenstone2 release kits
6        Oran Fry
7        ..........................................................
8-->
9
10<project name="rk2-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 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>
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">
26            <fileset dir="${basedir}/distributions/web" includes="common-src/**/*,runtime-src/**/*build-src/**/*,packages/**/*"/>
27        </length>
28        <math result="component.megabytesize.sourcecode" operand1="${component.bytesize.sourcecode}" operation="/" operand2="1048576" datatype="int"/>
29        <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
43        <!-- put the concrete values of things in the config -->
44        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/>
45        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.core@" replacement="${component.size.core}"/>
46        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.sourcecode@" replacement="${component.size.sourcecode}"/>
47        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.linux-java@" replacement="${component.size.linux-java}"/>
48        <rsr file="${basedir}/installer/build.xml" pattern="@version@" replacement="${version}"/>
49        <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/>
50        <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/>
51
52        <!-- put the concrete values of things in the text -->
53        <!-- default -->
54        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/>
55        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
56        <!-- chinese -->
57        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/>
58        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
59
60        <!-- os specific replacements -->
61        <if>
62            <bool><equals arg1="windows" arg2="${rk.os}"/></bool>
63            <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
64            <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
65
66        <else><if>
67            <bool><equals arg1="linux" arg2="${rk.os}"/></bool>
68            <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/>
69            <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/>
70            <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/>
71
72            </if></else>
73
74        </if>
75
76    </target>
77</project>
Note: See TracBrowser for help on using the browser.