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

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