Changeset 16744

Show
Ignore:
Timestamp:
13.08.2008 11:44:24 (11 years ago)
Author:
oranfry
Message:

changes to mark3 after ant cleaned up

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

Legend:

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

    r16655 r16744  
    11<?xml version="1.0" encoding="utf-8" ?> 
    2  
    32<!-- 
    43        ..........................................................  
     
    1716    <property name="bundled.version.ant" value="1.6.5"/> 
    1817 
    19     <!-- set current month and year--> 
    20     <exec executable="date" outputproperty="current.month"><arg value="+%b"/></exec> 
    21     <exec executable="date" outputproperty="current.year"><arg value="+%Y"/></exec> 
    22  
    2318    <!-- for the benefit of the shared scripts, set release-kit home --> 
    2419    <property name="rk.home" value="${mark3.home}" /> 
    25  
     20    <property name="rk.os" value="linux" /> 
    2621 
    2722    <!-- IMPORT OTHER ANT SCRIPTS --> 
    2823    <import file="shared-ant-scripts/init.xml"/> 
     24    <import file="../greenstone3/ant-scripts/rk3-targets.xml"/> 
    2925    <import file="compile.xml"/> 
    3026    <import file="create-distribution.xml"/> 
     
    3430    <!-- TARGET TO PERFORM ADDITIONAL PRECONDITION CHECKS --> 
    3531    <target name="mark3-init"> 
    36         <echo>Determining Processor...</echo> 
    3732        <if> 
    3833            <bool> 
    3934                <or><equals arg1="${processor}" arg2="ppc" /><equals arg1="${processor}" arg2="intel"/></or> 
    4035            </bool> 
    41  
    42             <echo>Processor: ${processor}</echo> 
    43             <echo/> 
    4436 
    4537            <else> 
     
    4840            </else> 
    4941        </if> 
     42        <echo>Processor: ${processor}</echo> 
    5043    </target> 
    5144 
    5245    <!-- THE MAIN TARGET --> 
    5346    <target name="mark3" depends="init,mark3-init"> 
    54         <addressedcall target="compile"/> 
    55         <addressedcall target="create-distribution"/> 
    56         <addressedcall target="create-installer"/> 
    57         <addressedcall target="wrap"/> 
     47        <antcall target="compile"/> 
     48        <antcall target="create-distribution"/> 
     49        <antcall target="create-installer"/> 
     50        <antcall target="wrap"/> 
    5851    </target> 
    5952 
  • release-kits/mark3/ant-scripts/compile.xml

    r16655 r16744  
    11<?xml version="1.0" encoding="utf-8" ?> 
    22<project name="mark3-compile" default="compile"> 
    3  
    43 
    54    <target name="compile"> 
    65 
    76        <!-- checkout --> 
    8         <addressedcall target="checkout-greenstone3" /> 
     7        <antcall target="checkout-greenstone3" /> 
    98 
    109        <!-- preparation --> 
    11         <addressedcall target="set-version-number-property" /> 
    12         <addressedcall target="set-gdbm-installed-path" /> 
    13         <addressedcall target="dist-prepare-unix" /> 
    14  
     10        <antcall target="set-version-number-property" /> 
     11        <antcall target="set-gdbm-installed-path" /> 
     12        <ant target="prepare-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/> 
     13         
    1514        <!-- update --> 
    16         <addressedcall target="dist-update-unix" /> 
     15        <ant target="update-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/> 
    1716 
    1817        <!-- configure --> 
    19         <addressedcall target="dist-configure-unix" /> 
    20         <addressedcall target="tweak-makefiles" /> 
     18        <ant target="configure-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/> 
     19        <antcall target="tweak-makefiles" /> 
    2120 
    2221        <!-- build --> 
    23         <addressedcall target="dist-build-unix" /> 
    24         <addressedcall target="linux-strip-execs" /> 
     22        <ant target="build-unix" dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" inheritAll="false"/> 
     23        <antcall target="linux-strip-execs" /> 
    2524 
    2625        <!-- documentation --> 
    27         <addressedcall target="prepare-documentation" /> 
     26        <antcall target="prepare-documentation" /> 
    2827 
    2928    </target> 
    3029 
    3130    <target name="checkout-greenstone3"> 
    32         <if><bool><istrue value="${execute}"/></bool> 
    33             <svn> 
    34                 <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/> 
    35             </svn> 
    36         </if> 
     31        <svn> 
     32            <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/> 
     33        </svn> 
    3734    </target> 
    3835 
    3936    <target name="set-version-number-property"> 
    40         <if><bool><istrue value="${execute}"/></bool> 
    41             <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" /> 
    42  
    43         </if> 
     37        <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" /> 
    4438    </target> 
    4539 
    4640    <target name="set-gdbm-installed-path"> 
    47         <if><bool><istrue value="${execute}"/></bool> 
    48             <rsr file="greenstone3/build.properties" pattern="(gdbm.installed.path=).*" replacement="$1${mark3.home}/mac/${processor}/gdbm"/> 
    49         </if> 
     41        <rsr file="greenstone3/build.properties" pattern="(gdbm.installed.path=).*" replacement="$1${mark3.home}/mac/${processor}/gdbm"/> 
    5042    </target> 
    5143 
     44    <target name="tweak-makefiles"> 
     45      <rsr 
     46            file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/db2txt/Makefile" 
     47            pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" 
     48            replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
    5249 
     50        <rsr 
     51            file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/txt2db/Makefile" 
     52            pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" 
     53            replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
    5354 
    54  
    55     <target name="dist-prepare-unix"> 
    56         <if><bool><istrue value="${execute}"/></bool> 
    57             <ant dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-unix"  inheritAll="false"/> 
    58         </if>    
    59     </target> 
    60  
    61     <target name="dist-update-unix"> 
    62         <if><bool><istrue value="${execute}"/></bool> 
    63             <ant dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" target="update-unix"  inheritAll="false"/> 
    64         </if> 
    65     </target> 
    66  
    67     <target name="dist-configure-unix"> 
    68         <if><bool><istrue value="${execute}"/></bool> 
    69             <ant dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" target="configure-unix" inheritAll="false"/> 
    70         </if> 
    71     </target> 
    72  
    73         <target name="tweak-makefiles"> 
    74                 <if><bool><istrue value="${execute}"/></bool> 
    75                <rsr 
    76                 file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/db2txt/Makefile" 
    77                 pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" 
    78                 replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
    79  
    80                 <rsr 
    81                 file="${basedir}/greenstone3/gs2build/common-src/src/gdbmedit/txt2db/Makefile" 
    82                 pattern="^(LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" 
    83                 replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
    84                 <rsr 
    85                 file="${basedir}/greenstone3/src/packages/javagdbm/jni/Makefile" 
    86                 pattern="^(GDBM_LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" 
    87                 replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
    88  
    89                </if> 
    90         </target> 
    91  
    92     <target name="dist-build-unix"> 
    93         <if><bool><istrue value="${execute}"/></bool> 
    94             <ant dir="greenstone3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" target="build-unix" inheritAll="false"/> 
    95         </if> 
     55        <rsr 
     56            file="${basedir}/greenstone3/src/packages/javagdbm/jni/Makefile" 
     57            pattern="^(GDBM_LIBS ?=.*)-L${mark3.home}/mac/${processor}/gdbm/lib -lgdbm(.*)$" 
     58            replacement="$1${mark3.home}/mac/${processor}/gdbm/lib/libgdbm.a$2" /> 
    9659    </target> 
    9760 
    9861    <target name="linux-strip-execs"> 
    99         <if><bool><istrue value="${execute}"/></bool> 
    100             <exec dir="greenstone3/gs2build/bin/darwin" executable="find"> 
    101                 <arg line=". ! -name . -exec strip {} &#59;"/> 
    102             </exec> 
    103         </if> 
     62        <exec dir="greenstone3/gs2build/bin/darwin" executable="find"> 
     63            <arg line=". ! -name . -exec strip {} &#59;"/> 
     64        </exec> 
    10465    </target> 
    10566 
    10667    <target name="prepare-documentation"> 
    107         <if><bool><istrue value="${execute}"/></bool> 
    108             <mkdir dir="greenstone3/gsdl-manuals"/> 
    109             <svn> 
    110                 <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/> 
    111                 <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/> 
    112             </svn> 
    113             <javac srcdir="greenstone3/gsdl-manuals/shared" 
    114                   destdir="greenstone3/gsdl-manuals/shared" 
    115                   debug="on"> 
    116                 <include name="*.java"/> 
    117             </javac> 
    118             <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/> 
     68        <mkdir dir="greenstone3/gsdl-manuals"/> 
     69        <svn> 
     70            <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/> 
     71            <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/> 
     72        </svn> 
     73        <javac srcdir="greenstone3/gsdl-manuals/shared" 
     74              destdir="greenstone3/gsdl-manuals/shared" 
     75              debug="on"> 
     76            <include name="*.java"/> 
     77        </javac> 
     78        <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/> 
    11979 
    120             <path id="documentation.compile.classpath"> 
    121                 <fileset dir="greenstone3/gsdl-manuals"> 
    122                     <include name="**/*.jar"/> 
    123                 </fileset> 
    124                 <pathelement path="greenstone3/gsdl-manuals/shared"/> 
    125                 <pathelement path="greenstone3/gsdl-manuals/manuals"/> 
    126             </path> 
     80        <path id="documentation.compile.classpath"> 
     81            <fileset dir="greenstone3/gsdl-manuals"> 
     82                <include name="**/*.jar"/> 
     83            </fileset> 
     84            <pathelement path="greenstone3/gsdl-manuals/shared"/> 
     85            <pathelement path="greenstone3/gsdl-manuals/manuals"/> 
     86        </path> 
    12787 
    128             <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml"> 
    129                 <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" /> 
    130                 <arg value="greenstone3/gli/help/en/help.xml" /> 
    131                 <arg value="greenstone3" /> 
    132             </java> 
     88        <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml"> 
     89            <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" /> 
     90            <arg value="greenstone3/gli/help/en/help.xml" /> 
     91            <arg value="greenstone3" /> 
     92        </java> 
    13393 
    134             <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/> 
    135             <echo>Run generate-pdf.sh</echo> 
    136             <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh"> 
    137                 <arg line="generate-pdf.sh u en" /> 
    138             </exec> 
    139         </if> 
    140     </target> 
    141  
    142     <!-- 
    143  
    144         third level targets 
    145  
    146     --> 
    147  
    148     <target name="mgpp-add-static"> 
    149         <if><bool><istrue value="${execute}"/></bool> 
    150             <rsr file="greenstone3/gs2build/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" /> 
    151             <exec dir="greenstone3/gs2build/indexers/mgpp" executable="autoconf" output="greenstone3/gs2build/indexers/mgpp/configure"> 
    152                 <arg line="configure.in"/> 
    153             </exec> 
    154         </if> 
    155     </target> 
    156     <target name="mg-add-static"> 
    157         <if><bool><istrue value="${execute}"/></bool> 
    158             <rsr file="greenstone3/gs2build/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" /> 
    159             <exec dir="greenstone3/gs2build/indexers/mg" executable="autoconf" output="greenstone3/gs2build/indexers/mg/configure"> 
    160                 <arg line="configure.in"/> 
    161             </exec> 
    162         </if> 
    163     </target> 
    164     <target name="gs2buildextra-add-static"> 
    165         <if><bool><istrue value="${execute}"/></bool> 
    166             <rsr file="greenstone3/gs2build/gs2build-extra/packages.configure" pattern="^ENVIRONMENT=&quot;&quot;$" replacement="ENVIRONMENT=&quot;LDFLAGS=-static&quot;" /> 
    167             <rsr file="greenstone3/gs2build/gs2build-extra/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" /> 
    168         </if> 
    169     </target> 
    170  
    171     <target name="wv-add-static"> 
    172         <if><bool><istrue value="${execute}"/></bool> 
    173             <rsr file="greenstone3/gs2build/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" /> 
    174         </if> 
    175     </target> 
    176     <target name="xlhtml-add-static"> 
    177         <if><bool><istrue value="${execute}"/></bool> 
    178             <rsr file="greenstone3/gs2build/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" /> 
    179         </if> 
    180     </target> 
    181     <target name="ppthtml-add-static"> 
    182         <if><bool><istrue value="${execute}"/></bool> 
    183             <rsr file="greenstone3/gs2build/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" /> 
    184         </if> 
    185     </target> 
    186     <target name="rtftohtml-add-static"> 
    187         <if><bool><istrue value="${execute}"/></bool> 
    188             <rsr file="greenstone3/gs2build/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml(.{2})EXEEXT(.{1})" replacement="-o rtftohtml$1EXEEXT$2 -static" /> 
    189         </if> 
    190     </target> 
    191     <target name="gdbm-add-static"> 
    192         <if><bool><istrue value="${execute}"/></bool> 
    193             <rsr file="greenstone3/src/packages/javagdbm/jni/Makefile" pattern="^(GDBM_LIBS)\s*=\s*(.*)-lgdbm(.*)$" replacement="$1=$2/usr/lib/libgdbm.a$3" /> 
    194         </if> 
     94        <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/> 
     95        <echo>Run generate-pdf.sh</echo> 
     96        <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh"> 
     97            <arg line="generate-pdf.sh u en" /> 
     98        </exec> 
    19599    </target> 
    196100 
  • release-kits/mark3/ant-scripts/create-distribution.xml

    r16655 r16744  
    22<project name="mark3-create-distribution" default="create-distribution"> 
    33 
     4    <target name="create-distribution"> 
     5        <!-- create distribution --> 
     6        <antcall target="export-greenstone3" /> 
     7        <antcall target="dist-set-version-number-property" /> 
     8        <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distribution/greenstone3/gli"/></antcall> 
    49 
    5     <target name="create-distribution"> 
     10        <ant target="create-distribution-1" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" inheritAll="false"> 
     11            <property name="app.version" value="${version}"/> 
     12            <property name="branch.path" value="${branch.path}"/> 
     13        </ant> 
    614 
    7         <!-- create distribution --> 
    8         <addressedcall target="export-greenstone3" /> 
    9         <addressedcall target="dist-set-version-number-property" /> 
    10         <addressedcall target="dist-set-gli-version" /> 
    11         <addressedcall target="create-distributions-1" /> 
    12         <addressedcall target="create-distributions-2" /> 
    13         <addressedcall target="create-distributions-3" /> 
    14         <addressedcall target="copy-over-build-xml" /> 
    15         <addressedcall target="insert-user-manual"/> 
    16         <addressedcall target="insert-compiled-binaries"/> 
     15        <ant target="create-distribution-2" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" inheritAll="false"> 
     16            <property name="app.version" value="${version}"/> 
     17            <property name="branch.path" value="${branch.path}"/> 
     18        </ant> 
    1719 
     20        <ant target="create-distribution-3" antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" inheritAll="false"> 
     21            <property name="app.version" value="${version}"/> 
     22            <property name="branch.path" value="${branch.path}"/> 
     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"/> 
    1829    </target> 
    1930 
    2031    <target name="export-greenstone3"> 
    21         <if><bool><istrue value="${execute}"/></bool> 
    22             <mkdir dir="distribution"/> 
    23             <delete dir="distribution/greenstone3"/> 
    24             <svn> 
    25                 <export srcurl="${svn.root}/greenstone3/${branch.path}" destPath="distribution/greenstone3"/> 
    26                 <export srcurl="${svn.root}/gli/${branch.path}" destPath="distribution/greenstone3/gli"/> 
    27             </svn> 
    28         </if> 
     32        <mkdir dir="distribution"/> 
     33        <delete dir="distribution/greenstone3"/> 
     34        <svn> 
     35            <export srcurl="${svn.root}/greenstone3/${branch.path}" destPath="distribution/greenstone3"/> 
     36            <export srcurl="${svn.root}/gli/${branch.path}" destPath="distribution/greenstone3/gli"/> 
     37        </svn> 
    2938    </target> 
    3039 
    3140    <target name="dist-set-version-number-property"> 
    32         <if><bool><istrue value="${execute}"/></bool> 
    33             <rsr file="distribution/greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" /> 
    34         </if> 
     41        <rsr 
     42            file="distribution/greenstone3/resources/java/global.properties.in" 
     43            pattern="(.*)@gsdl3version@(.*)" 
     44            replacement="$1${version}$2" /> 
    3545    </target> 
    3646 
    37     <target name="dist-set-gli-version"> 
    38         <if><bool><istrue value="${execute}"/></bool> 
    39             <ant antfile="${mark3.home}/ant-scripts/shared-ant-scripts/operations-on-gli.xml" dir="${basedir}/distribution/greenstone3/gli" target="set-version-numbers"/> 
    40         </if> 
     47    <target name="copy-over-build-xml"> 
     48        <move file="distribution/greenstone3/modified-build.xml" tofile="distribution/greenstone3/build.xml"/> 
     49    </target> 
     50 
     51    <target name="insert-user-manual"> 
     52        <copy file="greenstone3/gsdl-manuals/manuals/build/en/pdf/User_en.pdf" tofile="distribution/greenstone3/docs/manual/gs2_user_en.pdf"/> 
     53    </target> 
     54 
     55    <target name="insert-compiled-binaries"> 
     56        <delete dir="distribution/greenstone3/lib/jni"/> 
     57        <exec executable="cp"><arg line="-r greenstone3/lib/jni distribution/greenstone3/lib"/></exec> 
     58 
     59        <delete dir="distribution/greenstone3/gs2build/bin/linux"/> 
     60        <exec executable="cp"><arg line="-r greenstone3/gs2build/bin/linux distribution/greenstone3/gs2build/bin"/></exec> 
     61 
     62        <delete dir="distribution/greenstone3/gs2build/bin/java"/> 
     63        <exec executable="cp"><arg line="-r greenstone3/gs2build/bin/java distribution/greenstone3/gs2build/bin"/></exec> 
     64    </target> 
     65 
     66    <target name="rename-build-xml-for-transit"> 
     67        <move file="distribution/greenstone3/build.xml" tofile="distribution/greenstone3/greenstone3-build.xml"/> 
    4168    </target> 
    4269 
    4370 
    44     <target name="create-distributions-1"> 
    45         <if><bool><istrue value="${execute}"/></bool> 
    46             <ant antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-1" inheritAll="false"> 
    47                 <property name="app.version" value="${version}"/> 
    48                 <property name="branch.path" value="${branch.path}"/> 
    49             </ant> 
    50         </if> 
    51     </target> 
    52  
    53     <target name="create-distributions-2"> 
    54         <if><bool><istrue value="${execute}"/></bool> 
    55             <ant antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-2"  inheritAll="false"> 
    56                 <property name="app.version" value="${version}"/> 
    57                 <property name="branch.path" value="${branch.path}"/> 
    58             </ant> 
    59         </if> 
    60     </target> 
    61  
    62     <target name="create-distributions-3"> 
    63         <if><bool><istrue value="${execute}"/></bool> 
    64             <ant antfile="${mark3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-3"  inheritall="false"> 
    65                 <property name="app.version" value="${version}"/> 
    66                 <property name="branch.path" value="${branch.path}"/> 
    67             </ant> 
    68         </if> 
    69     </target> 
    70  
    71     <target name="copy-over-build-xml"> 
    72         <if><bool><istrue value="${execute}"/></bool> 
    73             <move file="distribution/greenstone3/modified-build.xml" tofile="distribution/greenstone3/build.xml"/> 
    74         </if> 
    75     </target> 
    76  
    77     <target name="insert-user-manual"> 
    78         <if><bool><istrue value="${execute}"/></bool> 
    79             <copy file="greenstone3/gsdl-manuals/manuals/build/en/pdf/User_en.pdf" tofile="distribution/greenstone3/docs/manual/gs2_user_en.pdf"/> 
    80         </if> 
    81     </target> 
    82  
    83     <target name="insert-compiled-binaries"> 
    84         <if><bool><istrue value="${execute}"/></bool> 
    85  
    86             <delete dir="distribution/greenstone3/lib/jni"/> 
    87             <exec executable="cp"><arg line="-r greenstone3/lib/jni distribution/greenstone3/lib"/></exec> 
    88  
    89             <delete dir="distribution/greenstone3/gs2build/bin/linux"/> 
    90             <exec executable="cp"><arg line="-r greenstone3/gs2build/bin/linux distribution/greenstone3/gs2build/bin"/></exec> 
    91  
    92             <delete dir="distribution/greenstone3/gs2build/bin/java"/> 
    93             <exec executable="cp"><arg line="-r greenstone3/gs2build/bin/java distribution/greenstone3/gs2build/bin"/></exec> 
    94  
    95         </if> 
    96     </target> 
    97  
    98  
    99  
    100  
    10171</project> 
  • release-kits/mark3/ant-scripts/create-installer.xml

    r16655 r16744  
    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             <!-- get the size of packages --> 
    13             <exec executable="du" dir="${basedir}/distribution/greenstone3/packages" outputproperty="du.tomcat"><arg line="-hs tomcat"/></exec> 
    14             <exec executable="sed" inputstring="${du.tomcat}" outputproperty="component.size.tomcat"><arg line="-e 's/^\(.*\)\s.*$/\1b/g'"/></exec> 
    15  
    16             <exec executable="du" dir="${basedir}/distribution/greenstone3/packages" outputproperty="du.ant"><arg line="-hs ant"/></exec> 
    17             <exec executable="sed" inputstring="${du.ant}" outputproperty="component.size.ant"><arg line="-e 's/^\(.*\)\s.*$/\1b/g'"/></exec> 
    18  
    19             <echo>Project Path: ${basedir}/distribution/greenstone3</echo> 
    20  
    21             <echo>Getting things ready to compile the installer</echo> 
    22             <mkdir dir="${basedir}/installer/resources"/> 
    23             <copy todir="${basedir}/installer" file="${mark3.home}/installer/antinstall-config.xml" overwrite="true" /> 
    24             <copy todir="${basedir}/installer" file="${mark3.home}/installer/build.xml" overwrite="true" /> 
    25             <copy todir="${basedir}/installer/classes" overwrite="true"> 
    26                 <fileset dir="${mark3.home}/greenstone3/installer-classes"/> 
    27                 <fileset dir="${mark3.home}/ant-scripts/tasks/orans" includes="RegexSearchReplace.class" /> 
    28             </copy> 
    29  
    30             <!-- put the concrete values of things in the config --> 
    31             <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/> 
    32             <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.linux-java@" replacement="${component.size.linux-java}"/> 
    33             <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/> 
    34             <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.ant@" replacement="${component.size.ant}"/> 
    35  
    36             <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/> 
    37             <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/> 
    38  
    39  
    40             <!-- put the concrete values of things in the text --> 
    41  
    42             <!-- default --> 
    43             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/> 
    44             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 
    45             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/> 
    46             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
    47             <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
    48  
    49             <!-- chinese --> 
    50             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/> 
    51             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 
    52             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/> 
    53             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 
    54             <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 
    55  
    56         </if> 
     11    <target name="copy-installer-files"> 
     12        <echo>Getting things ready to compile the installer</echo> 
     13        <mkdir dir="${basedir}/installer/resources"/> 
     14        <copy todir="${basedir}/installer" file="${mark3.home}/installer/antinstall-config.xml" overwrite="true" /> 
     15        <copy todir="${basedir}/installer" file="${mark3.home}/installer/build.xml" overwrite="true" /> 
     16        <copy todir="${basedir}/installer/classes" overwrite="true"> 
     17            <fileset dir="${mark3.home}/greenstone3/installer-classes"/> 
     18            <fileset dir="${mark3.home}/ant-scripts/tasks/orans" includes="RegexSearchReplace.class" /> 
     19        </copy> 
    5720    </target> 
    5821 
    5922    <target name="compile-installer"> 
    60         <if><bool><istrue value="${execute}"/></bool> 
     23        <installer file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar" 
     24                compress="true" 
     25                extractType="NonExtractor" 
     26                installConfig="${basedir}/installer/antinstall-config.xml" 
     27                buildFile="${basedir}/installer/build.xml" 
     28                antInstallLib="${mark3.home}/packages/ant-installer/lib" 
     29                antLib="${mark3.home}/packages/ant/lib" 
     30                validateConfig="true" 
     31                failOnError="false" 
     32                icons="bluecurve"> 
    6133 
    62             <installer file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar" 
    63                     compress="true" 
    64                     extractType="NonExtractor" 
    65                     installConfig="${basedir}/installer/antinstall-config.xml" 
    66                     buildFile="${basedir}/installer/build.xml" 
    67                     antInstallLib="${mark3.home}/packages/ant-installer/lib" 
    68                     antLib="${mark3.home}/packages/ant/lib" 
    69                     validateConfig="true" 
    70                     failOnError="false" 
    71                     icons="bluecurve"> 
     34            <!-- copy all the important files into the archive to be extracted for install --> 
     35            <zipfileset dir="${basedir}/installer/classes" includes="**/*" /> <!-- installer classes --> 
     36            <zipfileset dir="${basedir}/distribution/greenstone3" includes="**/*"/> 
    7237 
    73                 <!-- copy all the important files into the archive to be extracted for install --> 
    74                 <zipfileset dir="${basedir}/installer/classes" includes="**/*" /> <!-- installer classes --> 
    75                 <zipfileset dir="${basedir}/distribution/greenstone3" includes="**/*"/> 
    76  
    77             </installer> 
    78         </if> 
     38        </installer> 
    7939    </target> 
    8040 
  • release-kits/mark3/ant-scripts/wrap.xml

    r16655 r16744  
    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="${mark3.home}/mac/Wrapper.app"/></copy> 
     9        <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources"><fileset dir="${mark2.home}/greenstone3/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="${mark3.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