Changeset 15205


Ignore:
Timestamp:
2008-04-23T17:26:48+12:00 (14 years ago)
Author:
oranfry
Message:

some updates to make the release kit produce nicer installers

Location:
release-kits/lirk3
Files:
2 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • release-kits/lirk3/ant-scripts/create-installer.xml

    r15142 r15205  
    2424            <copy todir="${basedir}/installer" file="${lirk3.home}/installer/antinstall-config.xml"/>
    2525            <copy todir="${basedir}/installer" file="${lirk3.home}/installer/build.xml"/>
     26            <copy todir="${basedir}/installer/cp"><fileset dir="${lirk3.home}/installer/cp"/></copy>
     27
     28            <!-- put the concrete values of things in the config -->
    2629            <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/>
     30            <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/>
    2731            <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${java.extracted}"/>
    28            
     32
     33
     34            <!-- put the concrete values of things in the text -->
     35            <!-- default -->
     36            <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/>
     37            <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
     38            <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/>
     39            <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
     40            <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
     41
     42            <!-- chinese -->
     43            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/>
     44            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
     45            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/>
     46            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
     47            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
     48
    2949        </if>
    3050    </target>
     
    3252    <target name="compile-installer">
    3353        <if><bool><istrue value="${execute}"/></bool>
     54
     55            <installer file="${basedir}/installer/greenstone3-with-java.jar"
     56                    compress="true"
     57                    extractType="NonExtractor"
     58                    installConfig="${basedir}/installer/antinstall-config.xml"
     59                    buildFile="${basedir}/installer/build.xml"
     60                    antInstallLib="${lirk3.home}/bin/ant-installer/lib"
     61                    antLib="${lirk3.home}/bin/ant-installer/antlib"
     62                    validateConfig="true"
     63                    icons="bluecurve">
     64
     65                <!-- copy all the important files into the archive to be extracted for install -->
     66                <zipfileset dir="${basedir}/installer/cp" includes="resources/*"/>
     67                <zipfileset dir="${lirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
     68
     69<!--
     70                <zipfileset dir="${basedir}/distribution/greenstone3" includes="*"/>
     71                <zipfileset dir="${basedir}/distribution/greenstone3/bin" prefix="bin"><include name="**/*"/></zipfileset>
     72                <zipfileset dir="${basedir}/distribution/greenstone3/docs" prefix="docs"><include name="**/*"/></zipfileset>
     73                <zipfileset dir="${basedir}/distribution/greenstone3/gli" prefix="gli"><include name="**/*"/></zipfileset>
     74                <zipfileset dir="${basedir}/distribution/greenstone3/gs2build" prefix="gs2build"><include name="**/*"/></zipfileset>
     75                <zipfileset dir="${basedir}/distribution/greenstone3/lib" prefix="lib"><include name="**/*"/></zipfileset>
     76                <zipfileset dir="${basedir}/distribution/greenstone3/web" prefix="web"><include name="**/*"/></zipfileset>
     77                <zipfileset dir="${basedir}/distribution/greenstone3/packages" prefix="packages"><include name="**/*"/></zipfileset>
     78                <zipfileset dir="${basedir}/distribution/greenstone3/resources" prefix="resources"><include name="**/*"/></zipfileset>
     79                <zipfileset dir="${basedir}/distribution/greenstone3/src" prefix="src"><include name="**/*"/></zipfileset>
     80-->
     81
     82            </installer>
     83
     84            <!-- delete the 'bundled java only' lines from the installer config -->
     85            <rsr file="${basedir}/installer/antinstall-config.xml" pattern=".*&lt;!-- bundled java only --&gt;" replacement=""/>
    3486
    3587            <installer file="${basedir}/installer/greenstone3.jar"
     
    4799                <zipfileset dir="${lirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
    48100
     101<!--
    49102                <zipfileset dir="${basedir}/distribution/greenstone3" includes="*"/>
    50103                <zipfileset dir="${basedir}/distribution/greenstone3/bin" prefix="bin"><include name="**/*"/></zipfileset>
     
    57110                <zipfileset dir="${basedir}/distribution/greenstone3/resources" prefix="resources"><include name="**/*"/></zipfileset>
    58111                <zipfileset dir="${basedir}/distribution/greenstone3/src" prefix="src"><include name="**/*"/></zipfileset>
     112-->
    59113            </installer>
    60114
  • release-kits/lirk3/ant-scripts/init.xml

    r15142 r15205  
    4343    <!-- bundled java strings -->
    4444    <!-- java.installer: use a filename which has only letters numbers and underscores -->
    45     <property name="java.installer" value="jre_6u5_linux_i586"/>
     45
     46    <!-- the version numbers of bundled things -->
     47    <property name="bundled.version.java" value="1.6.0_05"/>
     48    <property name="bundled.version.tomcat" value="5.5.25"/>
     49    <property name="bundled.version.ant" value="1.6.5"/>
     50
     51    <!--<property name="java.installer" value="jre_6u5_linux_i586"/>-->
     52    <property name="java.installer" value="jre_6u5_tar_gz"/>
    4653    <property name="java.extracted" value="jre1.6.0_05"/>
    4754    <property name="java.min.version" value="1.5.0_00"/>
  • release-kits/lirk3/ant-scripts/wrap.xml

    r15142 r15205  
    2929            <copy todir="${basedir}/wrapped-installer/build" file="${lirk3.home}/wrapper/${java.installer}"/>
    3030            <copy todir="${basedir}/wrapped-installer/build" file="${basedir}/installer/greenstone3.jar"/>
     31            <copy todir="${basedir}/wrapped-installer/build" file="${basedir}/installer/greenstone3-with-java.jar"/>
    3132
    3233            <!-- substitute the real java installer filename and min version into various files -->
     
    4647            </exec>
    4748            <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build">
     49                <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone3_with_java_jar_start=greenstone3jar --readonly-text greenstone3-with-java.jar greenstone3-with-java.jar.o"/>
     50            </exec>
     51            <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build">
    4852                <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_search4j_start=search4j --readonly-text search4j search4j.o"/>
    4953            </exec>
     
    5357
    5458
    55             <echo level="info">create a header file declaring bundled greenstone.jar and search4j</echo>
    56             <delete file="mywrapper.h"/>
    57 
    58             <!-- greenstone.jar -->
     59            <!-- get size of greenstone.jar -->
    5960            <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone3.jar.ls"><arg line="-l greenstone3.jar"/></exec>
    6061            <exec executable="sed" inputstring="${greenstone3.jar.ls}" outputproperty="greenstone3.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
    61             <exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h"><arg line="extern const char greenstone3jar[${greenstone3.jar.size}];"/></exec>
    6262
    63             <!-- search4j -->
     63            <!-- get size of greenstone-with-java.jar -->
     64            <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone3-with-java.jar.ls"><arg line="-l greenstone3-with-java.jar"/></exec>
     65            <exec executable="sed" inputstring="${greenstone3-with-java.jar.ls}" outputproperty="greenstone3-with-java.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
     66
     67            <!-- get size of search4j -->
    6468            <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="search4j.ls"><arg line="-l search4j"/></exec>
    6569            <exec executable="sed" inputstring="${search4j.ls}" outputproperty="search4j.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
     70
     71            <!-- get size of java -->
     72            <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="java.ls"><arg line="-l ${java.installer}"/></exec>
     73            <exec executable="sed" inputstring="${java.ls}" outputproperty="java.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
     74
     75
     76            <echo level="info">creating the header file for no java version</echo>
     77            <delete file="mywrapper.h"/>
     78            <exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h"><arg line="extern const char greenstone3jar[${greenstone3.jar.size}];"/></exec>
    6679            <exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="extern const char search4j[${search4j.size}];"/></exec>
    67 
    6880
    6981            <echo level="info">compile the wrapper program</echo>
     
    7890
    7991
    80             <echo level="info">add java to the header file</echo>
    81             <!-- java -->
    82             <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="java.ls"><arg line="-l ${java.installer}"/></exec>
    83             <exec executable="sed" inputstring="${java.ls}" outputproperty="java.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
     92            <echo level="info">creating the header file for bundled java version</echo>
     93            <delete file="mywrapper.h"/>
     94            <exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h"><arg line="extern const char greenstone3jar[${greenstone3-with-java.jar.size}];"/></exec>
     95            <exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="extern const char search4j[${search4j.size}];"/></exec>
    8496            <exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="extern const char java[${java.size}];"/></exec>
    8597            <exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="#define java_is_bundled yes"/></exec>
     
    92104            <echo level="info">relink, bundling the files to be bundled</echo>
    93105            <exec executable="g++" dir="${basedir}/wrapped-installer/build">
    94                 <arg line="-static -static-libgcc -o  ../greenstone-${version}-linux-with-jre.bin mywrapper.o greenstone3.jar.o search4j.o java.o"/>
     106                <arg line="-static -static-libgcc -o  ../greenstone-${version}-linux-with-java.bin mywrapper.o greenstone3-with-java.jar.o search4j.o java.o"/>
    95107            </exec>
    96108
  • release-kits/lirk3/installer/antinstall-config.xml

    r15142 r15205  
    66            debug="false"
    77            lookAndFeel="org.tp23.jgoodies.plaf.plastic.PlasticXPLookAndFeel"
    8             name="Greenstone3Installer"
    9             windowIcon="/resources/gkmain_inv.png"
     8            name="Greenstone3 Installer"
     9            windowIcon="/resources/gs3-small.png"
    1010            defaultImageResource="/resources/makewavesdawn.png"
    1111            minJavaVersion="1.4">
    1212
    13     <!--  each page element represents a page of the installer -->
    14     <page
    15             type="input"
    16             name="intro"
    17             displayText="Welcome to the Greenstone3 installer">
     13    <!--  simple intro page -->
     14    <page type="input" name="intro" displayText="">
     15        <comment name="welcome-message"/>
    1816    </page>
    1917
    2018    <!--  type="license" shows a license page to click through -->
    21     <page
    22             type="license"
    23             name="license"
    24             displayText="License conditions"
    25             resource="/LICENSE.txt">
    26     </page>
     19    <page type="license" name="license" resource="/LICENSE.txt"  displayText="" />
    2720
    28     <!--  type="input" shows a list of editable options for the installer -->
    29     <page
    30             type="input"
    31             name="destination"
    32             displayText="Install Destination">
     21    <!--  install destination page -->
     22    <page type="input" name="destination">
    3323
    34         <directory
    35                 property="installDir"
    36                 defaultValue="/usr/local/Greenstone-@version@"
    37                 defaultValueWin="${env.ProgramFiles}\Greenstone-@version@"
    38                 displayText="Select an installation directory"
    39                 create="true"/>
     24        <directory property="installDir"
     25            defaultValue="/usr/local/Greenstone-@version@"
     26            defaultValueWin="${env.ProgramFiles}\Greenstone-@version@"
     27            create="true"
     28            displayText="" />
    4029
    4130    </page>
    4231
    43     <page type="input" name="tomcatports" displayText="Tomcat Ports">
     32    <page type="input" name="selector">
    4433
    45         <comment name="tomcatportsdescription" displayText="Please select the ports which the web server (Apache Tomcat) will use  will use. It is usually safe to accept the defaults by just clicking Next. The exception is when you are running other services on these ports - if this is the case, select some free ports and click Next."/>
     34        <comment name="choose-components"/>
    4635
    47         <text property="tomcat.server" defaultValue="localhost" displayText="Tomcat Server"/>
    48         <text property="tomcat.port" defaultValue="8080" displayText="Tomcat Port"/>
    49         <text property="tomcat.shutdown.port" defaultValue="8005" displayText="Tomcat Shutdown Port"/>
     36        <target target="install-core-components"    defaultValue="true" force="true" displayText="" />
     37        <target target="install-java"               defaultValue="true" displayText="" /> <!-- bundled java only -->
     38        <target target="install-tomcat"             defaultValue="true" displayText="" />
     39        <target target="install-ant"                    defaultValue="true" displayText="" />
     40        <target target="install-source-code"        defaultValue="false" displayText="" />
    5041
    5142    </page>
    5243
     44    <page type="input" name="tomcat-config" ifProperty="(${install-tomcat}==true)">
    5345
    54     <page
    55             type="input"
    56             name="selector"
    57             displayText="Components to install">
    58 
    59         <comment name="choosecomponents" displayText="Choose the components you want to install" bold="true"/>
    60         <target displayText="Core components" target="default" defaultValue="true" force="true"/>
    61         <target displayText="Source code" target="tgsrc" defaultValue="false"/>
     46        <text property="tomcat.server" defaultValue="localhost" displayText=""/>
     47        <text property="tomcat.port" defaultValue="8080" displayText=""/>
     48        <text property="tomcat.shutdown.port" defaultValue="8005" displayText=""/>
    6249
    6350    </page>
     
    6653            type="progress"
    6754            name="progress"
    68             displayText="Installation progress"
    6955            showTargets="false"
    7056            target="cleanuptarget">
  • release-kits/lirk3/installer/build.xml

    r15142 r15205  
    44-->
    55
    6 <project name="Installation" default="">
     6<project name="Installation">
    77
    88    <!-- this is required to pick up the properties generated during the install pages -->
     
    2121
    2222
    23     <target name="default" depends="">
     23    <target name="install-core-components" depends="">
    2424
    2525        <!-- create the installation directory -->
     
    134134
    135135    <!-- Source -->
    136     <target name="tgsrc" depends="">
     136    <target name="install-source-code" depends="">
    137137        <echo message="Installing Source Code (src)"/>
    138138        <mkdir dir="${installDir}/src"/>
     
    144144    </target>
    145145
    146     <target name="install-bundled-java" depends="" if="bundled.java.exists">
     146    <target name="install-java">
    147147        <echo message="Installing bundled java"/>
    148148        <copy todir="${installDir}/packages/jre">
     
    152152    </target>
    153153
    154     <target name="cleanuptarget" depends="install-bundled-java">
     154    <target name="install-tomcat">
     155        <echo message="Installing Tomcat"/>
     156    </target>
     157
     158    <target name="install-ant">
     159        <echo message="Installing Ant"/>
     160    </target>
     161
     162
     163
     164    <target name="cleanuptarget">
    155165    </target>
    156166   
  • release-kits/lirk3/wrapper/mywrapper.c

    r15142 r15205  
    6666            cout << "Your java is too old." << endl;
    6767        } else {
    68             cout << "Could not find java." << endl;
     68            cout << "Could not find java on your system." << endl;
    6969        }
    7070       
     
    7373        #ifdef java_is_bundled
    7474            //yes, JRE is bundled
     75            /*
    7576            cout
    7677                << "This installer comes bundled with a suitible version of java: " << endl
     
    7980            char r[1024]; cin >> r;
    8081            if ( strcmp( r, "y" ) == 0 || strcmp( r, "Y" ) == 0) {
    81                 extract_bundled_file( java, sizeof(java), (char*)"@java.installer@", true );
    82                 system( "./@java.installer@" );
    83                 jvmFound = true; //assume the java installation went well
    84             }
     82            */
     83
     84            cout << "Using bundled java." << endl;
     85            extract_bundled_file( java, sizeof(java), (char*)"@java.installer@", true );
     86            system( "tar -xzf @java.installer@" );
     87            jvmFound = true; //assume the java installation went well
     88
     89            /*}*/
    8590        #endif
    8691
Note: See TracChangeset for help on using the changeset viewer.