root/release-kits/wirk2/ant-scripts/compile.xml @ 17257

Revision 17257, 3.8 KB (checked in by oranfry, 11 years ago)

added the uninstaller to all release kits

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="set-version-numbers" />
7        <antcall target="unzip-packages" />
8        <antcall target="get-winbin" />
9        <antcall target="insert-perl" />
10        <antcall target="compile-c-code" />
11        <antcall target="compile-uninstaller" /> <!-- from global-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}/gsdl"/>
18            <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/gsdl/gli"/>
19        </svn>
20    </target>
21
22    <target name="set-version-numbers">
23        <rsr file="${basedir}/gsdl/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION ).*" replacement="$1&quot;${version}&quot;" />
24        <rsr file="${basedir}/gsdl/Install.sh" pattern="(echo &quot;Version: ).*(&quot; .*)" replacement="$1${version}$2" />
25        <rsr file="${basedir}/gsdl/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
26    </target>
27
28    <target name="unzip-packages">
29        <unzip src="${basedir}/gsdl/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/gsdl/common-src/packages/windows/crypt"/>
30        <unzip src="${basedir}/gsdl/common-src/packages/windows/expat/expat.zip" dest="${basedir}/gsdl/common-src/packages/windows/expat"/>
31        <unzip src="${basedir}/gsdl/common-src/packages/windows/gdbm/gdbm.zip" dest="${basedir}/gsdl/common-src/packages/windows/gdbm"/>
32        <unzip src="${basedir}/gsdl/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/gsdl/common-src/packages/windows/stlport"/>
33        <unzip src="${basedir}/gsdl/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/gsdl/common-src/indexers/packages/windows/iconv"/>
34    </target>
35
36    <target name="get-winbin">
37        <if>
38            <bool><not><available file="${basedir}/gsdl/bin/windows"/></not></bool>
39            <svn><export srcUrl="${svn.root}/other-projects/trunk/winbin/bin" destPath="${basedir}/gsdl/bin/windows" revision="${branch.revision}"/></svn>
40        </if>
41    </target>
42
43    <target name="insert-perl">
44        <mkdir dir="${basedir}/gsdl/bin/windows"/>
45        <delete dir="${basedir}/gsdl/bin/windows/perl"/>
46        <unzip src="${wirk2.home}/resources/perl.zip" dest="${basedir}/gsdl/bin/windows"/>
47    </target>
48   
49    <target name="compile-c-code">
50        <copy file="${wirk2.home}/resources/compile.bat" todir="${basedir}/gsdl" overwrite="true"/>
51        <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/compile.bat" />
52        <copy file="${basedir}/gsdl/server.exe" todir="${basedir}/gsdl/bin/windows"/>
53        <move todir="${basedir}/gsdl/bin/windows">
54            <fileset dir="${basedir}/gsdl/cgi-bin" includes="library.exe,oaiserver.exe"/>
55        </move>
56    </target>
57   
58    <target name="build-demo-collection">
59        <!-- the envs on these execs simulate the environment when you run setup.bat -->
60        <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/bin/windows/perl/bin/perl.exe">
61            <arg line="bin\script\import.pl --removeold demo"/>
62            <env key="GSDLHOME" value="${basedir}/gsdl"/>
63            <env key="GSDLCOLLECTDIR" value="${basedir}/gsdl/collect"/>
64            <env key="GSDLOS" value="windows"/>
65            <env key="PATH" value="${basedir}\gsdl\bin\windows\perl\bin;${basedir}\gsdl\bin\windows;${basedir}\gsdl\bin\script"/>
66        </exec>
67        <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/bin/windows/perl/bin/perl.exe">
68            <arg line="bin\script\buildcol.pl --removeold demo"/>
69            <env key="GSDLHOME" value="${basedir}/gsdl"/>
70            <env key="GSDLCOLLECTDIR" value="${basedir}/gsdl/collect"/>
71            <env key="GSDLOS" value="windows"/>
72            <env key="PATH" value="${basedir}\gsdl\bin\windows\perl\bin;${basedir}\gsdl\bin\windows;${basedir}\gsdl\bin\script"/>
73        </exec>
74       
75        <delete dir="${basedir}/gsdl/collect/demo/index"/>
76        <move file="${basedir}/gsdl/collect/demo/building" tofile="${basedir}/gsdl/collect/demo/index"/>
77    </target>
78   
79</project>
Note: See TracBrowser for help on using the browser.