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