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="todir" value="compiled/bin/windows"/></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="unzip-packages">
|
---|
29 | <unzip src="${basedir}/compiled/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/compiled/common-src/packages/windows/crypt"/>
|
---|
30 | <unzip src="${basedir}/compiled/common-src/packages/windows/expat/expat.zip" dest="${basedir}/compiled/common-src/packages/windows/expat"/>
|
---|
31 | <unzip src="${basedir}/compiled/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/compiled/common-src/packages/windows/stlport"/>
|
---|
32 | <unzip src="${basedir}/compiled/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/compiled/common-src/indexers/packages/windows/iconv"/>
|
---|
33 | <untar src="${basedir}/compiled/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/compiled/common-src/packages/sqlite" compression="gzip"/>
|
---|
34 | </target>
|
---|
35 |
|
---|
36 | <target name="get-winbin">
|
---|
37 | <if>
|
---|
38 | <bool><not><available file="${basedir}/compiled/bin/windows"/></not></bool>
|
---|
39 | <svn><export srcUrl="${svn.root}/other-projects/trunk/winbin/bin" destPath="${basedir}/compiled/bin/windows" revision="${branch.revision}"/></svn>
|
---|
40 | </if>
|
---|
41 | </target>
|
---|
42 |
|
---|
43 | <target name="compile-c-code">
|
---|
44 | <copy file="${wirk2.home}/resources/compile.bat" todir="${basedir}/compiled" overwrite="true"/>
|
---|
45 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/compile.bat" />
|
---|
46 | <mkdir dir="products"/>
|
---|
47 | <copy file="${basedir}/compiled/server.exe" tofile="${basedir}/products/server-${version}.exe"/>
|
---|
48 | <move file="${basedir}/compiled/server.exe" todir="${basedir}/compiled/bin/windows"/>
|
---|
49 | </target>
|
---|
50 |
|
---|
51 | <target name="build-demo-collection">
|
---|
52 | <!-- the envs on these execs simulate the environment when you run setup.bat -->
|
---|
53 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl.exe">
|
---|
54 | <arg line="bin\script\import.pl --removeold demo"/>
|
---|
55 | <env key="GSDLHOME" value="${basedir}/compiled"/>
|
---|
56 | <env key="GSDLCOLLECTDIR" value="${basedir}/compiled/collect"/>
|
---|
57 | <env key="GSDLOS" value="windows"/>
|
---|
58 | <env key="PATH" value="${basedir}\compiled\bin\windows\perl\bin;${basedir}\compiled\bin\windows;${basedir}\compiled\bin\script"/>
|
---|
59 | </exec>
|
---|
60 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl.exe">
|
---|
61 | <arg line="bin\script\buildcol.pl --removeold demo"/>
|
---|
62 | <env key="GSDLHOME" value="${basedir}/compiled"/>
|
---|
63 | <env key="GSDLCOLLECTDIR" value="${basedir}/compiled/collect"/>
|
---|
64 | <env key="GSDLOS" value="windows"/>
|
---|
65 | <env key="PATH" value="${basedir}\compiled\bin\windows\perl\bin;${basedir}\compiled\bin\windows;${basedir}\compiled\bin\script"/>
|
---|
66 | </exec>
|
---|
67 |
|
---|
68 | <delete dir="${basedir}/compiled/collect/demo/index"/>
|
---|
69 | <move file="${basedir}/compiled/collect/demo/building" tofile="${basedir}/compiled/collect/demo/index"/>
|
---|
70 | </target>
|
---|
71 |
|
---|
72 | </project>
|
---|