Changeset 21630

Show
Ignore:
Timestamp:
26.01.2010 14:44:30 (9 years ago)
Author:
oranfry
Message:

tidy up for greenstone3, and made wrap shared

Location:
main/trunk/release-kits
Files:
2 added
6 removed
10 modified

Legend:

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

    r21623 r21630  
    99 
    1010<project name="rk2-build" default="rk2"> 
     11 
     12    <property name="version.major" value="2"/> 
    1113 
    1214    <!-- IMPORT OTHER ANT SCRIPTS --> 
     
    2628    <target name="rk2" depends="init,gs2-init,compile,create-components,create-installer,wrap,create-cdrom-components"/> 
    2729 
    28     <target name="properties"> 
    29         <echo>Required Properties:</echo> 
    30         <echo>version             the version string for the release</echo> 
    31         <echo/> 
    32         <echo>Optional Properties:</echo> 
    33         <echo>branch.path         the branch of Greenstone to make a release of. Eg: tags/2.81. Default: trunk.</echo> 
    34         <echo>branch.revision     the revision of Greenstone to make a release of. Eg: 18273. Default: HEAD.</echo> 
    35         <echo/> 
    36     </target> 
    37  
    38     <!-- TODO: Move the targets below to the xml file that calls it --> 
    39  
    40     <target name="create-binary-zip-unix"> 
    41         <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/> 
    42  
    43         <delete dir="${binzip.dir}"/> 
    44         <exec dir="${basedir}" executable="cp"><arg line="-r distributions/web ${binzip.dir}"/></exec> 
    45  
    46         <!-- delete sourcecode --> 
    47         <delete dir="${binzip.dir}/common-src"/> 
    48         <delete dir="${binzip.dir}/build-src"/> 
    49         <delete dir="${binzip.dir}/runtime-src"/> 
    50  
    51         <!-- delete loose files --> 
    52         <delete> 
    53             <fileset 
    54                 dir="${binzip.dir}" 
    55                 includes="README*.txt,Uninstall.sh,uninst.jar,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in" 
    56                 excludes="READMEen.txt"/> 
    57         </delete> 
    58  
    59     </target> 
    60  
    61     <target name="dist-unzip-packages"> 
    62         <untar src="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz" dest="${basedir}/distributions/web/common-src/packages/sqlite" compression="gzip"/> 
    63         <delete file="${basedir}/distributions/web/common-src/packages/sqlite/sqlite-amalgamation-3.5.9.tar.gz"/> 
    64     </target> 
    65  
    66     <target name="copy-greenstone2-installer-files"> 
    67         <!-- the installer descriptors --> 
    68         <copy todir="installer" file="${rk.home}/kits/rk2/installer/antinstall-config.xml" overwrite="true"/> 
    69         <copy todir="installer" file="${rk.home}/kits/rk2/installer/build.xml" overwrite="true"/> 
    70     </target> 
     30    <!-- target to show properties in rk2-build.properties --> 
     31    <target name="properties" depends="core-properties"/> 
    7132 
    7233</project> 
  • main/trunk/release-kits/kits/rk3/ant-scripts/build.xml

    r20543 r21630  
    1010<project name="rk3-build" default="rk3"> 
    1111 
    12     <!-- CONSTANTS --> 
    13  
    14     <!-- for the benefit of the shared scripts, set release-kit home --> 
    15     <property name="rk.name" value="rk3"/> 
    16     <property name="rk.home" value="${rk3.home}" /> 
     12    <property name="version.major" value="3"/> 
    1713 
    1814    <!-- IMPORT OTHER ANT SCRIPTS --> 
    19     <import file="../core/ant-scripts/init.xml"/> 
    20     <import file="../core/ant-scripts/operations-on-gli.xml"/> 
    21     <import file="../greenstone3/ant-scripts/rk3-targets.xml"/> 
     15    <import file="${rk.home}/shared/core/ant-scripts/init.xml"/> 
     16    <import file="${rk.home}/shared/core/ant-scripts/operations-on-gli.xml"/> 
     17    <import file="${rk.home}/shared/greenstone2/ant-scripts/rk3-targets.xml"/> 
    2218 
    2319    <import file="compile.xml"/> 
    24     <import file="create-distribution.xml"/> 
    25     <import file="create-installer.xml"/> 
     20    <import file="${rk.home}/shared/core/ant-scripts/create-installer.xml"/> 
    2621    <import file="wrap.xml"/> 
    2722 
     
    2924    <target name="rk3" depends="init,gs3-init"> 
    3025        <antcall target="compile"/> 
    31         <antcall target="create-distribution"/> 
    32         <ant inheritRefs="true" dir="." antfile="${rk3.home}/ant-scripts/create-components.xml" target="create-components"/> 
     26        <ant inheritRefs="true" dir="." antfile="${rk.home}/kits/${rk.name}/ant-scripts/create-components.xml" target="create-components"/> 
    3327        <antcall target="create-installer"/> 
    3428        <antcall target="wrap"/> 
    35         <antcall target="create-minimal-distribution"/> 
    36  
    3729    </target> 
    3830 
    39     <target name="properties"> 
    40         <echo>Required Properties:</echo> 
    41         <echo>version             the version string for the release</echo> 
    42         <echo/> 
    43         <echo>Optional Properties:</echo> 
    44         <echo>branch.path         the branch of Greenstone3 to make a release of. Eg: tags/2.81. Default: trunk.</echo> 
    45         <echo>branch.revision     the revision of Greenstone3 to make a release of. Eg: 18273. Default: HEAD.</echo> 
    46         <echo/> 
    47     </target> 
     31    <!-- target to show properties in rk3-build.properties --> 
     32    <target name="properties" depends="core-properties"/> 
    4833 
     34    <!-- create the property set to be forwarded to greenstone3 --> 
     35    <propertyset id="forward.properties"> 
     36        <propertyref prefix="forward."/> 
     37        <mapper type="glob" from="forward.*" to="*"/> 
     38        <propertyref name="app.version"/> 
     39        <propertyref name="branch.path"/> 
     40        <propertyref name="branch.revision"/> 
     41    </propertyset> 
    4942 
    5043</project> 
  • main/trunk/release-kits/kits/rk3/ant-scripts/compile.xml

    r20335 r21630  
    33 
    44    <target name="compile"> 
    5         <antcall target="checkout-greenstone3"/> 
     5 
     6        <!-- checkout greenstone3 --> 
     7        <exec executable="svn"> 
     8            <arg value="checkout"/> 
     9            <arg value="${svn.root}/main/${branch.path}/greenstone3"/> 
     10            <arg value="compiled"/> 
     11            <arg value="-r"><arg value="${branch.revision}"/> 
     12        </exec> 
     13 
     14        <!-- run greenstone3's ant prepare --> 
    615        <ant dir="compiled" inheritAll="false"> 
    716            <target name="prepare"/> 
    817            <propertyset refid="forward.properties"/> 
    918        </ant> 
    10         <antcall target="greenstone3-set-version-numbers"> 
    11             <param name="greenstone3basedir" value="compiled"/> 
    12         </antcall> 
    13         <antcall target="gli-set-version-numbers"> 
    14             <param name="glibasedir" value="compiled/gli"/> 
    15         </antcall> 
    16         <antcall target="gsdl-set-version-numbers"> 
    17             <param name="gsdl.basedir" value="compiled/gs2build"/> 
    18         </antcall> 
     19 
     20        <!-- set all version numbers --> 
     21        <antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="compiled"/></antcall> 
     22        <antcall target="gli-set-version-numbers"><param name="glibasedir" value="compiled/gli"/></antcall> 
     23        <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="compiled/gs2build"/></antcall> 
     24 
     25        <!-- run greenstone3's ant install and ant dist-tidy --> 
    1926        <ant dir="compiled" inheritAll="false"> 
    2027            <target name="install"/> 
     
    2229            <propertyset refid="forward.properties"/> 
    2330        </ant> 
    24         <antcall target="insert-xml-parser"/> 
    25         <antcall target="insert-ant"/> 
    26         <antcall target="insert-documented-examples"/> 
    27         <antcall target="compile-uninstaller" /> 
    28         <antcall target="prepare-documentation"/> 
    2931 
    30         <!-- windows only --> 
     32        <!-- insert an xml parser --> 
     33        <copy todir="compiled/gs2build/perllib/cpan"> 
     34            <fileset dir="${rk.home}/shared/greenstone3" includes="XML-Parser/**/*"/> 
     35        </copy> 
     36 
     37        <!-- TODO: insert-ant --> 
     38 
     39        <!-- put the uninstaller in place --> 
     40        <antcall target="insert-and-compile-uninstaller"/> 
     41 
     42        <!-- (windows only) --> 
    3143        <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
    32             <antcall target="insert-windows-perl"> 
    33                 <param name="todir" value="compiled/gs2build/bin/windows"/> 
    34             </antcall> 
    35             <antcall target="insert-windows-icon"/> 
     44            <!-- insert perl --> 
     45            <unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/gs2build/bin/windows"/> 
    3646        </if> 
     47 
     48        <!-- minify tomcat --> 
     49        <delete dir="compiled/packages/tomcat/webapps/docs"/> 
     50        <delete dir="compiled/packages/tomcat/webapps/examples"/> 
     51 
     52        <!-- tidy up gli to make it smaller --> 
     53        <antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall> 
     54 
     55        <!-- strip out .svn dirs --> 
     56        <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall> 
     57 
     58        <!-- (linux only) --> 
     59        <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool> 
     60            <!-- grab imagemagick binaries --> 
     61            <delete dir="compiled/gs2build/bin/linux/imagemagick"/> 
     62            <exec executable="svn"> 
     63                <arg value="export"/> 
     64                <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/> 
     65                <arg value="compiled/gs2build/bin/linux/imagemagick"/> 
     66            </exec> 
     67 
     68            <!-- grab wv binaries --> 
     69            <delete dir="compiled/gs2build/bin/linux/wv"/> 
     70            <exec executable="svn"> 
     71                <arg value="export"/> 
     72                <arg value="${svn.root}/main/${branch.path}/binaries/linux/wv"/> 
     73                <arg value="compiled/gs2build/bin/linux/wv"/> 
     74            </exec> 
     75        <!-- (mac only) --> 
     76        <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 
     77            <!-- grab imagemagick binaries --> 
     78            <delete dir="compiled/gs2build/bin/darwin/imagemagick"/> 
     79            <exec executable="svn"> 
     80                <arg value="export"/> 
     81                <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/> 
     82                <arg value="compiled/gs2build/bin/darwin/imagemagick"/> 
     83            </exec> 
     84 
     85            <!-- grab ghostscript binaries --> 
     86            <delete dir="compiled/gs2build/bin/darwin/imagemagick"/> 
     87            <exec executable="svn"> 
     88                <arg value="export"/> 
     89                <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/> 
     90                <arg value="compiled/gs2build/bin/darwin/ghostscript"/> 
     91            </exec> 
     92        </if></else></if> 
     93 
    3794    </target> 
    3895 
  • main/trunk/release-kits/kits/rk3/ant-scripts/create-components.xml

    r21311 r21630  
    22<project name="rk3-create-components"> 
    33 
    4     <import file="${basedir}/distributions/web/resources/xml/components.xml"/> 
     4    <import file="${basedir}/compiled/resources/xml/components.xml"/> 
    55    <import file="${rk.home}/core/ant-scripts/init.xml"/> 
    6  
    7     <!-- create components from the distributions folder --> 
    86 
    97    <target name="create-components"> 
    108 
    11         <antcall target="prepare-component"><param name="component" value="core"/></antcall> 
    12         <antcall target="compress-component"><param name="component" value="core"/></antcall> 
     9        <!-- core --> 
     10        <antcall target="create-component"><param name="component" value="core"/></antcall> 
    1311 
    14         <antcall target="prepare-component"><param name="component" value="tomcat"/></antcall> 
    15         <antcall target="compress-component"><param name="component" value="tomcat"/></antcall> 
     12        <!-- tomcat --> 
     13        <antcall target="create-component"><param name="component" value="tomcat"/></antcall> 
    1614 
    17         <antcall target="prepare-component"><param name="component" value="imagemagick"/></antcall> 
    18         <antcall target="compress-component"><param name="component" value="imagemagick"/></antcall> 
     15        <!-- imageagick --> 
     16        <antcall target="create-component"><param name="component" value="imagemagick"/></antcall> 
    1917 
    20         <!-- windows and mac only --> 
     18        <!-- (windows and mac only) --> 
    2119        <if><bool><or><equals arg1="${rk.os}" arg2="windows"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 
    22             <antcall target="prepare-component"><param name="component" value="ghostscript"/></antcall> 
    23             <antcall target="compress-component"><param name="component" value="ghostscript"/></antcall> 
     20            <!-- ghostscript --> 
     21            <antcall target="create-component"><param name="component" value="ghostscript"/></antcall> 
    2422        </if> 
    2523 
  • main/trunk/release-kits/shared/core/ant-scripts/create-installer.xml

    r21623 r21630  
    22<project name="create-installer"> 
    33 
    4     <target name="create-installer"> 
     4    <target name="create-installer" depends="init,gs${version.major}-init"> 
    55 
    66        <!-- create installer directory --> 
  • main/trunk/release-kits/shared/core/ant-scripts/init.xml

    r21623 r21630  
    190190    </target> 
    191191 
     192    <!-- show the core properties of all release-kits --> 
     193    <target name="core-properties"> 
     194        <echo>Required Properties:</echo> 
     195        <echo>version             the version string for the release</echo> 
     196        <echo/> 
     197        <echo>Optional Properties:</echo> 
     198        <echo>branch.path         the branch of Greenstone to make a release of. Eg: tags/2.81. Default: trunk.</echo> 
     199        <echo>branch.revision     the revision of Greenstone to make a release of. Eg: 18273. Default: HEAD.</echo> 
     200        <echo/> 
     201    </target> 
     202 
    192203    <!-- a target to strip any directory of .svn folders --> 
    193204    <target name="strip-svn-dirs"> 
     
    224235            manifest="${rk.home}/shared/core/uninstaller/manifest.mf" 
    225236            basedir="compiled/uninstaller/build" /> 
     237 
     238        <!-- clean up build directory --> 
     239        <delete dir="compiled/uninstaller"/> 
    226240 
    227241        <!-- put the associated script in place --> 
  • main/trunk/release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml

    r21394 r21630  
    77        .......................................................... 
    88--> 
    9  
    10 <project name="rk2-targets"> 
    11  
    12     <property name="version.major" value="2"/> 
     9<project name="greenstone2-targets"> 
    1310 
    1411    <target name="gs2-init"> 
  • main/trunk/release-kits/shared/greenstone3/ant-scripts/rk3-targets.xml

    r21202 r21630  
    88--> 
    99 
    10 <project name="rk3-targets"> 
    11  
    12     <property name="version.major" value="3"/> 
    13  
    14     <!-- create the property set to be forwarded to greenstone3 --> 
    15     <propertyset id="forward.properties"> 
    16         <propertyref prefix="forward."/> 
    17         <mapper type="glob" from="forward.*" to="*"/> 
    18         <propertyref name="app.version"/> 
    19         <propertyref name="branch.path"/> 
    20         <propertyref name="branch.revision"/> 
    21     </propertyset> 
    22  
    23     <target name="greenstone3-set-version-numbers"> 
    24         <rsr 
    25             file="${greenstone3basedir}/resources/java/global.properties.in" 
    26             pattern="@gsdl3version@" 
    27             replacement="${version}" /> 
    28         <rsr 
    29             file="${greenstone3basedir}/resources/java/server.properties" 
    30             pattern="^(Server3Control\.Version=).*$" 
    31             replacement="$1${version}" /> 
    32  
    33     </target> 
     10<project name="greenstone3-targets"> 
    3411 
    3512    <target name="gs3-init"> 
     
    5027    </target> 
    5128 
    52     <target name="insert-uninstaller-jar"> 
    53         <copy file="compiled/uninst.jar" tofile="distributions/web/uninst.jar"/> 
     29    <target name="greenstone3-set-version-numbers"> 
     30        <rsr 
     31            file="${greenstone3basedir}/resources/java/global.properties.in" 
     32            pattern="@gsdl3version@" 
     33            replacement="${version}" /> 
     34        <rsr 
     35            file="${greenstone3basedir}/resources/java/server.properties" 
     36            pattern="^(Server3Control\.Version=).*$" 
     37            replacement="$1${version}" /> 
     38 
    5439    </target> 
    5540 
     
    7257        <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 
    7358            <exec executable="cp"> 
    74                 <arg    value="-r"/> 
     59                <arg value="-r"/> 
    7560                <arg value="${rk.home}/core/ant"/> 
    7661                <arg value="compiled/packages"/> 
     
    9580    </target> 
    9681 
    97     <target name="checkout-greenstone3"> 
    98         <svn> 
    99             <checkout url="${svn.root}/main/${branch.path}/greenstone3" destPath="compiled" revision="${branch.revision}"/> 
    100         </svn> 
    101     </target> 
    102  
    10382    <target name="export-greenstone3"> 
    10483        <svn> 
    10584            <export srcUrl="${svn.root}/main/${branch.path}/greenstone3" destPath="${dest}" revision="${branch.revision}"/> 
    10685        </svn> 
    107     </target> 
    108  
    109     <target name="insert-xml-parser"> 
    110         <copy todir="compiled/gs2build/perllib/cpan"> 
    111             <fileset dir="${rk.home}/greenstone3" includes="XML-Parser/**/*"/> 
    112         </copy> 
    113     </target> 
    114  
    115     <target name="insert-documented-examples"> 
    116         <echo>NOT IMPLEMENTED: Remember to put code in this target to grab and install the documented examples.</echo> 
    117         <!-- copy the doc eg colls from /home/nzdl - note we don't include the formatting ones --> 
    118     </target> 
    119  
    120     <target name="prepare-documentation"> 
    121  
    122         <mkdir dir="compiled/gsdl-manuals"/> 
    123         <svn> 
    124             <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="compiled/gsdl-manuals/manuals"/> 
    125             <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="compiled/gsdl-manuals/shared"/> 
    126         </svn> 
    127         <path id="documentation.compile.classpath"> 
    128             <fileset dir="compiled/gsdl-manuals"> 
    129                 <include name="**/*.jar"/> 
    130             </fileset> 
    131             <pathelement path="compiled/gsdl-manuals/shared"/> 
    132             <pathelement path="compiled/gsdl-manuals/manuals"/> 
    133         </path> 
    134         <javac srcdir="compiled/gsdl-manuals/shared" 
    135             destdir="compiled/gsdl-manuals/shared" 
    136             debug="on" 
    137             classpathref="documentation.compile.classpath"> 
    138             <include name="*.java"/> 
    139         </javac> 
    140         <unzip src="compiled/gsdl-manuals/shared/fop.zip" dest="compiled/gsdl-manuals/shared"/> 
    141  
    142         <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="compiled/gsdl-manuals/manuals/xml-source/en/help-en.xml"> 
    143             <arg value="compiled/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" /> 
    144             <arg value="compiled/gli/help/en/help.xml" /> 
    145             <arg value="compiled" /> 
    146         </java> 
    147  
    148         <chmod perm="a+x" file="compiled/gsdl-manuals/shared/fop/fop.sh"/> 
    149         <echo>Run generate-pdf script</echo> 
    150         <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 
    151             <exec dir="compiled/gsdl-manuals/manuals" executable="cmd"> 
    152                 <arg value="/C" /> 
    153                 <arg file="${basedir}/compiled/gsdl-manuals/manuals/generate-pdf.bat" /> 
    154                 <arg value="u" /> 
    155                 <arg value="en" /> 
    156             </exec> 
    157         <else> 
    158             <exec dir="compiled/gsdl-manuals/manuals" executable="/bin/bash"> 
    159                 <arg line="generate-pdf.sh u en" /> 
    160             </exec> 
    161         </else></if> 
    16286    </target> 
    16387 
     
    195119    </target> 
    196120 
    197     <target name="clean-uninstaller"> 
    198         <delete dir="distributions/web/uninstaller"/> 
    199     </target> 
    200121 
    201122    <target name="insert-windows-icon"> 
  • main/trunk/release-kits/shared/linux/wrapper.cpp

    r19938 r21630  
    9696    #ifndef CDROM 
    9797 
    98     string jarfile = tempdir + "/@installer.name@.jar"; //where we will store the jar file 
     98    string jarfile = tempdir + "/greenstone.jar"; //where we will store the jar file 
    9999    string javafile = tempdir + "/@java.installer@"; //where we will store the java tar file 
    100100 
     
    102102    //extract files 
    103103    cout << "Extracting installer jar..." << endl; 
    104     succeeded = extract_bundled_file( @installer.name@jar, sizeof(@installer.name@jar), (char*)jarfile.c_str(), false); 
     104    succeeded = extract_bundled_file( greenstonejar, sizeof(greenstonejar), (char*)jarfile.c_str(), false); 
    105105 
    106106    #ifdef java_is_bundled 
     
    166166        cout << "Launching Installer ..." << endl; 
    167167        int launch_exit_code = 0; 
    168         launch_exit_code = system( (foundJvm.getExecutable() + " -Xmx85M -jar @installer.name@.jar" + (text_mode?" text":"") ).c_str() ); 
     168        launch_exit_code = system( (foundJvm.getExecutable() + " -Xmx85M -jar greenstone.jar" + (text_mode?" text":"") ).c_str() ); 
    169169 
    170170        //report how it went