[22097] | 1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
| 2 | <project name="rk2-compile">
|
---|
| 3 |
|
---|
| 4 | <target name="compile" depends="init,gs2-init">
|
---|
| 5 | <!-- checkout greenstone2 (or gsdl if a pre-2.84 release is being created) and gli -->
|
---|
| 6 | <if>
|
---|
[22479] | 7 | <bool>
|
---|
| 8 | <or>
|
---|
| 9 | <equals arg1="${branch.path}" arg2="trunk"/>
|
---|
| 10 | <equals arg1="${branch.path}" arg2="tags/stable"/>
|
---|
| 11 | <isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/>
|
---|
| 12 | </or>
|
---|
| 13 | </bool>
|
---|
[22821] | 14 | <exec executable="svn">
|
---|
[22479] | 15 | <arg value="checkout"/>
|
---|
| 16 | <arg value="${svn.root}/main/${branch.path}/greenstone2"/>
|
---|
| 17 | <arg value="${basedir}/compiled"/>
|
---|
[22821] | 18 | </exec>
|
---|
[22479] | 19 | <else>
|
---|
| 20 | <exec executable="svn">
|
---|
| 21 | <arg value="checkout"/>
|
---|
| 22 | <arg value="${svn.root}/main/${branch.path}/gsdl"/>
|
---|
| 23 | <arg value="${basedir}/compiled"/>
|
---|
| 24 | </exec>
|
---|
| 25 | </else>
|
---|
[22097] | 26 | </if>
|
---|
[22479] | 27 |
|
---|
[22821] | 28 | <exec executable="svn">
|
---|
| 29 | <arg value="checkout"/>
|
---|
| 30 | <arg value="${svn.root}/main/${branch.path}/gli"/>
|
---|
| 31 | <arg value="${basedir}/compiled/gli"/>
|
---|
[22097] | 32 | </exec>
|
---|
| 33 |
|
---|
| 34 | <!-- drop in documentation -->
|
---|
| 35 | <copy todir="compiled" overwrite="true">
|
---|
| 36 | <fileset dir="${rk.home}/shared/greenstone2/docs" excludes="READMEar.txt,READMEes.txt,READMEfr.txt,READMEru.txt"/>
|
---|
| 37 | </copy>
|
---|
| 38 |
|
---|
| 39 | <!-- set version numbers -->
|
---|
| 40 | <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
|
---|
| 41 | <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/compiled/gli"/></antcall>
|
---|
| 42 |
|
---|
[22389] | 43 | <!-- we do not want the *.app folders if we are not mac-->
|
---|
| 44 | <if><bool><not><equals arg1="${rk.os}" arg2="mac"/></not></bool>
|
---|
| 45 | <delete dir="${basedir}/compiled/client-gli.app"/>
|
---|
| 46 | <delete dir="${basedir}/compiled/gems.app"/>
|
---|
| 47 | <delete dir="${basedir}/compiled/gs2-server.app"/>
|
---|
[22461] | 48 | <delete dir="${basedir}/compiled/gli.app"/>
|
---|
[22389] | 49 | </if>
|
---|
[22821] | 50 |
|
---|
[23153] | 51 | <!-- mac or linux: get the support library -->
|
---|
[22821] | 52 | <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
|
---|
| 53 | <!-- checkout the gnome support library extension-->
|
---|
[22938] | 54 | <if><bool><or>
|
---|
| 55 | <equals arg1="${branch.path}" arg2="trunk"/>
|
---|
| 56 | <equals arg1="${branch.path}" arg2="tags/stable"/>
|
---|
[22821] | 57 | <isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/>
|
---|
[22938] | 58 | </or></bool>
|
---|
[23117] | 59 | <!-- Check out the pre-compiled version of the gnome-lib extension rather than compiling it from scratch -->
|
---|
[23032] | 60 | <echo>EXPORTING GNOME LIB EXTENSION</echo>
|
---|
[22821] | 61 | <exec executable="svn">
|
---|
[23032] | 62 | <arg value="export"/>
|
---|
| 63 | <arg value="${svn.root}/gs2-extensions/gnome-lib/trunk/gnome-lib-${os.shell}.tar.gz"/>
|
---|
| 64 | <arg value="${basedir}/compiled/ext/gnome-lib-${os.shell}.tar.gz"/>
|
---|
[22821] | 65 | </exec>
|
---|
[23032] | 66 |
|
---|
[23153] | 67 | <exec executable="tar" dir="${basedir}/compiled/ext">
|
---|
[23032] | 68 | <arg value="xvzf"/>
|
---|
| 69 | <arg value="gnome-lib-${os.shell}.tar.gz"/>
|
---|
[22821] | 70 | </exec>
|
---|
[23117] | 71 |
|
---|
| 72 | <exec executable="/bin/bash" dir="${basedir}/compiled/ext/gnome-lib">
|
---|
| 73 | <arg value="-c"/>
|
---|
| 74 | <arg value="source devel.bash"/>
|
---|
| 75 | </exec>
|
---|
[23032] | 76 | <echo>DONE EXTRACTING GNOME LIB EXTENSION</echo>
|
---|
[22938] | 77 | </if>
|
---|
[22821] | 78 | </if>
|
---|
[22389] | 79 |
|
---|
[22097] | 80 | <!-- windows only -->
|
---|
| 81 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
| 82 |
|
---|
| 83 | <!-- unzip packages -->
|
---|
| 84 | <unzip src="${basedir}/compiled/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/compiled/common-src/packages/windows/crypt"/>
|
---|
[22781] | 85 |
|
---|
| 86 | <!-- unzip expat if the version is less that 2.84 -->
|
---|
| 87 | <if><bool><and>
|
---|
| 88 | <not><equals arg1="${branch.path}" arg2="trunk"/></not>
|
---|
| 89 | <not><equals arg1="${branch.path}" arg2="tags/stable"/></not>
|
---|
| 90 | <islessthan arg1="${branch.tag.version}" arg2="2.84"/>
|
---|
| 91 | </and></bool>
|
---|
| 92 | <unzip src="${basedir}/compiled/common-src/packages/windows/expat/expat.zip" dest="${basedir}/compiled/common-src/packages/windows/expat"/>
|
---|
| 93 | </if>
|
---|
| 94 |
|
---|
[22097] | 95 | <unzip src="${basedir}/compiled/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/compiled/common-src/packages/windows/stlport"/>
|
---|
| 96 | <unzip src="${basedir}/compiled/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/compiled/common-src/indexers/packages/windows/iconv"/>
|
---|
| 97 | <untar src="${basedir}/compiled/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/compiled/common-src/packages/sqlite" compression="gzip"/>
|
---|
| 98 |
|
---|
| 99 | <!-- get winbin from tags if the version is greater than 2.83 otherwise get it from trunk -->
|
---|
| 100 | <if><bool><not><available file="${basedir}/compiled/bin/windows"/></not></bool>
|
---|
[22781] | 101 | <if><bool><and>
|
---|
| 102 | <not><equals arg1="${branch.path}" arg2="trunk"/></not>
|
---|
| 103 | <not><equals arg1="${branch.path}" arg2="tags/stable"/></not>
|
---|
| 104 | <isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/>
|
---|
| 105 | </and></bool>
|
---|
[22160] | 106 |
|
---|
| 107 | <exec executable="svn">
|
---|
| 108 | <arg value="export"/>
|
---|
| 109 | <arg value="${svn.root}/main/${branch.path}/binaries/windows/bin"/>
|
---|
| 110 | <arg value="${basedir}/compiled/bin/windows"/>
|
---|
| 111 | <arg value="-r"/>
|
---|
| 112 | <arg value="${branch.revision}"/>
|
---|
| 113 | </exec>
|
---|
| 114 |
|
---|
| 115 | <else>
|
---|
| 116 | <exec executable="svn">
|
---|
| 117 | <arg value="export"/>
|
---|
| 118 | <arg value="${svn.root}/main/trunk/binaries/windows/bin"/>
|
---|
| 119 | <arg value="${basedir}/compiled/bin/windows"/>
|
---|
| 120 | <arg value="-r"/>
|
---|
| 121 | <arg value="${branch.revision}"/>
|
---|
| 122 | </exec>
|
---|
| 123 | </else>
|
---|
| 124 | </if>
|
---|
[22097] | 125 | </if>
|
---|
| 126 |
|
---|
| 127 | <!-- insert windows perl -->
|
---|
| 128 | <unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/bin/windows"/>
|
---|
[22160] | 129 |
|
---|
[22479] | 130 | <exec executable="${basedir}/compiled/bin/windows/gunzip.exe" dir="${basedir}/compiled/runtime-src/packages/apache-httpd">
|
---|
| 131 | <arg value="-d"/>
|
---|
| 132 | <arg value="httpd-2.2.11-gs.tar.gz"/>
|
---|
| 133 | </exec>
|
---|
[22160] | 134 |
|
---|
[22479] | 135 | <exec executable="${basedir}/compiled/bin/windows/tar.exe" dir="${basedir}/compiled/runtime-src/packages/apache-httpd">
|
---|
| 136 | <arg value="-xvf"/>
|
---|
| 137 | <arg value="httpd-2.2.11-gs.tar"/>
|
---|
| 138 | </exec>
|
---|
[22160] | 139 |
|
---|
[22490] | 140 | <!-- Insert a unique number after every occurrence of the word tempfile to prevent some strange race conditions present on Windows 7 (iuv = InsertUniqueValue) -->
|
---|
| 141 | <iuv>
|
---|
| 142 | <fileset dir="${basedir}/compiled/runtime-src/packages/apache-httpd/httpd-2.2.11" includes="**/*.mak"/>
|
---|
| 143 | <job pattern="tempfile"/>
|
---|
| 144 | </iuv>
|
---|
| 145 |
|
---|
[22097] | 146 | <!-- compile c code -->
|
---|
| 147 | <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="clean"/></exec>
|
---|
| 148 | <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="APACHE_HTTPD=1"/></exec>
|
---|
| 149 | <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="LOCAL_LIBRARY=1"/></exec>
|
---|
[22493] | 150 | <delete><fileset dir="${basedir}/compiled/apache-httpd" includes="**/*.pdb"/></delete>
|
---|
[22992] | 151 |
|
---|
| 152 | <copy file="${rk.home}/shared/windows/msvcr100.dll" tofile="${basedir}/compiled/apache-httpd/windows/lib/msvcr100.dll"/>
|
---|
[22997] | 153 | <copy file="${rk.home}/shared/windows/MSVCR71.DLL" tofile="${basedir}/compiled/apache-httpd/windows/lib/MSVCR71.DLL"/>
|
---|
[22992] | 154 |
|
---|
[22097] | 155 | <mkdir dir="products"/>
|
---|
| 156 | <copy file="${basedir}/compiled/server.exe" tofile="${basedir}/products/server-${version}.exe"/>
|
---|
| 157 | <move file="${basedir}/compiled/server.exe" todir="${basedir}/compiled/bin/windows"/>
|
---|
| 158 |
|
---|
| 159 |
|
---|
| 160 | <!-- linux only -->
|
---|
| 161 | <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
| 162 | <!-- add static to configure.in -->
|
---|
| 163 | <rsr file="${basedir}/compiled/configure.in" pattern="^LDFLAGS=.*$" replacement="LDFLAGS=-static"/>
|
---|
| 164 | <exec dir="${basedir}/compiled" executable="autoconf" output="${basedir}/compiled/configure">
|
---|
| 165 | <arg value="configure.in"/>
|
---|
| 166 | </exec>
|
---|
| 167 |
|
---|
| 168 | <!-- set environment in packages/configure -->
|
---|
| 169 | <rsr file="${basedir}/compiled/common-src/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT="LDFLAGS=-static""/>
|
---|
| 170 | <rsr file="${basedir}/compiled/build-src/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT="LDFLAGS=-static""/>
|
---|
| 171 |
|
---|
| 172 | <!-- run configure -->
|
---|
| 173 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true">
|
---|
| 174 | <arg line="--enable-apache-httpd"/>
|
---|
[22938] | 175 | <arg line="PATH="${basedir}/compiled/ext/gnome-lib/linux/bin:${env.PATH}""/>
|
---|
| 176 | <arg line="CFLAGS="-I${basedir}/compiled/ext/gnome-lib/linux/include""/>
|
---|
| 177 | <arg line="CPPFLAGS="-I${basedir}/compiled/ext/gnome-lib/linux/include""/>
|
---|
| 178 | <arg line="CXXFLAGS="-I${basedir}/compiled/ext/gnome-lib/linux/include""/>
|
---|
| 179 | <arg line="LDFLAGS="-static -L${basedir}/compiled/ext/gnome-lib/linux/lib""/>
|
---|
[23153] | 180 | <arg line="PKG_CONFIG_PATH="${basedir}/compiled/ext/gnome-lib/linux/lib/pkgconfig""/>
|
---|
[22097] | 181 | </exec>
|
---|
| 182 |
|
---|
| 183 | <!-- add -static to makefiles -->
|
---|
[22158] | 184 | <rsr file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static"/>
|
---|
| 185 | <rsr file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static"/>
|
---|
[22097] | 186 | <rsr file="${basedir}/compiled/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="(-o rtftohtml.{2}EXEEXT.{1})" replacement="$1 -static"/>
|
---|
| 187 |
|
---|
| 188 | <!-- mac only -->
|
---|
| 189 | <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
| 190 | <!-- run configure -->
|
---|
| 191 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true">
|
---|
| 192 | <arg line="--enable-apache-httpd"/>
|
---|
[22944] | 193 | <arg line="PATH="${basedir}/compiled/ext/gnome-lib/darwin/bin:${env.PATH}""/>
|
---|
| 194 | <arg line="CFLAGS="-I${basedir}/compiled/ext/gnome-lib/darwin/include""/>
|
---|
| 195 | <arg line="CPPFLAGS="-I${basedir}/compiled/ext/gnome-lib/darwin/include""/>
|
---|
| 196 | <arg line="CXXFLAGS="-I${basedir}/compiled/ext/gnome-lib/darwin/include""/>
|
---|
| 197 | <arg line="LDFLAGS="-L${basedir}/compiled/ext/gnome-lib/darwin/lib""/>
|
---|
[22097] | 198 | </exec>
|
---|
| 199 |
|
---|
| 200 | <!-- tweak makefiles -->
|
---|
| 201 | <rsr file="${basedir}/compiled/runtime-src/src/recpt/Makefile" pattern="^(LIBS =.*)-L(.)\(PACKAGES_DIR\)/expat/lib -lexpat(.*)$" replacement="$1$2(PACKAGES_DIR)/expat/lib/libexpat.a$3"/>
|
---|
| 202 | <rsr file="${basedir}/compiled/runtime-src/src/oaiservr/Makefile" pattern="^(LIBS =.*)-L(.)\(PACKAGES_DIR\)/expat/lib -lexpat(.*)$" replacement="$1$2(PACKAGES_DIR)/expat/lib/libexpat.a$3"/>
|
---|
| 203 |
|
---|
| 204 | </if></else></if></else></if>
|
---|
| 205 |
|
---|
| 206 | <!-- mac and linux: compile -->
|
---|
| 207 | <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
|
---|
[23153] | 208 | <!-- LD_LIBRARY_PATH is DYLD_LIBRARY_PATH on mac-->
|
---|
| 209 | <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
| 210 | <property key="libpathvar" value="DYLD_LIBRARY_PATH"/>
|
---|
| 211 | <else>
|
---|
| 212 | <property key="libpathvar" value="LD_LIBRARY_PATH"/>
|
---|
| 213 | </else>
|
---|
| 214 | </if>
|
---|
| 215 |
|
---|
[22097] | 216 | <!-- make -->
|
---|
[23153] | 217 | <exec dir="${basedir}/compiled" executable="make" failonerror="true">
|
---|
| 218 | <arg line="${libpathvar}="${basedir}/compiled/ext/gnome-lib/linux/lib""/>
|
---|
| 219 | </exec>
|
---|
[22097] | 220 |
|
---|
| 221 | <!-- make install -->
|
---|
| 222 | <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="install"/></exec>
|
---|
| 223 |
|
---|
| 224 | <!-- make apache-for-dist -->
|
---|
| 225 | <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="apache-for-dist"/></exec>
|
---|
| 226 |
|
---|
| 227 | <!-- strip executables -->
|
---|
| 228 | <exec dir="${basedir}/compiled/bin/${os.shell}" executable="find" failonerror="true">
|
---|
| 229 | <arg line=". ! -name . -type f -maxdepth 1 -exec strip {} ;"/>
|
---|
| 230 | </exec>
|
---|
[22835] | 231 | </if>
|
---|
[22828] | 232 |
|
---|
[22835] | 233 | <!-- Delete the entire gnome support library on Linux -->
|
---|
| 234 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
[22830] | 235 | <delete dir="${basedir}/compiled/ext/gnome-lib"/>
|
---|
[23117] | 236 | <delete dir="${basedir}/compiled/ext/gnome-lib-linux.tar.gz"/>
|
---|
[22097] | 237 | </if>
|
---|
[22835] | 238 |
|
---|
[22851] | 239 | <!-- Delete all but the lib folder and the setup.bash script of the gnome support library on Mac -->
|
---|
[22835] | 240 | <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
| 241 | <delete dir="${basedir}/compiled/ext/gnome-lib/cascade-make"/>
|
---|
| 242 | <delete dir="${basedir}/compiled/ext/gnome-lib/packages"/>
|
---|
| 243 | <delete dir="${basedir}/compiled/ext/gnome-lib/darwin/bin"/>
|
---|
| 244 | <delete dir="${basedir}/compiled/ext/gnome-lib/darwin/etc"/>
|
---|
| 245 | <delete dir="${basedir}/compiled/ext/gnome-lib/darwin/include"/>
|
---|
| 246 | <delete dir="${basedir}/compiled/ext/gnome-lib/darwin/share"/>
|
---|
| 247 | <delete file="${basedir}/compiled/ext/gnome-lib/setup.bat"/>
|
---|
| 248 | <delete file="${basedir}/compiled/ext/gnome-lib/CASCADE-MAKE.sh"/>
|
---|
[23117] | 249 | <delete file="${basedir}/compiled/ext/gnome-lib-darwin.tar.gz"/>
|
---|
[22835] | 250 | </if>
|
---|
[22425] | 251 |
|
---|
[22461] | 252 | <!-- insert the necessary additional xml parser versions-->
|
---|
[22425] | 253 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
[22461] | 254 | <!-- Add the 5.6 version if necessary -->
|
---|
| 255 | <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.6"/></not></bool>
|
---|
| 256 | <copy todir="${basedir}/compiled/perllib/cpan">
|
---|
| 257 | <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.6,perl-5.6/**/*"/>
|
---|
| 258 | </copy>
|
---|
| 259 | </if>
|
---|
| 260 |
|
---|
| 261 | <!-- Add the 5.8 version if necessary -->
|
---|
| 262 | <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.8"/></not></bool>
|
---|
| 263 | <copy todir="${basedir}/compiled/perllib/cpan">
|
---|
| 264 | <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.8,perl-5.8/**/*"/>
|
---|
| 265 | </copy>
|
---|
| 266 | </if>
|
---|
| 267 |
|
---|
| 268 | <!-- Add the 5.10 version if necessary -->
|
---|
| 269 | <if><bool><not><available file="${basedir}/compiled/perllib/cpan/perl-5.10"/></not></bool>
|
---|
| 270 | <copy todir="${basedir}/compiled/perllib/cpan">
|
---|
| 271 | <fileset dir="${rk.home}/shared/linux/XML-Parser" includes="perl-5.10,perl-5.10/**/*"/>
|
---|
| 272 | </copy>
|
---|
| 273 | </if>
|
---|
[22425] | 274 | </if>
|
---|
[22097] | 275 |
|
---|
| 276 | <!-- compile gli -->
|
---|
| 277 | <!-- (linux and mac) -->
|
---|
| 278 | <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
|
---|
| 279 | <exec dir="compiled/gli" executable="/bin/bash"><arg value="-c"/><arg value="./makegli.sh"/></exec>
|
---|
| 280 | <exec dir="compiled/gli" executable="/bin/bash"><arg value="-c"/><arg value="./makejar.sh"/></exec>
|
---|
| 281 | <!-- windows -->
|
---|
| 282 | <else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
| 283 | <exec dir="compiled/gli" executable="cmd.exe"><arg value="/c"/><arg value="makegli.bat"/></exec>
|
---|
| 284 | <exec dir="compiled/gli" executable="cmd.exe"><arg value="/c"/><arg value="makejar.bat"/></exec>
|
---|
| 285 | </if></else></if>
|
---|
| 286 |
|
---|
| 287 | <delete dir="compiled/gli/jar"/>
|
---|
| 288 | <delete dir="compiled/gli/classes/org"/>
|
---|
| 289 | <move file="compiled/gli/GLIServer.jar" todir="compiled/bin/java"/>
|
---|
| 290 |
|
---|
| 291 | <!-- compile uninstaller -->
|
---|
| 292 | <antcall target="insert-and-compile-uninstaller" />
|
---|
| 293 |
|
---|
| 294 | <!-- build demo collection -->
|
---|
[22111] | 295 | <!-- the envs on these execs simulate the environment when you run setup.bat -->
|
---|
| 296 | <if>
|
---|
| 297 | <bool>
|
---|
| 298 | <equals arg1="${rk.os}" arg2="windows"/>
|
---|
| 299 | </bool>
|
---|
| 300 |
|
---|
| 301 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl">
|
---|
| 302 | <arg line="-S"/>
|
---|
| 303 | <arg line="bin/script/import.pl demo"/>
|
---|
| 304 | <env key="GSDLHOME" path="${basedir}/compiled"/>
|
---|
| 305 | <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/collect"/>
|
---|
| 306 | <env key="GSDLOS" value="windows"/>
|
---|
| 307 | <env key="PATH" path="${basedir}/compiled/bin/windows/perl/bin:${basedir}/compiled/bin/windows:${basedir}/compiled/bin/script:${env.PATH}"/>
|
---|
| 308 | </exec>
|
---|
| 309 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/bin/windows/perl/bin/perl">
|
---|
| 310 | <arg line="-S"/>
|
---|
| 311 | <arg line="bin/script/buildcol.pl demo"/>
|
---|
| 312 | <env key="GSDLHOME" path="${basedir}/compiled"/>
|
---|
| 313 | <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/collect"/>
|
---|
| 314 | <env key="GSDLOS" value="windows"/>
|
---|
| 315 | <env key="PATH" path="${basedir}/compiled/bin/windows/perl/bin:${basedir}/compiled/bin/windows:${basedir}/compiled/bin/script:${env.PATH}"/>
|
---|
| 316 | </exec>
|
---|
| 317 |
|
---|
| 318 | <else>
|
---|
| 319 | <exec dir="${basedir}/compiled" executable="perl">
|
---|
| 320 | <arg line="-S"/>
|
---|
| 321 | <arg line="bin/script/import.pl demo"/>
|
---|
| 322 | <env key="GSDLHOME" path="${basedir}/compiled"/>
|
---|
| 323 | <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/collect"/>
|
---|
| 324 | <env key="GSDLOS" value="linux"/>
|
---|
| 325 | <env key="PATH" path="${basedir}/compiled/bin/linux:${basedir}/compiled/bin/script:${env.PATH}"/>
|
---|
| 326 | </exec>
|
---|
| 327 | <exec dir="${basedir}/compiled" executable="perl">
|
---|
| 328 | <arg line="-S"/>
|
---|
| 329 | <arg line="bin/script/buildcol.pl demo"/>
|
---|
| 330 | <env key="GSDLHOME" path="${basedir}/compiled"/>
|
---|
| 331 | <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/collect"/>
|
---|
| 332 | <env key="GSDLOS" value="linux"/>
|
---|
| 333 | <env key="PATH" path="${basedir}/compiled/bin/linux:${basedir}/compiled/bin/script:${env.PATH}"/>
|
---|
| 334 | </exec>
|
---|
| 335 | </else>
|
---|
| 336 | </if>
|
---|
[22097] | 337 | <delete dir="${basedir}/compiled/collect/demo/index"/>
|
---|
| 338 | <move file="${basedir}/compiled/collect/demo/building" tofile="${basedir}/compiled/collect/demo/index"/>
|
---|
| 339 |
|
---|
| 340 | <!-- delete the source code -->
|
---|
| 341 | <delete><fileset dir="compiled" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/></delete>
|
---|
| 342 | <delete dir="compiled/common-src"/>
|
---|
| 343 | <delete dir="compiled/build-src"/>
|
---|
| 344 | <delete dir="compiled/runtime-src"/>
|
---|
| 345 | <delete><fileset dir="compiled" includes="Install.txt,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in,win32.mak,win32cfg.h"/></delete>
|
---|
| 346 |
|
---|
| 347 | <!-- strip .svn working-copy dirs -->
|
---|
| 348 | <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall>
|
---|
| 349 |
|
---|
| 350 | <!-- create needed empty files -->
|
---|
| 351 | <mkdir dir="compiled/tmp"/>
|
---|
| 352 | <chmod dir="compiled/tmp" perm="a+rwx"/>
|
---|
| 353 | <echo file="compiled/etc/usage.txt"></echo>
|
---|
| 354 |
|
---|
| 355 | <!-- windows -->
|
---|
| 356 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
| 357 |
|
---|
| 358 | <!-- make a copy of server.exe in the root -->
|
---|
| 359 | <copy file="compiled/bin/windows/server.exe" tofile="compiled/server.exe"/>
|
---|
| 360 |
|
---|
| 361 | <!-- delete sourcecode -->
|
---|
| 362 | <delete dir="${binzip.dir}/common-src"/>
|
---|
| 363 | <delete dir="${binzip.dir}/build-src"/>
|
---|
| 364 | <delete dir="${binzip.dir}/runtime-src"/>
|
---|
[22160] | 365 |
|
---|
[22097] | 366 | <!-- create simple zipped binary distribution
|
---|
| 367 | <mkdir dir="distributions"/>
|
---|
| 368 | <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
|
---|
| 369 | <copy todir="${binzip.dir}"><fileset dir="compiled"/></copy>
|
---|
| 370 | <delete><fileset dir="${binzip.dir}" includes="README*.txt,Uninstall.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/></delete>
|
---|
| 371 | -->
|
---|
| 372 |
|
---|
| 373 | <!-- delete unneeded files -->
|
---|
| 374 | <delete dir="compiled/bin/linux" />
|
---|
| 375 | <delete><fileset dir="compiled" includes="*.bash,*.sh,*.csh,.gstermrc"/></delete>
|
---|
| 376 | <delete><fileset dir="compiled/gli" includes="*.sh,*4gs3.bat"/></delete>
|
---|
| 377 | <delete dir="compiled/autom4te.cache" />
|
---|
| 378 |
|
---|
| 379 | <!-- linux -->
|
---|
| 380 | <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
| 381 |
|
---|
| 382 | <!-- grab imagemagick and wv binaries -->
|
---|
| 383 | <delete dir="compiled/bin/linux/imagemagick"/>
|
---|
| 384 |
|
---|
[22938] | 385 | <if><bool><or>
|
---|
| 386 | <equals arg1="${branch.path}" arg2="trunk"/>
|
---|
| 387 | <equals arg1="${branch.path}" arg2="tags/stable"/>
|
---|
[22097] | 388 | <isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/>
|
---|
[22938] | 389 | </or></bool>
|
---|
[22781] | 390 | <exec executable="svn">
|
---|
| 391 | <arg value="export"/>
|
---|
| 392 | <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
|
---|
| 393 | <arg value="compiled/bin/linux/imagemagick"/>
|
---|
| 394 | </exec>
|
---|
[22097] | 395 |
|
---|
[22781] | 396 | <else>
|
---|
[22938] | 397 | <delete dir="compiled/bin/linux/wv"/>
|
---|
[22781] | 398 | <exec executable="svn">
|
---|
| 399 | <arg value="export"/>
|
---|
| 400 | <arg value="${svn.root}/main/trunk/binaries/linux/imagemagick"/>
|
---|
| 401 | <arg value="compiled/bin/linux/imagemagick"/>
|
---|
| 402 | </exec>
|
---|
[22097] | 403 |
|
---|
[22781] | 404 | <exec executable="svn">
|
---|
| 405 | <arg value="export"/>
|
---|
| 406 | <arg value="${svn.root}/main/trunk/binaries/linux/wv"/>
|
---|
| 407 | <arg value="compiled/bin/linux/wv"/>
|
---|
| 408 | </exec>
|
---|
| 409 | </else>
|
---|
[22097] | 410 | </if>
|
---|
| 411 |
|
---|
| 412 | <!-- delete unneeded files -->
|
---|
| 413 | <delete><fileset dir="compiled" includes="win32.mak,win32cfg.h,Install.sh,Support.htm,micotest.cpp"/></delete>
|
---|
| 414 | <delete><fileset dir="compiled/gli" includes="*.bat"/></delete>
|
---|
| 415 | <delete><fileset dir="compiled" includes="*.bat"/></delete>
|
---|
| 416 | <delete dir="compiled/common-src/packages/windows"/>
|
---|
| 417 | <delete dir="compiled/common-src/indexers/packages/windows"/>
|
---|
| 418 |
|
---|
| 419 | <!-- mac -->
|
---|
| 420 | <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
| 421 | <!-- grab imagemagick and ghostscript binaries -->
|
---|
| 422 | <delete dir="compiled/bin/darwin/imagemagick"/>
|
---|
| 423 | <delete dir="compiled/bin/darwin/ghostscript"/>
|
---|
| 424 |
|
---|
[22781] | 425 | <if><bool><and>
|
---|
[22097] | 426 | <not><equals arg1="${branch.path}" arg2="trunk"/></not>
|
---|
[22479] | 427 | <not><equals arg1="${branch.path}" arg2="tags/stable"/></not>
|
---|
[22097] | 428 | <isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/>
|
---|
[22781] | 429 | </and></bool>
|
---|
[22097] | 430 |
|
---|
[22781] | 431 | <exec executable="svn">
|
---|
| 432 | <arg value="export"/>
|
---|
| 433 | <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
|
---|
| 434 | <arg value="compiled/bin/darwin/imagemagick"/>
|
---|
| 435 | </exec>
|
---|
[22097] | 436 |
|
---|
[22781] | 437 | <exec executable="svn">
|
---|
| 438 | <arg value="export"/>
|
---|
| 439 | <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
|
---|
| 440 | <arg value="compiled/bin/darwin/ghostscript"/>
|
---|
| 441 | </exec>
|
---|
[22097] | 442 |
|
---|
[22781] | 443 | <else>
|
---|
| 444 | <exec executable="svn">
|
---|
| 445 | <arg value="export"/>
|
---|
| 446 | <arg value="${svn.root}/main/trunk/binaries/mac/intel/imagemagick"/>
|
---|
| 447 | <arg value="compiled/bin/darwin/imagemagick"/>
|
---|
| 448 | </exec>
|
---|
[22097] | 449 |
|
---|
[22781] | 450 | <exec executable="svn">
|
---|
| 451 | <arg value="export"/>
|
---|
| 452 | <arg value="${svn.root}/main/trunk/binaries/mac/intel/ghostscript"/>
|
---|
| 453 | <arg value="compiled/bin/darwin/ghostscript"/>
|
---|
| 454 | </exec>
|
---|
| 455 | </else>
|
---|
[22097] | 456 | </if>
|
---|
| 457 |
|
---|
| 458 | <!-- delete unneeded files -->
|
---|
| 459 | <delete><fileset dir="compiled" includes="win32.mak,win32cfg.h,Install.sh,Support.htm,*.bat"/></delete>
|
---|
| 460 | <delete><fileset dir="compiled/gli" includes="*.bat"/></delete>
|
---|
| 461 | <delete dir="compiled/common-src/packages/windows"/>
|
---|
| 462 |
|
---|
| 463 | </if></else></if></else></if>
|
---|
| 464 |
|
---|
| 465 | <!-- delete unneeded files -->
|
---|
| 466 | <delete dir="compiled/uninstaller" />
|
---|
| 467 | <delete file="compiled/bin/java/SignedGatherer.jar" />
|
---|
| 468 |
|
---|
| 469 | <!-- tidy up gli -->
|
---|
| 470 | <antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall>
|
---|
| 471 |
|
---|
| 472 | <!-- mac and linux: insert export to cdrom package -->
|
---|
| 473 | <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
|
---|
| 474 | <mkdir dir="compiled/bin/windows"/>
|
---|
| 475 | <get src="${server.exe.location}" dest="compiled/bin/windows/server.exe"/>
|
---|
| 476 |
|
---|
[22781] | 477 | <if><bool><and>
|
---|
[22097] | 478 | <not><equals arg1="${branch.path}" arg2="trunk"/></not>
|
---|
[22781] | 479 | <not><equals arg1="${branch.path}" arg2="tags/stable"/></not>
|
---|
[22097] | 480 | <isgreaterthan arg1="${branch.tag.version}" arg2="2.83"/>
|
---|
[22781] | 481 | </and></bool>
|
---|
| 482 | <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe" dest="compiled/bin/windows/Setup.exe"/>
|
---|
| 483 | <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe" dest="compiled/bin/windows/gssetup.exe"/>
|
---|
[22097] | 484 |
|
---|
[22781] | 485 | <else>
|
---|
| 486 | <get src="${svn.root}/main/trunk/binaries/windows/bin/Setup.exe" dest="compiled/bin/windows/Setup.exe"/>
|
---|
| 487 | <get src="${svn.root}/main/trunk/binaries/windows/bin/gssetup.exe" dest="compiled/bin/windows/gssetup.exe"/>
|
---|
| 488 | </else>
|
---|
[22097] | 489 | </if>
|
---|
| 490 | </if>
|
---|
| 491 |
|
---|
| 492 | </target>
|
---|
| 493 |
|
---|
| 494 | </project>
|
---|