1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 | <project name="wirk2-create-distribution" default="create-distribution">
|
---|
3 |
|
---|
4 | <target name="create-distribution">
|
---|
5 | <antcall target="export-gsdl-gli" />
|
---|
6 | <antcall target="dist-set-version" />
|
---|
7 | <antcall target="drop-in-binaries" />
|
---|
8 | <antcall target="drop-in-demo-collection" />
|
---|
9 | <antcall target="drop-in-docs" />
|
---|
10 | <antcall target="drop-in-misc" />
|
---|
11 | <antcall target="insert-uninstaller"><param name="script-format" value="bat"/></antcall> <!-- from rk2-targets -->
|
---|
12 | <antcall target="compile-gli" />
|
---|
13 | <antcall target="tweak-files" />
|
---|
14 | </target>
|
---|
15 |
|
---|
16 | <target name="export-gsdl-gli">
|
---|
17 | <mkdir dir="distributions"/>
|
---|
18 | <delete dir="distributions/web"/>
|
---|
19 | <svn>
|
---|
20 | <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distributions/web"/>
|
---|
21 | <export srcurl="${svn.root}/gli/${branch.path}" destPath="distributions/web/gli"/>
|
---|
22 | </svn>
|
---|
23 | </target>
|
---|
24 |
|
---|
25 | <target name="dist-set-version">
|
---|
26 | <echo level="info">Setting version in src/lib/gsdlconf.h</echo>
|
---|
27 | <rsr file="${basedir}/distributions/web/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) ".*"" replacement="$1 "${version}"" />
|
---|
28 | <echo level="info">Setting version in etc/VERSION</echo>
|
---|
29 | <rsr file="${basedir}/distributions/web/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
|
---|
30 | </target>
|
---|
31 |
|
---|
32 | <target name="drop-in-binaries">
|
---|
33 | <echo level="info">Dropping compiled binaries into distribution</echo>
|
---|
34 | <delete dir="${basedir}/distributions/web/bin/windows" />
|
---|
35 | <copy todir="${basedir}/distributions/web/bin/windows">
|
---|
36 | <fileset dir="${basedir}/gsdl/bin/windows" includes="**/*"/>
|
---|
37 | </copy>
|
---|
38 | <copy todir="${basedir}/distributions/web/bin" file="${basedir}/gsdl/bin/search4j.exe"/>
|
---|
39 | <copy todir="${basedir}/distributions/web" file="${basedir}/gsdl/bin/windows/server.exe"/>
|
---|
40 | </target>
|
---|
41 |
|
---|
42 | <target name="drop-in-demo-collection">
|
---|
43 | <echo level="info">Dropping rebuilt demo collection into distribution</echo>
|
---|
44 | <delete dir="${basedir}/distributions/web/collect/demo" />
|
---|
45 | <copy todir="${basedir}/distributions/web/collect/demo">
|
---|
46 | <fileset dir="${basedir}/gsdl/collect/demo" includes="**/*"/>
|
---|
47 | </copy>
|
---|
48 | </target>
|
---|
49 |
|
---|
50 | <target name="drop-in-docs">
|
---|
51 | <echo level="info">Dropping gsdl docs into distribution</echo>
|
---|
52 | <copy todir="${basedir}/distributions/web" overwrite="true">
|
---|
53 | <fileset dir="${wirk2.home}/greenstone2/docs"/>
|
---|
54 | </copy>
|
---|
55 | </target>
|
---|
56 |
|
---|
57 | <target name="drop-in-misc">
|
---|
58 | <echo level="info">Putting the default gsdlsite.cfg at the root of the distribution</echo>
|
---|
59 | <copy todir="${basedir}/distributions/web" file="${wirk2.home}/resources/gsdlsite.cfg" overwrite="true"/>
|
---|
60 | </target>
|
---|
61 |
|
---|
62 | <target name="compile-gli">
|
---|
63 | <echo>Compiling gli...</echo>
|
---|
64 | <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.bat"/>
|
---|
65 |
|
---|
66 | <echo>Creating jar...</echo>
|
---|
67 | <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.bat"/>
|
---|
68 |
|
---|
69 | <echo>Cleaning up intermediate files...</echo>
|
---|
70 | <delete dir="${basedir}/distributions/web/gli/jar"/>
|
---|
71 | <delete dir="${basedir}/distributions/web/gli/classes/org"/>
|
---|
72 |
|
---|
73 | <echo>Putting gli server jar in a better place</echo>
|
---|
74 | <move file="${basedir}/distributions/web/gli/GLIServer.jar" todir="${basedir}/distributions/web/bin/java" />
|
---|
75 | </target>
|
---|
76 |
|
---|
77 | <target name="tweak-files">
|
---|
78 | <echo level="info">Changing date and version in the docs</echo>
|
---|
79 | <!-- ar -->
|
---|
80 | <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(اÙتارÙØ® : \s*)(.*)" replacement="$1${month.ar} ${current.year}" />
|
---|
81 | <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(اÙÙسخ٠: \s*)(.*)" replacement="$1${version}" />
|
---|
82 | <!-- es -->
|
---|
83 | <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}" />
|
---|
84 | <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}" />
|
---|
85 | <!-- fr -->
|
---|
86 | <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}" />
|
---|
87 | <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" />
|
---|
88 | <!-- ru -->
|
---|
89 | <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(ÐаÑа\s*)(.*)" replacement="$1${month.ru} ${current.year}" />
|
---|
90 | <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(ÐеÑÑОÑ\s*)(.*)" replacement="$1${version}" />
|
---|
91 | <!-- en -->
|
---|
92 | <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
|
---|
93 | <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" />
|
---|
94 |
|
---|
95 | <!-- Support.htm -->
|
---|
96 | <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*Greenstone Digital Library version: ).*(<br>.*)" replacement="$1${version}$2"/>
|
---|
97 | <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*<input.* name="gsdl version".* value=").*(".*>)" replacement="$1${version}$2"/>
|
---|
98 |
|
---|
99 |
|
---|
100 | <echo level="info">Removing signed gatherer</echo>
|
---|
101 | <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
|
---|
102 |
|
---|
103 | <echo level="info">Removing some unneeded stuff</echo>
|
---|
104 | <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
|
---|
105 | <delete dir="${basedir}/distributions/web/bin/linux" />
|
---|
106 | <delete><fileset dir="${basedir}/distributions/web" includes="*.bash,*.sh,*.csh,install-sh,configure,configure.in,config.sub,config.guess,config.h.in,configtest.pl,Makefile.in,aclocal.m4,acconfig.h,micotest.cpp,win32.mak,WIN32cfg.h,Install.txt"/></delete>
|
---|
107 | <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.sh,*4gs3.bat"/></delete>
|
---|
108 | </target>
|
---|
109 |
|
---|
110 | </project>
|
---|