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

Revision 17536, 6.7 KB (checked in by oranfry, 12 years ago)

dont fail if java os is not specified, just assume java is not to be bundled

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 -->
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        <!-- imagemagick -->
35        <length property="component.bytesize.imagemagick" mode="all"><fileset file="${basedir}/components/imagemagick.comp"/></length>
36        <math result="component.megabytesize.imagemagick" operand1="${component.bytesize.imagemagick}" operation="/" operand2="1048576" datatype="int"/>
37        <property name="component.size.imagemagick" value="${component.megabytesize.imagemagick} MB"/>
38       
39        <!-- ghostscript -->
40        <length property="component.bytesize.ghostscript" mode="all"><fileset file="${basedir}/components/ghostscript.comp"/></length>
41        <math result="component.megabytesize.ghostscript" operand1="${component.bytesize.ghostscript}" operation="/" operand2="1048576" datatype="int"/>
42        <property name="component.size.ghostscript" value="${component.megabytesize.ghostscript} MB"/>
43       
44        <!-- put the concrete values of things in the config -->
45        <rsr file="${basedir}/installer/antinstall-config.xml">
46            <job pattern="@version@" replacement="${version}"/>
47            <job pattern="@component.size.core@" replacement="${component.size.core}"/>
48            <job pattern="@component.size.sourcecode@" replacement="${component.size.sourcecode}"/>
49            <job pattern="@component.size.imagemagick@" replacement="${component.size.imagemagick}"/>
50            <job pattern="@component.size.ghostscript@" replacement="${component.size.ghostscript}"/>
51        </rsr>
52
53        <rsr file="${basedir}/installer/build.xml">
54            <job pattern="@version@" replacement="${version}"/>
55            <job pattern="@java.min.version@" replacement="${java.min.version}"/>
56            <job pattern="@windows-java.extracted@" replacement="${windows-java.extracted}"/>
57            <job pattern="@linux-java.extracted@" replacement="${linux-java.extracted}"/>
58        </rsr>
59
60        <!-- put the concrete values of things in the text -->
61        <!-- default -->
62        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties">
63            <job pattern="@version@" replacement="${version}"/>
64            <job pattern="@java.min.version@" replacement="${java.min.version}"/>
65            <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/>
66            <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/>
67            <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/>
68            <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/>
69        </rsr>
70
71        <!-- chinese -->
72        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh.properties">
73            <job pattern="@version@" replacement="${version}"/>
74            <job pattern="@java.min.version@" replacement="${java.min.version}"/>
75            <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/>
76            <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/>
77            <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/>
78            <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/>
79        </rsr>
80
81    </target>
82
83    <target name="compile-search4j-unix">
84        <copy todir="${basedir}/gsdl"><fileset dir="${rk.home}/packages" includes="search4j/**/*"/></copy>
85        <chmod perm="ug+x" file="${basedir}/gsdl/search4j/compile.sh"/>
86        <exec dir="${basedir}/gsdl/search4j" executable="${basedir}/gsdl/search4j/compile.sh"/>
87        <move file="${basedir}/gsdl/search4j/search4j" todir="${basedir}/gsdl/bin"/>
88        <chmod perm="ug+x" file="${basedir}/gsdl/bin/search4j"/>
89    </target>
90
91    <target name="compile-search4j-windows">
92        <copy todir="${basedir}/gsdl"><fileset dir="${rk.home}/packages" includes="search4j/**/*"/></copy>
93        <exec dir="${basedir}/gsdl/search4j" executable="${basedir}/gsdl/search4j/compile.bat"/>
94        <move file="${basedir}/gsdl/search4j/search4j.exe" todir="${basedir}/gsdl/bin"/>
95    </target>
96
97
98    <target name="compile-uninstaller">
99        <echo>Compiling Uninstaller</echo>
100
101        <mkdir dir="${basedir}/gsdl/uninstaller/build" />
102
103        <javac
104            srcdir="${rk.home}/uninstaller"
105            destdir="${basedir}/gsdl/uninstaller/build" />
106
107        <copy todir="${basedir}/gsdl/uninstaller/build">
108            <fileset dir="${rk.home}/uninstaller" includes="*.properties"/>
109        </copy>
110
111        <jar
112            destfile="${basedir}/gsdl/uninstaller/uninst.jar"
113            manifest="${rk.home}/uninstaller/manifest.mf"
114            basedir="${basedir}/gsdl/uninstaller/build" />
115
116    </target>
117
118    <target name="insert-uninstaller">
119        <copy file="gsdl/uninstaller/uninst.jar" todir="distributions/web" />
120        <copy file="${rk.home}/uninstaller/Uninstall.${script-format}" todir="distributions/web" />
121    </target>
122
123    <target name="insert-export-to-cd-package">
124        <mkdir dir="distributions/web/bin/windows"/>
125        <get src="http://greenstone.org/release-snapshots/server.exe" dest="${basedir}/distributions/web/bin/windows/server.exe"/>
126        <get src="http://svn.greenstone.org/other-projects/trunk/winbin/bin/Setup.exe" dest="${basedir}/distributions/web/bin/windows/Setup.exe"/>
127        <get src="http://svn.greenstone.org/other-projects/trunk/winbin/bin/gssetup.exe" dest="${basedir}/distributions/web/bin/windows/gssetup.exe"/>
128    </target>
129
130
131
132</project>
Note: See TracBrowser for help on using the browser.