source: main/trunk/release-kits/kits/rk2/ant-scripts/compile.xml@ 36690

Last change on this file since 36690 was 36690, checked in by kjdon, 19 months ago

added PERL_PERTURB_KEYS=0 into the environment for building the demo collection. this is currently set in setup.bat/gs3-setup.bat, but in the release kits, under windows, the setup files are not called. (which they are under linux). thi sflag is needed so that perl doesn't make keys come out of a hashmap in a random order each time, which was added for security reasons. we need this to happen so that each time we read in the archives inf db during the build process, we get the documents coming out in the same order. if not, the sections don't match up between each pass through. Also, we need to use the 14+ iconv zip, not the old pre14 version, to match the version of visual studio on the build machine.

File size: 28.3 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="rk2-compile">
3
4 <target name="compile" depends="init,gs2-init">
5 <!-- checkout greenstone2 (or gsdl if a pre-2.84 release is being created) and gli -->
6 <if><bool><equals arg1="${post.2.83.version}" arg2="true"/></bool>
7 <exec executable="svn">
8 <arg value="checkout"/>
9 <arg value="${svn.root}/main/${branch.path}/greenstone2"/>
10 <arg value="${basedir}/compiled"/>
11 </exec>
12 <else>
13 <exec executable="svn">
14 <arg value="checkout"/>
15 <arg value="${svn.root}/main/${branch.path}/gsdl"/>
16 <arg value="${basedir}/compiled"/>
17 </exec>
18 </else>
19 </if>
20
21 <exec executable="svn">
22 <arg value="checkout"/>
23 <arg value="${svn.root}/main/${branch.path}/gli"/>
24 <arg value="${basedir}/compiled/gli"/>
25 </exec>
26
27 <!-- drop in documentation -->
28 <copy todir="compiled" overwrite="true">
29 <fileset dir="${rk.home}/shared/greenstone2/docs" excludes="READMEar.txt,READMEes.txt,READMEfr.txt,READMEru.txt"/>
30 </copy>
31
32 <!-- set version numbers -->
33 <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
34 <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/compiled/gli"/></antcall>
35
36 <!-- we do not want the *.app folders if we are not mac-->
37 <if><bool><not><equals arg1="${rk.os}" arg2="mac"/></not></bool>
38 <delete dir="${basedir}/compiled/client-gli.app"/>
39 <delete dir="${basedir}/compiled/gems.app"/>
40 <delete dir="${basedir}/compiled/gs2-server.app"/>
41 <delete dir="${basedir}/compiled/gli.app"/>
42 </if>
43
44 <!-- mac or linux: get the support library -->
45 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
46 <!-- svn export the gnome support library extension-->
47
48 <!-- For Lions, need a specific gnome-lib-minimal tar file. The file name contains darwin12 for Lion, it contains the shell.name (darwin/linux) for other cases.
49 Mac OS X v10.7.4 onwards is Lion/Mountain Lion, different from Leopard/Snow Leopard. See http://en.wikipedia.org/wiki/Darwin_(operating_system) -->
50 <condition property="specific.os.type" value="${os.shell}-Lion" else="${os.shell}">
51 <and>
52 <contains string="${os.shell}" substring="darwin" casesensitive="false"/>
53 <matches pattern="^(10\.7\.[4-9]|10\.[8-9]|1[1-9]|[2-9])" string="${os.version}"/>
54 </and>
55 </condition>
56
57 <if><bool><equals arg1="${post.2.83.version}" arg2="true"/></bool>
58 <echo>EXPORTING GNOME LIB EXTENSION</echo>
59 <exec executable="svn">
60 <arg value="export"/>
61 <arg value="${svn.root}/gs2-extensions/gnome-lib/trunk/gnome-lib-minimal-${specific.os.type}${arch}${extension-x64}.tar.gz"/>
62 <arg value="${basedir}/compiled/ext/gnome-lib-minimal-${specific.os.type}.tar.gz"/>
63 </exec>
64
65 <exec executable="tar" dir="${basedir}/compiled/ext">
66 <arg value="xvzf"/>
67 <arg value="gnome-lib-minimal-${specific.os.type}.tar.gz"/>
68 </exec>
69
70 <exec executable="/bin/bash" dir="${basedir}/compiled/ext/gnome-lib-minimal">
71 <arg value="-c"/>
72 <arg value="source setup.bash_old &amp;&amp; source devel.bash"/>
73 </exec>
74
75 <echo>DONE EXTRACTING GNOME LIB EXTENSION</echo>
76 </if>
77 </if>
78
79 <if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
80 <!-- LD_LIBRARY_PATH is DYLD_LIBRARY_PATH on mac-->
81 <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
82 <property name="libpathvar" value="DYLD_LIBRARY_PATH"/>
83 <else>
84 <property name="libpathvar" value="LD_LIBRARY_PATH"/>
85 </else>
86 </if>
87
88 <property name="gnome.lib.dir" value="${basedir}/compiled/ext/gnome-lib-minimal/${os.shell}"/>
89 <property name="path.arg" value="PATH=&quot;${gnome.lib.dir}/bin:${env.PATH}&quot;"/>
90 <property name="cflags.arg" value="CFLAGS=&quot;-I${gnome.lib.dir}/include&quot;"/>
91 <property name="cxxflags.arg" value="CXXFLAGS=&quot;-I${gnome.lib.dir}/include&quot;"/>
92 <property name="cppflags.arg" value="CPPFLAGS=&quot;-I${gnome.lib.dir}/include&quot;"/>
93 <property name="ldflags.arg" value="LDFLAGS=&quot;-L${gnome.lib.dir}/lib&quot;"/>
94 <property name="pcpath.arg" value="PKG_CONFIG_PATH=&quot;${gnome.lib.dir}/lib/pkgconfig&quot;"/>
95 <property name="ldlpath.arg" value="${libpathvar}=&quot;${gnome.lib.dir}/lib&quot;"/>
96
97 <property name="allargs" value="${path.arg} ${cflags.arg} ${cxxflags.arg} ${cppflags.arg} ${ldflags.arg} ${pcpath.arg} ${ldlpath.arg}"/>
98 </if>
99
100 <!-- windows only -->
101 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
102
103 <!-- unzip packages -->
104 <unzip src="${basedir}/compiled/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/compiled/common-src/packages/windows/crypt"/>
105
106 <!-- unzip expat if the version is less that 2.84 -->
107 <if><bool><equals arg1="${post.2.83.version}" arg2="false"/></bool>
108 <unzip src="${basedir}/compiled/common-src/packages/windows/expat/expat.zip" dest="${basedir}/compiled/common-src/packages/windows/expat"/>
109 </if>
110
111 <unzip src="${basedir}/compiled/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/compiled/common-src/packages/windows/stlport"/>
112 <unzip src="${basedir}/compiled/common-src/indexers/packages/windows/iconv/iconv-VS14-PLUS.zip" dest="${basedir}/compiled/common-src/indexers/packages/windows/iconv"/>
113 <untar src="${basedir}/compiled/common-src/packages/sqlite/sqlite-autoconf-3070602.tar.gz" dest="${basedir}/compiled/common-src/packages/sqlite" compression="gzip"/>
114
115 <!-- get winbin from tags if the version is greater than 2.83 otherwise get it from trunk -->
116 <if><bool><not><available file="${basedir}/compiled/bin/windows"/></not></bool>
117 <if><bool><equals arg1="${post.2.83.version}" arg2="true"/></bool>
118
119 <exec executable="svn">
120 <arg value="export"/>
121 <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/>
122 <arg value="${basedir}/compiled/bin/windows"/>
123 <arg value="-r"/>
124 <arg value="${branch.revision}"/>
125 </exec>
126
127 <else>
128 <exec executable="svn">
129 <arg value="export"/>
130 <arg value="${svn.root}/main/trunk/binaries/windows/bin"/>
131 <arg value="${basedir}/compiled/bin/windows"/>
132 <arg value="-r"/>
133 <arg value="${branch.revision}"/>
134 </exec>
135 </else>
136 </if>
137 </if>
138
139 <!-- insert windows perl -->
140 <unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/bin/windows"/>
141
142 <exec executable="${basedir}/compiled/bin/windows/gunzip.exe" dir="${basedir}/compiled/runtime-src/packages/apache-httpd">
143 <arg value="-d"/>
144 <arg value="httpd-2.2.11-gs.tar.gz"/>
145 </exec>
146
147 <exec executable="${basedir}/compiled/bin/windows/tar.exe" dir="${basedir}/compiled/runtime-src/packages/apache-httpd">
148 <arg value="-xvf"/>
149 <arg value="httpd-2.2.11-gs.tar"/>
150 </exec>
151
152 <!-- Insert a unique number after every occurrence of the word tempfile to prevent some strange race conditions present on Windows 7 (iuv = InsertUniqueValue) -->
153 <iuv>
154 <fileset dir="${basedir}/compiled/runtime-src/packages/apache-httpd/httpd-2.2.11" includes="**/*.mak"/>
155 <job pattern="tempfile"/>
156 </iuv>
157
158 <!-- compile c code -->
159 <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="clean"/></exec>
160 <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="APACHE_HTTPD=1"/></exec>
161 <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="LOCAL_LIBRARY=1"/></exec>
162 <delete><fileset dir="${basedir}/compiled/apache-httpd" includes="**/*.pdb"/></delete>
163
164 <copy file="${rk.home}/shared/windows/Microsoft.VC80.CRT.manifest" tofile="${basedir}/compiled/apache-httpd/windows/bin/Microsoft.VC80.CRT.manifest"/>
165 <copy file="${rk.home}/shared/windows/Microsoft.VC80.CRT.manifest" tofile="${basedir}/compiled/apache-httpd/windows/lib/Microsoft.VC80.CRT.manifest"/>
166 <copy file="${rk.home}/shared/windows/Microsoft.VC80.CRT.manifest" tofile="${basedir}/compiled/apache-httpd/windows/modules/Microsoft.VC80.CRT.manifest"/>
167 <copy file="${rk.home}/shared/windows/msvcr80.dll" tofile="${basedir}/compiled/apache-httpd/windows/bin/msvcr80.dll"/>
168 <copy file="${rk.home}/shared/windows/msvcr80.dll" tofile="${basedir}/compiled/apache-httpd/windows/lib/msvcr80.dll"/>
169 <copy file="${rk.home}/shared/windows/msvcr80.dll" tofile="${basedir}/compiled/apache-httpd/windows/modules/msvcr80.dll"/>
170
171 <mkdir dir="products"/>
172 <copy file="${basedir}/compiled/server.exe" tofile="${basedir}/products/server-${version}${version-extra}.exe"/>
173 <move file="${basedir}/compiled/server.exe" todir="${basedir}/compiled/bin/windows"/>
174
175
176 <!-- linux only -->
177 <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
178 <if><bool><equals arg1="${x64}" arg2="false"/></bool>
179 <!-- add static to configure.in, but not for x64. Why?? -->
180 <echo>********* adding -static to compiled/configure.in</echo>
181 <rsr file="${basedir}/compiled/configure.in" pattern="^LDFLAGS=.*$" replacement="LDFLAGS=-static"/>
182 <!-- set environment in packages/configure -->
183 <rsr file="${basedir}/compiled/common-src/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;"/>
184 <rsr file="${basedir}/compiled/build-src/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;"/>
185
186 </if>
187 <exec dir="${basedir}/compiled" executable="autoconf" output="${basedir}/compiled/configure">
188 <arg value="configure.in"/>
189 </exec>
190
191
192 <!-- run configure -->
193 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true">
194 <arg line="--enable-apache-httpd --disable-wvware"/>
195 </exec>
196
197 <exec executable="tar" dir="${basedir}/compiled/build-src/packages/wv">
198 <arg value="xvzf"/>
199 <arg value="wv-1.2.4-gs.tar.gz"/>
200 </exec>
201
202 <exec dir="${basedir}/compiled/build-src/packages/wv/wv-gs" executable="${basedir}/compiled/build-src/packages/wv/wv-gs/configure" failonerror="true">
203 <arg line="--prefix=${basedir}/compiled/build-src/packages/wv --bindir=${basedir}/compiled/bin/linux --libdir=${basedir}/compiled/lib/linux --datadir=${basedir}/compiled/etc/packages --disable-shared --enable-static"/>
204 <arg line="${allargs}"/>
205 </exec>
206
207 <!-- add -static to makefiles -->
208 <rsr file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static"/>
209 <rsr file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static"/>
210 <rsr file="${basedir}/compiled/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="(-o rtftohtml.{2}EXEEXT.{1})" replacement="$1 -static"/>
211
212 <!-- this bit from the lin32 compile-->
213 <if><bool><equals arg1="${x64}" arg2="false"/></bool>
214 <echo>******** modifying wget Makefile for linux 32</echo>
215 <rsr file="${basedir}/compiled/build-src/packages/wget/wget-1.17.1-gs/src/Makefile" pattern="^LDFLAGS =(.*) -static(.*)$" replacement="LDFLAGS = $1 $2"/>
216 </if>
217 <!-- mac only -->
218 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
219 <!-- run configure -->
220 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true">
221 <arg line="--enable-apache-httpd"/>
222 <arg line="${allargs}"/>
223 </exec>
224
225 <!-- tweak makefiles -->
226 <rsr file="${basedir}/compiled/runtime-src/src/recpt/Makefile" pattern="^(LIBS =.*)-L(.)\(PACKAGES_DIR\)/expat/lib -lexpat(.*)$" replacement="$1$2(PACKAGES_DIR)/expat/lib/libexpat.a$3"/>
227 <rsr file="${basedir}/compiled/runtime-src/src/oaiservr/Makefile" pattern="^(LIBS =.*)-L(.)\(PACKAGES_DIR\)/expat/lib -lexpat(.*)$" replacement="$1$2(PACKAGES_DIR)/expat/lib/libexpat.a$3"/>
228
229 </if></else></if></else></if>
230
231 <!-- mac and linux: compile -->
232 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
233 <!-- make -->
234 <exec dir="${basedir}/compiled" executable="make" failonerror="true">
235 <arg line="${ldlpath.arg}"/>
236 </exec>
237
238 <!-- make install -->
239 <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="install"/></exec>
240
241 <!-- make apache-for-dist -->
242 <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="apache-for-dist"/></exec>
243
244 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
245 <exec dir="${basedir}/compiled/build-src/packages/wv/wv-gs" executable="make" failonerror="true">
246 <arg line="${ldlpath.arg}"/>
247 </exec>
248 <exec dir="${basedir}/compiled/build-src/packages/wv/wv-gs" executable="make" failonerror="true"><arg value="install"/></exec>
249 </if>
250
251 <!-- strip executables -->
252 <exec dir="${basedir}/compiled/bin/${os.shell}" executable="find" failonerror="true">
253 <arg line=". ! -name . -type f -maxdepth 1 -exec strip {} &#59;"/>
254 </exec>
255
256 <!-- the libsqlite3.dylib is no longer compatible with Macs from Maverick/Yosemite/El Capitan onwards, so 10.9, 10.10, 10.11,
257 but also future versions of darwin, like anything that is version 11+, so major version numbers that are 2 digits or beyond) -->
258 <if><bool>
259 <and>
260 <contains string="${os.shell}" substring="darwin" casesensitive="false"/>
261 <not><matches pattern="^(10\.9|10\.[1-9][0-9]|1[1-9]|[2-9][0-9])" string="${os.version}"/></not><!--all darwin before Maverick/10.9-->
262 </and>
263 </bool>
264 <copy todir="${basedir}/compiled/lib/${os.shell}">
265 <fileset dir="${basedir}/compiled/common-src/packages/sqlite/lib" includes="*.dylib"/>
266 </copy>
267 </if>
268
269 </if>
270
271 <!-- in mac and linux 64 bit versions, we copy IsisGdl from caveat-emptor. However, now that it compiles under 64 bit, I don't think we need to do that anymore.-->
272
273
274 <!-- Delete all but the lib folder and the setup.bash script of the gnome support library -->
275 <if><bool><and>
276 <not><equals arg1="${keep.src}" arg2="true"/></not>
277 <or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or>
278 </and></bool>
279 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/${os.shell}/bin"/>
280 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/${os.shell}/include"/>
281 <delete file="${basedir}/compiled/ext/gnome-lib-minimal/setup.bat"/>
282 <delete file="${basedir}/compiled/ext/gnome-lib-minimal/devel.bash"/>
283 <delete file="${basedir}/compiled/ext/gnome-lib-minimal-${os.shell}.tar.gz"/>
284 </if>
285
286 <!-- insert the necessary additional xml parser versions-->
287 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
288 <!-- Add the 5.6 version if necessary -->
289 <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.6"/></not></bool>
290 <copy todir="${basedir}/compiled/perllib/cpan">
291 <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.6,perl-5.6/**/*"/>
292 </copy>
293 </if>
294
295 <!-- Add the 5.8 version if necessary -->
296 <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.8"/></not></bool>
297 <copy todir="${basedir}/compiled/perllib/cpan">
298 <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.8,perl-5.8/**/*"/>
299 </copy>
300 </if>
301
302 <!-- Add the 5.8 mutlithreaded version if necessary -->
303 <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.8-mt"/></not></bool>
304 <copy todir="${basedir}/compiled/perllib/cpan">
305 <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.8-mt,perl-5.8-mt/**/*"/>
306 </copy>
307 </if>
308
309 <!-- Add the 5.10 version if necessary -->
310 <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.10"/></not></bool>
311 <copy todir="${basedir}/compiled/perllib/cpan">
312 <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.10,perl-5.10/**/*"/>
313 </copy>
314 </if>
315
316 <!-- Add the 5.14 version if necessary -->
317 <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.14"/></not></bool>
318 <copy todir="${basedir}/compiled/perllib/cpan">
319 <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.14,perl-5.14/**/*"/>
320 </copy>
321 </if>
322 </if>
323
324 <!-- compile gli -->
325 <!-- (linux and mac) -->
326 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
327 <exec dir="compiled/gli" executable="/bin/bash"><arg value="-c"/><arg value="./makegli.sh"/></exec>
328 <exec dir="compiled/gli" executable="/bin/bash"><arg value="-c"/><arg value="./makejar.sh"/></exec>
329 <!-- windows -->
330 <else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
331 <exec dir="compiled/gli" executable="cmd.exe"><arg value="/c"/><arg value="makegli.bat"/></exec>
332 <exec dir="compiled/gli" executable="cmd.exe"><arg value="/c"/><arg value="makejar.bat"/></exec>
333 </if></else></if>
334
335 <if><bool><not><equals arg1="${keep.src}" arg2="true"/></not></bool>
336 <delete dir="compiled/gli/jar"/>
337 <delete dir="compiled/gli/classes/org"/>
338 </if>
339 <move file="compiled/gli/GLIServer.jar" todir="compiled/bin/java"/>
340
341 <!-- compile uninstaller -->
342 <antcall target="insert-and-compile-uninstaller" />
343
344 <!-- delete the source code -->
345 <if><bool><not><equals arg1="${keep.src}" arg2="true"/></not></bool>
346 <delete><fileset dir="compiled" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/></delete>
347 <delete dir="compiled/common-src"/>
348 <delete dir="compiled/build-src"/>
349 <delete dir="compiled/runtime-src"/>
350 <delete><fileset dir="compiled" includes="Install.txt,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in,win32.mak,win32cfg.h,lib/**/*.a"/></delete>
351 </if>
352
353 <!-- strip .svn working-copy dirs -->
354 <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall>
355
356 <!-- create needed empty files -->
357 <mkdir dir="compiled/tmp"/>
358 <chmod dir="compiled/tmp" perm="a+rwx"/>
359 <echo file="compiled/etc/usage.txt"></echo>
360
361 <!-- scripts to compile GS2 are not needed in the binary -->
362 <delete file="compiled/makegs2.bat"/>
363 <delete file="compiled/makegs2x64.bat"/>
364 <delete file="compiled/makegs2.sh"/>
365
366 <!-- windows -->
367 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
368
369 <!-- make a copy of server.exe in the root -->
370 <copy file="compiled/bin/windows/server.exe" tofile="compiled/server.exe"/>
371
372 <!-- delete sourcecode -->
373 <delete dir="${binzip.dir}/common-src"/>
374 <delete dir="${binzip.dir}/build-src"/>
375 <delete dir="${binzip.dir}/runtime-src"/>
376
377 <!-- create simple zipped binary distribution
378 <mkdir dir="distributions"/>
379 <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
380 <copy todir="${binzip.dir}"><fileset dir="compiled"/></copy>
381 <delete><fileset dir="${binzip.dir}" includes="README*.txt,Uninstall.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/></delete>
382 -->
383
384 <!-- delete unneeded files -->
385 <delete dir="compiled/bin/linux" />
386<!--
387 Actually, leaving these in is helpful for running a cross-platform
388 Pure JAVA install
389 <delete><fileset dir="compiled" includes="*.bash,*.sh,*.csh,.gstermrc,makegs2.bat"/></delete>
390 <delete><fileset dir="compiled/gli" includes="*.sh,*4gs3.bat"/></delete>
391
392-->
393 <delete><fileset dir="compiled/gli" includes="*4gs3.bat"/></delete>
394 <delete dir="compiled/autom4te.cache" />
395
396 <!-- linux -->
397 <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
398
399 <!-- grab imagemagick and wv (if less than 2.84) binaries -->
400 <delete dir="compiled/bin/linux/imagemagick"/>
401
402 <if><bool><equals arg1="${post.2.83.version}" arg2="true"/></bool>
403 <!--<if><bool><equals arg1="${x64}" arg2="true"/></bool>-->
404 <exec executable="svn">
405 <arg value="export"/>
406 <arg value="${svn.root}/gs2-extensions/imagemagick/trunk/imagemagick-linux${extension-x64}.tar.gz"/>
407 <arg value="compiled/ext/imagemagick-linux${extension-x64}.tar.gz"/>
408 </exec>
409
410 <exec executable="tar" dir="compiled/ext">
411 <arg value="xvzf"/>
412 <arg value="imagemagick-linux${extension-x64}.tar.gz"/>
413 </exec>
414 <delete file="compiled/ext/imagemagick-linux${extension-x64}.tar.gz"/>
415 <move todir="compiled/bin/linux/imagemagick">
416 <fileset dir="compiled/ext/imagemagick/linux"/>
417 </move>
418 <!--<else>
419 <exec executable="svn">
420 <arg value="export"/>
421 <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
422 <arg value="compiled/bin/linux/imagemagick"/>
423 </exec>
424 </else>
425 </if>-->
426 <else>
427 <delete dir="compiled/bin/linux/wv"/>
428 <exec executable="svn">
429 <arg value="export"/>
430 <arg value="${svn.root}/main/trunk/binaries/linux/imagemagick"/>
431 <arg value="compiled/bin/linux/imagemagick"/>
432 </exec>
433
434 <exec executable="svn">
435 <arg value="export"/>
436 <arg value="${svn.root}/main/trunk/binaries/linux/wv"/>
437 <arg value="compiled/bin/linux/wv"/>
438 </exec>
439 </else>
440 </if>
441
442 <!-- delete unneeded files -->
443 <delete><fileset dir="compiled" includes="win32.mak,win32cfg.h,Install.sh,Support.htm,micotest.cpp"/></delete>
444<!--
445 Actually useful to keep these files around for a Pure Java install
446 <delete><fileset dir="compiled/gli" includes="*.bat"/></delete>
447 <delete><fileset dir="compiled" includes="*.bat"/></delete>
448-->
449 <delete dir="compiled/common-src/packages/windows"/>
450 <delete dir="compiled/common-src/indexers/packages/windows"/>
451
452 <!-- mac -->
453 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
454 <!-- grab imagemagick and ghostscript binaries -->
455 <delete dir="compiled/bin/darwin/imagemagick"/>
456 <delete dir="compiled/bin/darwin/ghostscript"/>
457
458 <if><bool><equals arg1="${post.2.83.version}" arg2="true"/></bool>
459
460 <!--<exec executable="svn">
461 <arg value="export"/>
462 <arg value="${svn.root}/gs2-extensions/imagemagick/trunk/imagemagick-darwin-10.5.tar.gz"/>
463 <arg value="compiled/ext/imagemagick-darwin-10.5.tar.gz"/>
464 </exec>
465
466 <exec executable="tar" dir="compiled/ext">
467 <arg value="xvzf"/>
468 <arg value="imagemagick-darwin-10.5.tar.gz"/>
469 </exec>
470 <delete file="compiled/ext/imagemagick-darwin-10.5.tar.gz"/>
471 <move todir="compiled/bin/darwin/imagemagick">
472 <fileset dir="compiled/ext/imagemagick/darwin"/>
473 </move>-->
474
475 <exec executable="svn">
476 <arg value="export"/>
477 <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
478 <arg value="compiled/bin/darwin/imagemagick"/>
479 </exec>
480
481 <exec executable="svn">
482 <arg value="export"/>
483 <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
484 <arg value="compiled/bin/darwin/ghostscript"/>
485 </exec>
486
487 <else>
488 <exec executable="svn">
489 <arg value="export"/>
490 <arg value="${svn.root}/main/trunk/binaries/mac/intel/imagemagick"/>
491 <arg value="compiled/bin/darwin/imagemagick"/>
492 </exec>
493
494 <exec executable="svn">
495 <arg value="export"/>
496 <arg value="${svn.root}/main/trunk/binaries/mac/intel/ghostscript"/>
497 <arg value="compiled/bin/darwin/ghostscript"/>
498 </exec>
499 </else>
500 </if>
501
502 <!-- delete unneeded files -->
503 <delete><fileset dir="compiled" includes="win32.mak,win32cfg.h,Install.sh,Support.htm"/></delete>
504<!--
505 Actually useful to keep these files around for a Pure Java install
506 <delete><fileset dir="compiled/gli" includes="*.bat"/></delete>
507 <delete><fileset dir="compiled" includes="*.bat"/></delete>
508-->
509
510 <delete dir="compiled/common-src/packages/windows"/>
511
512 </if></else></if></else></if>
513
514 <!-- build demo collection -->
515 <!-- the envs on these execs simulate the environment when you run setup.bat -->
516 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
517
518 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl">
519 <arg line="-S"/>
520 <arg line="bin/script/import.pl demo"/>
521 <env key="GSDLHOME" path="${basedir}/compiled"/>
522 <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/collect"/>
523 <env key="GSDLOS" value="windows"/>
524 <env key="PERL_PERTURB_KEYS" value="0"/>
525 <env key="PATH" path="${basedir}/compiled/bin/windows/perl/bin:${basedir}/compiled/bin/windows:${basedir}/compiled/bin/script:${env.PATH}"/>
526 </exec>
527 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl">
528 <arg line="-S"/>
529 <arg line="bin/script/buildcol.pl demo"/>
530 <env key="PERL_PERTURB_KEYS" value="0"/>
531 <env key="GSDLHOME" path="${basedir}/compiled"/>
532 <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/collect"/>
533 <env key="GSDLOS" value="windows"/>
534 <env key="PATH" path="${basedir}/compiled/bin/windows/perl/bin:${basedir}/compiled/bin/windows:${basedir}/compiled/bin/script:${env.PATH}"/>
535 </exec>
536
537 <delete dir="${basedir}/compiled/collect/demo/index"/>
538 <move file="${basedir}/compiled/collect/demo/building" tofile="${basedir}/compiled/collect/demo/index"/>
539
540 <else>
541 <echo file="${basedir}/compiled/buildscript.sh">
542 #!/bin/bash
543 source setup.bash
544 /usr/bin/perl -S ${basedir}/compiled/bin/script/full-rebuild.pl demo
545 </echo>
546 <chmod perm="755" file="${basedir}/compiled/buildscript.sh"/>
547 <exec dir="${basedir}/compiled" executable="/bin/bash">
548 <arg line="buildscript.sh"/>
549 </exec>
550 <delete file="${basedir}/compiled/buildscript.sh"/>
551 </else>
552 </if>
553
554 <!-- delete unneeded files -->
555 <delete dir="compiled/uninstaller" />
556 <delete file="compiled/bin/java/SignedGatherer.jar" />
557
558 <!-- tidy up gli -->
559 <antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall>
560 <echo>Setting up export to cdrom package</echo>
561 <!-- mac and linux: insert export to cdrom package -->
562 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
563 <mkdir dir="compiled/bin/windows"/>
564 <!--<get src="${server.exe.location}" dest="compiled/bin/windows/server.exe"/>-->
565 <exec executable="wget" failonerror="true">
566 <arg value="-P"/>
567 <arg value="compiled/bin/windows"/>
568 <arg value="--no-check-certificate"/>
569 <arg value="${server.exe.location}"/>
570 </exec>
571 <move file="compiled/bin/windows/latest-server.exe"
572 tofile="distributions/${dist.name}/bin/windows/server.exe"/>
573
574 <if><bool><equals arg1="${post.2.83.version}" arg2="true"/></bool>
575 <!--<get src="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe" dest="compiled/bin/windows/Setup.exe"/>
576 <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe" dest="compiled/bin/windows/gssetup.exe"/>-->
577 <exec executable="svn">
578 <arg value="export"/>
579 <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe"/>
580 <arg value="compiled/bin/windows/Setup.exe"/>
581 </exec>
582 <exec executable="svn">
583 <arg value="export"/>
584 <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe"/>
585 <arg value="compiled/bin/windows/gssetup.exe"/>
586 </exec>
587
588 <else>
589 <!--<get src="${svn.root}/main/trunk/binaries/windows/bin/Setup.exe" dest="compiled/bin/windows/Setup.exe"/>
590 <get src="${svn.root}/main/trunk/binaries/windows/bin/gssetup.exe" dest="compiled/bin/windows/gssetup.exe"/>-->
591 <exec executable="svn">
592 <arg value="export"/>
593 <arg value="${svn.root}/main/trunk/binaries/windows/bin/Setup.exe"/>
594 <arg value="compiled/bin/windows/Setup.exe"/>
595 </exec>
596 <exec executable="svn">
597 <arg value="export"/>
598 <arg value="${svn.root}/main/trunk/binaries/windows/bin/gssetup.exe"/>
599 <arg value="compiled/bin/windows/gssetup.exe"/>
600 </exec>
601 </else>
602 </if>
603 </if>
604
605 </target>
606
607</project>
Note: See TracBrowser for help on using the repository browser.