1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 | <project name="wirk2-create-distribution" default="create-distribution">
|
---|
3 |
|
---|
4 | <target name="create-distribution">
|
---|
5 | <!-- create distribution -->
|
---|
6 | <addressedcall target="export-gsdl-gli-indexers" />
|
---|
7 | <addressedcall target="dist-set-version" />
|
---|
8 | <addressedcall target="drop-in-binaries" />
|
---|
9 | <addressedcall target="drop-in-demo-collection" />
|
---|
10 | <addressedcall target="compile-gli" />
|
---|
11 | <!--<addressedcall target="create-gli-client-zip" />-->
|
---|
12 | <addressedcall target="tweak-files" />
|
---|
13 | </target>
|
---|
14 |
|
---|
15 | <target name="export-gsdl-gli-indexers">
|
---|
16 | <if><bool><istrue value="${execute}"/></bool>
|
---|
17 |
|
---|
18 | <mkdir dir="distributions"/>
|
---|
19 | <delete dir="distributions/web"/>
|
---|
20 | <svn>
|
---|
21 | <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distributions/web"/>
|
---|
22 | <export srcurl="${svn.root}/gli/${branch.path}" destPath="distributions/web/gli"/>
|
---|
23 | <export srcurl="${svn.root}/indexers/${branch.path}" destPath="distributions/web/indexers"/>
|
---|
24 | </svn>
|
---|
25 |
|
---|
26 | </if>
|
---|
27 | </target>
|
---|
28 |
|
---|
29 | <target name="dist-set-version">
|
---|
30 | <if><bool><istrue value="${execute}"/></bool>
|
---|
31 |
|
---|
32 | <echo level="info">Setting version in src/lib/gsdlconf.h</echo>
|
---|
33 | <rsr file="${basedir}/distributions/web/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) ".*"" replacement="$1 "${version}"" />
|
---|
34 |
|
---|
35 | <echo level="info">Setting version in etc/VERSION</echo>
|
---|
36 | <rsr file="${basedir}/distributions/web/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
|
---|
37 |
|
---|
38 | </if>
|
---|
39 | </target>
|
---|
40 |
|
---|
41 | <target name="drop-in-binaries">
|
---|
42 | <if><bool><istrue value="${execute}"/></bool>
|
---|
43 | <echo level="info">Dropping compiled binaries into distribution</echo>
|
---|
44 | <delete dir="${basedir}/distributions/web/bin/windows" />
|
---|
45 | <copy todir="${basedir}/distributions/web/bin/windows">
|
---|
46 | <fileset dir="${basedir}/gsdl/bin/windows" includes="**/*"/>
|
---|
47 | </copy>
|
---|
48 | </if>
|
---|
49 | </target>
|
---|
50 |
|
---|
51 | <target name="drop-in-demo-collection">
|
---|
52 | <if><bool><istrue value="${execute}"/></bool>
|
---|
53 | <echo level="info">Dropping rebuilt demo collection into distribution</echo>
|
---|
54 | <delete dir="${basedir}/distributions/web/collect/demo" />
|
---|
55 | <copy todir="${basedir}/distributions/web/collect/demo">
|
---|
56 | <fileset dir="${basedir}/gsdl/collect/demo" includes="**/*"/>
|
---|
57 | </copy>
|
---|
58 | </if>
|
---|
59 | </target>
|
---|
60 |
|
---|
61 | <target name="compile-gli">
|
---|
62 | <if><bool><istrue value="${execute}"/></bool>
|
---|
63 |
|
---|
64 | <echo>Compiling gli...</echo>
|
---|
65 | <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.bat"/>
|
---|
66 |
|
---|
67 | <echo>Creating jar...</echo>
|
---|
68 | <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.bat"/>
|
---|
69 |
|
---|
70 | <echo>Cleaning up intermediate files...</echo>
|
---|
71 | <delete dir="${basedir}/distributions/web/gli/jar"/>
|
---|
72 | <delete dir="${basedir}/distributions/web/gli/classes/org"/>
|
---|
73 |
|
---|
74 | <echo>Putting gli server jar in a better place</echo>
|
---|
75 | <move file="${basedir}/distributions/web/gli/GLIServer.jar" todir="${basedir}/distributions/web/bin/java" />
|
---|
76 |
|
---|
77 | </if>
|
---|
78 | </target>
|
---|
79 |
|
---|
80 | <target name="tweak-files">
|
---|
81 | <if><bool><istrue value="${execute}"/></bool>
|
---|
82 |
|
---|
83 | <echo level="info">Putting the docs into distribution</echo>
|
---|
84 | <copy todir="${basedir}/distributions/web" overwrite="true">
|
---|
85 | <fileset dir="${wirk2.home}/greenstone2/docs"/>
|
---|
86 | </copy>
|
---|
87 |
|
---|
88 | <echo level="info">Removing signed gatherer</echo>
|
---|
89 | <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
|
---|
90 |
|
---|
91 | <echo level="info">Removing some unneeded stuff</echo>
|
---|
92 | <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
|
---|
93 | <delete file="${basedir}/distributions/web/gli/gli4gs3.sh" />
|
---|
94 | <delete dir="${basedir}/distributions/web/bin/linux" />
|
---|
95 | <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>
|
---|
96 | <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.sh,*4gs3.bat"/></delete>
|
---|
97 |
|
---|
98 | </if>
|
---|
99 | </target>
|
---|
100 |
|
---|
101 | </project>
|
---|