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

Revision 16814, 4.2 KB (checked in by oranfry, 12 years ago)

shared ant targetsts for greenstone2 release kits

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}/distribution/greenstone3" 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"><fileset dir="${basedir}/distribution/greenstone3" includes="common-src/**/*,runtime-src/**/*build-src/**/*,packages/**/*"/></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        <!-- show the calculated sizes -->
30        <echo>component.size.core: ${component.size.core}</echo>
31        <echo>component.size.sourcecode: ${component.size.sourcecode}</echo>
32        <if>
33            <bool><equals arg1="windows" arg2="${rk.os}"/></bool>
34            <echo>component.size.windows-java: ${component.size.windows-java}</echo>
35        <else><if>
36            <bool><equals arg1="linux" arg2="${rk.os}"/></bool>
37            <echo>component.size.linux-java: ${component.size.linux-java}</echo>
38            </if></else>
39        </if>
40
41        <!-- put the concrete values of things in the config -->
42        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/>
43        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.core@" replacement="${component.size.core}"/>
44        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.sourcecode@" replacement="${component.size.sourcecode}"/>
45        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.linux-java@" replacement="${component.size.linux-java}"/>
46        <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/>
47        <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/>
48
49        <!-- put the concrete values of things in the text -->
50        <!-- default -->
51        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/>
52        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
53        <!-- chinese -->
54        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/>
55        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
56
57        <!-- os specific replacements -->
58        <if>
59            <bool><equals arg1="windows" arg2="${rk.os}"/></bool>
60            <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
61            <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
62
63        <else><if>
64            <bool><equals arg1="linux" arg2="${rk.os}"/></bool>
65            <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/>
66            <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/>
67            <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/>
68
69            </if></else>
70
71        </if>
72
73    </target>
Note: See TracBrowser for help on using the browser.