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