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

Last change on this file since 35605 was 35605, checked in by davidb, 10 months ago

iconv.zip changed to iconv-PRE-VS14.zip to keep in line with the recent change that provides both iconv-PRE-VS14.zip (the original iconv.zip) and iconv-VS14-PLUS.zip (a version based on gs-libiconv v1.11 that is needed to work with compilation with newer versions of Visual Studio. In this commit I decided to go with a change that meant the same (original) iconv.zip file is the one that is unzipped. Given that newer versions of VS are likely to be installed on developers systems, this might be a decision we want to revisit, choosing instead for the Release Kit to include the VS14-PLUS version. Note: in SVN both files are present, and if compiling an svn checked out version, then the build-scripts we have in svn test the version of VisualStudioVersion and unzip the approprirate one

File size: 27.5 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-PRE-VS14.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 <!-- add static to configure.in -->
179 <rsr file="${basedir}/compiled/configure.in" pattern="^LDFLAGS=.*$" replacement="LDFLAGS=-static"/>
180 <exec dir="${basedir}/compiled" executable="autoconf" output="${basedir}/compiled/configure">
181 <arg value="configure.in"/>
182 </exec>
183
184 <!-- set environment in packages/configure -->
185 <rsr file="${basedir}/compiled/common-src/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;"/>
186 <rsr file="${basedir}/compiled/build-src/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;"/>
187
188 <!-- run configure -->
189 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true">
190 <arg line="--enable-apache-httpd --disable-wvware"/>
191 </exec>
192
193 <exec executable="tar" dir="${basedir}/compiled/build-src/packages/wv">
194 <arg value="xvzf"/>
195 <arg value="wv-1.2.4-gs.tar.gz"/>
196 </exec>
197
198 <exec dir="${basedir}/compiled/build-src/packages/wv/wv-gs" executable="${basedir}/compiled/build-src/packages/wv/wv-gs/configure" failonerror="true">
199 <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"/>
200 <arg line="${allargs}"/>
201 </exec>
202
203 <!-- add -static to makefiles -->
204 <rsr file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static"/>
205 <rsr file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static"/>
206 <rsr file="${basedir}/compiled/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="(-o rtftohtml.{2}EXEEXT.{1})" replacement="$1 -static"/>
207
208 <!-- mac only -->
209 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
210 <!-- run configure -->
211 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true">
212 <arg line="--enable-apache-httpd"/>
213 <arg line="${allargs}"/>
214 </exec>
215
216 <!-- tweak makefiles -->
217 <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"/>
218 <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"/>
219
220 </if></else></if></else></if>
221
222 <!-- mac and linux: compile -->
223 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
224 <!-- make -->
225 <exec dir="${basedir}/compiled" executable="make" failonerror="true">
226 <arg line="${ldlpath.arg}"/>
227 </exec>
228
229 <!-- make install -->
230 <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="install"/></exec>
231
232 <!-- make apache-for-dist -->
233 <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="apache-for-dist"/></exec>
234
235 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
236 <exec dir="${basedir}/compiled/build-src/packages/wv/wv-gs" executable="make" failonerror="true">
237 <arg line="${ldlpath.arg}"/>
238 </exec>
239 <exec dir="${basedir}/compiled/build-src/packages/wv/wv-gs" executable="make" failonerror="true"><arg value="install"/></exec>
240 </if>
241
242 <!-- strip executables -->
243 <exec dir="${basedir}/compiled/bin/${os.shell}" executable="find" failonerror="true">
244 <arg line=". ! -name . -type f -maxdepth 1 -exec strip {} &#59;"/>
245 </exec>
246
247 <!-- the libsqlite3.dylib is no longer compatible with Macs from Maverick/Yosemite/El Capitan onwards, so 10.9, 10.10, 10.11,
248 but also future versions of darwin, like anything that is version 11+, so major version numbers that are 2 digits or beyond) -->
249 <if><bool>
250 <and>
251 <contains string="${os.shell}" substring="darwin" casesensitive="false"/>
252 <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-->
253 </and>
254 </bool>
255 <copy todir="${basedir}/compiled/lib/${os.shell}">
256 <fileset dir="${basedir}/compiled/common-src/packages/sqlite/lib" includes="*.dylib"/>
257 </copy>
258 </if>
259
260 </if>
261
262 <!-- Delete all but the lib folder and the setup.bash script of the gnome support library -->
263 <if><bool><and>
264 <not><equals arg1="${keep.src}" arg2="true"/></not>
265 <or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or>
266 </and></bool>
267 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/${os.shell}/bin"/>
268 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/${os.shell}/include"/>
269 <delete file="${basedir}/compiled/ext/gnome-lib-minimal/setup.bat"/>
270 <delete file="${basedir}/compiled/ext/gnome-lib-minimal/devel.bash"/>
271 <delete file="${basedir}/compiled/ext/gnome-lib-minimal-${os.shell}.tar.gz"/>
272 </if>
273
274 <!-- insert the necessary additional xml parser versions-->
275 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
276 <!-- Add the 5.6 version if necessary -->
277 <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.6"/></not></bool>
278 <copy todir="${basedir}/compiled/perllib/cpan">
279 <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.6,perl-5.6/**/*"/>
280 </copy>
281 </if>
282
283 <!-- Add the 5.8 version if necessary -->
284 <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.8"/></not></bool>
285 <copy todir="${basedir}/compiled/perllib/cpan">
286 <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.8,perl-5.8/**/*"/>
287 </copy>
288 </if>
289
290 <!-- Add the 5.8 mutlithreaded version if necessary -->
291 <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.8-mt"/></not></bool>
292 <copy todir="${basedir}/compiled/perllib/cpan">
293 <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.8-mt,perl-5.8-mt/**/*"/>
294 </copy>
295 </if>
296
297 <!-- Add the 5.10 version if necessary -->
298 <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.10"/></not></bool>
299 <copy todir="${basedir}/compiled/perllib/cpan">
300 <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.10,perl-5.10/**/*"/>
301 </copy>
302 </if>
303
304 <!-- Add the 5.14 version if necessary -->
305 <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.14"/></not></bool>
306 <copy todir="${basedir}/compiled/perllib/cpan">
307 <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.14,perl-5.14/**/*"/>
308 </copy>
309 </if>
310 </if>
311
312 <!-- compile gli -->
313 <!-- (linux and mac) -->
314 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
315 <exec dir="compiled/gli" executable="/bin/bash"><arg value="-c"/><arg value="./makegli.sh"/></exec>
316 <exec dir="compiled/gli" executable="/bin/bash"><arg value="-c"/><arg value="./makejar.sh"/></exec>
317 <!-- windows -->
318 <else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
319 <exec dir="compiled/gli" executable="cmd.exe"><arg value="/c"/><arg value="makegli.bat"/></exec>
320 <exec dir="compiled/gli" executable="cmd.exe"><arg value="/c"/><arg value="makejar.bat"/></exec>
321 </if></else></if>
322
323 <if><bool><not><equals arg1="${keep.src}" arg2="true"/></not></bool>
324 <delete dir="compiled/gli/jar"/>
325 <delete dir="compiled/gli/classes/org"/>
326 </if>
327 <move file="compiled/gli/GLIServer.jar" todir="compiled/bin/java"/>
328
329 <!-- compile uninstaller -->
330 <antcall target="insert-and-compile-uninstaller" />
331
332 <!-- delete the source code -->
333 <if><bool><not><equals arg1="${keep.src}" arg2="true"/></not></bool>
334 <delete><fileset dir="compiled" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/></delete>
335 <delete dir="compiled/common-src"/>
336 <delete dir="compiled/build-src"/>
337 <delete dir="compiled/runtime-src"/>
338 <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>
339 </if>
340
341 <!-- strip .svn working-copy dirs -->
342 <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall>
343
344 <!-- create needed empty files -->
345 <mkdir dir="compiled/tmp"/>
346 <chmod dir="compiled/tmp" perm="a+rwx"/>
347 <echo file="compiled/etc/usage.txt"></echo>
348
349 <!-- scripts to compile GS2 are not needed in the binary -->
350 <delete file="compiled/makegs2.bat"/>
351 <delete file="compiled/makegs2x64.bat"/>
352 <delete file="compiled/makegs2.sh"/>
353
354 <!-- windows -->
355 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
356
357 <!-- make a copy of server.exe in the root -->
358 <copy file="compiled/bin/windows/server.exe" tofile="compiled/server.exe"/>
359
360 <!-- delete sourcecode -->
361 <delete dir="${binzip.dir}/common-src"/>
362 <delete dir="${binzip.dir}/build-src"/>
363 <delete dir="${binzip.dir}/runtime-src"/>
364
365 <!-- create simple zipped binary distribution
366 <mkdir dir="distributions"/>
367 <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
368 <copy todir="${binzip.dir}"><fileset dir="compiled"/></copy>
369 <delete><fileset dir="${binzip.dir}" includes="README*.txt,Uninstall.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/></delete>
370 -->
371
372 <!-- delete unneeded files -->
373 <delete dir="compiled/bin/linux" />
374<!--
375 Actually, leaving these in is helpful for running a cross-platform
376 Pure JAVA install
377 <delete><fileset dir="compiled" includes="*.bash,*.sh,*.csh,.gstermrc,makegs2.bat"/></delete>
378 <delete><fileset dir="compiled/gli" includes="*.sh,*4gs3.bat"/></delete>
379
380-->
381 <delete><fileset dir="compiled/gli" includes="*4gs3.bat"/></delete>
382 <delete dir="compiled/autom4te.cache" />
383
384 <!-- linux -->
385 <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
386
387 <!-- grab imagemagick and wv (if less than 2.84) binaries -->
388 <delete dir="compiled/bin/linux/imagemagick"/>
389
390 <if><bool><equals arg1="${post.2.83.version}" arg2="true"/></bool>
391 <!--<if><bool><equals arg1="${x64}" arg2="true"/></bool>-->
392 <exec executable="svn">
393 <arg value="export"/>
394 <arg value="${svn.root}/gs2-extensions/imagemagick/trunk/imagemagick-linux${extension-x64}.tar.gz"/>
395 <arg value="compiled/ext/imagemagick-linux${extension-x64}.tar.gz"/>
396 </exec>
397
398 <exec executable="tar" dir="compiled/ext">
399 <arg value="xvzf"/>
400 <arg value="imagemagick-linux${extension-x64}.tar.gz"/>
401 </exec>
402 <delete file="compiled/ext/imagemagick-linux${extension-x64}.tar.gz"/>
403 <move todir="compiled/bin/linux/imagemagick">
404 <fileset dir="compiled/ext/imagemagick/linux"/>
405 </move>
406 <!--<else>
407 <exec executable="svn">
408 <arg value="export"/>
409 <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
410 <arg value="compiled/bin/linux/imagemagick"/>
411 </exec>
412 </else>
413 </if>-->
414 <else>
415 <delete dir="compiled/bin/linux/wv"/>
416 <exec executable="svn">
417 <arg value="export"/>
418 <arg value="${svn.root}/main/trunk/binaries/linux/imagemagick"/>
419 <arg value="compiled/bin/linux/imagemagick"/>
420 </exec>
421
422 <exec executable="svn">
423 <arg value="export"/>
424 <arg value="${svn.root}/main/trunk/binaries/linux/wv"/>
425 <arg value="compiled/bin/linux/wv"/>
426 </exec>
427 </else>
428 </if>
429
430 <!-- delete unneeded files -->
431 <delete><fileset dir="compiled" includes="win32.mak,win32cfg.h,Install.sh,Support.htm,micotest.cpp"/></delete>
432<!--
433 Actually useful to keep these files around for a Pure Java install
434 <delete><fileset dir="compiled/gli" includes="*.bat"/></delete>
435 <delete><fileset dir="compiled" includes="*.bat"/></delete>
436-->
437 <delete dir="compiled/common-src/packages/windows"/>
438 <delete dir="compiled/common-src/indexers/packages/windows"/>
439
440 <!-- mac -->
441 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
442 <!-- grab imagemagick and ghostscript binaries -->
443 <delete dir="compiled/bin/darwin/imagemagick"/>
444 <delete dir="compiled/bin/darwin/ghostscript"/>
445
446 <if><bool><equals arg1="${post.2.83.version}" arg2="true"/></bool>
447
448 <!--<exec executable="svn">
449 <arg value="export"/>
450 <arg value="${svn.root}/gs2-extensions/imagemagick/trunk/imagemagick-darwin-10.5.tar.gz"/>
451 <arg value="compiled/ext/imagemagick-darwin-10.5.tar.gz"/>
452 </exec>
453
454 <exec executable="tar" dir="compiled/ext">
455 <arg value="xvzf"/>
456 <arg value="imagemagick-darwin-10.5.tar.gz"/>
457 </exec>
458 <delete file="compiled/ext/imagemagick-darwin-10.5.tar.gz"/>
459 <move todir="compiled/bin/darwin/imagemagick">
460 <fileset dir="compiled/ext/imagemagick/darwin"/>
461 </move>-->
462
463 <exec executable="svn">
464 <arg value="export"/>
465 <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
466 <arg value="compiled/bin/darwin/imagemagick"/>
467 </exec>
468
469 <exec executable="svn">
470 <arg value="export"/>
471 <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
472 <arg value="compiled/bin/darwin/ghostscript"/>
473 </exec>
474
475 <else>
476 <exec executable="svn">
477 <arg value="export"/>
478 <arg value="${svn.root}/main/trunk/binaries/mac/intel/imagemagick"/>
479 <arg value="compiled/bin/darwin/imagemagick"/>
480 </exec>
481
482 <exec executable="svn">
483 <arg value="export"/>
484 <arg value="${svn.root}/main/trunk/binaries/mac/intel/ghostscript"/>
485 <arg value="compiled/bin/darwin/ghostscript"/>
486 </exec>
487 </else>
488 </if>
489
490 <!-- delete unneeded files -->
491 <delete><fileset dir="compiled" includes="win32.mak,win32cfg.h,Install.sh,Support.htm"/></delete>
492<!--
493 Actually useful to keep these files around for a Pure Java install
494 <delete><fileset dir="compiled/gli" includes="*.bat"/></delete>
495 <delete><fileset dir="compiled" includes="*.bat"/></delete>
496-->
497
498 <delete dir="compiled/common-src/packages/windows"/>
499
500 </if></else></if></else></if>
501
502 <!-- build demo collection -->
503 <!-- the envs on these execs simulate the environment when you run setup.bat -->
504 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
505
506 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl">
507 <arg line="-S"/>
508 <arg line="bin/script/import.pl demo"/>
509 <env key="GSDLHOME" path="${basedir}/compiled"/>
510 <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/collect"/>
511 <env key="GSDLOS" value="windows"/>
512 <env key="PATH" path="${basedir}/compiled/bin/windows/perl/bin:${basedir}/compiled/bin/windows:${basedir}/compiled/bin/script:${env.PATH}"/>
513 </exec>
514 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl">
515 <arg line="-S"/>
516 <arg line="bin/script/buildcol.pl demo"/>
517 <env key="GSDLHOME" path="${basedir}/compiled"/>
518 <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/collect"/>
519 <env key="GSDLOS" value="windows"/>
520 <env key="PATH" path="${basedir}/compiled/bin/windows/perl/bin:${basedir}/compiled/bin/windows:${basedir}/compiled/bin/script:${env.PATH}"/>
521 </exec>
522
523 <delete dir="${basedir}/compiled/collect/demo/index"/>
524 <move file="${basedir}/compiled/collect/demo/building" tofile="${basedir}/compiled/collect/demo/index"/>
525
526 <else>
527 <echo file="${basedir}/compiled/buildscript.sh">
528 #!/bin/bash
529 source setup.bash
530 /usr/bin/perl -S ${basedir}/compiled/bin/script/full-rebuild.pl demo
531 </echo>
532 <chmod perm="755" file="${basedir}/compiled/buildscript.sh"/>
533 <exec dir="${basedir}/compiled" executable="/bin/bash">
534 <arg line="buildscript.sh"/>
535 </exec>
536 <delete file="${basedir}/compiled/buildscript.sh"/>
537 </else>
538 </if>
539
540 <!-- delete unneeded files -->
541 <delete dir="compiled/uninstaller" />
542 <delete file="compiled/bin/java/SignedGatherer.jar" />
543
544 <!-- tidy up gli -->
545 <antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall>
546 <echo>Setting up export to cdrom package</echo>
547 <!-- mac and linux: insert export to cdrom package -->
548 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
549 <mkdir dir="compiled/bin/windows"/>
550 <!--<get src="${server.exe.location}" dest="compiled/bin/windows/server.exe"/>-->
551 <exec executable="wget" failonerror="true">
552 <arg value="-P"/>
553 <arg value="compiled/bin/windows"/>
554 <arg value="--no-check-certificate"/>
555 <arg value="${server.exe.location}"/>
556 </exec>
557 <move file="compiled/bin/windows/latest-server.exe"
558 tofile="distributions/${dist.name}/bin/windows/server.exe"/>
559
560 <if><bool><equals arg1="${post.2.83.version}" arg2="true"/></bool>
561 <!--<get src="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe" dest="compiled/bin/windows/Setup.exe"/>
562 <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe" dest="compiled/bin/windows/gssetup.exe"/>-->
563 <exec executable="svn">
564 <arg value="export"/>
565 <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe"/>
566 <arg value="compiled/bin/windows/Setup.exe"/>
567 </exec>
568 <exec executable="svn">
569 <arg value="export"/>
570 <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe"/>
571 <arg value="compiled/bin/windows/gssetup.exe"/>
572 </exec>
573
574 <else>
575 <!--<get src="${svn.root}/main/trunk/binaries/windows/bin/Setup.exe" dest="compiled/bin/windows/Setup.exe"/>
576 <get src="${svn.root}/main/trunk/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/trunk/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/trunk/binaries/windows/bin/gssetup.exe"/>
585 <arg value="compiled/bin/windows/gssetup.exe"/>
586 </exec>
587 </else>
588 </if>
589 </if>
590
591 </target>
592
593</project>
Note: See TracBrowser for help on using the repository browser.