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="insert-windows-vc-dlls"><param name="todir" value="compiled/apache-httpd/windows/bin"/></antcall>
|
---|
14 |
|
---|
15 | <antcall target="compile-c-code" />
|
---|
16 |
|
---|
17 | <!-- gli -->
|
---|
18 | <antcall target="compile-gli">
|
---|
19 | <param name="script.format" value="bat"/>
|
---|
20 | <param name="glibasedir" value="${basedir}/compiled/gli"/>
|
---|
21 | <param name="gsdlbasedir" value="${basedir}/compiled"/>
|
---|
22 | </antcall>
|
---|
23 |
|
---|
24 | <!-- uninstaller -->
|
---|
25 | <antcall target="compile-uninstaller" /> <!-- from init -->
|
---|
26 |
|
---|
27 | <antcall target="build-demo-collection" />
|
---|
28 | </target>
|
---|
29 |
|
---|
30 | <target name="unzip-packages">
|
---|
31 | <unzip src="${basedir}/compiled/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/compiled/common-src/packages/windows/crypt"/>
|
---|
32 | <unzip src="${basedir}/compiled/common-src/packages/windows/expat/expat.zip" dest="${basedir}/compiled/common-src/packages/windows/expat"/>
|
---|
33 | <unzip src="${basedir}/compiled/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/compiled/common-src/packages/windows/stlport"/>
|
---|
34 | <unzip src="${basedir}/compiled/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/compiled/common-src/indexers/packages/windows/iconv"/>
|
---|
35 | <untar src="${basedir}/compiled/runtime-src/packages/apache-httpd/httpd-2.2.11-gs.tar.gz" dest="${basedir}/compiled/runtime-src/packages/apache-httpd" compression="gzip"/>
|
---|
36 | <!--<untar src="${basedir}/compiled/runtime-src/packages/apache-httpd/libiconv-1.13.1.tar.gz" dest="${basedir}/compiled/runtime-src/packages/apache-httpd" compression="gzip"/>-->
|
---|
37 | <untar src="${basedir}/compiled/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/compiled/common-src/packages/sqlite" compression="gzip"/>
|
---|
38 | </target>
|
---|
39 |
|
---|
40 | <target name="get-winbin">
|
---|
41 | <if>
|
---|
42 | <bool><not><available file="${basedir}/compiled/bin/windows"/></not></bool>
|
---|
43 | <svn><export srcUrl="${svn.root}/main/${branch.path}/binaries/windows/bin" destPath="${basedir}/compiled/bin/windows" revision="${branch.revision}"/></svn>
|
---|
44 | </if>
|
---|
45 | </target>
|
---|
46 |
|
---|
47 | <target name="compile-c-code">
|
---|
48 | <copy file="${wirk2.home}/resources/compile.bat" todir="${basedir}/compiled" overwrite="true"/>
|
---|
49 | <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="clean"/></exec>
|
---|
50 | <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="APACHE_HTTPD=1"/></exec>
|
---|
51 | <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="LOCAL_LIBRARY=1"/></exec>
|
---|
52 | <mkdir dir="products"/>
|
---|
53 | <copy file="${basedir}/compiled/server.exe" tofile="${basedir}/products/server-${version}.exe"/>
|
---|
54 | <move file="${basedir}/compiled/server.exe" todir="${basedir}/compiled/bin/windows"/>
|
---|
55 | </target>
|
---|
56 |
|
---|
57 | <target name="build-demo-collection">
|
---|
58 | <!-- the envs on these execs simulate the environment when you run setup.bat -->
|
---|
59 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl.exe">
|
---|
60 | <arg line="bin\script\import.pl --removeold demo"/>
|
---|
61 | <env key="GSDLHOME" value="${basedir}/compiled"/>
|
---|
62 | <env key="GSDLCOLLECTDIR" value="${basedir}/compiled/collect"/>
|
---|
63 | <env key="GSDLOS" value="windows"/>
|
---|
64 | <env key="PATH" value="${basedir}\compiled\bin\windows\perl\bin;${basedir}\compiled\bin\windows;${basedir}\compiled\bin\script"/>
|
---|
65 | </exec>
|
---|
66 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl.exe">
|
---|
67 | <arg line="bin\script\buildcol.pl --removeold demo"/>
|
---|
68 | <env key="GSDLHOME" value="${basedir}/compiled"/>
|
---|
69 | <env key="GSDLCOLLECTDIR" value="${basedir}/compiled/collect"/>
|
---|
70 | <env key="GSDLOS" value="windows"/>
|
---|
71 | <env key="PATH" value="${basedir}\compiled\bin\windows\perl\bin;${basedir}\compiled\bin\windows;${basedir}\compiled\bin\script"/>
|
---|
72 | </exec>
|
---|
73 |
|
---|
74 | <delete dir="${basedir}/compiled/collect/demo/index"/>
|
---|
75 | <move file="${basedir}/compiled/collect/demo/building" tofile="${basedir}/compiled/collect/demo/index"/>
|
---|
76 | </target>
|
---|
77 |
|
---|
78 | <target name="insert-windows-vc-dlls">
|
---|
79 | <property environment="env"/>
|
---|
80 | <copy todir="compiled/apache-httpd/windows/bin"><fileset dir="${env.VCINSTALLDIR}/redist/x86/Microsoft.VC80.CRT"/></copy>
|
---|
81 | <copy todir="compiled/apache-httpd/windows/modules"><fileset dir="${env.VCINSTALLDIR}/redist/x86/Microsoft.VC80.CRT"/></copy>
|
---|
82 | </target>
|
---|
83 |
|
---|
84 | </project>
|
---|