Changeset 16741

Show
Ignore:
Timestamp:
13.08.2008 11:40:57 (11 years ago)
Author:
oranfry
Message:

changes to mark2 after ant hack cleaned up

Location:
release-kits/mark2/ant-scripts
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • release-kits/mark2/ant-scripts/build.xml

    r16654 r16741  
    77        .......................................................... 
    88--> 
     9 
    910<project name="mark2-build" default="mark2"> 
    1011 
    1112 
    1213    <!-- CONSTANTS --> 
    13  
    14     <!-- set current month and year--> 
    15     <exec executable="date" outputproperty="current.month"><arg value="+%b"/></exec> 
    16     <exec executable="date" outputproperty="current.year"><arg value="+%Y"/></exec> 
    1714 
    1815    <!-- for the benefit of the shared scripts, set release-kit home --> 
     
    2118    <!-- IMPORT OTHER ANT SCRIPTS --> 
    2219    <import file="shared-ant-scripts/init.xml"/> 
     20    <import file="shared-ant-scripts/operations-on-gli.xml"/> 
    2321    <import file="compile.xml"/> 
    2422    <import file="create-distribution.xml"/> 
     
    2826    <!-- TARGET TO PERFORM ADDITIONAL PRECONDITION CHECKS --> 
    2927    <target name="mark2-init"> 
    30         <echo>Determining Processor...</echo> 
    3128        <if> 
    3229            <bool> 
    3330                <or><equals arg1="${processor}" arg2="ppc" /><equals arg1="${processor}" arg2="intel"/></or> 
    3431            </bool> 
    35  
    36             <echo>Processor: ${processor}</echo> 
    37             <echo/> 
    3832 
    3933            <else> 
     
    4236            </else> 
    4337        </if> 
     38        <echo>Processor: ${processor}</echo> 
    4439    </target> 
    4540 
    4641    <!-- THE MAIN TARGET --> 
    4742    <target name="mark2" depends="init,mark2-init"> 
    48         <addressedcall target="compile"/> 
    49         <addressedcall target="create-distribution"/> 
    50         <addressedcall target="create-installer"/> 
    51         <addressedcall target="wrap"/> 
     43        <antcall target="compile"/> 
     44        <antcall target="create-distribution"/> 
     45        <antcall target="create-installer"/> 
     46        <antcall target="wrap"/> 
    5247    </target> 
    5348 
  • release-kits/mark2/ant-scripts/compile.xml

    r16519 r16741  
    55 
    66        <!-- checkout --> 
    7         <addressedcall target="checkout-gsdl-gli" /> 
     7        <antcall target="checkout-gsdl-gli" /> 
    88         
    99        <!-- configure --> 
    10         <addressedcall target="run-configure"/> 
    11         <addressedcall target="tweak-makefiles"/> 
     10        <antcall target="run-configure"/> 
     11        <antcall target="tweak-makefiles"/> 
    1212 
    1313        <!-- make --> 
    14         <addressedcall target="run-make"/> 
    15         <addressedcall target="run-make-install"/> 
    16         <addressedcall target="copy-library-oai"/> 
    17         <addressedcall target="strip-execs"/> 
     14        <antcall target="run-make"/> 
     15        <antcall target="run-make-install"/> 
     16        <antcall target="copy-library-oai"/> 
     17        <antcall target="strip-execs"/> 
    1818 
    1919        <!-- build collections --> 
    20         <addressedcall target="build-demo-collection" /> 
     20        <antcall target="build-demo-collection" /> 
    2121 
    2222    </target> 
    2323 
    2424    <target name="checkout-gsdl-gli"> 
    25         <if><bool><istrue value="${execute}"/></bool> 
    26             <svn> 
    27                 <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/gsdl"/> 
    28                 <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/gsdl/gli"/> 
    29             </svn> 
    30         </if> 
     25        <svn> 
     26            <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/gsdl"/> 
     27            <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/gsdl/gli"/> 
     28        </svn> 
    3129    </target> 
    3230 
    3331    <target name="run-configure"> 
    34         <if><bool><istrue value="${execute}"/></bool> 
    35             <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/configure"> 
    36                 <arg line="--with-gdbm=${mark2.home}/mac/${processor}/gdbm"/> 
    37             </exec> 
    38         </if> 
     32        <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/configure"> 
     33            <arg line="--with-gdbm=${mark2.home}/mac/${processor}/gdbm"/> 
     34        </exec> 
    3935    </target> 
    4036 
    4137    <target name="tweak-makefiles"> 
    42         <if><bool><istrue value="${execute}"/></bool> 
    43     <rsr file="${basedir}/gsdl/src/recpt/Makefile" pattern="^(LIBS =.*)-L${mark2.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" replacement="$1${mark2.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
    44     <rsr file="${basedir}/gsdl/src/oaiservr/Makefile" pattern="^(LIBS =.*)-L${mark2.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" replacement="$1${mark2.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
    45     <rsr file="${basedir}/gsdl/src/gdbmedit/db2txt/Makefile" pattern="^(LIBS =.*)-L${mark2.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" replacement="$1${mark2.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
    46     <rsr file="${basedir}/gsdl/src/gdbmedit/txt2db/Makefile" pattern="^(LIBS =.*)-L${mark2.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" replacement="$1${mark2.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
    47     <rsr file="${basedir}/gsdl/src/recpt/Makefile" pattern="^(LIBS =.*)-L(.)\(PACKAGES_DIR\)/expat/lib -lexpat(.*)$" replacement="$1$2(PACKAGES_DIR)/expat/lib/libexpat.a$3" /> 
    48     <rsr file="${basedir}/gsdl/src/oaiservr/Makefile" pattern="^(LIBS =.*)-L(.)\(PACKAGES_DIR\)/expat/lib -lexpat(.*)$" replacement="$1$2(PACKAGES_DIR)/expat/lib/libexpat.a$3" /> 
    49         </if> 
     38        <rsr file="${basedir}/gsdl/src/recpt/Makefile" pattern="^(LIBS =.*)-L${mark2.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" replacement="$1${mark2.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
     39        <rsr file="${basedir}/gsdl/src/oaiservr/Makefile" pattern="^(LIBS =.*)-L${mark2.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" replacement="$1${mark2.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
     40        <rsr file="${basedir}/gsdl/src/gdbmedit/db2txt/Makefile" pattern="^(LIBS =.*)-L${mark2.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" replacement="$1${mark2.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
     41        <rsr file="${basedir}/gsdl/src/gdbmedit/txt2db/Makefile" pattern="^(LIBS =.*)-L${mark2.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" replacement="$1${mark2.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
     42        <rsr file="${basedir}/gsdl/src/recpt/Makefile" pattern="^(LIBS =.*)-L(.)\(PACKAGES_DIR\)/expat/lib -lexpat(.*)$" replacement="$1$2(PACKAGES_DIR)/expat/lib/libexpat.a$3" /> 
     43        <rsr file="${basedir}/gsdl/src/oaiservr/Makefile" pattern="^(LIBS =.*)-L(.)\(PACKAGES_DIR\)/expat/lib -lexpat(.*)$" replacement="$1$2(PACKAGES_DIR)/expat/lib/libexpat.a$3" /> 
    5044    </target> 
    5145 
    5246    <target name="run-make"> 
    53         <if><bool><istrue value="${execute}"/></bool> 
    54             <exec dir="${basedir}/gsdl" executable="make"/> 
    55         </if> 
     47        <exec dir="${basedir}/gsdl" executable="make"/> 
    5648    </target> 
    5749 
    5850    <target name="run-make-install"> 
    59         <if><bool><istrue value="${execute}"/></bool> 
    60             <exec dir="${basedir}/gsdl" executable="make"><arg value="install"/></exec> 
    61         </if> 
     51        <exec dir="${basedir}/gsdl" executable="make"><arg value="install"/></exec> 
    6252    </target> 
    6353 
    6454    <target name="copy-library-oai"> 
    65         <if><bool><istrue value="${execute}"/></bool> 
    66             <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/library ${basedir}/gsdl/bin/darwin/library"/></exec> 
    67             <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/oaiserver ${basedir}/gsdl/bin/darwin/oaiserver"/></exec> 
    68         </if> 
     55        <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/library ${basedir}/gsdl/bin/darwin/library"/></exec> 
     56        <exec executable="cp"><arg line="${basedir}/gsdl/cgi-bin/oaiserver ${basedir}/gsdl/bin/darwin/oaiserver"/></exec> 
    6957    </target> 
    7058 
    7159    <target name="strip-execs"> 
    72         <if><bool><istrue value="${execute}"/></bool> 
    73             <exec dir="${basedir}/gsdl/bin/darwin" executable="find"> 
    74                 <arg line=". ! -name . -type f -maxdepth 1 -exec strip {} &#59;"/> 
    75             </exec> 
    76         </if> 
     60        <exec dir="${basedir}/gsdl/bin/darwin" executable="find"> 
     61            <arg line=". ! -name . -type f -maxdepth 1 -exec strip {} &#59;"/> 
     62        </exec> 
    7763    </target> 
    7864 
    7965    <target name="build-demo-collection"> 
    80         <if><bool><istrue value="${execute}"/></bool> 
    81             <exec dir="${basedir}/gsdl" executable="${mark2.home}/resources/build-demo.sh"/> 
    82         </if> 
     66        <exec dir="${basedir}/gsdl" executable="${mark2.home}/resources/build-demo.sh"/> 
    8367    </target> 
    8468 
  • release-kits/mark2/ant-scripts/create-distribution.xml

    r16469 r16741  
    22<project name="mark2-create-distribution" default="create-distribution"> 
    33 
     4    <target name="create-distribution"> 
     5        <antcall target="export-gsdl-gli" /> 
     6        <antcall target="dist-set-version" /> 
     7        <antcall target="gli-set-version-numbers"> 
     8            <param name="glibasedir" value="${basedir}/distribution/greenstone3/gli"/> 
     9        </antcall> 
     10        <antcall target="drop-in-binaries" /> 
     11        <antcall target="drop-in-demo-collection" /> 
     12        <antcall target="drop-in-docs" /> 
     13        <antcall target="compile-gli" /> 
     14        <antcall target="tweak-files" /> 
     15    </target> 
    416 
    5     <target name="create-distribution"> 
    6         <addressedcall target="export-gsdl-gli" /> 
    7         <addressedcall target="dist-set-version" /> 
    8         <addressedcall target="dist-set-gli-version" /> 
    9         <addressedcall target="drop-in-binaries" /> 
    10         <addressedcall target="drop-in-demo-collection" /> 
    11         <addressedcall target="drop-in-docs" /> 
    12         <addressedcall target="compile-gli" /> 
    13         <addressedcall target="create-gli-client-zip" /> 
    14         <addressedcall target="tweak-files" /> 
     17    <target name="export-gsdl-gli"> 
     18        <mkdir dir="distributions"/> 
     19        <delete dir="distributions/web"/> 
     20        <svn> 
     21            <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distributions/web"/> 
     22            <export srcurl="${svn.root}/gli/${branch.path}" destPath="distributions/web/gli"/> 
     23        </svn> 
     24    </target> 
     25 
     26    <target name="dist-set-version"> 
     27        <echo level="info">Setting version in src/lib/gsdlconf.h</echo> 
     28        <rsr file="${basedir}/distributions/web/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}&quot;" /> 
     29 
     30        <echo level="info">Setting version in Install.sh</echo> 
     31        <rsr file="${basedir}/distributions/web/Install.sh" pattern="(echo &quot;Version: ).*(&quot; .*)" replacement="$1${version}$2" /> 
     32 
     33        <echo level="info">Setting version in etc/VERSION</echo> 
     34        <rsr file="${basedir}/distributions/web/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" /> 
     35    </target> 
     36 
     37    <target name="dist-set-gli-version"> 
    1538 
    1639    </target> 
    1740 
    18     <target name="export-gsdl-gli"> 
    19         <if><bool><istrue value="${execute}"/></bool> 
    20              
    21             <mkdir dir="distributions"/> 
    22             <delete dir="distributions/web"/> 
    23             <svn> 
    24                 <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distributions/web"/> 
    25                 <export srcurl="${svn.root}/gli/${branch.path}" destPath="distributions/web/gli"/> 
    26             </svn> 
    27              
    28         </if> 
    29     </target> 
    30  
    31     <target name="dist-set-version"> 
    32         <if><bool><istrue value="${execute}"/></bool> 
    33  
    34             <echo level="info">Setting version in src/lib/gsdlconf.h</echo> 
    35             <rsr file="${basedir}/distributions/web/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}&quot;" /> 
    36  
    37             <echo level="info">Setting version in Install.sh</echo> 
    38             <rsr file="${basedir}/distributions/web/Install.sh" pattern="(echo &quot;Version: ).*(&quot; .*)" replacement="$1${version}$2" /> 
    39  
    40             <echo level="info">Setting version in etc/VERSION</echo> 
    41             <rsr file="${basedir}/distributions/web/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" /> 
    42  
    43         </if> 
    44     </target> 
    45  
    46     <target name="dist-set-gli-version"> 
    47         <if><bool><istrue value="${execute}"/></bool> 
    48             <ant antfile="${mark2.home}/ant-scripts/shared-ant-scripts/operations-on-gli.xml" dir="${basedir}/distributions/web/gli" target="set-version-numbers"/> 
    49         </if> 
    50     </target> 
    51  
    5241    <target name="drop-in-binaries"> 
    53         <if><bool><istrue value="${execute}"/></bool> 
    54             <echo level="info">Dropping compiled binaries into distribution</echo> 
    55             <delete dir="distributions/web/bin/linux" /> 
    56             <delete dir="distributions/web/bin/darwin" /> 
    57             <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/bin/darwin distributions/web/bin"/></exec> 
    58             <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/library distributions/web/cgi-bin"/></exec> 
    59             <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/oaiserver distributions/web/cgi-bin"/></exec> 
    60         </if> 
     42        <echo level="info">Dropping compiled binaries into distribution</echo> 
     43        <delete dir="distributions/web/bin/linux" /> 
     44        <delete dir="distributions/web/bin/darwin" /> 
     45        <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/bin/darwin distributions/web/bin"/></exec> 
     46        <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/library distributions/web/cgi-bin"/></exec> 
     47        <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/oaiserver distributions/web/cgi-bin"/></exec> 
    6148    </target> 
    6249 
    6350    <target name="drop-in-demo-collection"> 
    64         <if><bool><istrue value="${execute}"/></bool> 
    65             <echo level="info">Dropping rebuilt demo collection into distribution</echo> 
    66             <delete dir="distributions/web/collect/demo" /> 
    67             <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/collect/demo distributions/web/collect"/></exec> 
    68         </if> 
     51        <echo level="info">Dropping rebuilt demo collection into distribution</echo> 
     52        <delete dir="distributions/web/collect/demo" /> 
     53        <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/collect/demo distributions/web/collect"/></exec> 
    6954    </target> 
    7055 
    7156    <target name="drop-in-docs"> 
    72         <if><bool><istrue value="${execute}"/></bool> 
    73             <echo level="info">Dropping gsdl docs  into distribution</echo> 
    74             <copy todir="${basedir}/distributions/web" overwrite="true"> 
    75                 <fileset dir="${mark2.home}/greenstone2/docs"/> 
    76             </copy> 
    77         </if> 
     57        <echo level="info">Dropping gsdl docs  into distribution</echo> 
     58        <copy todir="${basedir}/distributions/web" overwrite="true"> 
     59            <fileset dir="${mark2.home}/greenstone2/docs"/> 
     60        </copy> 
    7861    </target> 
    7962 
    8063    <target name="compile-gli"> 
    81         <if><bool><istrue value="${execute}"/></bool> 
     64        <echo>Compiling gli...</echo> 
     65        <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/> 
    8266 
    83             <echo>Compiling gli...</echo> 
    84             <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/> 
     67        <echo>Creating jar...</echo> 
     68        <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/> 
    8569 
    86             <echo>Creating jar...</echo> 
    87             <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/> 
     70        <echo>Cleaning up intermediate files...</echo> 
     71        <delete dir="${basedir}/distributions/web/gli/jar"/> 
     72        <delete dir="${basedir}/distributions/web/gli/classes/org"/> 
    8873 
    89             <echo>Cleaning up intermediate files...</echo> 
    90             <delete dir="${basedir}/distributions/web/gli/jar"/> 
    91             <delete dir="${basedir}/distributions/web/gli/classes/org"/> 
    92  
    93             <echo>Putting gli server jar in a better place</echo> 
    94             <exec dir="${basedir}/distributions/web" executable="mv" failonerror="true"> 
    95                 <arg line="gli/GLIServer.jar bin/java" /> 
    96             </exec> 
    97  
    98         </if> 
     74        <echo>Putting gli server jar in a better place</echo> 
     75        <exec dir="${basedir}/distributions/web" executable="mv" failonerror="true"> 
     76            <arg line="gli/GLIServer.jar bin/java" /> 
     77        </exec> 
    9978    </target> 
    10079 
    101     <target name="create-gli-client-zip"> 
    102         <if><bool><istrue value="${execute}"/></bool> 
    103             <!-- 
    104             # take a copy of GLI directory 
    105             &util::cp_r(&util::filename_cat($tmpdir, "gsdl", "gli"), $tmpdir); 
     80    <target name="tweak-files"> 
     81        <echo level="info">Changing Install.sh to web release</echo> 
     82        <rsr file="${basedir}/distributions/web/Install.sh" pattern="^(iscdrom=).*" replacement="$1&quot;no&quot;" /> 
    10683 
    107             my $client_dirname = "gli-client-" . $version_num; 
    108             rename ("gli", $client_dirname); 
    109             chdir(&util::filename_cat($tmpdir, $client_dirname)); 
     84        <echo level="info">Changing date and version in the docs</echo> 
     85        <!-- ar --> 
     86        <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(التاريخ : \s*)(.*)" replacement="$1${month.ar} ${current.year}" /> 
     87        <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(النسخه : \s*)(.*)" replacement="$1${version}" /> 
     88        <!-- es --> 
     89        <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}" /> 
     90        <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}" /> 
     91        <!-- fr --> 
     92        <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}" /> 
     93        <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" /> 
     94        <!-- ru --> 
     95        <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(Дата\s*)(.*)" replacement="$1${month.ru} ${current.year}" /> 
     96        <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(ВерсОя\s*)(.*)" replacement="$1${version}" /> 
     97        <!-- en --> 
     98        <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" /> 
     99        <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" /> 
    110100 
     101        <!-- Support.htm --> 
     102        <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*Greenstone Digital Library version: ).*(&lt;br&gt;.*)" replacement="$1${version}$2"/> 
     103        <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*&lt;input.* name=&quot;gsdl version&quot;.* value=&quot;).*(&quot;.*&gt;)" replacement="$1${version}$2"/> 
    111104 
    112             # delete unnecessary stuff 
    113             `rm -rf clean.* document.* gems.* gli*.sh gli*.bat make*.sh make*.bat lib src`; 
    114             # make sure permissions are ok 
    115             `chmod a+x client-gli.sh client-gli.bat`; 
    116             chdir($tmpdir); 
     105        <echo level="info">Removing signed gatherer</echo> 
     106        <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" /> 
    117107 
    118             # zip up the client 
    119             &zip($client_dirname, $client_dirname, $tmpdir, 1); 
    120             --> 
    121         </if> 
    122     </target> 
    123  
    124  
    125     <target name="tweak-files"> 
    126         <if><bool><istrue value="${execute}"/></bool> 
    127  
    128             <echo level="info">Changing Install.sh to web release</echo> 
    129             <rsr file="${basedir}/distributions/web/Install.sh" pattern="^(iscdrom=).*" replacement="$1&quot;no&quot;" /> 
    130  
    131  
    132             <echo level="info">Changing date and version in the docs</echo> 
    133             <!-- ar --> 
    134             <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(التاريخ : \s*)(.*)" replacement="$1${month.ar} ${current.year}" /> 
    135             <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(النسخه : \s*)(.*)" replacement="$1${version}" /> 
    136  
    137             <!-- es --> 
    138             <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}" /> 
    139             <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}" /> 
    140             <!-- fr --> 
    141             <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}" /> 
    142             <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" /> 
    143             <!-- ru --> 
    144             <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(Дата\s*)(.*)" replacement="$1${month.ru} ${current.year}" /> 
    145             <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(ВерсОя\s*)(.*)" replacement="$1${version}" /> 
    146             <!-- en --> 
    147             <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" /> 
    148             <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" /> 
    149  
    150             <!-- Support.htm --> 
    151             <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*Greenstone Digital Library version: ).*(&lt;br&gt;.*)" replacement="$1${version}$2"/> 
    152             <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*&lt;input.* name=&quot;gsdl version&quot;.* value=&quot;).*(&quot;.*&gt;)" replacement="$1${version}$2"/> 
    153  
    154             <echo level="info">Removing signed gatherer</echo> 
    155             <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" /> 
    156  
    157             <echo level="info">Removing some unneeded stuff</echo> 
    158             <delete file="${basedir}/distributions/web/gli/.greenstonestore" /> 
    159             <delete file="${basedir}/distributions/web/gli/gli4gs3.sh" /> 
    160             <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.bat"/></delete> 
    161             <delete><fileset dir="${basedir}/distributions/web" includes="*.bat"/></delete> 
    162  
    163         </if> 
     108        <echo level="info">Removing some unneeded stuff</echo> 
     109        <delete file="${basedir}/distributions/web/gli/.greenstonestore" /> 
     110        <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.bat"/></delete> 
     111        <delete><fileset dir="${basedir}/distributions/web" includes="*.bat"/></delete> 
    164112    </target> 
    165113 
  • release-kits/mark2/ant-scripts/create-installer.xml

    r16654 r16741  
    33 
    44    <target name="create-installer"> 
    5         <addressedcall target="setup-for-installer-creation"/> 
    6         <addressedcall target="compile-installer"/> 
     5        <antcall target="setup-for-installer-creation"/> 
     6        <antcall target="compile-installer"/> 
    77    </target> 
    88 
    99    <target name="setup-for-installer-creation"> 
    10         <if><bool><istrue value="${execute}"/></bool> 
     10        <echo>Getting things ready to compile the installer</echo> 
     11        <mkdir dir="${basedir}/installer/classes"/> 
     12        <copy todir="${basedir}/installer" file="${mark2.home}/installer/antinstall-config.xml" overwrite="true"/> 
     13        <copy todir="${basedir}/installer" file="${mark2.home}/installer/build.xml" overwrite="true"/> 
     14        <copy todir="${basedir}/installer/classes" overwrite="true"> 
     15            <fileset dir="${mark2.home}/greenstone2/installer-classes"/> 
     16        <fileset dir="${mark2.home}/ant-scripts/tasks/orans" includes="RegexSearchReplace.class" /> 
     17        </copy> 
    1118 
    12             <echo>Getting things ready to compile the installer</echo> 
    13             <mkdir dir="${basedir}/installer/classes"/> 
    14             <copy todir="${basedir}/installer" file="${mark2.home}/installer/antinstall-config.xml" overwrite="true"/> 
    15             <copy todir="${basedir}/installer" file="${mark2.home}/installer/build.xml" overwrite="true"/> 
    16             <copy todir="${basedir}/installer/classes" overwrite="true"> 
    17                 <fileset dir="${mark2.home}/greenstone2/installer-classes"/> 
    18             <fileset dir="${mark2.home}/ant-scripts/tasks/orans" includes="RegexSearchReplace.class" /> 
    19             </copy> 
     19        <!-- put the concrete values of things in the config --> 
     20        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/> 
     21        <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.java@" replacement="${component.size.linux-java}"/> 
     22        <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/> 
     23        <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/> 
    2024 
    21             <!-- put the concrete values of things in the config --> 
    22             <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/> 
    23             <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.java@" replacement="${component.size.linux-java}"/> 
    24             <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/> 
    25             <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/> 
    26  
    27             <!-- put the concrete values of things in the text --> 
    28             <!-- default --> 
    29             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/> 
    30             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 
    31             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/> 
    32  
    33         </if> 
     25        <!-- put the concrete values of things in the text --> 
     26        <!-- default --> 
     27        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/> 
     28        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 
     29        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/> 
    3430    </target> 
    3531 
    3632    <target name="compile-installer"> 
    37         <if><bool><istrue value="${execute}"/></bool> 
     33        <!-- create the installer without java --> 
     34        <installer file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar" 
     35                compress="true" 
     36                extractType="NonExtractor" 
     37                installConfig="${basedir}/installer/antinstall-config.xml" 
     38                buildFile="${basedir}/installer/build.xml" 
     39                antInstallLib="${mark2.home}/packages/ant-installer/lib" 
     40                antLib="${mark2.home}/packages/ant/lib" 
     41                validateConfig="true" 
     42                failOnError="false" 
     43                icons="bluecurve"> 
    3844 
    39             <!-- create the installer without java --> 
    40             <installer file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar" 
    41                     compress="true" 
    42                     extractType="NonExtractor" 
    43                     installConfig="${basedir}/installer/antinstall-config.xml" 
    44                     buildFile="${basedir}/installer/build.xml" 
    45                     antInstallLib="${mark2.home}/packages/ant-installer/lib" 
    46                     antLib="${mark2.home}/packages/ant/lib" 
    47                     validateConfig="true" 
    48                     failOnError="false" 
    49                     icons="bluecurve"> 
     45            <zipfileset dir="${basedir}/installer/classes" includes="**/*" /> 
     46            <zipfileset dir="${basedir}/distributions/web" includes="**/*"/> 
    5047 
    51                 <zipfileset dir="${basedir}/installer/classes" includes="**/*" /> 
    52                 <zipfileset dir="${basedir}/distributions/web" includes="**/*"/> 
    53  
    54             </installer> 
    55  
    56         </if> 
     48        </installer> 
    5749    </target> 
    5850 
  • release-kits/mark2/ant-scripts/wrap.xml

    r16654 r16741  
    33 
    44    <target name="wrap"> 
    5         <if><bool><istrue value="${execute}"/></bool> 
     5        <!-- create and setup the build directory --> 
     6        <delete dir="${basedir}/wrapped-installer"/> 
     7        <mkdir dir="${basedir}/wrapped-installer"/> 
     8        <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app"><fileset dir="${mark2.home}/mac/Wrapper.app"/></copy> 
     9        <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources"><fileset dir="${mark2.home}/greenstone2/icon/icon.icns"/></copy> 
     10        <chmod file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/MacOS/JavaApplicationStub" perm="ug+x"/> 
    611 
    7             <!-- create and setup the build directory --> 
    8             <delete dir="${basedir}/wrapped-installer"/> 
    9             <mkdir dir="${basedir}/wrapped-installer"/> 
    10             <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app"><fileset dir="${mark2.home}/mac/Wrapper.app"/></copy> 
    11             <chmod file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/MacOS/JavaApplicationStub" perm="ug+x"/> 
     12        <!-- copy bundled files --> 
     13        <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources/Java" file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar"/> 
    1214 
    13             <!-- copy bundled files --> 
    14             <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources/Java" file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar"/> 
     15        <!-- substitute in real values --> 
     16        <rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@jar@" replacement="Greenstone-${version}-MacOS-${processor}.jar"/> 
     17        <rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@version@" replacement="${version}"/> 
    1518 
    16             <!-- substitute in real values --> 
    17             <rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@jar@" replacement="Greenstone-${version}-MacOS-${processor}.jar"/> 
    18             <rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@version@" replacement="${version}"/> 
     19                     <!-- get size of app --> 
     20                     <exec executable="du" dir="${basedir}/wrapped-installer" outputproperty="app.du"><arg line="-ks Greenstone${version}.app"/></exec> 
     21        <echo>app.du: ${app.du}</echo> 
     22                     <exec executable="sed" inputstring="${app.du}" outputproperty="app.size"><arg line="-e 's/^\([0-9]*\).*$/\1/g'"/></exec> 
     23        <echo>app.size: ${app.size}</echo> 
     24        <math result="dmg.size" operand1="${app.size}" operation="+" operand2="2048" datatype="int"/> 
     25        <echo>dmg.size: ${dmg.size}</echo> 
    1926 
    20                         <!-- get size of app --> 
    21                         <exec executable="du" dir="${basedir}/wrapped-installer" outputproperty="app.du"><arg line="-ks Greenstone${version}.app"/></exec> 
    22             <echo>app.du: ${app.du}</echo> 
    23                         <exec executable="sed" inputstring="${app.du}" outputproperty="app.size"><arg line="-e 's/^\([0-9]*\).*$/\1/g'"/></exec> 
    24             <echo>app.size: ${app.size}</echo> 
    25             <math result="dmg.size" operand1="${app.size}" operation="+" operand2="2048" datatype="int"/> 
    26             <echo>dmg.size: ${dmg.size}</echo> 
    27  
    28             <!-- create disk image --> 
    29             <exec dir="${basedir}/wrapped-installer" executable="hdiutil"><arg line="create -size ${dmg.size}k -fs HFS+ -volname Greenstone${version} Greenstone${version}.dmg"/></exec> 
    30             <!-- mount it --> 
    31             <exec executable="hdiutil" dir="${basedir}/wrapped-installer"><arg line="attach Greenstone${version}.dmg"/></exec> 
    32             <!-- copy file into it --> 
    33             <exec executable="cp" dir="${basedir}/wrapped-installer"><arg line="-r Greenstone${version}.app /Volumes/Greenstone${version}"/></exec> 
    34             <!-- unmount it--> 
    35             <exec executable="hdiutil" dir="${basedir}/wrapped-installer"><arg line="detach /Volumes/Greenstone${version}"/></exec> 
    36         </if> 
     27        <!-- create disk image --> 
     28        <exec dir="${basedir}/wrapped-installer" executable="hdiutil"><arg line="create -size ${dmg.size}k -fs HFS+ -volname Greenstone${version} Greenstone${version}.dmg"/></exec> 
     29        <!-- mount it --> 
     30        <exec executable="hdiutil" dir="${basedir}/wrapped-installer"><arg line="attach Greenstone${version}.dmg"/></exec> 
     31        <!-- copy file into it --> 
     32        <exec executable="cp" dir="${basedir}/wrapped-installer"><arg line="-r Greenstone${version}.app /Volumes/Greenstone${version}"/></exec> 
     33        <!-- unmount it--> 
     34        <exec executable="hdiutil" dir="${basedir}/wrapped-installer"><arg line="detach /Volumes/Greenstone${version}"/></exec> 
    3735    </target> 
    3836