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