Changeset 21623

Show
Ignore:
Timestamp:
26.01.2010 12:52:31 (9 years ago)
Author:
oranfry
Message:

working on final cleanup of release-kits

Location:
main/trunk/release-kits
Files:
1 added
3 removed
5 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/release-kits/kits/rk2/ant-scripts/build.xml

    r21593 r21623  
    1616 
    1717    <import file="compile.xml"/> 
    18     <import file="create-distribution.xml"/> 
    1918    <import file="create-components.xml"/> 
    20     <import file="create-installer.xml"/> 
     19    <import file="${rk.home}/shared/core/ant-scripts/create-installer.xml"/> 
    2120    <import file="wrap.xml"/> 
    2221    <import file="create-cdrom-components.xml"/> 
     
    2524 
    2625    <!-- THE MAIN TARGET --> 
    27     <target name="rk2" depends="init,gs2-init,compile,create-distribution,create-components,create-installer,wrap,create-cdrom-components"/> 
     26    <target name="rk2" depends="init,gs2-init,compile,create-components,create-installer,wrap,create-cdrom-components"/> 
    2827 
    2928    <target name="properties"> 
     
    3837 
    3938    <!-- TODO: Move the targets below to the xml file that calls it --> 
    40     <target name="checkout-gsdl-gli"> 
    41         <exec executable="svn"> 
    42             <arg value="checkout"/> 
    43             <arg value="${svn.root}/main/${branch.path}/greenstone2"/> 
    44             <arg value="${basedir}/compiled"/> 
    45         </exec> 
    46                 <exec executable="svn"> 
    47             <arg value="checkout"/> 
    48             <arg value="${svn.root}/main/${branch.path}/gli"/> 
    49             <arg value="${basedir}/compiled/gli"/> 
    50         </exec> 
    51     </target> 
    52  
    53     <target name="insert-export-to-cd-package"> 
    54         <mkdir dir="${gsdl.basedir}/bin/windows"/> 
    55         <get src="${server.exe.location}" dest="${gsdl.basedir}/bin/windows/server.exe"/> 
    56         <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe" dest="${gsdl.basedir}/bin/windows/Setup.exe"/> 
    57         <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe" dest="${gsdl.basedir}/bin/windows/gssetup.exe"/> 
    58     </target> 
    5939 
    6040    <target name="create-binary-zip-unix"> 
     
    7959    </target> 
    8060 
    81     <target name="create-binary-zip-windows"> 
    82         <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/> 
    83         <copy todir="${binzip.dir}"> 
    84             <fileset dir="distributions/web"/> 
    85         </copy> 
    86  
    87         <!-- delete sourcecode --> 
    88         <delete dir="${binzip.dir}/common-src"/> 
    89         <delete dir="${binzip.dir}/build-src"/> 
    90         <delete dir="${binzip.dir}/runtime-src"/> 
    91  
    92         <!-- delete loose files --> 
    93         <delete> 
    94             <fileset dir="${binzip.dir}" includes="README*.txt,Uninstall.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/> 
    95         </delete> 
    96     </target> 
    97  
    98     <target name="dist-clean-sourcecode"> 
    99  
    100         <!-- delete the sourcecode --> 
    101         <delete> 
    102             <fileset dir="distributions/web" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/> 
    103         </delete> 
    104         <delete dir="distributions/web/common-src"/> 
    105         <delete dir="distributions/web/build-src"/> 
    106         <delete dir="distributions/web/runtime-src"/> 
    107         <delete> 
    108             <fileset dir="distributions/web" 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"/> 
    109         </delete> 
    110  
    111         </target> 
    112  
    11361    <target name="dist-unzip-packages"> 
    11462        <untar src="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/distributions/web/common-src/packages/sqlite" compression="gzip"/> 
    11563        <delete file="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/> 
    116     </target> 
    117  
    118     <target name="make-common-src"> 
    119         <exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"/> 
    120         <!--<exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"><arg value="install"/></exec>--> 
    121     </target> 
    122  
    123     <target name="compile-gli"> 
    124  
    125         <if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 
    126             <property name="script.format" value="sh"/> 
    127         <else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
    128             <property name="script.format" value="bat"/> 
    129         </if></else></if> 
    130          
    131         <echo>Compiling gli...</echo> 
    132         <exec dir="${glibasedir}" executable="${glibasedir}/makegli.${script.format}"/> 
    133  
    134         <echo>Creating jar...</echo> 
    135         <exec dir="${glibasedir}" executable="${glibasedir}/makejar.${script.format}"/> 
    136  
    137         <echo>Cleaning up intermediate files...</echo> 
    138         <delete dir="${glibasedir}/jar"/> 
    139         <delete dir="${glibasedir}/classes/org"/> 
    140  
    141         <if><bool><isset property="gsdlbasedir"/></bool> 
    142             <echo>Putting gli server jar in a better place</echo> 
    143             <exec executable="mv" failonerror="true"> 
    144                 <arg line="${glibasedir}/GLIServer.jar ${gsdlbasedir}/bin/java" /> 
    145             </exec> 
    146         </if> 
    147  
    14864    </target> 
    14965 
  • main/trunk/release-kits/kits/rk2/ant-scripts/compile.xml

    r21593 r21623  
    44    <target name="compile" depends="init,gs2-init"> 
    55 
    6         <antcall target="checkout-gsdl-gli" /> 
    7         <antcall target="drop-in-docs"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall> 
     6        <!-- checkout gsdl and gli --> 
     7        <exec executable="svn"> 
     8            <arg value="checkout"/> 
     9            <arg value="${svn.root}/main/${branch.path}/greenstone2"/> 
     10            <arg value="${basedir}/compiled"/> 
     11        </exec> 
     12                <exec executable="svn"> 
     13            <arg value="checkout"/> 
     14            <arg value="${svn.root}/main/${branch.path}/gli"/> 
     15            <arg value="${basedir}/compiled/gli"/> 
     16        </exec> 
     17 
     18        <!-- drop in documentation --> 
     19        <copy todir="compiled" overwrite="true"> 
     20            <fileset dir="${rk.home}/shared/greenstone2/docs" excludes="READMEar.txt,READMEes.txt,READMEfr.txt,READMEru.txt"/> 
     21        </copy> 
     22 
     23        <!-- set version numbers --> 
    824        <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall> 
    925        <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/compiled/gli"/></antcall> 
     
    1127        <!-- windows only --> 
    1228        <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
    13             <antcall target="unzip-packages" /> 
    14             <antcall target="get-winbin" /> 
    15             <antcall target="insert-windows-perl"><param name="todir" value="compiled/bin/windows"/></antcall> 
    16             <antcall target="compile-c-code" /> 
     29 
     30            <!-- unzip packages --> 
     31            <unzip src="${basedir}/compiled/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/compiled/common-src/packages/windows/crypt"/> 
     32            <unzip src="${basedir}/compiled/common-src/packages/windows/expat/expat.zip" dest="${basedir}/compiled/common-src/packages/windows/expat"/> 
     33            <unzip src="${basedir}/compiled/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/compiled/common-src/packages/windows/stlport"/> 
     34            <unzip src="${basedir}/compiled/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/compiled/common-src/indexers/packages/windows/iconv"/> 
     35            <untar src="${basedir}/compiled/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/compiled/common-src/packages/sqlite" compression="gzip"/> 
     36 
     37            <!-- get winbin --> 
     38            <if><bool><not><available file="${basedir}/compiled/bin/windows"/></not></bool> 
     39                <svn><export srcUrl="${svn.root}/main/${branch.path}/binaries/windows/bin" destPath="${basedir}/compiled/bin/windows" revision="${branch.revision}"/></svn> 
     40            </if> 
     41 
     42            <!-- insert windows perl --> 
     43            <unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/bin/windows"/> 
     44 
     45            <!-- compile c code --> 
     46            <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="clean"/></exec> 
     47            <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="APACHE_HTTPD=1"/></exec> 
     48            <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="LOCAL_LIBRARY=1"/></exec> 
     49            <mkdir dir="products"/> 
     50            <copy file="${basedir}/compiled/server.exe" tofile="${basedir}/products/server-${version}.exe"/> 
     51            <move file="${basedir}/compiled/server.exe" todir="${basedir}/compiled/bin/windows"/> 
     52 
    1753 
    1854        <!-- linux only --> 
    1955        <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool> 
    20             <antcall target="add-static-to-configure-in"/> 
    21             <antcall target="set-environment-in-packages-configure"/> 
    22             <antcall target="run-configure"/> 
    23             <antcall target="makefiles-add-static"/> 
    24             <!-- make common-src and reconfigure --> 
    25             <!-- this is a workaround to a problem with the gsdl build code --> 
    26             <!-- expat needs to be compiled before the perl XML Parser is configured --> 
    27             <antcall target="make-common-src"/> 
    28             <antcall target="run-configure"/> 
    29             <!-- end of workaround --> 
    30             <antcall target="run-make"/> 
    31             <antcall target="run-make-install"/> 
    32             <antcall target="run-make-apache-for-dist"/> 
    33             <antcall target="strip-execs"/> 
    34  
    35         <!-- mac only --> 
    36         <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 
    37             <antcall target="run-configure"/> 
    38             <antcall target="tweak-makefiles"/> 
    39             <!-- make common-src and reconfigure --> 
    40             <!-- this is a workaround to a problem with the gsdl build code --> 
    41             <!-- expat needs to be compiled before the perl XML Parser is configured --> 
    42             <antcall target="make-common-src"/> 
    43             <antcall target="run-configure"/> 
    44             <!-- end of workaround --> 
    45             <antcall target="run-make"/> 
    46             <antcall target="run-make-install"/> 
    47             <antcall target="run-make-apache-for-dist"/> 
    48             <antcall target="strip-execs"/> 
    49  
    50         </if></else></if></else></if> 
    51  
    52         <!-- gli --> 
    53         <antcall target="compile-gli"> 
    54             <param name="glibasedir"  value="${basedir}/compiled/gli"/> 
    55             <param name="gsdlbasedir" value="${basedir}/compiled"/> 
    56         </antcall> 
    57  
    58         <!-- uninstaller --> 
    59         <antcall target="compile-uninstaller" /> 
    60  
    61         <!-- build collections --> 
    62         <antcall target="build-demo-collection" /> 
    63  
    64     </target> 
    65  
    66     <target name="add-static-to-configure-in"> 
    67         <rsr 
    68             file="${basedir}/compiled/configure.in" 
    69             pattern="^LDFLAGS=.*$" 
    70             replacement="LDFLAGS=-static" /> 
    71         <exec dir="${basedir}/compiled" executable="autoconf" output="${basedir}/compiled/configure"><arg value="configure.in"/></exec> 
    72     </target> 
    73  
    74     <target name="set-environment-in-packages-configure"> 
    75         <rsr 
    76             file="${basedir}/compiled/common-src/packages/configure" 
    77             pattern="^ENVIRONMENT=.*$" 
    78             replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" /> 
    79         <rsr 
    80             file="${basedir}/compiled/build-src/packages/configure" 
    81             pattern="^ENVIRONMENT=.*$" 
    82             replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" /> 
    83     </target> 
    84  
    85     <target name="run-configure"> 
    86         <!-- linux --> 
    87         <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool> 
     56 
     57            <!-- add static to configure.in --> 
     58            <rsr file="${basedir}/compiled/configure.in" pattern="^LDFLAGS=.*$" replacement="LDFLAGS=-static"/> 
     59            <exec dir="${basedir}/compiled" executable="autoconf" output="${basedir}/compiled/configure"> 
     60                <arg value="configure.in"/> 
     61            </exec> 
     62 
     63            <!-- set environment in packages/configure --> 
     64            <rsr file="${basedir}/compiled/common-src/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;"/> 
     65            <rsr file="${basedir}/compiled/build-src/packages/configure" pattern="^ENVIRONMENT=.*$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;"/> 
     66 
     67            <!-- run configure --> 
    8868            <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true"> 
    8969                <arg line="--enable-apache-httpd"/> 
     
    9171            </exec> 
    9272 
    93         <!-- mac --> 
     73            <!-- add -static to makefiles --> 
     74            <rsr file="${basedir}/compiled/build-src/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static" /> 
     75            <rsr file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static"/> 
     76            <rsr file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =.*$" replacement="LDFLAGS = -static"/> 
     77            <rsr file="${basedir}/compiled/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="(-o rtftohtml.{2}EXEEXT.{1})" replacement="$1 -static"/> 
     78 
     79        <!-- mac only --> 
    9480        <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 
    95             <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure"> 
    96                 <arg value="--enable-apache-httpd"/> 
    97             </exec> 
    98  
    99         <else> 
    100             <fail>This target does not support this rk.os: ${rk.os}</fail> 
    101  
    102         </else></if></else></if> 
    103     </target> 
    104  
    105     <target name="makefiles-add-static"> 
    106         <rsr 
    107             file="${basedir}/compiled/build-src/packages/wv/wv-gs/Makefile" 
    108             pattern="^LDFLAGS =.*$" 
    109             replacement="LDFLAGS = -static" /> 
    110         <rsr 
    111             file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" 
    112             pattern="^LDFLAGS =.*$" 
    113             replacement="LDFLAGS = -static" /> 
    114         <rsr 
    115             file="${basedir}/compiled/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" 
    116             pattern="^LDFLAGS =.*$" 
    117             replacement="LDFLAGS = -static" /> 
    118         <rsr 
    119             file="${basedir}/compiled/build-src/packages/rtftohtml/rtftohtml_src/Makefile" 
    120             pattern="(-o rtftohtml.{2}EXEEXT.{1})" 
    121             replacement="$1 -static" /> 
    122     </target> 
    123  
    124     <target name="run-make"> 
    125         <exec dir="${basedir}/compiled" executable="make" failonerror="true"/> 
    126     </target> 
    127  
    128     <target name="run-make-install"> 
    129         <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="install"/></exec> 
    130     </target> 
    131  
    132     <target name="run-make-apache-for-dist"> 
    133         <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="apache-for-dist"/></exec> 
    134     </target> 
    135  
    136     <target name="strip-execs"> 
    137         <exec dir="${basedir}/compiled/bin/${os.shell}" executable="find" failonerror="true"> 
    138             <arg line=". ! -name . -type f -maxdepth 1 -exec strip {} &#59;"/> 
    139         </exec> 
    140     </target> 
    141  
    142     <target name="build-demo-collection"> 
    143  
     81            <!-- run configure --> 
     82            <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true"> 
     83                <arg line="--enable-apache-httpd"/> 
     84            </exec> 
     85 
     86            <!-- tweak makefiles --> 
     87            <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"/> 
     88            <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"/> 
     89 
     90        </if></else></if></else></if> 
     91 
     92        <!-- mac and linux: compile --> 
     93        <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool> 
     94 
     95            <!-- WORKAROUND: make common-src and reconfigure --> 
     96            <!-- this is a workaround to a problem with the gsdl build code --> 
     97            <!-- expat needs to be compiled before the perl XML Parser is configured --> 
     98            <exec dir="${basedir}/compiled/common-src" executable="make" failonerror="true"/> 
     99            <exec dir="${basedir}/compiled" executable="${basedir}/compiled/configure" failonerror="true"> 
     100                <arg line="--enable-apache-httpd"/> 
     101                <env key="LDFLAGS" value="-static"/> 
     102            </exec> 
     103            <!-- /WORKAROUND --> 
     104 
     105            <!-- make --> 
     106            <exec dir="${basedir}/compiled" executable="make" failonerror="true"/> 
     107 
     108            <!-- make install --> 
     109            <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="install"/></exec> 
     110 
     111            <!-- make apache-for-dist --> 
     112            <exec dir="${basedir}/compiled" executable="make" failonerror="true"><arg value="apache-for-dist"/></exec> 
     113 
     114            <!-- strip executables --> 
     115            <exec dir="${basedir}/compiled/bin/${os.shell}" executable="find" failonerror="true"> 
     116                <arg line=". ! -name . -type f -maxdepth 1 -exec strip {} &#59;"/> 
     117            </exec> 
     118        </if> 
     119 
     120        <!-- compile gli --> 
     121        <exec dir="compiled/gli" executable="compiled/gli/makegli.${os.script.format}"/> 
     122        <exec dir="compiled/gli" executable="compiled/gli/makejar.${os.script.format}"/> 
     123        <delete dir="${glibasedir}/jar"/> 
     124        <delete dir="${glibasedir}/classes/org"/> 
     125        <move file="compiled/gli/GLIServer.jar" todir="compiled/bin/java"/> 
     126 
     127        <!-- compile uninstaller --> 
     128        <antcall target="insert-and-compile-uninstaller" /> 
     129 
     130        <!-- build demo collection --> 
    144131        <!-- linux, mac --> 
    145132        <if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 
    146             <exec dir="${basedir}/compiled" executable="${rk.home}/kits/rk2/resources/build-demo.sh" failonerror="true"/> 
     133            <exec dir="${basedir}/compiled" executable="/bin/bash" failonerror="true"> 
     134                <arg value="-c"/> 
     135                <arg value=" 
     136                    source setup.bash &amp;&amp; \ 
     137                    import.pl --removeold demo &amp;&amp; \ 
     138                    buildcol.pl --removeold demo &amp;&amp; \ 
     139                    rm -rf collect/demo/index collect/demo/archives &amp;&amp; \ 
     140                    mv collect/demo/building collect/demo/index"/> 
     141            </exec> 
    147142 
    148143        <!-- windows --> 
     
    166161            <move file="${basedir}/compiled/collect/demo/building" tofile="${basedir}/compiled/collect/demo/index"/> 
    167162 
    168         <else> 
    169             <fail>This target does not support the current rk.os: ${rk.os}</fail> 
    170  
    171         </else></if></else></if> 
     163        </if></else></if> 
     164 
     165        <!-- delete the source code --> 
     166        <delete><fileset dir="compiled" includes="Makefile,config.cache,config.h,config.log,stamp-h,config.status"/></delete> 
     167        <delete dir="compiled/common-src"/> 
     168        <delete dir="compiled/build-src"/> 
     169        <delete dir="compiled/runtime-src"/> 
     170        <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> 
     171 
     172        <!-- strip .svn working-copy dirs --> 
     173        <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall> 
     174 
     175        <!-- create needed empty files --> 
     176        <mkdir dir="compiled/tmp"/> 
     177        <chmod dir="compiled/tmp" perm="a+rwx"/> 
     178        <echo file="compiled/etc/usage.txt"></echo> 
     179 
     180        <!-- windows --> 
     181        <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
     182 
     183            <!-- make a copy of server.exe in the root --> 
     184            <copy file="compiled/bin/windows/server.exe" tofile="compiled/server.exe"/> 
     185 
     186            <!-- delete sourcecode --> 
     187            <delete dir="${binzip.dir}/common-src"/> 
     188            <delete dir="${binzip.dir}/build-src"/> 
     189            <delete dir="${binzip.dir}/runtime-src"/> 
     190 
     191            <!-- create simple zipped binary distribution  
     192            <mkdir dir="distributions"/> 
     193            <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/> 
     194            <copy todir="${binzip.dir}"><fileset dir="compiled"/></copy> 
     195            <delete><fileset dir="${binzip.dir}" includes="README*.txt,Uninstall.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/></delete> 
     196            --> 
     197 
     198            <!-- delete unneeded files --> 
     199            <delete dir="compiled/bin/linux" /> 
     200            <delete><fileset dir="compiled" includes="*.bash,*.sh,*.csh,.gstermrc"/></delete> 
     201            <delete><fileset dir="compiled/gli" includes="*.sh,*4gs3.bat"/></delete> 
     202            <delete dir="compiled/autom4te.cache" /> 
     203 
     204        <!-- linux --> 
     205        <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool> 
     206            <!-- grab imagemagick binaries --> 
     207            <delete dir="compiled/bin/linux/imagemagick"/> 
     208            <exec executable="svn"> 
     209                <arg value="export"/> 
     210                <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/> 
     211                <arg value="compiled/bin/linux/imagemagick"/> 
     212            </exec> 
     213 
     214            <!-- grab wv binaries --> 
     215            <delete dir="compiled/bin/linux/wv"/> 
     216            <exec executable="svn"> 
     217                <arg value="export"/> 
     218                <arg value="${svn.root}/main/${branch.path}/binaries/linux/wv"/> 
     219                <arg value="compiled/bin/linux/wv"/> 
     220            </exec> 
     221 
     222            <!-- delete unneeded files --> 
     223            <delete><fileset dir="compiled" includes="win32.mak,win32cfg.h,Install.sh,Support.htm,micotest.cpp"/></delete> 
     224            <delete><fileset dir="compiled/gli" includes="*.bat"/></delete> 
     225            <delete><fileset dir="compiled" includes="*.bat"/></delete> 
     226            <delete dir="compiled/common-src/packages/windows"/> 
     227            <delete dir="compiled/common-src/indexers/packages/windows"/> 
     228 
     229        <!-- mac --> 
     230        <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 
     231            <!-- grab imagemagick binaries --> 
     232            <delete dir="compiled/bin/darwin/imagemagick"/> 
     233            <exec executable="svn"> 
     234                <arg value="export"/> 
     235                <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/> 
     236                <arg value="compiled/bin/darwin/imagemagick"/> 
     237            </exec> 
     238 
     239            <!-- grab ghostscript binaries --> 
     240            <delete dir="compiled/bin/darwin/imagemagick"/> 
     241            <exec executable="svn"> 
     242                <arg value="export"/> 
     243                <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/> 
     244                <arg value="compiled/bin/darwin/ghostscript"/> 
     245            </exec> 
     246 
     247            <!-- delete unneeded files --> 
     248            <delete><fileset dir="compiled" includes="win32.mak,win32cfg.h,Install.sh,Support.htm,*.bat"/></delete> 
     249            <delete><fileset dir="compiled/gli" includes="*.bat"/></delete> 
     250            <delete dir="compiled/common-src/packages/windows"/> 
     251 
     252        </if></else></if></else></if> 
     253 
     254        <!-- delete unneeded files --> 
     255        <delete dir="compiled/uninstaller" /> 
     256        <delete file="compiled/gli/.greenstonestore" /> 
     257        <delete file="compiled/bin/java/SignedGatherer.jar" /> 
     258 
     259        <!-- mac and linux: insert export to cdrom package --> 
     260        <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool> 
     261            <mkdir dir="compiled/bin/windows"/> 
     262            <get src="${server.exe.location}" dest="compiled/bin/windows/server.exe"/> 
     263            <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/Setup.exe" dest="compiled/bin/windows/Setup.exe"/> 
     264            <get src="${svn.root}/main/${branch.path}/binaries/windows/bin/gssetup.exe" dest="compiled/bin/windows/gssetup.exe"/> 
     265        </if> 
    172266 
    173267    </target> 
    174268 
    175     <target name="tweak-makefiles"> 
    176         <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" /> 
    177         <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" /> 
    178     </target> 
    179  
    180     <target name="unzip-packages"> 
    181         <unzip src="${basedir}/compiled/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/compiled/common-src/packages/windows/crypt"/> 
    182         <unzip src="${basedir}/compiled/common-src/packages/windows/expat/expat.zip" dest="${basedir}/compiled/common-src/packages/windows/expat"/> 
    183         <unzip src="${basedir}/compiled/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/compiled/common-src/packages/windows/stlport"/> 
    184         <unzip src="${basedir}/compiled/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/compiled/common-src/indexers/packages/windows/iconv"/> 
    185         <untar src="${basedir}/compiled/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/compiled/common-src/packages/sqlite" compression="gzip"/> 
    186     </target> 
    187  
    188     <target name="get-winbin"> 
    189         <if> 
    190             <bool><not><available file="${basedir}/compiled/bin/windows"/></not></bool> 
    191             <svn><export srcUrl="${svn.root}/main/${branch.path}/binaries/windows/bin" destPath="${basedir}/compiled/bin/windows" revision="${branch.revision}"/></svn> 
    192         </if> 
    193     </target> 
    194  
    195     <target name="compile-c-code"> 
    196         <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="clean"/></exec> 
    197         <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="APACHE_HTTPD=1"/></exec> 
    198         <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="LOCAL_LIBRARY=1"/></exec> 
    199         <mkdir dir="products"/> 
    200         <copy file="${basedir}/compiled/server.exe" tofile="${basedir}/products/server-${version}.exe"/> 
    201         <move file="${basedir}/compiled/server.exe" todir="${basedir}/compiled/bin/windows"/> 
    202     </target> 
    203  
    204     <target name="drop-in-docs"> 
    205         <echo level="info">Dropping gsdl docs into distribution</echo> 
    206         <copy todir="${gsdl.basedir}" overwrite="true"> 
    207             <fileset dir="${rk.home}/shared/greenstone2/docs" excludes="READMEar.txt,READMEes.txt,READMEfr.txt,READMEru.txt"/> 
    208         </copy> 
    209     </target> 
    210  
    211  
    212269</project> 
  • main/trunk/release-kits/kits/rk2/ant-scripts/create-cdrom-components.xml

    r21593 r21623  
    1010    <target name="create-cdrom-components" depends="init,gs2-init"> 
    1111        <antcall target="compile-cdrom-installer"/> <!-- from init --> 
    12         <antcall target="prepare-cdrom-components"/> 
    13         <antcall target="compile-cdrom-wrapper"/> 
    14         <antcall target="create-cdrom-components-archive"/> 
    15     </target> 
    16  
    17     <target name="prepare-cdrom-components"> 
    1812 
    1913        <!-- clean up --> 
     
    2822        <mkdir dir="cdrom/dist/Software/core/all"/> 
    2923        <mkdir dir="cdrom/dist/Software/core/${rk.os}"/> 
    30  
    3124 
    3225        <!-- core linux --> 
     
    109102            <delete file="cdrom/dist/Java/Linux/jre.tar"/> 
    110103            --> 
     104 
    111105        <!-- jre windows --> 
    112106        <else><if><bool><or><equals arg1="${rk.os}" arg2="windows"/></or></bool> 
     
    121115        </if> 
    122116 
    123     </target> 
    124  
    125     <target name="compile-cdrom-wrapper"> 
    126  
    127         <!-- windows --> 
     117        <!-- compile cdrom wrapper --> 
     118        <!-- (windows) --> 
    128119        <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
    129120            <copy todir="cdrom/build" overwrite="true"> 
     
    143134            </exec> 
    144135 
    145         <!-- linux --> 
     136        <!-- (linux) --> 
    146137        <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool> 
    147138            <copy file="${rk.home}/shared/linux/wrapper.cpp" todir="cdrom/build" overwrite="true"/> 
     
    157148            </exec> 
    158149 
    159         <!-- mac --> 
     150        <!-- (mac) --> 
    160151        <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 
    161152 
     
    175166        </if></else></if></else></if> 
    176167 
    177     </target> 
    178168 
    179  
    180  
    181     <target name="create-cdrom-components-archive"> 
     169        <!-- create cdrom components -archive --> 
    182170        <mkdir dir="products"/> 
    183         <!-- windows --> 
     171        <!-- (windows) --> 
    184172        <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
    185173            <tar destfile="products/cdrom-components-${version}-windows.tar.gz" compression="gzip"> 
     
    187175            </tar> 
    188176 
    189         <!-- linux and mac --> 
     177        <!-- (linux and mac) --> 
    190178        <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 
    191179            <exec dir="cdrom/dist" executable="bash"> 
     
    196184    </target> 
    197185 
    198  
    199186</project> 
  • main/trunk/release-kits/kits/rk2/ant-scripts/create-components.xml

    r21394 r21623  
    44    <target name="create-components" depends="init,gs2-init"> 
    55 
    6         <antcall target="prepare-component"><param name="component" value="core"/></antcall> 
    7         <antcall target="compress-component"><param name="component" value="core"/></antcall> 
     6        <!-- core  --> 
     7        <antcall target="create-component"><param name="component" value="core"/></antcall> 
    88 
    9         <antcall target="prepare-component"><param name="component" value="imagemagick"/></antcall> 
    10         <antcall target="compress-component"><param name="component" value="imagemagick"/></antcall> 
     9        <!-- imagemagick --> 
     10        <antcall target="create-component"><param name="component" value="imagemagick"/></antcall> 
    1111 
    1212        <!-- windows and mac only --> 
    1313        <if><bool><or><equals arg1="${rk.os}" arg2="windows"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 
    14             <antcall target="prepare-component"><param name="component" value="ghostscript"/></antcall> 
    15             <antcall target="compress-component"><param name="component" value="ghostscript"/></antcall> 
     14            <!-- ghostscript --> 
     15            <antcall target="create-component"><param name="component" value="ghostscript"/></antcall> 
    1616        </if> 
    1717 
  • main/trunk/release-kits/shared/core/ant-scripts/init.xml

    r21611 r21623  
    6565                <include name="ant-tasks/orangevolt/roxes-win32forjava-1.1.1.jar"/> 
    6666                <include name="ant-tasks/orangevolt/orangevolt-ant-tasks-1.3.8.jar"/> 
    67                 <include name="ant-tasks/svnant/lib/ganymed.jar"/> 
    68                 <include name="ant-tasks/svnant/lib/svnClientAdapter.jar"/> 
    69                 <include name="ant-tasks/svnant/lib/svnant.jar"/> 
    70                 <include name="ant-tasks/svnant/lib/svnjavahl.jar"/> 
    71                 <include name="ant-tasks/svnant/lib/svnkit.jar"/> 
    7267                <include name="ant-tasks/greenstone/anttasks.jar"/> 
    7368                <include name="ant-tasks/7z-ant/7z.jar"/> 
     
    108103        <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="zh.Dates.${current.month}" outputProperty="month.zh"/> 
    109104        <get-property-value propertiesFile="${rk.home}/shared/core/lib/dates.properties" propertyName="default.Dates.${current.month}" outputProperty="month.default"/> 
     105 
     106 
     107        <!-- version number --> 
     108        <if><bool><not><isset property="version"/></not></bool> 
     109            <fail>Version number not set. Check that the file '${rk.name}-build.properties' exists and defines property 'version'.</fail> 
     110        </if> 
     111        <property name="app.version" value="${version}"/> 
     112 
     113        <!-- work out rk.os --> 
     114        <if> 
     115            <bool> 
     116                <or> 
     117                    <equals arg1="${rk.os}" arg2="linux"/> 
     118                    <equals arg1="${rk.os}" arg2="mac"/> 
     119                    <equals arg1="${rk.os}" arg2="windows"/> 
     120                </or> 
     121            </bool> 
     122            <echo>Using user-specified value for rk.os: '${rk.os}'</echo> 
     123 
     124        <else><if> 
     125            <bool><equals arg1="${os.name}" arg2="Linux"/></bool> 
     126            <property name="rk.os" value="linux"/> 
     127 
     128        <else><if> 
     129            <bool><equals arg1="${os.name}" arg2="Mac OS X"/></bool> 
     130            <property name="rk.os" value="mac"/> 
     131 
     132        <else><if> 
     133            <bool> 
     134                <or> 
     135                    <equals arg1="${os.name}" arg2="Windows 95"/> 
     136                    <equals arg1="${os.name}" arg2="Windows 98"/> 
     137                    <equals arg1="${os.name}" arg2="Windows 2000"/> 
     138                    <equals arg1="${os.name}" arg2="Windows XP"/> 
     139                    <equals arg1="${os.name}" arg2="Windows NT"/> 
     140                    <equals arg1="${os.name}" arg2="Windows ME"/> 
     141                    <equals arg1="${os.name}" arg2="Windows Vista"/> 
     142                </or> 
     143            </bool> 
     144            <property name="rk.os" value="windows"/> 
     145 
     146        <else> 
     147            <fail>Can't work out what to set rk.os to. Please report this to greenstone_team@cs.waikato.ac.nz . In the mean time, manually set rk.os to 'windows', 'mac', or 'linux' by reinvoking the release kit with, for example, '-Drk.os=windows'</fail> 
     148 
     149        </else></if></else></if></else></if></else></if> 
     150 
     151        <!-- set os.suffix and os.shell --> 
     152        <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 
     153            <property name="os.suffix" value="MacOS-intel"/> 
     154            <property name="os.shell" value="darwin"/> 
     155        </if> 
     156        <property name="os.suffix" value="${rk.os}"/> 
     157        <property name="os.shell" value="${rk.os}"/> 
     158 
     159        <!-- set os.script.format --> 
     160        <if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 
     161            <property name="os.script.format" value="sh"/> 
     162        <else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
     163            <property name="os.script.format" value="bat"/> 
     164        </if></else></if> 
     165 
     166        <!-- show important properties --> 
     167        <echo level="info">Version (version): ${version}</echo> 
     168        <echo level="info">Major Version (version.major): ${version.major}</echo> 
     169        <echo level="info">Branch Path (branch.path): ${branch.path}</echo> 
     170        <echo level="info">Date (date): ${date}</echo> 
     171        <echo level="info">Current Month (current.month): ${current.month}</echo> 
     172        <echo level="info">Current Year (current.year): ${current.year}</echo> 
     173        <echo level="info">Operating System (rk.os): ${rk.os}</echo> 
     174        <echo level="info">Operating System Suffix (os.suffix): ${os.suffix}</echo> 
    110175        <!-- 
    111176        <echo level="info">Current Date</echo> 
     
    123188        <echo level="info">default: (${month.default} ${current.year})</echo> 
    124189        --> 
    125  
    126         <!-- version number --> 
    127         <if> 
    128             <bool> 
    129                 <not><isset property="version"/></not> 
    130             </bool> 
    131             <fail>Version number not set. 
    132 Check that the file '${rk.name}-build.properties' exists and defines property 'version'.</fail> 
    133         </if> 
    134         <property name="app.version" value="${version}"/> 
    135  
    136         <!-- work out rk.os --> 
    137         <if> 
    138             <bool> 
    139                 <or> 
    140                     <equals arg1="${rk.os}" arg2="linux"/> 
    141                     <equals arg1="${rk.os}" arg2="mac"/> 
    142                     <equals arg1="${rk.os}" arg2="windows"/> 
    143                 </or> 
    144             </bool> 
    145             <echo>Using user-specified value for rk.os: '${rk.os}'</echo> 
    146  
    147         <else><if> 
    148             <bool><equals arg1="${os.name}" arg2="Linux"/></bool> 
    149             <property name="rk.os" value="linux"/> 
    150  
    151         <else><if> 
    152             <bool><equals arg1="${os.name}" arg2="Mac OS X"/></bool> 
    153             <property name="rk.os" value="mac"/> 
    154  
    155         <else><if> 
    156             <bool> 
    157                 <or> 
    158                     <equals arg1="${os.name}" arg2="Windows 95"/> 
    159                     <equals arg1="${os.name}" arg2="Windows 98"/> 
    160                     <equals arg1="${os.name}" arg2="Windows 2000"/> 
    161                     <equals arg1="${os.name}" arg2="Windows XP"/> 
    162                     <equals arg1="${os.name}" arg2="Windows NT"/> 
    163                     <equals arg1="${os.name}" arg2="Windows ME"/> 
    164                     <equals arg1="${os.name}" arg2="Windows Vista"/> 
    165                 </or> 
    166             </bool> 
    167             <property name="rk.os" value="windows"/> 
    168  
    169         <else> 
    170             <fail>Can't work out what to set rk.os to. Please report this to greenstone_team@cs.waikato.ac.nz . In the mean time, manually set rk.os to 'windows', 'mac', or 'linux' by reinvoking the release kit with, for example, '-Drk.os=windows'</fail> 
    171  
    172         </else></if></else></if></else></if></else></if> 
    173  
    174         <!-- set os.suffix and os.shell --> 
    175         <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 
    176             <property name="os.suffix" value="MacOS-intel"/> 
    177             <property name="os.shell" value="darwin"/> 
    178         </if> 
    179         <property name="os.suffix" value="${rk.os}"/> 
    180         <property name="os.shell" value="${rk.os}"/> 
    181  
    182         <!-- show important properties --> 
    183         <echo level="info">Version (version): ${version}</echo> 
    184         <echo level="info">Major Version (version.major): ${version.major}</echo> 
    185         <echo level="info">Branch Path (branch.path): ${branch.path}</echo> 
    186         <echo level="info">Date (date): ${date}</echo> 
    187         <echo level="info">Current Month (current.month): ${current.month}</echo> 
    188         <echo level="info">Current Year (current.year): ${current.year}</echo> 
    189         <echo level="info">Operating System (rk.os): ${rk.os}</echo> 
    190         <echo level="info">Operating System Suffix (os.suffix): ${os.suffix}</echo> 
    191  
    192     </target> 
    193  
     190    </target> 
     191 
     192    <!-- a target to strip any directory of .svn folders --> 
    194193    <target name="strip-svn-dirs"> 
    195194        <delete includeemptydirs="true"> 
     
    203202    </target> 
    204203 
    205     <target name="compile-binary-installer"> 
    206  
    207         <copy file="installer/antinstall-config.xml" tofile="installer/antinstall-config-binary.xml" overwrite="true"/> 
    208         <dcff file="installer/antinstall-config-binary.xml" startTag=".*&lt;!-- start cdrom --&gt;.*" endTag=".*&lt;!-- end cdrom --&gt;.*" /> 
    209  
    210         <copy file="installer/build.xml" tofile="installer/build-binary.xml" overwrite="true"/> 
    211         <dcff file="installer/build-binary.xml" startTag=".*&lt;!-- start cdrom --&gt;.*" endTag=".*&lt;!-- end cdrom --&gt;.*" /> 
    212  
    213         <installer file="installer/Greenstone-${version}-${os.suffix}.jar" 
    214             compress="true" 
    215             extractType="NonExtractor" 
    216             installConfig="installer/antinstall-config-binary.xml" 
    217             buildFile="installer/build-binary.xml" 
    218             antInstallLib="${rk.home}/shared/core/ant-installer/lib" 
    219             antLib="${ant.home}/lib" 
    220             validateConfig="true" 
    221             icons="bluecurve"> 
    222  
    223             <zipfileset dir="installer/classes" includes="**/*" /> 
    224             <zipfileset dir="components" includes="*.lzma"/> 
    225  
    226         </installer> 
    227          
    228     </target> 
    229  
    230     <target name="compile-cdrom-installer"> 
    231  
    232         <copy file="installer/antinstall-config.xml" tofile="installer/antinstall-config-cdrom.xml"/> 
    233         <dcff file="installer/antinstall-config-cdrom.xml" startTag=".*&lt;!-- start web --&gt;.*" endTag=".*&lt;!-- end web --&gt;.*" /> 
    234  
    235         <copy file="installer/build.xml" tofile="installer/build-cdrom.xml"/> 
    236         <dcff file="installer/build-cdrom.xml" startTag=".*&lt;!-- start web --&gt;.*" endTag=".*&lt;!-- end web --&gt;.*" /> 
    237  
    238         <installer file="installer/cdrom.jar" 
    239             compress="true" 
    240             extractType="NonExtractor" 
    241             installConfig="installer/antinstall-config-cdrom.xml" 
    242             buildFile="installer/build-cdrom.xml" 
    243             antInstallLib="${rk.home}/shared/core/ant-installer/lib" 
    244             antLib="${ant.home}/lib" 
    245             validateConfig="true" 
    246             icons="bluecurve"> 
    247             <zipfileset dir="installer/classes" includes="**/*" /> 
    248         </installer> 
    249          
    250     </target> 
    251  
    252     <target name="copy-main-installer-files"> 
    253  
    254         <mkdir dir="${basedir}/installer/classes"/> 
    255  
    256         <!-- the language bundle --> 
    257         <native2ascii 
    258             implementation="sun" 
    259             encoding="UTF-8" 
    260             src="${rk.home}/shared/core/language-strings" 
    261             dest="${basedir}/installer/classes/resources"/> 
    262  
    263         <!-- other installer classes --> 
    264         <copy todir="${basedir}/installer/classes" overwrite="true"> 
    265             <fileset dir="${rk.home}/shared/core/installer-classes" erroronmissingdir="false"/> 
    266             <fileset dir="${rk.home}/kits/${rk.name}/installer-classes" erroronmissingdir="false"/> 
    267             <fileset dir="${rk.home}/shared/${rk.os}/installer-classes" erroronmissingdir="false"/> 
    268         </copy> 
    269  
    270     </target> 
    271  
    272     <target name="make-installer-files-concrete"> 
    273  
    274         <!-- calculate the size of components --> 
    275         <echo>Calculating the size of some components</echo> 
    276  
    277         <!-- core --> 
    278         <length property="component.bytesize.core-without-jre" mode="all"><fileset file="${basedir}/components/core.comp"/></length> 
    279         <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
    280             <math result="component.bytesize.core" operand1="${component.bytesize.core-without-jre}" operation="+" operand2="${component.bytesize.windows-java}" datatype="int"/> 
    281         <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool> 
    282             <math result="component.bytesize.core" operand1="${component.bytesize.core-without-jre}" operation="+" operand2="${component.bytesize.linux-java}" datatype="int"/> 
    283         <else> 
    284             <property name="component.bytesize.core" value="${component.bytesize.core-without-jre}"/> 
    285         </else></if></else></if> 
    286         <math result="component.megabytesize.core" operand1="${component.bytesize.core}" operation="/" operand2="1048576" datatype="int"/> 
    287         <property name="component.size.core" value="${component.megabytesize.core} MB"/> 
    288  
    289         <!-- imagemagick --> 
    290         <length property="component.bytesize.imagemagick" mode="all"><fileset file="${basedir}/components/imagemagick.comp"/></length> 
    291         <math result="component.megabytesize.imagemagick" operand1="${component.bytesize.imagemagick}" operation="/" operand2="1048576" datatype="int"/> 
    292         <property name="component.size.imagemagick" value="${component.megabytesize.imagemagick} MB"/> 
    293  
    294         <!-- ghostscript --> 
    295         <length property="component.bytesize.ghostscript" mode="all"><fileset file="${basedir}/components/ghostscript.comp"/></length> 
    296         <math result="component.megabytesize.ghostscript" operand1="${component.bytesize.ghostscript}" operation="/" operand2="1048576" datatype="int"/> 
    297         <property name="component.size.ghostscript" value="${component.megabytesize.ghostscript} MB"/> 
    298  
    299         <!-- tomcat --> 
    300         <length property="component.bytesize.tomcat" mode="all"><fileset file="${basedir}/components/tomcat.comp"/></length> 
    301         <math result="component.megabytesize.tomcat" operand1="${component.bytesize.tomcat}" operation="/" operand2="1048576" datatype="int"/> 
    302         <property name="component.size.tomcat" value="${component.megabytesize.tomcat} MB"/> 
    303  
    304         <!-- make the installer descriptors relevant to the current os --> 
    305         <dcff file="installer/antinstall-config.xml" startTag="&lt;!--\s*if\s*(?!.*${rk.os})[^ ]+\s*--&gt;" endTag="&lt;!--\s*/if\s*--&gt;" /> 
    306         <dcff file="installer/build.xml" startTag="&lt;!--\s*if\s*(?!.*${rk.os})[^ ]+\s*--&gt;" endTag="&lt;!--\s*/if\s*--&gt;" /> 
    307  
    308         <!-- put the concrete values of things in the config --> 
    309         <rsr> 
    310             <fileset dir="${basedir}/installer" includes="*.xml"/> 
    311             <job pattern="@version@" replacement="${version}"/> 
    312             <job pattern="@component.size.core@" replacement="${component.size.core}"/> 
    313             <job pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/> 
    314             <job pattern="@component.size.imagemagick@" replacement="${component.size.imagemagick}"/> 
    315             <job pattern="@component.size.ghostscript@" replacement="${component.size.ghostscript}"/> 
    316             <job pattern="@java.min.version@" replacement="${java.min.version}"/> 
    317             <job pattern="@java.extracted@" replacement="${java.extracted}"/> 
    318         </rsr> 
    319  
    320         <!-- put the concrete values of things in the text --> 
    321         <rsr> 
    322             <fileset dir="${basedir}/installer/classes/resources" includes="*.properties"/> 
    323             <job pattern="@version@" replacement="${version}"/> 
    324             <job pattern="@version.major@" replacement="${version.major}"/> 
    325             <job pattern="@java.min.version@" replacement="${java.min.version}"/> 
    326             <job pattern="@bundled.version.imagemagick@" replacement="${bundled.version.imagemagick}"/> 
    327             <job pattern="@bundled.version.ghostscript@" replacement="${bundled.version.ghostscript}"/> 
    328             <job pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
    329             <job pattern="@bundled.version.windows-java@" replacement="${bundled.version.windows-java}"/> 
    330             <job pattern="@bundled.version.linux-java@" replacement="${bundled.version.linux-java}"/> 
    331         </rsr> 
    332  
    333     </target> 
    334  
    335     <!-- shared target to compile the uninstaller --> 
    336     <target name="compile-uninstaller"> 
    337         <echo>Compiling Uninstaller</echo> 
     204    <!-- target to insert the uninstaller into 'compiled' and compile it --> 
     205    <target name="insert-and-compile-uninstaller"> 
    338206 
    339207        <!-- create working build directory --> 
    340         <mkdir dir="${basedir}/compiled/uninstaller/build/resources" /> 
     208        <mkdir dir="compiled/uninstaller/build/resources" /> 
    341209 
    342210        <!-- copile to build --> 
    343211        <javac 
    344212            srcdir="${rk.home}/shared/core/uninstaller" 
    345             destdir="${basedir}/compiled/uninstaller/build" /> 
     213            destdir="compiled/uninstaller/build" /> 
    346214 
    347215        <!-- copy language bundle into place --> 
     
    349217            implementation="sun" 
    350218            src="${rk.home}/shared/core/language-strings" 
    351             dest="${basedir}/compiled/uninstaller/build/resources"/> 
     219            dest="compiled/uninstaller/build/resources"/> 
    352220 
    353221        <!-- jar it all up --> 
    354222        <jar 
    355             destfile="${basedir}/compiled/uninst.jar" 
     223            destfile="compiled/uninst.jar" 
    356224            manifest="${rk.home}/shared/core/uninstaller/manifest.mf" 
    357             basedir="${basedir}/compiled/uninstaller/build" /> 
    358  
    359     </target> 
    360  
    361     <!-- copy the uninstaller script from the rk to web distribution --> 
    362     <target name="insert-uninstaller"> 
    363  
    364         <!-- linux and mac --> 
    365         <if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 
    366             <copy file="${rk.home}/shared/core/uninstaller/Uninstall.sh" todir="distributions/web"/> 
    367  
    368         <!-- windows --> 
    369         <else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
    370             <copy file="${rk.home}/shared/core/uninstaller/Uninstall.bat" todir="distributions/web"/> 
    371  
    372         <!-- else fail --> 
    373         <else> 
    374             <fail>this target does not support the current os</fail> 
    375  
    376         </else></if></else></if> 
    377     </target> 
    378  
    379     <!-- unzip windows perl into bin/windows of the given gsdl or gs2build --> 
    380     <target name="insert-windows-perl"> 
    381         <mkdir dir="${todir}"/> 
    382         <delete dir="${todir}/perl"/> 
    383         <unzip src="${rk.home}/shared/windows/perl.zip" dest="${todir}"/> 
    384     </target> 
    385  
    386     <target name="copy-compiled-to-dist"> 
    387  
    388         <!-- windows --> 
    389         <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
    390             <delete dir="distributions/web"/> 
    391             <mkdir dir="distributions"/> 
    392             <copy todir="distributions/web"> 
    393                 <fileset dir="compiled" includes="**/*"/> 
    394             </copy> 
    395  
    396         <!-- linux, mac --> 
    397         <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 
    398             <delete dir="distributions/web"/> 
    399             <mkdir dir="distributions"/> 
    400             <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 
    401                 <exec executable="cp" failonerror="true"><arg line="-R compiled distributions/web"/></exec> 
    402             <else> 
    403                 <exec executable="cp" failonerror="true"><arg line="-r compiled distributions/web"/></exec> 
    404             </else></if> 
    405  
    406         <!-- else fail --> 
    407         <else> 
    408             <fail>this target does not support the current os</fail> 
    409  
    410         </else></if></else></if> 
    411  
    412     </target> 
    413  
     225            basedir="compiled/uninstaller/build" /> 
     226 
     227        <!-- put the associated script in place --> 
     228        <copy file="${rk.home}/shared/core/uninstaller/Uninstall.${os.script.format}" todir="compiled"/> 
     229 
     230    </target> 
     231 
     232    <!-- target to set all the version numbers in a greenstone2 or gs2build directory --> 
    414233    <target name="gsdl-set-version-numbers"> 
    415234 
    416235        <if><bool><available file="${gsdl.basedir}/common-src/src/lib/gsdlconf.h"/></bool> 
    417             <echo level="info">Setting version in common-src/src/lib/gsdlconf.h</echo> 
    418236            <rsr file="${gsdl.basedir}/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}&quot;" /> 
    419         <else> 
    420             <echo message="skipping gsdlconf.h"/> 
    421         </else></if> 
     237        </if> 
    422238 
    423239        <if><bool><available file="${gsdl.basedir}/etc/VERSION"/></bool> 
    424             <echo level="info">Setting version in etc/VERSION</echo> 
    425240            <rsr file="${gsdl.basedir}/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" /> 
    426         <else> 
    427             <echo message="skipping VERSION"/> 
    428         </else></if> 
     241        </if> 
    429242 
    430243        <if><bool><available file="${gsdl.basedir}/lib/java/server.properties"/></bool> 
    431             <echo level="info">Setting version in server.properties</echo> 
    432244            <rsr file="${gsdl.basedir}/lib/java/server.properties" pattern="^(Server2Control.Version[:=]).*" replacement="$1${version}" /> 
    433         <else> 
    434             <echo message="skipping server.properties"/> 
    435         </else></if> 
     245        </if> 
    436246 
    437247        <if><bool><available file="${gsdl.basedir}/lib/java/log4j.properties.in"/></bool> 
    438             <echo level="info">Sneakily changing some log4j stuff</echo> 
    439248            <rsr file="${gsdl.basedir}/lib/java/log4j.properties.in" pattern="^(log4j.category.org.greenstone.server[:=].*)INFO(.*)" replacement="$1WARN$2" /> 
    440         <else> 
    441             <echo message="skipping log4j.properties.in"/> 
    442         </else></if> 
     249        </if> 
    443250 
    444251        <antcall target="gsdl-set-dates-in-readmes"><param name="gsdl.basedir" value="${gsdl.basedir}"/></antcall> 
     
    446253    </target> 
    447254 
     255    <!-- target to set dates in readme files --> 
    448256    <target name="gsdl-set-dates-in-readmes"> 
    449         <echo level="info">Changing date and version in the docs</echo> 
    450257 
    451258        <!-- en --> 
     
    491298    </target> 
    492299 
    493     <!-- prepare the component named in ${component} --> 
    494     <target name="prepare-component"> 
     300    <!-- target to archive and compress a given component --> 
     301    <target name="create-component"> 
    495302        <mkdir dir="components"/> 
    496303        <zip destfile="components/${component}.comp" compress="false"> 
    497             <zipfileset dir="distributions/web"> 
     304            <zipfileset dir="compiled"> 
    498305                <patternset refid="greenstone${version.major}.${component}.component"/> 
    499306            </zipfileset> 
    500307        </zip> 
    501     </target>    
    502  
    503     <!-- compress the component named in ${component} --> 
    504     <target name="compress-component"> 
    505308        <!-- windows --> 
    506309        <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
     
    516319 
    517320        </else></if></else></if> 
    518     </target> 
    519  
    520  
    521     <target name="create-minimal-distribution"> 
    522  
    523         <property name="dist.name" value="Greenstone-${version}-${os.suffix}-minimal"/> 
    524  
    525         <!-- unzip the core component to a temporary space --> 
    526         <mkdir dir="minimal-dist/${dist.name}"/> 
    527         <unzip src="components/core.comp" dest="minimal-dist/${dist.name}"/> 
    528  
    529         <!-- under windows, create zip--> 
    530         <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
    531             <zip destfile="products/${dist.name}.zip" basedir="minimal-dist"/> 
    532  
    533         <!-- under unix, create tar.gz --> 
    534         <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 
    535             <exec dir="." executable="tar"> 
    536                 <arg value="-czf"/><arg value="products/${dist.name}.tar.gz"/> 
    537                 <arg value="minimal-dist"/> 
    538             </exec> 
    539  
    540         </if></else></if> 
    541              
    542     </target> 
    543  
     321    </target>    
    544322 
    545323</project>