source: release-kits/wirk2/ant-scripts/create-distribution.xml@ 18054

Last change on this file since 18054 was 18054, checked in by oranfry, 15 years ago

create needed empty files at build time so they make it into all releases including archive releases

File size: 5.0 KB
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="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/web"/></antcall>
8 <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/web/gli"/></antcall>
9 <antcall target="drop-in-docs" />
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"><parem 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-docs">
44 <echo level="info">Dropping gsdl docs into distribution</echo>
45 <copy todir="${basedir}/distributions/web" overwrite="true">
46 <fileset dir="${wirk2.home}/greenstone2/docs" includes="*.txt"/>
47 </copy>
48 </target>
49
50 <target name="drop-in-misc">
51 <echo level="info">Putting the default gsdlsite.cfg at the root of the distribution</echo>
52 <copy todir="${basedir}/distributions/web" file="${wirk2.home}/resources/gsdlsite.cfg" overwrite="true"/>
53 </target>
54
55 <target name="compile-gli">
56 <echo>Compiling gli...</echo>
57 <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.bat"/>
58
59 <echo>Creating jar...</echo>
60 <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.bat"/>
61
62 <echo>Cleaning up intermediate files...</echo>
63 <delete dir="${basedir}/distributions/web/gli/jar"/>
64 <delete dir="${basedir}/distributions/web/gli/classes/org"/>
65
66 <echo>Putting gli server jar in a better place</echo>
67 <move file="${basedir}/distributions/web/gli/GLIServer.jar" todir="${basedir}/distributions/web/bin/java" />
68 </target>
69
70 <target name="remove-unneeded-files">
71 <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
72 <delete dir="${basedir}/distributions/web/bin/linux" />
73 <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>
74 <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.sh,*4gs3.bat"/></delete>
75 <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
76 </target>
77
78 <target name="dist-unzip-packages">
79 <unzip src="${basedir}/distributions/web/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/distributions/web/common-src/indexers/packages/windows/iconv"/>
80 <delete file="${basedir}/distributions/web/common-src/indexers/packages/windows/iconv/iconv.zip"/>
81
82 <unzip src="${basedir}/distributions/web/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/distributions/web/common-src/packages/windows/crypt"/>
83 <delete file="${basedir}/distributions/web/common-src/packages/windows/crypt/crypt.zip"/>
84
85 <unzip src="${basedir}/distributions/web/common-src/packages/windows/expat/expat.zip" dest="${basedir}/distributions/web/common-src/packages/windows/expat"/>
86 <delete file="${basedir}/distributions/web/common-src/packages/windows/expat/expat.zip"/>
87
88 <unzip src="${basedir}/distributions/web/common-src/packages/windows/gdbm/gdbm.zip" dest="${basedir}/distributions/web/common-src/packages/windows/gdbm"/>
89 <delete file="${basedir}/distributions/web/common-src/packages/windows/gdbm/gdbm.zip"/>
90
91 <unzip src="${basedir}/distributions/web/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/distributions/web/common-src/packages/windows/stlport"/>
92 <delete file="${basedir}/distributions/web/common-src/packages/windows/stlport/stlport.zip"/>
93 </target>
94
95</project>
Note: See TracBrowser for help on using the repository browser.