Ignore:
Timestamp:
2008-08-13T11:48:29+12:00 (16 years ago)
Author:
oranfry
Message:

changes to wirk3 after ant cleaned up

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

Legend:

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

    r16245 r16748  
    33        ..........................................................
    44        February 2008
    5         Windows Release Kit for greenstone3
     5        Windows Release Kit for greenstone3 (wirk3)
    66        Oran Fry
    77        ..........................................................
    88-->
     9
    910<project name="wirk3-build" default="wirk3">
    1011
    1112    <!-- CONSTANTS -->
    12 
    13     <!-- the size of the resourse chunks to be put in the wrapped installer -->
    14     <property name="resources.chunksize" value="8388608"/><!-- 8MiB -->
    1513
    1614    <!-- the version numbers of bundled things -->
     
    1816    <property name="bundled.version.ant" value="1.6.5"/>
    1917
    20     <!-- set date !AD HOC, CHANGE SOON -->
    21     <property name="current.month" value="Jun"/>
    22     <property name="current.year" value="2008"/>
     18    <!-- the size of the resourse chunks to be put in the wrapped installer -->
     19    <property name="resources.chunksize" value="8388608"/><!-- 8MiB -->
    2320
    2421    <!-- for the benefit of the shared scripts, set release-kit home -->
    2522    <property name="rk.home" value="${wirk3.home}" />
     23    <property name="rk.os" value="windows" />
    2624
    2725    <!-- IMPORT OTHER ANT SCRIPTS -->
    2826    <import file="shared-ant-scripts/init.xml"/>
     27    <import file="shared-ant-scripts/operations-on-gli.xml"/>
     28    <import file="../greenstone3/ant-scripts/rk3-targets.xml"/>
    2929    <import file="compile.xml"/>
    3030    <import file="create-distribution.xml"/>
     
    3434    <!-- THE MAIN TARGET -->
    3535    <target name="wirk3" depends="init">
    36         <addressedcall target="compile"/>
    37         <addressedcall target="create-distribution"/>
    38         <addressedcall target="create-installer"/>
    39         <addressedcall target="wrap"/>
     36        <antcall target="compile"/>
     37        <antcall target="create-distribution"/>
     38        <antcall target="create-installer"/>
     39        <antcall target="wrap"/>
    4040    </target>
    4141
  • release-kits/wirk3/ant-scripts/compile.xml

    r16198 r16748  
    33
    44    <target name="compile">
    5         <addressedcall target="checkout-greenstone3" />
    6         <addressedcall target="set-version-number-property" />
    7         <addressedcall target="dist-prepare-windows" />
    8         <addressedcall target="dist-build-windows" />
    9         <addressedcall target="prepare-documentation" />
     5        <antcall target="checkout-greenstone3" />
     6        <antcall target="set-version-number-property" />
     7        <ant target="prepare-windows" dir="greenstone3" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false">
     8            <property name="app.version" value="${version}"/>
     9            <property name="branch.path" value="${branch.path}"/>
     10            <property name="branch.revision" value="${branch.revision}"/>
     11        </ant>
     12        <ant target="build-windows" dir="greenstone3" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false">
     13            <property name="app.version" value="${version}"/>
     14            <property name="branch.path" value="${branch.path}"/>
     15            <property name="branch.revision" value="${branch.revision}"/>
     16        </ant>
     17        <antcall target="prepare-documentation" />
    1018    </target>
    1119
    1220    <target name="checkout-greenstone3">
    13         <if><bool><istrue value="${execute}"/></bool>
    14             <svn>
    15                 <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3" revision="${branch.revision}"/>
    16             </svn>
    17         </if>
     21        <svn>
     22            <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3" revision="${branch.revision}"/>
     23        </svn>
    1824    </target>
    1925
    2026    <target name="set-version-number-property">
    21         <if><bool><istrue value="${execute}"/></bool>
    22             <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
    23         </if>
     27        <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
    2428    </target>
    2529
    26     <target name="dist-prepare-windows">
    27         <if><bool><istrue value="${execute}"/></bool>
    28             <ant dir="greenstone3" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-windows" inheritAll="false">
    29                 <property name="app.version" value="${version}"/>
    30                 <property name="branch.path" value="${branch.path}"/>
    31                 <property name="branch.revision" value="${branch.revision}"/>
    32             </ant>
    3330
    34         </if>   
    35     </target>
    3631    <target name="tweak-configure-scripts">
    37         <addressedcall target="mgpp-add-static" />
    38         <addressedcall target="mg-add-static" />
    39         <addressedcall target="gs2buildextra-add-static" />
     32        <antcall target="mgpp-add-static" />
     33        <antcall target="mg-add-static" />
     34        <antcall target="gs2buildextra-add-static" />
    4035    </target>
    4136
    42     <target name="dist-build-windows">
    43         <if><bool><istrue value="${execute}"/></bool>
    44             <ant dir="greenstone3" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" target="build-windows" inheritAll="false">
    45                 <property name="app.version" value="${version}"/>
    46                 <property name="branch.path" value="${branch.path}"/>
    47                 <property name="branch.revision" value="${branch.revision}"/>
    48             </ant>
    49         </if>
    50     </target>
    51    
    5237    <target name="prepare-documentation">
    53         <if><bool><istrue value="${execute}"/></bool>
     38        <mkdir dir="greenstone3/gsdl-manuals"/>
     39        <svn>
     40            <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals" revision="${branch.revision}"/>
     41            <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared" revision="${branch.revision}"/>
     42        </svn>
     43        <javac srcdir="greenstone3/gsdl-manuals/shared" destdir="greenstone3/gsdl-manuals/shared" debug="on"><include name="*.java"/></javac>
     44        <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
    5445
    55             <mkdir dir="greenstone3/gsdl-manuals"/>
    56             <svn>
    57                 <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals" revision="${branch.revision}"/>
    58                 <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared" revision="${branch.revision}"/>
    59             </svn>
    60             <javac srcdir="greenstone3/gsdl-manuals/shared" destdir="greenstone3/gsdl-manuals/shared" debug="on"><include name="*.java"/></javac>
    61             <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
    62 
    63             <echo>Define Classpath</echo>
    64             <path id="documentation.compile.classpath">
    65                 <fileset dir="greenstone3/gsdl-manuals">
    66                     <include name="**/*.jar"/>
    67                 </fileset>
    68                 <pathelement path="greenstone3/gsdl-manuals/shared"/>
    69                 <pathelement path="greenstone3/gsdl-manuals/manuals"/>
    70                 <pathelement path="greenstone3/gli/classes"/>
    71             </path>
    72                        
    73             <echo>Apply XSLT</echo>
    74             <java classname="org.apache.xalan.xslt.Process" classpathref="documentation.compile.classpath" fork="true">
    75                 <jvmarg value="-DGSDLHOME=${basedir}/greenstone" />
    76                 <arg value="-IN"/><arg file="greenstone3/gli/help/en/help.xml" />
    77                 <arg value="-XSL"/><arg file="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
    78                 <arg value="-OUT"/><arg file="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml" />
    79                
    80             </java>
    81                        
    82             <echo>Run generate-pdf.bat</echo>
    83             <exec dir="${basedir}\greenstone3/gsdl-manuals/manuals" executable="cmd">
    84                 <arg value="/C" />
    85                 <arg file="${basedir}/greenstone3/gsdl-manuals/manuals/generate-pdf.bat" />
    86                 <arg value="u" />
    87                 <arg value="en" />
    88             </exec>
     46        <echo>Define Classpath</echo>
     47        <path id="documentation.compile.classpath">
     48            <fileset dir="greenstone3/gsdl-manuals">
     49                <include name="**/*.jar"/>
     50            </fileset>
     51            <pathelement path="greenstone3/gsdl-manuals/shared"/>
     52            <pathelement path="greenstone3/gsdl-manuals/manuals"/>
     53            <pathelement path="greenstone3/gli/classes"/>
     54        </path>
     55                   
     56        <echo>Apply XSLT</echo>
     57        <java classname="org.apache.xalan.xslt.Process" classpathref="documentation.compile.classpath" fork="true">
     58            <jvmarg value="-DGSDLHOME=${basedir}/greenstone" />
     59            <arg value="-IN"/><arg file="greenstone3/gli/help/en/help.xml" />
     60            <arg value="-XSL"/><arg file="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
     61            <arg value="-OUT"/><arg file="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml" />
    8962           
    90         </if>
     63        </java>
     64                   
     65        <echo>Run generate-pdf.bat</echo>
     66        <exec dir="${basedir}\greenstone3/gsdl-manuals/manuals" executable="cmd">
     67            <arg value="/C" />
     68            <arg file="${basedir}/greenstone3/gsdl-manuals/manuals/generate-pdf.bat" />
     69            <arg value="u" />
     70            <arg value="en" />
     71        </exec>
    9172    </target>
    9273
    93    
    94 
    9574</project>
  • release-kits/wirk3/ant-scripts/create-distribution.xml

    r16198 r16748  
    22<project name="wirk3-create-distribution" default="create-distribution">
    33
    4 
    54    <target name="create-distribution">
    65        <!-- create distribution -->
    7         <addressedcall target="export-greenstone3" />
    8         <addressedcall target="dist-set-version-number-property" />
    9         <addressedcall target="create-distributions-1" />
    10         <addressedcall target="create-distributions-2" />
    11         <addressedcall target="create-distributions-3" />
    12         <addressedcall target="copy-over-build-xml" />
    13         <addressedcall target="insert-user-manual"/>
    14         <addressedcall target="insert-compiled-binaries"/>
    15         <addressedcall target="rename-build-xml-for-transit"/>
     6        <antcall target="export-greenstone3" />
     7        <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distribution/greenstone3/gli" />
     8
     9        <ant target="create-distribution-1" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" inheritAll="false">
     10            <property name="app.version" value="${version}"/>
     11            <property name="branch.path" value="${branch.path}"/>
     12            <property name="branch.revision" value="${branch.revision}"/>
     13        </ant>
     14        <ant target="create-distribution-2" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" inheritAll="false">
     15            <property name="app.version" value="${version}"/>
     16            <property name="branch.path" value="${branch.path}"/>
     17            <property name="branch.revision" value="${branch.revision}"/>
     18        </ant>
     19        <ant target="create-distribution-3" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" inheritAll="false">
     20            <property name="app.version" value="${version}"/>
     21            <property name="branch.path" value="${branch.path}"/>
     22            <property name="branch.revision" value="${branch.revision}"/>
     23        </ant>
     24
     25        <antcall target="copy-over-build-xml" />
     26        <antcall target="insert-user-manual"/>
     27        <antcall target="insert-compiled-binaries"/>
     28        <antcall target="rename-build-xml-for-transit"/>
    1629    </target>
    1730
    1831    <target name="export-greenstone3">
    19         <if><bool><istrue value="${execute}"/></bool>
    20             <mkdir dir="distribution"/>
    21             <delete dir="distribution/greenstone3"/>
    22             <svn>
    23                 <export srcurl="${svn.root}/greenstone3/${branch.path}" destPath="distribution/greenstone3" revision="${branch.revision}"/>
    24             </svn>
    25         </if>
     32        <mkdir dir="distribution"/>
     33        <delete dir="distribution/greenstone3"/>
     34        <svn>
     35            <export srcurl="${svn.root}/greenstone3/${branch.path}" destPath="distribution/greenstone3" revision="${branch.revision}"/>
     36        </svn>
    2637    </target>
    2738
    2839    <target name="dist-set-version-number-property">
    29         <if><bool><istrue value="${execute}"/></bool>
    30             <rsr file="distribution/greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
    31         </if>
    32     </target>
    33 
    34     <target name="create-distributions-1">
    35         <if><bool><istrue value="${execute}"/></bool>
    36             <ant antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-1" inheritAll="false">
    37                 <property name="app.version" value="${version}"/>
    38                 <property name="branch.path" value="${branch.path}"/>
    39             </ant>
    40         </if>
    41     </target>
    42 
    43     <target name="create-distributions-2">
    44         <if><bool><istrue value="${execute}"/></bool>
    45             <ant antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-2" inheritAll="false">
    46                 <property name="app.version" value="${version}"/>
    47                 <property name="branch.path" value="${branch.path}"/>
    48                 <property name="branch.revision" value="${branch.revision}"/>
    49             </ant>
    50         </if>
    51     </target>
    52 
    53     <target name="create-distributions-3">
    54         <if><bool><istrue value="${execute}"/></bool>
    55             <ant antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-3" inheritall="false">
    56                 <property name="app.version" value="${version}"/>
    57                 <property name="branch.path" value="${branch.path}"/>
    58             </ant>
    59         </if>
     40        <rsr
     41            file="distribution/greenstone3/resources/java/global.properties.in"
     42            pattern="(.*)@gsdl3version@(.*)"
     43            replacement="$1${version}$2" />
    6044    </target>
    6145
     
    6751
    6852    <target name="insert-user-manual">
    69         <if><bool><istrue value="${execute}"/></bool>
    70             <copy file="greenstone3/gsdl-manuals/manuals/build/en/pdf/User_en.pdf" tofile="distribution/greenstone3/docs/manual/gs2_user_en.pdf"/>
    71         </if>
     53        <copy file="greenstone3/gsdl-manuals/manuals/build/en/pdf/User_en.pdf" tofile="distribution/greenstone3/docs/manual/gs2_user_en.pdf"/>
    7254    </target>
    7355
    7456    <target name="insert-compiled-binaries">
    75         <if><bool><istrue value="${execute}"/></bool>
    76            
    77             <delete dir="distribution/greenstone3/lib/jni"/>
    78             <copy todir="distribution/greenstone3/lib/jni"><fileset dir="greenstone3/lib/jni"/></copy>
    79            
    80             <delete dir="distribution/greenstone3/gs2build/bin/windows"/>
    81             <copy todir="distribution/greenstone3/gs2build/bin/windows"><fileset dir="greenstone3/gs2build/bin/windows"/></copy>
    82            
    83             <delete dir="distribution/greenstone3/gs2build/bin/java"/>
    84             <copy todir="distribution/greenstone3/gs2build/bin/java"><fileset dir="greenstone3/gs2build/bin/java"/></copy>
     57        <delete dir="distribution/greenstone3/lib/jni"/>
     58        <copy todir="distribution/greenstone3/lib/jni"><fileset dir="greenstone3/lib/jni"/></copy>
    8559       
    86         </if>
     60        <delete dir="distribution/greenstone3/gs2build/bin/windows"/>
     61        <copy todir="distribution/greenstone3/gs2build/bin/windows"><fileset dir="greenstone3/gs2build/bin/windows"/></copy>
     62       
     63        <delete dir="distribution/greenstone3/gs2build/bin/java"/>
     64        <copy todir="distribution/greenstone3/gs2build/bin/java"><fileset dir="greenstone3/gs2build/bin/java"/></copy>
    8765    </target>
    8866
    8967    <target name="rename-build-xml-for-transit">
    90         <if><bool><istrue value="${execute}"/></bool>
    91             <move file="distribution/greenstone3/build.xml" tofile="distribution/greenstone3/greenstone3-build.xml"/>
    92         </if>
     68        <move
     69            file="distribution/greenstone3/build.xml"
     70            tofile="distribution/greenstone3/greenstone3-build.xml" />
    9371    </target>
    9472
  • release-kits/wirk3/ant-scripts/create-installer.xml

    r16279 r16748  
    33
    44    <target name="create-installer">
    5         <addressedcall target="setup-for-installer-creation"/>
    6         <addressedcall target="compile-installer"/>
     5        <antcall target="calculate-component-sizes"/> <!-- from rk3-targets -->
     6        <antcall target="copy-installer-files"/>
     7        <antcall target="make-installer-files-concrete"/> <!-- from rk3-targets -->
     8        <antcall target="compile-installer"/>
    79    </target>
    810
    9     <target name="setup-for-installer-creation">
    10         <if><bool><istrue value="${execute}"/></bool>
    11            
    12             <mkdir dir="${basedir}/installer/resources"/>
    13             <copy todir="${basedir}/installer" file="${wirk3.home}/installer/antinstall-config.xml"/>
    14             <copy todir="${basedir}/installer" file="${wirk3.home}/installer/build.xml"/>
    15             <copy todir="${basedir}/installer/classes">
    16                 <fileset dir="${wirk3.home}/windows/installer-classes"/>
    17                 <fileset dir="${wirk3.home}/greenstone3/installer-classes"/>
    18                 <fileset dir="${wirk3.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            
    41         </if>
     11    <target name="copy-installer-files">
     12        <mkdir dir="${basedir}/installer/resources"/>
     13        <copy todir="${basedir}/installer" file="${wirk3.home}/installer/antinstall-config.xml"/>
     14        <copy todir="${basedir}/installer" file="${wirk3.home}/installer/build.xml"/>
     15        <copy todir="${basedir}/installer/classes">
     16            <fileset dir="${wirk3.home}/windows/installer-classes"/>
     17            <fileset dir="${wirk3.home}/greenstone3/installer-classes"/>
     18            <fileset dir="${wirk3.home}/ant-scripts/tasks/orans" includes="RegexSearchReplace.class" />
     19        </copy>
    4220    </target>
    4321
    4422    <target name="compile-installer">
    45         <if><bool><istrue value="${execute}"/></bool>
     23        <installer file="${basedir}/installer/greenstone-${version}-win32.jar"
     24                compress="true"
     25                extractType="NonExtractor"
     26                installConfig="${basedir}/installer/antinstall-config.xml"
     27                buildFile="${basedir}/installer/build.xml"
     28                antInstallLib="${wirk3.home}/packages/ant-installer/lib"
     29                antLib="${wirk3.home}/packages/ant/lib"
     30                validateConfig="true"
     31                icons="bluecurve">
     32
     33            <zipfileset dir="${basedir}/installer/classes" includes="**/*" />
     34            <zipfileset dir="${basedir}/distribution/greenstone3" includes="**/*" />
    4635           
    47             <installer file="${basedir}/installer/greenstone-${version}-win32.jar"
    48                     compress="true"
    49                     extractType="NonExtractor"
    50                     installConfig="${basedir}/installer/antinstall-config.xml"
    51                     buildFile="${basedir}/installer/build.xml"
    52                     antInstallLib="${wirk3.home}/packages/ant-installer/lib"
    53                     antLib="${wirk3.home}/packages/ant/lib"
    54                     validateConfig="true"
    55                     icons="bluecurve">
    56 
    57                 <zipfileset dir="${basedir}/installer/classes" includes="**/*" />
    58                 <zipfileset dir="${basedir}/distribution/greenstone3" includes="**/*" />
    59                
    60             </installer>
    61            
    62         </if>
     36        </installer>
    6337    </target>
    6438   
  • release-kits/wirk3/ant-scripts/wrap.xml

    r16245 r16748  
    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"/>
     14        <!--create a directory to build the wrapped installer in -->
     15        <mkdir dir="${basedir}/wrapped-installer/build"/>
    1816
    19             <!-- copy source files -->
    20             <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/windows/wrapper/wrapper.cpp"/>
    21             <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/packages/search4j/libsearch4j.cpp"/>
    22             <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/packages/search4j/libsearch4j.h"/>
    23        
    24         </if>
     17        <!-- copy source files -->
     18        <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/windows/wrapper/wrapper.cpp"/>
     19        <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/packages/search4j/libsearch4j.cpp"/>
     20        <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/packages/search4j/libsearch4j.h"/>
    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.min.version@" replacement="${java.min.version}"/>
    33             <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.installer@" replacement="${windows-java.installer}"/>
    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.min.version@" replacement="${java.min.version}"/>
     27        <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.installer@" replacement="${windows-java.installer}"/>
     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="${wirk3.home}/greenstone3/icon" includes="icon.ico"/>
     37                        <srcfiles dir="${wirk3.home}/windows/wrapper" includes="${windows-java.installer}"/>
     38                        <srcfiles dir="${wirk3.home}/windows/wrapper" includes="*.bmp"/>
     39                        <srcfiles dir="${wirk3.home}/windows/wrapper" includes="*.rc"/>
     40                        <srcfiles dir="${wirk3.home}/greenstone3/wrapper" includes="*.bmp"/>
     41                        <srcfiles dir="${basedir}/installer" includes="greenstone3.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="${wirk3.home}/greenstone3/icon" includes="icon.ico"/>
    47                             <srcfiles dir="${wirk3.home}/windows/wrapper" includes="${windows-java.installer}"/>
    48                             <srcfiles dir="${wirk3.home}/windows/wrapper" includes="*.bmp"/>
    49                             <srcfiles dir="${wirk3.home}/windows/wrapper" includes="*.rc"/>
    50                             <srcfiles dir="${wirk3.home}/greenstone3/wrapper" includes="*.bmp"/>
    51                             <srcfiles dir="${basedir}/installer" includes="greenstone3.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="${wirk3.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">
    63                     <fileset dir="${wirk3.home}/windows/wrapper" includes="*.bmp"/>
    64                     <fileset dir="${wirk3.home}/greenstone3/wrapper" includes="*.bmp"/>
    65                     <fileset dir="${wirk3.home}/greenstone3/icon" includes="icon.ico"/>
    66                 </copy>
    67                
    68                 <echo>adding greenstone3.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"/>
    85                
    86                 <echo>adding ${windows-java.installer} to the copy as chunks</echo>
    87                 <rsplit
    88                     resource="${wirk3.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="${wirk3.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">
     53                <fileset dir="${wirk3.home}/windows/wrapper" includes="*.bmp"/>
     54                <fileset dir="${wirk3.home}/greenstone3/wrapper" includes="*.bmp"/>
     55                <fileset dir="${wirk3.home}/greenstone3/icon" includes="icon.ico"/>
     56            </copy>
     57           
     58            <echo>adding greenstone3.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"/>
     75           
     76            <echo>adding ${windows-java.installer} to the copy as chunks</echo>
     77            <rsplit
     78                resource="${wirk3.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.