Changeset 16745


Ignore:
Timestamp:
2008-08-13T11:45:21+12:00 (13 years ago)
Author:
oranfry
Message:

changes to wirk2 after ant cleaned up

Location:
release-kits/wirk2/ant-scripts
Files:
5 edited

Legend:

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

    r16244 r16745  
    33        ..........................................................
    44        June 2008
    5         Wirk2 (Windows Release Kit for Greenstone2)
     5        Windows Release Kit for Greenstone2 (wirk2)
    66        Oran Fry
    77        ..........................................................
    88-->
     9
    910<project name="wirk2-build" default="wirk2">
    1011
     
    1415    <property name="resources.chunksize" value="8388608"/><!-- 8MiB -->
    1516
    16     <!-- set date !AD HOC, CHANGE SOON -->
    17     <property name="current.month" value="Jun"/>
    18     <property name="current.year" value="2008"/>
    19 
    2017    <!-- for the benefit of the shared scripts, set release-kit home -->
    2118    <property name="rk.home" value="${wirk2.home}" />
     
    2421    <!-- IMPORT OTHER ANT SCRIPTS -->
    2522    <import file="shared-ant-scripts/init.xml"/>
     23    <import file="shared-ant-scripts/operations-on-gli.xml"/>
    2624    <import file="compile.xml"/>
    2725    <import file="create-distribution.xml"/>
     
    3129    <!-- THE MAIN TARGET -->
    3230    <target name="wirk2" depends="init">
    33         <addressedcall target="compile"/>
    34         <addressedcall target="create-distribution"/>
    35         <addressedcall target="create-installer"/>
    36         <addressedcall target="wrap"/>
     31        <antcall target="compile"/>
     32        <antcall target="create-distribution"/>
     33        <antcall target="create-installer"/>
     34        <antcall target="wrap"/>
    3735    </target>
    3836
  • release-kits/wirk2/ant-scripts/compile.xml

    r16633 r16745  
    33
    44    <target name="compile">
    5 
    6         <addressedcall target="checkout-gsdl-gli" />
    7         <addressedcall target="set-version-numbers" />
    8         <addressedcall target="unzip-packages" />
    9         <addressedcall target="get-winbin" />
    10         <addressedcall target="insert-perl" />
    11         <addressedcall target="compile-c-code" />
    12         <addressedcall target="build-demo-collection" />
    13        
     5        <antcall target="checkout-gsdl-gli" />
     6        <antcall target="set-version-numbers" />
     7        <antcall target="unzip-packages" />
     8        <antcall target="get-winbin" />
     9        <antcall target="insert-perl" />
     10        <antcall target="compile-c-code" />
     11        <antcall target="build-demo-collection" />
    1412    </target>
    1513
    1614    <target name="checkout-gsdl-gli">
    17         <if><bool><istrue value="${execute}"/></bool>
    18             <svn>
    19                 <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/gsdl"/>
    20                 <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/gsdl/gli"/>
    21             </svn>
    22         </if>
     15        <svn>
     16            <checkout url="${svn.root}/gsdl/${branch.path}" destPath="${basedir}/gsdl"/>
     17            <checkout url="${svn.root}/gli/${branch.path}" destPath="${basedir}/gsdl/gli"/>
     18        </svn>
    2319    </target>
    2420
    2521    <target name="set-version-numbers">
    26         <if><bool><istrue value="${execute}"/></bool>
    27             <rsr file="${basedir}/gsdl/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION ).*" replacement="$1&quot;${version}&quot;" />
    28             <rsr file="${basedir}/gsdl/Install.sh" pattern="(echo &quot;Version: ).*(&quot; .*)" replacement="$1${version}$2" />
    29             <rsr file="${basedir}/gsdl/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
    30         </if>
     22        <rsr file="${basedir}/gsdl/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION ).*" replacement="$1&quot;${version}&quot;" />
     23        <rsr file="${basedir}/gsdl/Install.sh" pattern="(echo &quot;Version: ).*(&quot; .*)" replacement="$1${version}$2" />
     24        <rsr file="${basedir}/gsdl/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
    3125    </target>
    3226
    3327    <target name="unzip-packages">
    34         <if><bool><istrue value="${execute}"/></bool>
    35             <unzip src="${basedir}/gsdl/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/gsdl/common-src/packages/windows/crypt"/>
    36             <unzip src="${basedir}/gsdl/common-src/packages/windows/expat/expat.zip" dest="${basedir}/gsdl/common-src/packages/windows/expat"/>
    37             <unzip src="${basedir}/gsdl/common-src/packages/windows/gdbm/gdbm.zip" dest="${basedir}/gsdl/common-src/packages/windows/gdbm"/>
    38             <unzip src="${basedir}/gsdl/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/gsdl/common-src/packages/windows/stlport"/>
    39         </if>   
     28        <unzip src="${basedir}/gsdl/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/gsdl/common-src/packages/windows/crypt"/>
     29        <unzip src="${basedir}/gsdl/common-src/packages/windows/expat/expat.zip" dest="${basedir}/gsdl/common-src/packages/windows/expat"/>
     30        <unzip src="${basedir}/gsdl/common-src/packages/windows/gdbm/gdbm.zip" dest="${basedir}/gsdl/common-src/packages/windows/gdbm"/>
     31        <unzip src="${basedir}/gsdl/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/gsdl/common-src/packages/windows/stlport"/>
    4032    </target>
    4133
    4234    <target name="get-winbin">
    43         <if><bool><istrue value="${execute}"/></bool>
    44            
    45             <if>
    46                 <bool><not><available file="${basedir}/gsdl/bin/windows"/></not></bool>
    47                 <svn><export srcUrl="${svn.root}/other-projects/trunk/winbin/bin" destPath="${basedir}/gsdl/bin/windows" revision="${branch.revision}"/></svn>
    48             </if>
    49            
     35        <if>
     36            <bool><not><available file="${basedir}/gsdl/bin/windows"/></not></bool>
     37            <svn><export srcUrl="${svn.root}/other-projects/trunk/winbin/bin" destPath="${basedir}/gsdl/bin/windows" revision="${branch.revision}"/></svn>
    5038        </if>
    5139    </target>
    5240
    5341    <target name="insert-perl">
    54         <if><bool><istrue value="${execute}"/></bool>
    55             <mkdir dir="${basedir}/gsdl/bin/windows"/>
    56             <delete dir="${basedir}/gsdl/bin/windows/perl"/>
    57             <unzip src="${wirk2.home}/resources/perl.zip" dest="${basedir}/gsdl/bin/windows"/>
    58         </if>
     42        <mkdir dir="${basedir}/gsdl/bin/windows"/>
     43        <delete dir="${basedir}/gsdl/bin/windows/perl"/>
     44        <unzip src="${wirk2.home}/resources/perl.zip" dest="${basedir}/gsdl/bin/windows"/>
    5945    </target>
    6046   
    6147    <target name="compile-c-code">
    62         <if><bool><istrue value="${execute}"/></bool>
    63             <copy file="${wirk2.home}/resources/compile.bat" todir="${basedir}/gsdl" overwrite="true"/>
    64             <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/compile.bat"/>
    65            
    66             <move file="${basedir}/gsdl/server.exe" todir="${basedir}/gsdl/bin/windows"/>
    67             <move todir="${basedir}/gsdl/bin/windows">
    68                 <fileset dir="${basedir}/gsdl/cgi-bin" includes="library.exe,oaiserver.exe"/>
    69             </move>
    70 
    71         </if>
     48        <copy file="${wirk2.home}/resources/compile.bat" todir="${basedir}/gsdl" overwrite="true"/>
     49        <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/compile.bat" />
     50       
     51        <move file="${basedir}/gsdl/server.exe" todir="${basedir}/gsdl/bin/windows"/>
     52        <move todir="${basedir}/gsdl/bin/windows">
     53            <fileset dir="${basedir}/gsdl/cgi-bin" includes="library.exe,oaiserver.exe"/>
     54        </move>
    7255    </target>
    7356   
    7457    <target name="build-demo-collection">
    75         <if><bool><istrue value="${execute}"/></bool>
    76             <!-- the envs on these execs simulate the environment when you run setup.bat -->
    77             <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/bin/windows/perl/bin/perl.exe">
    78                 <arg line="bin\script\import.pl --removeold demo"/>
    79                 <env key="GSDLHOME" value="${basedir}/gsdl"/>
    80                 <env key="GSDLCOLLECTDIR" value="${basedir}/gsdl/collect"/>
    81                 <env key="GSDLOS" value="windows"/>
    82                 <env key="PATH" value="${basedir}\gsdl\bin\windows\perl\bin;${basedir}\gsdl\bin\windows;${basedir}\gsdl\bin\script"/>
    83             </exec>
    84             <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/bin/windows/perl/bin/perl.exe">
    85                 <arg line="bin\script\buildcol.pl --removeold demo"/>
    86                 <env key="GSDLHOME" value="${basedir}/gsdl"/>
    87                 <env key="GSDLCOLLECTDIR" value="${basedir}/gsdl/collect"/>
    88                 <env key="GSDLOS" value="windows"/>
    89                 <env key="PATH" value="${basedir}\gsdl\bin\windows\perl\bin;${basedir}\gsdl\bin\windows;${basedir}\gsdl\bin\script"/>
    90             </exec>
    91            
    92             <delete dir="${basedir}/gsdl/collect/demo/index"/>
    93             <move file="${basedir}/gsdl/collect/demo/building" tofile="${basedir}/gsdl/collect/demo/index"/>
    94         </if>
     58        <!-- the envs on these execs simulate the environment when you run setup.bat -->
     59        <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/bin/windows/perl/bin/perl.exe">
     60            <arg line="bin\script\import.pl --removeold demo"/>
     61            <env key="GSDLHOME" value="${basedir}/gsdl"/>
     62            <env key="GSDLCOLLECTDIR" value="${basedir}/gsdl/collect"/>
     63            <env key="GSDLOS" value="windows"/>
     64            <env key="PATH" value="${basedir}\gsdl\bin\windows\perl\bin;${basedir}\gsdl\bin\windows;${basedir}\gsdl\bin\script"/>
     65        </exec>
     66        <exec dir="${basedir}/gsdl" executable="${basedir}/gsdl/bin/windows/perl/bin/perl.exe">
     67            <arg line="bin\script\buildcol.pl --removeold demo"/>
     68            <env key="GSDLHOME" value="${basedir}/gsdl"/>
     69            <env key="GSDLCOLLECTDIR" value="${basedir}/gsdl/collect"/>
     70            <env key="GSDLOS" value="windows"/>
     71            <env key="PATH" value="${basedir}\gsdl\bin\windows\perl\bin;${basedir}\gsdl\bin\windows;${basedir}\gsdl\bin\script"/>
     72        </exec>
     73       
     74        <delete dir="${basedir}/gsdl/collect/demo/index"/>
     75        <move file="${basedir}/gsdl/collect/demo/building" tofile="${basedir}/gsdl/collect/demo/index"/>
    9576    </target>
    9677   
  • release-kits/wirk2/ant-scripts/create-distribution.xml

    r16633 r16745  
    33
    44    <target name="create-distribution">
    5         <!-- create distribution -->
    6         <addressedcall target="export-gsdl-gli" />
    7         <addressedcall target="dist-set-version" />
    8         <addressedcall target="drop-in-binaries" />
    9         <addressedcall target="drop-in-demo-collection" />
    10         <addressedcall target="compile-gli" />
    11         <!--<addressedcall target="create-gli-client-zip" />-->
    12         <addressedcall target="tweak-files" />
     5        <antcall target="export-gsdl-gli" />
     6        <antcall target="dist-set-version" />
     7        <antcall target="drop-in-binaries" />
     8        <antcall target="drop-in-demo-collection" />
     9        <antcall target="drop-in-docs" />
     10        <antcall target="copy-server-to-root"/>
     11        <antcall target="compile-gli" />
     12        <antcall target="tweak-files" />
    1313    </target>
    1414
    1515    <target name="export-gsdl-gli">
    16         <if><bool><istrue value="${execute}"/></bool>
    17            
    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            
    25         </if>
     16        <mkdir dir="distributions"/>
     17        <delete dir="distributions/web"/>
     18        <svn>
     19            <export srcurl="${svn.root}/gsdl/${branch.path}"        destPath="distributions/web"/>
     20            <export srcurl="${svn.root}/gli/${branch.path}"         destPath="distributions/web/gli"/>
     21        </svn>
    2622    </target>
    2723
    2824    <target name="dist-set-version">
    29         <if><bool><istrue value="${execute}"/></bool>
    30            
    31             <echo level="info">Setting version in src/lib/gsdlconf.h</echo>
    32             <rsr file="${basedir}/distributions/web/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}&quot;" />
    33            
    34             <echo level="info">Setting version in etc/VERSION</echo>
    35             <rsr file="${basedir}/distributions/web/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
    36            
    37         </if>
     25        <echo level="info">Setting version in src/lib/gsdlconf.h</echo>
     26        <rsr file="${basedir}/distributions/web/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}&quot;" />
     27        <echo level="info">Setting version in etc/VERSION</echo>
     28        <rsr file="${basedir}/distributions/web/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
    3829    </target>
    3930   
    4031    <target name="drop-in-binaries">
    41         <if><bool><istrue value="${execute}"/></bool>
    42             <echo level="info">Dropping compiled binaries into distribution</echo>
    43             <delete dir="${basedir}/distributions/web/bin/windows" />
    44             <copy todir="${basedir}/distributions/web/bin/windows">
    45                 <fileset dir="${basedir}/gsdl/bin/windows" includes="**/*"/>
    46             </copy>
    47         </if>
     32        <echo level="info">Dropping compiled binaries into distribution</echo>
     33        <delete dir="${basedir}/distributions/web/bin/windows" />
     34        <copy todir="${basedir}/distributions/web/bin/windows">
     35            <fileset dir="${basedir}/gsdl/bin/windows" includes="**/*"/>
     36        </copy>
    4837    </target>
    4938
    5039    <target name="drop-in-demo-collection">
    51         <if><bool><istrue value="${execute}"/></bool>
    52             <echo level="info">Dropping rebuilt demo collection into distribution</echo>
    53             <delete dir="${basedir}/distributions/web/collect/demo" />
    54             <copy todir="${basedir}/distributions/web/collect/demo">
    55                 <fileset dir="${basedir}/gsdl/collect/demo" includes="**/*"/>
    56             </copy>
    57         </if>
     40        <echo level="info">Dropping rebuilt demo collection into distribution</echo>
     41        <delete dir="${basedir}/distributions/web/collect/demo" />
     42        <copy todir="${basedir}/distributions/web/collect/demo">
     43            <fileset dir="${basedir}/gsdl/collect/demo" includes="**/*"/>
     44        </copy>
     45    </target>
     46
     47    <target name="drop-in-docs">
     48        <echo level="info">Dropping gsdl docs  into distribution</echo>
     49        <copy todir="${basedir}/distributions/web" overwrite="true">
     50            <fileset dir="${wirk2.home}/greenstone2/docs"/>
     51        </copy>
     52    </target>
     53
     54    <target name="copy-server-to-root">
     55        <copy todir="${basedir}/distributions/web" overwrite="true">
     56            <fileset dir="${basedir}/bin/windows/server.exe"/>
     57        </copy>
     58
    5859    </target>
    5960   
    6061    <target name="compile-gli">
    61         <if><bool><istrue value="${execute}"/></bool>
    62            
    63             <echo>Compiling gli...</echo>
    64             <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.bat"/>
    65            
    66             <echo>Creating jar...</echo>
    67             <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.bat"/>
    68            
    69             <echo>Cleaning up intermediate files...</echo>
    70             <delete dir="${basedir}/distributions/web/gli/jar"/>
    71             <delete dir="${basedir}/distributions/web/gli/classes/org"/>
    72            
    73             <echo>Putting gli server jar in a better place</echo>
    74             <move file="${basedir}/distributions/web/gli/GLIServer.jar" todir="${basedir}/distributions/web/bin/java" />
    75            
    76         </if>
     62        <echo>Compiling gli...</echo>
     63        <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.bat"/>
     64       
     65        <echo>Creating jar...</echo>
     66        <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.bat"/>
     67       
     68        <echo>Cleaning up intermediate files...</echo>
     69        <delete dir="${basedir}/distributions/web/gli/jar"/>
     70        <delete dir="${basedir}/distributions/web/gli/classes/org"/>
     71       
     72        <echo>Putting gli server jar in a better place</echo>
     73        <move file="${basedir}/distributions/web/gli/GLIServer.jar" todir="${basedir}/distributions/web/bin/java" />
    7774    </target>
    7875
    7976    <target name="tweak-files">
    80         <if><bool><istrue value="${execute}"/></bool>
     77        <echo level="info">Changing date and version in the docs</echo>
     78        <!-- ar -->
     79        <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(التاريخ : \s*)(.*)" replacement="$1${month.ar} ${current.year}" />
     80        <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(النسخه : \s*)(.*)" replacement="$1${version}" />
     81        <!-- es -->
     82        <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}" />
     83        <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}" />
     84        <!-- fr -->
     85        <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}" />
     86        <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" />
     87        <!-- ru -->
     88        <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(Дата\s*)(.*)" replacement="$1${month.ru} ${current.year}" />
     89        <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(ВерсОя\s*)(.*)" replacement="$1${version}" />
     90        <!-- en -->
     91        <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
     92        <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" />
    8193
    82             <echo level="info">Putting the docs into distribution</echo>
    83             <copy todir="${basedir}/distributions/web" overwrite="true">
    84                 <fileset dir="${wirk2.home}/greenstone2/docs"/>
    85             </copy>
     94        <!-- Support.htm -->
     95        <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*Greenstone Digital Library version: ).*(&lt;br&gt;.*)" replacement="$1${version}$2"/>
     96        <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*&lt;input.* name=&quot;gsdl version&quot;.* value=&quot;).*(&quot;.*&gt;)" replacement="$1${version}$2"/>
    8697
    87             <echo level="info">Removing signed gatherer</echo>
    88             <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
    8998
    90             <echo level="info">Removing some unneeded stuff</echo>
    91             <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
    92             <delete file="${basedir}/distributions/web/gli/gli4gs3.sh" />
    93             <delete dir="${basedir}/distributions/web/bin/linux" />
    94             <delete><fileset dir="${basedir}/distributions/web" includes="*.bash,*.sh,*.csh,install-sh,configure,configure.in,config.sub,config.guess,config.h.in,configtest.pl,Makefile.in,aclocal.m4,acconfig.h,micotest.cpp,win32.mak,WIN32cfg.h,Install.txt"/></delete>
    95             <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.sh,*4gs3.bat"/></delete>
    96            
    97         </if>
     99        <echo level="info">Removing signed gatherer</echo>
     100        <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
     101
     102        <echo level="info">Removing some unneeded stuff</echo>
     103        <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
     104        <delete dir="${basedir}/distributions/web/bin/linux" />
     105        <delete><fileset dir="${basedir}/distributions/web" includes="*.bash,*.sh,*.csh,install-sh,configure,configure.in,config.sub,config.guess,config.h.in,configtest.pl,Makefile.in,aclocal.m4,acconfig.h,micotest.cpp,win32.mak,WIN32cfg.h,Install.txt"/></delete>
     106        <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.sh,*4gs3.bat"/></delete>
    98107    </target>
    99108
  • release-kits/wirk2/ant-scripts/create-installer.xml

    r16633 r16745  
    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>
    11            
    12             <mkdir dir="${basedir}/installer/classes"/>
    13             <copy todir="${basedir}/installer" file="${wirk2.home}/installer/antinstall-config.xml" overwrite="true"/>
    14             <copy todir="${basedir}/installer" file="${wirk2.home}/installer/build.xml" overwrite="true"/>
    15             <copy todir="${basedir}/installer/classes" overwrite="true">
    16                 <fileset dir="${wirk2.home}/greenstone2/installer-classes"/>
    17                 <fileset dir="${wirk2.home}/windows/installer-classes"/>
    18                 <fileset dir="${wirk2.home}/ant-scripts/tasks/orans" includes="RegexSearchReplace.class" />
    19             </copy>
    20            
    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/build.xml" pattern="@version@" replacement="${version}"/>
    24                                    
    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.windows-java}"/>
    30             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
    31             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
    32            
    33             <!-- chinese -->
    34             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/>
    35             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
    36             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
    37             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
    38             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
    39            
    40         </if>
     10        <mkdir dir="${basedir}/installer/classes"/>
     11        <copy todir="${basedir}/installer" file="${wirk2.home}/installer/antinstall-config.xml" overwrite="true"/>
     12        <copy todir="${basedir}/installer" file="${wirk2.home}/installer/build.xml" overwrite="true"/>
     13        <copy todir="${basedir}/installer/classes" overwrite="true">
     14            <fileset dir="${wirk2.home}/greenstone2/installer-classes"/>
     15            <fileset dir="${wirk2.home}/windows/installer-classes"/>
     16            <fileset dir="${wirk2.home}/ant-scripts/tasks/orans" includes="RegexSearchReplace.class" />
     17        </copy>
     18       
     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/build.xml" pattern="@version@" replacement="${version}"/>
     22                               
     23        <!-- put the concrete values of things in the text -->
     24        <!-- default -->
     25        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/>
     26        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
     27        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
     28        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
     29        <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
     30       
     31        <!-- chinese -->
     32        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/>
     33        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
     34        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
     35        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
     36        <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
    4137    </target>
    4238
    4339    <target name="compile-installer">
    44         <if><bool><istrue value="${execute}"/></bool>
     40        <installer file="${basedir}/installer/greenstone-${version}-win32.jar"
     41            compress="true"
     42            extractType="NonExtractor"
     43            installConfig="${basedir}/installer/antinstall-config.xml"
     44            buildFile="${basedir}/installer/build.xml"
     45            antInstallLib="${wirk2.home}/packages/ant-installer/lib"
     46            antLib="${wirk2.home}/packages/ant/lib"
     47            validateConfig="true"
     48            icons="bluecurve">
    4549           
    46             <installer file="${basedir}/installer/greenstone-${version}-win32.jar"
    47                 compress="true"
    48                 extractType="NonExtractor"
    49                 installConfig="${basedir}/installer/antinstall-config.xml"
    50                 buildFile="${basedir}/installer/build.xml"
    51                 antInstallLib="${wirk2.home}/packages/ant-installer/lib"
    52                 antLib="${wirk2.home}/packages/ant/lib"
    53                 validateConfig="true"
    54                 icons="bluecurve">
    55                
    56                 <zipfileset dir="${basedir}/installer/classes" includes="**/*" />
    57                 <zipfileset dir="${basedir}/distributions/web" includes="**/*" />
    58                
    59             </installer>
     50            <zipfileset dir="${basedir}/installer/classes" includes="**/*" />
     51            <zipfileset dir="${basedir}/distributions/web" includes="**/*" />
    6052           
    61         </if>
     53        </installer>
    6254    </target>
    6355   
  • release-kits/wirk2/ant-scripts/wrap.xml

    r16633 r16745  
    33
    44    <target name="wrap">
    5         <addressedcall target="copy-files-for-wrapping"/>
    6         <addressedcall target="tweak-files-for-wrapping"/>
    7         <addressedcall target="compile-resources"/>
    8         <addressedcall target="compile-wrapper"/>
    9         <addressedcall target="link-wrapper-no-java"/>
    10         <addressedcall target="link-wrapper-with-java"/>
     5        <antcall target="copy-files-for-wrapping"/>
     6        <antcall target="tweak-files-for-wrapping"/>
     7        <antcall target="compile-resources"/>
     8        <antcall target="compile-wrapper"/>
     9        <antcall target="link-wrapper-no-java"/>
     10        <antcall target="link-wrapper-with-java"/>
    1111    </target>
    1212
    1313    <target name="copy-files-for-wrapping">
    14         <if><bool><istrue value="${execute}"/></bool>
    15            
    16             <!--create a directory to build the wrapped installer in -->
    17             <mkdir dir="${basedir}/wrapped-installer/build"/>
    18            
    19             <!-- copy source files -->
    20             <copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/windows/wrapper/wrapper.cpp"  overwrite="true"/>
    21             <copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/packages/search4j/libsearch4j.cpp" overwrite="true"/>
    22             <copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/packages/search4j/libsearch4j.h" overwrite="true"/>
     14        <!--create a directory to build the wrapped installer in -->
     15        <mkdir dir="${basedir}/wrapped-installer/build"/>
    2316       
    24         </if>
     17        <!-- copy source files -->
     18        <copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/windows/wrapper/wrapper.cpp"  overwrite="true"/>
     19        <copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/packages/search4j/libsearch4j.cpp" overwrite="true"/>
     20        <copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/packages/search4j/libsearch4j.h" overwrite="true"/>
    2521    </target>
    2622   
    2723    <target name="tweak-files-for-wrapping">
    28         <if><bool><istrue value="${execute}"/></bool>
    29            
    30             <!-- substitute the real java installer filename and min version into various files -->
    31             <echo>Substitute concrete values of things into source files</echo>
    32             <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.installer@" replacement="${windows-java.installer}"/>
    33             <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.min.version@" replacement="${java.min.version}"/>
    34             <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
    35            
    36         </if>
     24        <!-- substitute the real java installer filename and min version into various files -->
     25        <echo>Substitute concrete values of things into source files</echo>
     26        <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.installer@" replacement="${windows-java.installer}"/>
     27        <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.min.version@" replacement="${java.min.version}"/>
     28        <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/>
    3729    </target>
    3830
    3931    <target name="compile-resources">
    40         <if><bool><istrue value="${execute}"/></bool>
     32        <if>
     33            <bool>
     34                <not>
     35                    <uptodate targetfile="${basedir}/wrapped-installer/build/wrapper.RES">
     36                        <srcfiles dir="${wirk2.home}/greenstone2/icon" includes="gs2.ico"/>
     37                        <srcfiles dir="${wirk2.home}/windows/wrapper" includes="${windows-java.installer}"/>
     38                        <srcfiles dir="${wirk2.home}/windows/wrapper" includes="*.bmp"/>
     39                        <srcfiles dir="${wirk2.home}/greenstone2/wrapper" includes="*.bmp"/>
     40                        <srcfiles dir="${wirk2.home}/windows/wrapper" includes="*.rc"/>
     41                        <srcfiles dir="${basedir}/installer" includes="greenstone2.jar"/>
     42                    </uptodate>
     43                </not>
     44            </bool>
    4145           
    42             <if>
    43                 <bool>
    44                     <not>
    45                         <uptodate targetfile="${basedir}/wrapped-installer/build/wrapper.RES">
    46                             <srcfiles dir="${wirk2.home}/greenstone2/icon" includes="gs2.ico"/>
    47                             <srcfiles dir="${wirk2.home}/windows/wrapper" includes="${windows-java.installer}"/>
    48                             <srcfiles dir="${wirk2.home}/windows/wrapper" includes="*.bmp"/>
    49                             <srcfiles dir="${wirk2.home}/greenstone2/wrapper" includes="*.bmp"/>
    50                             <srcfiles dir="${wirk2.home}/windows/wrapper" includes="*.rc"/>
    51                             <srcfiles dir="${basedir}/installer" includes="greenstone2.jar"/>
    52                         </uptodate>
    53                     </not>
    54                 </bool>
    55                
    56                 <echo>Compiling resources</echo>
    57                
    58                 <echo>getting the template resource script</echo>
    59                 <copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/windows/wrapper/wrapper.rc" overwrite="true"/>
    60                
    61                 <echo>copying the small resource files into place</echo>
    62                 <copy todir="${basedir}/wrapped-installer/build" overwrite="true">
    63                     <fileset dir="${wirk2.home}/windows/wrapper" includes="*.bmp"/>
    64                     <fileset dir="${wirk2.home}/greenstone2/wrapper" includes="*.bmp"/>
    65                     <fileset dir="${wirk2.home}/greenstone2/icon" includes="icon.ico"/>
    66                 </copy>
    67                
    68                 <echo>adding greenstone2.jar to the resource script as chunks</echo>
    69                 <rsplit
    70                     resource="${basedir}/installer/greenstone-${version}-win32.jar"
    71                     outputDir="${basedir}/wrapped-installer/build"
    72                     resourceScript="${basedir}/wrapped-installer/build/wrapper.rc"
    73                     resourceName="JAR"
    74                     resourceType="JAR"
    75                     chunkSize="${resources.chunksize}"
    76                     />
     46            <echo>Compiling resources</echo>
    7747           
    78                 <echo>resource compiling the resource script</echo>
    79                 <exec executable="rc" dir="${basedir}/wrapped-installer/build">
    80                     <arg line="wrapper.rc"/>
    81                 </exec>
    82                
    83                 <echo>making a copy of the resource script</echo>
    84                 <copy file="${basedir}/wrapped-installer/build/wrapper.rc" tofile="${basedir}/wrapped-installer/build/wrapper-with-jre.rc" overwrite="true"/>
    85                
    86                 <echo>adding ${windows-java.installer} to the copy as chunks</echo>
    87                 <rsplit
    88                     resource="${wirk2.home}/windows/wrapper/${windows-java.installer}"
    89                     outputDir="${basedir}/wrapped-installer/build"                 
    90                     resourceScript="${basedir}/wrapped-installer/build/wrapper-with-jre.rc"
    91                     resourceName="JAVA"
    92                     resourceType="EXE"
    93                     chunkSize="${resources.chunksize}"
    94                     />
     48            <echo>getting the template resource script</echo>
     49            <copy todir="${basedir}/wrapped-installer/build" file="${wirk2.home}/windows/wrapper/wrapper.rc" overwrite="true"/>
     50           
     51            <echo>copying the small resource files into place</echo>
     52            <copy todir="${basedir}/wrapped-installer/build" overwrite="true">
     53                <fileset dir="${wirk2.home}/windows/wrapper" includes="*.bmp"/>
     54                <fileset dir="${wirk2.home}/greenstone2/wrapper" includes="*.bmp"/>
     55                <fileset dir="${wirk2.home}/greenstone2/icon" includes="icon.ico"/>
     56            </copy>
     57           
     58            <echo>adding greenstone2.jar to the resource script as chunks</echo>
     59            <rsplit
     60                resource="${basedir}/installer/greenstone-${version}-win32.jar"
     61                outputDir="${basedir}/wrapped-installer/build"
     62                resourceScript="${basedir}/wrapped-installer/build/wrapper.rc"
     63                resourceName="JAR"
     64                resourceType="JAR"
     65                chunkSize="${resources.chunksize}"
     66                />
     67       
     68            <echo>resource compiling the resource script</echo>
     69            <exec executable="rc" dir="${basedir}/wrapped-installer/build">
     70                <arg line="wrapper.rc"/>
     71            </exec>
     72           
     73            <echo>making a copy of the resource script</echo>
     74            <copy file="${basedir}/wrapped-installer/build/wrapper.rc" tofile="${basedir}/wrapped-installer/build/wrapper-with-jre.rc" overwrite="true"/>
     75           
     76            <echo>adding ${windows-java.installer} to the copy as chunks</echo>
     77            <rsplit
     78                resource="${wirk2.home}/windows/wrapper/${windows-java.installer}"
     79                outputDir="${basedir}/wrapped-installer/build"                 
     80                resourceScript="${basedir}/wrapped-installer/build/wrapper-with-jre.rc"
     81                resourceName="JAVA"
     82                resourceType="EXE"
     83                chunkSize="${resources.chunksize}"
     84                />
    9585
    96                 <echo>resource compiling the generated resource script again</echo>
    97                 <exec executable="rc" dir="${basedir}/wrapped-installer/build">
    98                     <arg line="wrapper-with-jre.rc"/>
    99                 </exec>
    100                
    101                 <else>
    102                     <echo>Resourses are up-to-date, will not compile</echo>
    103                 </else>
    104             </if>
     86            <echo>resource compiling the generated resource script again</echo>
     87            <exec executable="rc" dir="${basedir}/wrapped-installer/build">
     88                <arg line="wrapper-with-jre.rc"/>
     89            </exec>
    10590           
    106            
     91            <else>
     92                <echo>Resourses are up-to-date, will not compile</echo>
     93            </else>
    10794        </if>
    10895    </target>
    10996
    11097    <target name="compile-wrapper">
    111         <if><bool><istrue value="${execute}"/></bool>
     98        <exec executable="cl" dir="${basedir}/wrapped-installer/build">
     99            <arg line="/c -GX /DWINDOWS=yes libsearch4j.cpp /out:libsearch4j.obj"/>
     100        </exec>
    112101
    113             <exec executable="cl" dir="${basedir}/wrapped-installer/build">
    114                 <arg line="/c -GX /DWINDOWS=yes libsearch4j.cpp /out:libsearch4j.obj"/>
    115             </exec>
    116 
    117             <exec executable="cl" dir="${basedir}/wrapped-installer/build">
    118                 <arg line="/c -GX /DWINDOWS=yes wrapper.cpp /out:wrapper.obj"/>
    119             </exec>
    120            
    121         </if>
     102        <exec executable="cl" dir="${basedir}/wrapped-installer/build">
     103            <arg line="/c -GX /DWINDOWS=yes wrapper.cpp /out:wrapper.obj"/>
     104        </exec>
    122105    </target>
    123106   
    124107    <target name="link-wrapper-no-java">
    125         <if><bool><istrue value="${execute}"/></bool>
    126             <exec executable="link" dir="${basedir}/wrapped-installer/build">
    127                 <arg line="/OUT:..\greenstone-${version}-win32.exe gdi32.lib advapi32.lib shell32.lib user32.lib libsearch4j.obj wrapper.obj wrapper.res"/>
    128             </exec>
    129         </if>
     108        <exec executable="link" dir="${basedir}/wrapped-installer/build">
     109            <arg line="/OUT:..\greenstone-${version}-win32.exe gdi32.lib advapi32.lib shell32.lib user32.lib libsearch4j.obj wrapper.obj wrapper.res"/>
     110        </exec>
    130111    </target>
    131112
    132113    <target name="link-wrapper-with-java">
    133         <if><bool><istrue value="${execute}"/></bool>
    134             <exec executable="link" dir="${basedir}/wrapped-installer/build">
    135                 <arg line="/OUT:..\greenstone-${version}-win32-with-java.exe gdi32.lib advapi32.lib shell32.lib user32.lib libsearch4j.obj wrapper.obj wrapper-with-jre.res"/>
    136             </exec>
    137         </if>
     114        <exec executable="link" dir="${basedir}/wrapped-installer/build">
     115            <arg line="/OUT:..\greenstone-${version}-win32-with-java.exe gdi32.lib advapi32.lib shell32.lib user32.lib libsearch4j.obj wrapper.obj wrapper-with-jre.res"/>
     116        </exec>
    138117    </target>
    139118
Note: See TracChangeset for help on using the changeset viewer.