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