root/release-kits/wirk2/ant-scripts/create-distribution.xml @ 18068

Revision 18068, 4.8 KB (checked in by oranfry, 12 years ago)

moved drop-in-docs call up so the readme version is updated

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="wirk2-create-distribution" default="create-distribution">
3
4    <target name="create-distribution">
5
6        <antcall target="export-gsdl-gli"><param name="dest" value="distributions/web"/></antcall>
7        <antcall target="drop-in-docs"><param name="gsdl.basedir" value="distributions/web"/></antcall>
8        <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/web"/></antcall>
9        <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/web/gli"/></antcall>
10        <antcall target="insert-uninstaller"><param name="script-format" value="bat"/></antcall> <!-- from rk2-targets -->
11        <antcall target="dist-unzip-packages"/>
12        <antcall target="drop-in-binaries" />
13        <antcall target="drop-in-demo-collection" />
14        <antcall target="drop-in-misc" />
15        <antcall target="compile-gli" />
16        <antcall target="remove-unneeded-files" />
17        <antcall target="create-needed-empty-files"><param name="gsdl.basedir" value="distributions/web"/></antcall>
18
19        <antcall target="create-binary-zip-windows"/>
20
21    </target>
22
23    <target name="drop-in-binaries">
24        <echo level="info">Dropping compiled binaries into distribution</echo>
25        <delete dir="${basedir}/distributions/web/bin/windows" />
26        <copy todir="${basedir}/distributions/web/bin/windows">
27            <fileset dir="${basedir}/compiled/bin/windows" includes="**/*"/>
28        </copy>
29        <copy todir="${basedir}/distributions/web" file="${basedir}/compiled/bin/windows/server.exe"/>
30       
31        <echo level="info">Dropping LuceneWrapper.jar in place</echo>
32        <copy file="${basedir}/compiled/bin/java/LuceneWrapper.jar" todir="${basedir}/distributions/web/bin/java" />
33    </target>
34
35    <target name="drop-in-demo-collection">
36        <echo level="info">Dropping rebuilt demo collection into distribution</echo>
37        <delete dir="${basedir}/distributions/web/collect/demo" />
38        <copy todir="${basedir}/distributions/web/collect/demo">
39            <fileset dir="${basedir}/compiled/collect/demo" includes="**/*"/>
40        </copy>
41    </target>
42
43    <target name="drop-in-misc">
44        <echo level="info">Putting the default gsdlsite.cfg at the root of the distribution</echo>
45        <copy todir="${basedir}/distributions/web" file="${wirk2.home}/resources/gsdlsite.cfg" overwrite="true"/>
46    </target>
47   
48    <target name="compile-gli">
49        <echo>Compiling gli...</echo>
50        <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.bat"/>
51       
52        <echo>Creating jar...</echo>
53        <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.bat"/>
54       
55        <echo>Cleaning up intermediate files...</echo>
56        <delete dir="${basedir}/distributions/web/gli/jar"/>
57        <delete dir="${basedir}/distributions/web/gli/classes/org"/>
58       
59        <echo>Putting gli server jar in a better place</echo>
60        <move file="${basedir}/distributions/web/gli/GLIServer.jar" todir="${basedir}/distributions/web/bin/java" />
61    </target>
62
63    <target name="remove-unneeded-files">
64        <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
65        <delete dir="${basedir}/distributions/web/bin/linux" />
66        <delete><fileset dir="${basedir}/distributions/web" includes="*.bash,*.sh,*.csh,Support.htm,install-sh,configure,configure.in,config.sub,config.guess,config.h.in,configtest.pl,Makefile.in,aclocal.m4,acconfig.h,micotest.cpp,Install.sh"/></delete>
67        <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.sh,*4gs3.bat"/></delete>
68        <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
69    </target>   
70
71    <target name="dist-unzip-packages">
72        <unzip src="${basedir}/distributions/web/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/distributions/web/common-src/indexers/packages/windows/iconv"/>
73        <delete file="${basedir}/distributions/web/common-src/indexers/packages/windows/iconv/iconv.zip"/>
74       
75        <unzip src="${basedir}/distributions/web/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/distributions/web/common-src/packages/windows/crypt"/>
76        <delete file="${basedir}/distributions/web/common-src/packages/windows/crypt/crypt.zip"/>
77       
78        <unzip src="${basedir}/distributions/web/common-src/packages/windows/expat/expat.zip" dest="${basedir}/distributions/web/common-src/packages/windows/expat"/>
79        <delete file="${basedir}/distributions/web/common-src/packages/windows/expat/expat.zip"/>
80       
81        <unzip src="${basedir}/distributions/web/common-src/packages/windows/gdbm/gdbm.zip" dest="${basedir}/distributions/web/common-src/packages/windows/gdbm"/>
82        <delete file="${basedir}/distributions/web/common-src/packages/windows/gdbm/gdbm.zip"/>
83       
84        <unzip src="${basedir}/distributions/web/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/distributions/web/common-src/packages/windows/stlport"/>
85        <delete file="${basedir}/distributions/web/common-src/packages/windows/stlport/stlport.zip"/>
86    </target>
87   
88</project>
Note: See TracBrowser for help on using the browser.