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

Revision 17653, 8.2 KB (checked in by oranfry, 12 years ago)

started source releases

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 -->
18        <length property="component.bytesize.core-without-jre" mode="all"><fileset file="${basedir}/components/core.comp"/></length>
19        <if><bool><equals arg1="${java.os}" arg2="windows"/></bool>
20            <math result="component.bytesize.core" operand1="${component.bytesize.core-without-jre}" operation="+" operand2="${component.bytesize.windows-java}" datatype="int"/>
21        <else><if><bool><equals arg1="${java.os}" arg2="linux"/></bool>
22            <math result="component.bytesize.core" operand1="${component.bytesize.core-without-jre}" operation="+" operand2="${component.bytesize.linux-java}" datatype="int"/>
23        <else>
24            <property name="component.bytesize.core" value="${component.bytesize.core-without-jre}"/>
25        </else></if></else></if>
26        <math result="component.megabytesize.core" operand1="${component.bytesize.core}" operation="/" operand2="1048576" datatype="int"/>
27        <property name="component.size.core" value="${component.megabytesize.core} MB"/>
28
29        <!-- source code core -->
30        <length property="component.bytesize.sourcecode-core" mode="all"><fileset file="${basedir}/components/sourcecode-core.comp"/></length>
31        <math result="component.megabytesize.sourcecode-core" operand1="${component.bytesize.sourcecode-core}" operation="/" operand2="1048576" datatype="int"/>
32        <property name="component.size.sourcecode-core" value="${component.megabytesize.sourcecode-core} MB"/>
33
34        <!-- source code -->
35        <length property="component.bytesize.sourcecode" mode="all"><fileset file="${basedir}/components/sourcecode.comp"/></length>
36        <math result="component.megabytesize.sourcecode" operand1="${component.bytesize.sourcecode}" operation="/" operand2="1048576" datatype="int"/>
37        <property name="component.size.sourcecode" value="${component.megabytesize.sourcecode} MB"/>
38
39        <!-- tomcat -->
40        <length property="component.bytesize.tomcat" mode="all"><fileset file="${basedir}/components/tomcat.comp"/></length>
41        <math result="component.megabytesize.tomcat" operand1="${component.bytesize.tomcat}" operation="/" operand2="1048576" datatype="int"/>
42        <property name="component.size.tomcat" value="${component.megabytesize.tomcat} MB"/>
43
44        <!-- ant -->
45        <length property="component.bytesize.ant" mode="all"><fileset file="${basedir}/components/ant.comp"/></length>
46        <math result="component.megabytesize.ant" operand1="${component.bytesize.ant}" operation="/" operand2="1048576" datatype="int"/>
47        <property name="component.size.ant" value="${component.megabytesize.ant} MB"/>
48
49        <!-- imagemagick -->
50        <length property="component.bytesize.imagemagick" mode="all"><fileset file="${basedir}/components/imagemagick.comp"/></length>
51        <math result="component.megabytesize.imagemagick" operand1="${component.bytesize.imagemagick}" operation="/" operand2="1048576" datatype="int"/>
52        <property name="component.size.imagemagick" value="${component.megabytesize.imagemagick} MB"/>
53
54        <!-- ghostscript -->
55        <length property="component.bytesize.ghostscript" mode="all"><fileset file="${basedir}/components/ghostscript.comp"/></length>
56        <math result="component.megabytesize.ghostscript" operand1="${component.bytesize.ghostscript}" operation="/" operand2="1048576" datatype="int"/>
57        <property name="component.size.ghostscript" value="${component.megabytesize.ghostscript} MB"/>
58
59       
60        <!-- show the calculated sizes -->
61        <echo>component.size.core: ${component.size.core}</echo>
62        <echo>component.size.sourcecode: ${component.size.sourcecode}</echo>
63        <echo>component.size.tomcat: ${component.size.tomcat}</echo>
64        <echo>component.size.ant: ${component.size.ant}</echo>
65        <echo>component.size.imagemagick: ${component.size.imagemagick}</echo>
66        <echo>component.size.ghostscript: ${component.size.ghostscript}</echo>
67        <if>
68            <bool><equals arg1="windows" arg2="${rk.os}"/></bool>
69            <echo>component.size.windows-java: ${component.size.windows-java}</echo>
70        <else><if>
71            <bool><equals arg1="linux" arg2="${rk.os}"/></bool>
72            <echo>component.size.linux-java: ${component.size.linux-java}</echo>
73            </if></else>
74        </if>
75
76
77        <!-- put the concrete values of things in the config -->
78        <rsr file="${basedir}/installer/antinstall-config.xml">
79            <job pattern="@version@" replacement="${version}"/>
80            <job pattern="@component.size.core@" replacement="${component.size.core}"/>
81            <job pattern="@component.size.sourcecode-core@" replacement="${component.size.sourcecode-core}"/>
82            <job pattern="@component.size.sourcecode@" replacement="${component.size.sourcecode}"/>
83            <job pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/>
84            <job pattern="@component.size.ant@" replacement="${component.size.ant}"/>
85            <job pattern="@component.size.imagemagick@" replacement="${component.size.imagemagick}"/>
86            <job pattern="@component.size.ghostscript@" replacement="${component.size.ghostscript}"/>
87        </rsr>
88
89        <rsr file="${basedir}/installer/build.xml">
90            <job pattern="@version@" replacement="${version}"/>
91            <job pattern="@java.min.version@" replacement="${java.min.version}"/>
92            <job pattern="@windows-java.extracted@" replacement="${windows-java.extracted}"/>
93            <job pattern="@linux-java.extracted@" replacement="${linux-java.extracted}"/>
94        </rsr>
95
96        <!-- put the concrete values of things in the text -->
97        <!-- default -->
98        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties">
99            <job pattern="@version@" replacement="${version}"/>
100            <job pattern="@java.min.version@" replacement="${java.min.version}"/>
101            <job pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
102            <job pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
103            <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/>
104            <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/>
105            <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/>
106            <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/>
107        </rsr>
108
109        <!-- chinese -->
110        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh.properties">
111            <job pattern="@version@" replacement="${version}"/>
112            <job pattern="@java.min.version@" replacement="${java.min.version}"/>
113            <job pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
114            <job pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
115            <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/>
116            <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/>
117            <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/>
118            <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/>
119        </rsr>
120
121    </target>
122
123    <target name="compile-uninstaller">
124        <echo>Compiling Uninstaller</echo>
125        <mkdir dir="${basedir}/greenstone3/uninstaller/build" />
126
127        <javac
128            srcdir="${rk.home}/uninstaller"
129            destdir="${basedir}/greenstone3/uninstaller/build" />
130
131        <copy todir="${basedir}/greenstone3/uninstaller/build">
132            <fileset dir="${rk.home}/uninstaller" includes="*.properties"/>
133        </copy>
134
135        <jar
136            destfile="${basedir}/greenstone3/uninstaller/uninst.jar"
137            manifest="${rk.home}/uninstaller/manifest.mf"
138            basedir="${basedir}/greenstone3/uninstaller/build" />
139
140    </target>
141
142    <target name="insert-uninstaller">
143        <copy file="greenstone3/uninstaller/uninst.jar" todir="distribution/greenstone3" />
144        <copy file="${rk.home}/uninstaller/Uninstall.${script-format}" todir="distribution/greenstone3" />
145    </target>
146
147    <target name="greenstone3-set-version-numbers">
148        <rsr
149            file="${greenstone3basedir}/resources/java/global.properties.in"
150            pattern="@gsdl3version@"
151            replacement="${version}" />
152    </target>
153
154    <target name="copy-web-to-source-greenstone3">
155        <copy todir="distribution/source"><fileset dir="distribution/greenstone3"/></copy>
156    </target>
157
158
159</project>
Note: See TracBrowser for help on using the browser.