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="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
|
---|
7 | <antcall target="unzip-packages" />
|
---|
8 | <antcall target="get-winbin" />
|
---|
9 | <antcall target="insert-windows-perl"><param name="gsdl.basedir" value="compiled"/></antcall>
|
---|
10 | <antcall target="compile-c-code" />
|
---|
11 | <antcall target="compile-uninstaller" /> <!-- from rk2-targets -->
|
---|
12 | <antcall target="build-demo-collection" />
|
---|
13 | </target>
|
---|
14 |
|
---|
15 | <target name="checkout-gsdl-gli">
|
---|
16 | <svn>
|
---|
17 | <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/compiled"/>
|
---|
18 | <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/compiled/gli"/>
|
---|
19 | </svn>
|
---|
20 | </target>
|
---|
21 |
|
---|
22 | <target name="unzip-packages">
|
---|
23 | <unzip src="${basedir}/compiled/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/compiled/common-src/packages/windows/crypt"/>
|
---|
24 | <unzip src="${basedir}/compiled/common-src/packages/windows/expat/expat.zip" dest="${basedir}/compiled/common-src/packages/windows/expat"/>
|
---|
25 | <unzip src="${basedir}/compiled/common-src/packages/windows/gdbm/gdbm.zip" dest="${basedir}/compiled/common-src/packages/windows/gdbm"/>
|
---|
26 | <unzip src="${basedir}/compiled/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/compiled/common-src/packages/windows/stlport"/>
|
---|
27 | <unzip src="${basedir}/compiled/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/compiled/common-src/indexers/packages/windows/iconv"/>
|
---|
28 | <untar src="${basedir}/compiled/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/compiled/common-src/packages/sqlite"/>
|
---|
29 | </target>
|
---|
30 |
|
---|
31 | <target name="get-winbin">
|
---|
32 | <if>
|
---|
33 | <bool><not><available file="${basedir}/compiled/bin/windows"/></not></bool>
|
---|
34 | <svn><export srcUrl="${svn.root}/other-projects/trunk/winbin/bin" destPath="${basedir}/compiled/bin/windows" revision="${branch.revision}"/></svn>
|
---|
35 | </if>
|
---|
36 | </target>
|
---|
37 |
|
---|
38 | <target name="compile-c-code">
|
---|
39 | <copy file="${wirk2.home}/resources/compile.bat" todir="${basedir}/compiled" overwrite="true"/>
|
---|
40 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/compile.bat" />
|
---|
41 | <move file="${basedir}/compiled/server.exe" todir="${basedir}/compiled/bin/windows"/>
|
---|
42 | <move todir="${basedir}/compiled/bin/windows">
|
---|
43 | <fileset dir="${basedir}/compiled/cgi-bin" includes="library.exe,oaiserver.exe"/>
|
---|
44 | </move>
|
---|
45 | </target>
|
---|
46 |
|
---|
47 | <target name="build-demo-collection">
|
---|
48 | <!-- the envs on these execs simulate the environment when you run setup.bat -->
|
---|
49 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl.exe">
|
---|
50 | <arg line="bin\script\import.pl --removeold demo"/>
|
---|
51 | <env key="GSDLHOME" value="${basedir}/compiled"/>
|
---|
52 | <env key="GSDLCOLLECTDIR" value="${basedir}/compiled/collect"/>
|
---|
53 | <env key="GSDLOS" value="windows"/>
|
---|
54 | <env key="PATH" value="${basedir}\compiled\bin\windows\perl\bin;${basedir}\compiled\bin\windows;${basedir}\compiled\bin\script"/>
|
---|
55 | </exec>
|
---|
56 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl.exe">
|
---|
57 | <arg line="bin\script\buildcol.pl --removeold demo"/>
|
---|
58 | <env key="GSDLHOME" value="${basedir}/compiled"/>
|
---|
59 | <env key="GSDLCOLLECTDIR" value="${basedir}/compiled/collect"/>
|
---|
60 | <env key="GSDLOS" value="windows"/>
|
---|
61 | <env key="PATH" value="${basedir}\compiled\bin\windows\perl\bin;${basedir}\compiled\bin\windows;${basedir}\compiled\bin\script"/>
|
---|
62 | </exec>
|
---|
63 |
|
---|
64 | <delete dir="${basedir}/compiled/collect/demo/index"/>
|
---|
65 | <move file="${basedir}/compiled/collect/demo/building" tofile="${basedir}/compiled/collect/demo/index"/>
|
---|
66 | </target>
|
---|
67 |
|
---|
68 | </project>
|
---|