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

Revision 17595, 7.5 KB (checked in by oranfry, 11 years ago)

getting rid of old code

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