source: release-kits/wirk2/ant-scripts/compile.xml@ 19586

Last change on this file since 19586 was 18929, checked in by oranfry, 15 years ago

changing the way the release kits make the greenstone2 distribution: instead of starting from a fresh export of greenstone, start from a copy of the compiled working copy

File size: 3.8 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="wirk2-compile" default="compile">
3
4 <target name="compile">
5 <antcall target="checkout-gsdl-gli" />
6 <antcall target="drop-in-docs"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
7 <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
8 <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/compiled/gli"/></antcall>
9
10 <antcall target="unzip-packages" />
11 <antcall target="get-winbin" />
12 <antcall target="insert-windows-perl"><param name="gsdl.basedir" value="compiled"/></antcall>
13 <antcall target="compile-c-code" />
14
15 <!-- gli -->
16 <antcall target="compile-gli">
17 <param name="script.format" value="bat"/>
18 <param name="glibasedir" value="${basedir}/compiled/gli"/>
19 <param name="gsdlbasedir" value="${basedir}/compiled"/>
20 </antcall>
21
22 <!-- uninstaller -->
23 <antcall target="compile-uninstaller" /> <!-- from init -->
24
25 <antcall target="build-demo-collection" />
26 </target>
27
28 <target name="checkout-gsdl-gli">
29 <svn>
30 <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/compiled"/>
31 <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/compiled/gli"/>
32 </svn>
33 </target>
34
35 <target name="unzip-packages">
36 <unzip src="${basedir}/compiled/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/compiled/common-src/packages/windows/crypt"/>
37 <unzip src="${basedir}/compiled/common-src/packages/windows/expat/expat.zip" dest="${basedir}/compiled/common-src/packages/windows/expat"/>
38 <unzip src="${basedir}/compiled/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/compiled/common-src/packages/windows/stlport"/>
39 <unzip src="${basedir}/compiled/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/compiled/common-src/indexers/packages/windows/iconv"/>
40 <untar src="${basedir}/compiled/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/compiled/common-src/packages/sqlite" compression="gzip"/>
41 </target>
42
43 <target name="get-winbin">
44 <if>
45 <bool><not><available file="${basedir}/compiled/bin/windows"/></not></bool>
46 <svn><export srcUrl="${svn.root}/other-projects/trunk/winbin/bin" destPath="${basedir}/compiled/bin/windows" revision="${branch.revision}"/></svn>
47 </if>
48 </target>
49
50 <target name="compile-c-code">
51 <copy file="${wirk2.home}/resources/compile.bat" todir="${basedir}/compiled" overwrite="true"/>
52 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/compile.bat" />
53 <move file="${basedir}/compiled/server.exe" todir="${basedir}/compiled/bin/windows"/>
54 </target>
55
56 <target name="build-demo-collection">
57 <!-- the envs on these execs simulate the environment when you run setup.bat -->
58 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl.exe">
59 <arg line="bin\script\import.pl --removeold demo"/>
60 <env key="GSDLHOME" value="${basedir}/compiled"/>
61 <env key="GSDLCOLLECTDIR" value="${basedir}/compiled/collect"/>
62 <env key="GSDLOS" value="windows"/>
63 <env key="PATH" value="${basedir}\compiled\bin\windows\perl\bin;${basedir}\compiled\bin\windows;${basedir}\compiled\bin\script"/>
64 </exec>
65 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl.exe">
66 <arg line="bin\script\buildcol.pl --removeold demo"/>
67 <env key="GSDLHOME" value="${basedir}/compiled"/>
68 <env key="GSDLCOLLECTDIR" value="${basedir}/compiled/collect"/>
69 <env key="GSDLOS" value="windows"/>
70 <env key="PATH" value="${basedir}\compiled\bin\windows\perl\bin;${basedir}\compiled\bin\windows;${basedir}\compiled\bin\script"/>
71 </exec>
72
73 <delete dir="${basedir}/compiled/collect/demo/index"/>
74 <move file="${basedir}/compiled/collect/demo/building" tofile="${basedir}/compiled/collect/demo/index"/>
75 </target>
76
77</project>
Note: See TracBrowser for help on using the repository browser.