source: release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml@ 17372

Last change on this file since 17372 was 17372, checked in by oranfry, 12 years ago

work out sizes of components and do replacements in a better way

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