Changeset 15980


Ignore:
Timestamp:
2008-06-13T12:38:22+12:00 (13 years ago)
Author:
oranfry
Message:

have lirk2 get the linux general stuff

Location:
release-kits/lirk2
Files:
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • release-kits/lirk2

    • Property svn:externals
      •  

        old new  
        11lib http://svn.greenstone.org/release-kits/shared/lib
        22search4j http://svn.greenstone.org/release-kits/shared/search4j
         3linux http://svn.greenstone.org/release-kits/shared/linux
        34
  • release-kits/lirk2/ant-scripts/build.xml

    r15956 r15980  
    1515    <import file="compile.xml"/>
    1616    <import file="create-distribution.xml"/>
    17     <!--
    1817    <import file="create-installer.xml"/>
    1918    <import file="wrap.xml"/>
    20     -->
    2119
    2220    <target name="lirk2" depends="init">
    2321        <addressedcall target="compile"/>
    2422        <addressedcall target="create-distribution"/>
    25         <!--
    2623        <addressedcall target="create-installer"/>
    2724        <addressedcall target="wrap"/>
    28         -->
    2925    </target>
    3026
  • release-kits/lirk2/ant-scripts/create-distribution.xml

    r15957 r15980  
    1515        <addressedcall target="export-gsdl-gli-indexers" />
    1616        <addressedcall target="dist-set-version" />
     17        <addressedcall target="drop-in-binaries" />
     18        <addressedcall target="drop-in-demo-collection" />
    1719        <addressedcall target="compile-gli" />
    1820        <addressedcall target="create-gli-client-zip" />
     
    2325        <if><bool><istrue value="${execute}"/></bool>
    2426
    25             <mkdir dir="distribution"/>
    26             <delete dir="distribution/gsdl"/>
     27            <mkdir dir="distributions"/>
     28            <delete dir="distributions/web"/>
    2729            <svn>
    28                 <export srcurl="${svn.root}/gsdl/${branch.path}"        destPath="distribution/gsdl"/>
     30                <export srcurl="${svn.root}/gsdl/${branch.path}"        destPath="distributions/web"/>
    2931            </svn>
    3032
    3133            <svn>
    32                 <export srcurl="${svn.root}/gli/${branch.path}"         destPath="distribution/gsdl/gli"/>
     34                <export srcurl="${svn.root}/gli/${branch.path}"         destPath="distributions/web/gli"/>
    3335            </svn>
    3436
    3537            <svn>
    36                 <export srcurl="${svn.root}/indexers/${branch.path}"    destPath="distribution/gsdl/indexers"/>
     38                <export srcurl="${svn.root}/indexers/${branch.path}"    destPath="distributions/web/indexers"/>
    3739            </svn>
    3840
     
    4446
    4547            <echo level="info">Setting version in src/lib/gsdlconf.h</echo>
    46             <rsr file="${basedir}/gsdl/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}&quot;" />
     48            <rsr file="${basedir}/distributions/web/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}&quot;" />
    4749
    4850            <echo level="info">Setting version in Install.sh</echo>
    49             <rsr file="${basedir}/gsdl/Install.sh" pattern="(echo &quot;Version: ).*(&quot; .*)" replacement="$1${version}$2" />
     51            <rsr file="${basedir}/distributions/web/Install.sh" pattern="(echo &quot;Version: ).*(&quot; .*)" replacement="$1${version}$2" />
    5052
    5153            <echo level="info">Setting version in etc/VERSION</echo>
    52             <rsr file="${basedir}/gsdl/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
     54            <rsr file="${basedir}/distributions/web/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
    5355
    5456        </if>
    5557    </target>
     58
     59    <target name="drop-in-binaries">
     60        <if><bool><istrue value="${execute}"/></bool>
     61            <echo level="info">Dropping compiled binaries into distribution</echo>
     62            <delete dir="distributions/web/bin/linux" />
     63            <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/bin/linux distributions/web/bin"/></exec>
     64            <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/library distributions/web/cgi-bin"/></exec>
     65            <exec dir="${basedir}" executable="cp"><arg line="gsdl/cgi-bin/oaiservr distributions/web/cgi-bin"/></exec>
     66        </if>
     67    </target>
     68
     69    <target name="drop-in-demo-collection">
     70        <if><bool><istrue value="${execute}"/></bool>
     71            <echo level="info">Dropping compiled binaries into distribution</echo>
     72            <delete dir="distributions/web/collect/demo" />
     73            <exec dir="${basedir}" executable="cp"><arg line="-r gsdl/collect/demo distributions/web/collect"/></exec>
     74        </if>
     75    </target>
     76
    5677
    5778    <target name="compile-gli">
     
    5980
    6081            <echo>Compiling gli...</echo>
    61             <exec dir="${basedir}/distribution/gsdl/gli" executable="${basedir}/distribution/gsdl/gli/makegli.sh"/>
     82            <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.sh"/>
    6283
    6384            <echo>Creating jar...</echo>
    64             <exec dir="${basedir}/distribution/gsdl/gli" executable="${basedir}/distribution/gsdl/gli/makejar.sh"/>
     85            <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.sh"/>
    6586
    6687            <echo>Cleaning up intermediate files...</echo>
    67             <delete dir="${basedir}/distribution/gsdl/gli/jar"/>
    68             <delete dir="${basedir}/distribution/gsdl/gli/classes/org"/>
     88            <delete dir="${basedir}/distributions/web/gli/jar"/>
     89            <delete dir="${basedir}/distributions/web/gli/classes/org"/>
    6990
    7091            <echo>Putting gli server jar in a better place</echo>
    71             <exec dir="${basedir}/distribution/gsdl" executable="mv" failonerror="true">
     92            <exec dir="${basedir}/distributions/web" executable="mv" failonerror="true">
    7293                <arg line="gli/GLIServer.jar bin/java" />
    7394            </exec>
     
    104125
    105126            <echo level="info">Changing Install.sh to web release</echo>
    106             <rsr file="${basedir}/distribution/gsdl/Install.sh" pattern="^(iscdrom=).*" replacement="$1&quot;no&quot;" />
     127            <rsr file="${basedir}/distributions/web/Install.sh" pattern="^(iscdrom=).*" replacement="$1&quot;no&quot;" />
     128
     129            <echo level="info">Putting the COPYING file into distribution</echo>
     130            <copy file="${lirk2.home}/resources/COPYING" tofile="${basedir}/distributions/web/COPYING" />
     131
     132            <echo level="info">Removing signed gatherer</echo>
     133            <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
     134
     135            <echo level="info">Removing some unneeded stuff</echo>
     136            <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
     137            <delete file="${basedir}/distributions/web/gli/gli4gs3.sh" />
     138            <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.bat"/></delete>
     139            <delete><fileset dir="${basedir}/distributions/web" includes="*.bat"/></delete>
    107140
    108141        </if>
    109142    </target>
    110143
    111    
    112 
    113 
    114 
    115144</project>
  • release-kits/lirk2/ant-scripts/create-installer.xml

    r15304 r15980  
    99-->
    1010
    11 <project name="lirk3-create-installer" default="create-installer">
     11<project name="lirk2-create-installer" default="create-installer">
    1212
    1313    <target name="create-installer">
    1414        <addressedcall target="setup-for-installer-creation"/>
    1515        <addressedcall target="compile-installer"/>
    16         <addressedcall target="clean-up-after-installer-creation"/>
    1716    </target>
    1817
     
    2019        <if><bool><istrue value="${execute}"/></bool>
    2120
    22             <echo>Project Path: ${basedir}/distribution/greenstone3</echo>
     21            <echo>Project Path: ${basedir}/distribution/gsdl</echo>
    2322            <mkdir dir="${basedir}/installer"/>
    24             <copy todir="${basedir}/installer" file="${lirk3.home}/installer/antinstall-config.xml"/>
    25             <copy todir="${basedir}/installer" file="${lirk3.home}/installer/build.xml"/>
    26             <copy todir="${basedir}/installer/cp"><fileset dir="${lirk3.home}/installer/cp"/></copy>
     23            <copy todir="${basedir}/installer" file="${lirk2.home}/installer/antinstall-config.xml" overwrite="true"/>
     24            <copy todir="${basedir}/installer" file="${lirk2.home}/installer/build.xml" overwrite="true"/>
     25            <copy todir="${basedir}/installer/cp" overwrite="true"><fileset dir="${lirk2.home}/installer/cp"/></copy>
    2726
    2827            <!-- put the concrete values of things in the config -->
    2928            <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/>
     29            <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.java@" replacement="${component.size.java}"/>
    3030            <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/>
    3131            <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${java.extracted}"/>
    32 
    3332
    3433            <!-- put the concrete values of things in the text -->
     
    3736            <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
    3837            <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}"/>
    4138
    4239            <!-- chinese -->
     40            <!--
    4341            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/>
    4442            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
     
    4644            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
    4745            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
     46            -->
     47
    4848
    4949        </if>
     
    5353        <if><bool><istrue value="${execute}"/></bool>
    5454
    55             <installer file="${basedir}/installer/greenstone3-with-java.jar"
     55            <!-- create the installer with java -->
     56            <installer file="${basedir}/installer/gsdl-${version}-linux-with-java.jar"
    5657                    compress="true"
    5758                    extractType="NonExtractor"
    5859                    installConfig="${basedir}/installer/antinstall-config.xml"
    5960                    buildFile="${basedir}/installer/build.xml"
    60                     antInstallLib="${lirk3.home}/bin/ant-installer/lib"
    61                     antLib="${lirk3.home}/bin/ant-installer/antlib"
     61                    antInstallLib="${lirk2.home}/bin/ant-installer/lib"
     62                    antLib="${lirk2.home}/bin/ant-installer/antlib"
    6263                    validateConfig="true"
    6364                    failOnError="false"
    6465                    icons="bluecurve">
    6566
    66                 <!-- copy all the important files into the archive to be extracted for install -->
    6767                <zipfileset dir="${basedir}/installer/cp" includes="resources/*"/>
    68                 <zipfileset dir="${lirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
    69 
    70 
    71                 <zipfileset dir="${basedir}/distribution/greenstone3" includes="*"/>
    72                 <zipfileset dir="${basedir}/distribution/greenstone3/bin" prefix="bin"><include name="**/*"/></zipfileset>
    73                 <zipfileset dir="${basedir}/distribution/greenstone3/docs" prefix="docs"><include name="**/*"/></zipfileset>
    74                 <zipfileset dir="${basedir}/distribution/greenstone3/gli" prefix="gli"><include name="**/*"/></zipfileset>
    75                 <zipfileset dir="${basedir}/distribution/greenstone3/gs2build" prefix="gs2build"><include name="**/*"/></zipfileset>
    76                 <zipfileset dir="${basedir}/distribution/greenstone3/lib" prefix="lib"><include name="**/*"/></zipfileset>
    77                 <zipfileset dir="${basedir}/distribution/greenstone3/web" prefix="web"><include name="**/*"/></zipfileset>
    78                 <zipfileset dir="${basedir}/distribution/greenstone3/packages" prefix="packages"><include name="**/*"/></zipfileset>
    79                 <zipfileset dir="${basedir}/distribution/greenstone3/resources" prefix="resources"><include name="**/*"/></zipfileset>
    80                 <zipfileset dir="${basedir}/distribution/greenstone3/src" prefix="src"><include name="**/*"/></zipfileset>
     68                <zipfileset dir="${lirk2.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
     69                <zipfileset dir="${basedir}/distributions/web" includes="**/*"/>
    8170
    8271            </installer>
     
    8574            <rsr file="${basedir}/installer/antinstall-config.xml" pattern=".*&lt;!-- bundled java only --&gt;" replacement=""/>
    8675
    87             <installer file="${basedir}/installer/greenstone3.jar"
     76            <!-- create the installer without java -->
     77            <installer file="${basedir}/installer/gsdl-${version}-linux.jar"
    8878                    compress="true"
    8979                    extractType="NonExtractor"
    9080                    installConfig="${basedir}/installer/antinstall-config.xml"
    9181                    buildFile="${basedir}/installer/build.xml"
    92                     antInstallLib="${lirk3.home}/bin/ant-installer/lib"
    93                     antLib="${lirk3.home}/bin/ant-installer/antlib"
     82                    antInstallLib="${lirk2.home}/bin/ant-installer/lib"
     83                    antLib="${lirk2.home}/bin/ant-installer/antlib"
    9484                    validateConfig="true"
     85                    failOnError="false"
    9586                    icons="bluecurve">
    9687
    97                 <!-- copy all the important files into the archive to be extracted for install -->
    9888                <zipfileset dir="${basedir}/installer/cp" includes="resources/*"/>
    99                 <zipfileset dir="${lirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
     89                <zipfileset dir="${lirk2.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
     90                <zipfileset dir="${basedir}/distributions/web" includes="**/*"/>
    10091
    101                 <zipfileset dir="${basedir}/distribution/greenstone3" includes="*"/>
    102                 <zipfileset dir="${basedir}/distribution/greenstone3/bin" prefix="bin"><include name="**/*"/></zipfileset>
    103                 <zipfileset dir="${basedir}/distribution/greenstone3/docs" prefix="docs"><include name="**/*"/></zipfileset>
    104                 <zipfileset dir="${basedir}/distribution/greenstone3/gli" prefix="gli"><include name="**/*"/></zipfileset>
    105                 <zipfileset dir="${basedir}/distribution/greenstone3/gs2build" prefix="gs2build"><include name="**/*"/></zipfileset>
    106                 <zipfileset dir="${basedir}/distribution/greenstone3/lib" prefix="lib"><include name="**/*"/></zipfileset>
    107                 <zipfileset dir="${basedir}/distribution/greenstone3/web" prefix="web"><include name="**/*"/></zipfileset>
    108                 <zipfileset dir="${basedir}/distribution/greenstone3/packages" prefix="packages"><include name="**/*"/></zipfileset>
    109                 <zipfileset dir="${basedir}/distribution/greenstone3/resources" prefix="resources"><include name="**/*"/></zipfileset>
    110                 <zipfileset dir="${basedir}/distribution/greenstone3/src" prefix="src"><include name="**/*"/></zipfileset>
    11192            </installer>
    11293
     
    11495    </target>
    11596
    116     <target name="clean-up-after-installer-creation">
    117         <if><bool><istrue value="${execute}"/></bool>
    118             <delete file="${basedir}/installer/antinstall-config.xml"/>
    119             <delete file="${basedir}/installer/build.xml"/>
    120         </if>
    121     </target>
    122 
    123 
    12497</project>
  • release-kits/lirk2/ant-scripts/init.xml

    r15956 r15980  
    5151    <!-- the version numbers of bundled things -->
    5252    <property name="bundled.version.java" value="1.6.0_05"/>
    53     <property name="bundled.version.tomcat" value="5.5.25"/>
    54     <property name="bundled.version.ant" value="1.6.5"/>
    5553
    5654    <!--<property name="java.installer" value="jre_6u5_linux_i586"/>-->
  • release-kits/lirk2/ant-scripts/wrap.xml

    r15205 r15980  
    99-->
    1010
    11 <project name="lirk3-wrap" default="wrap">
     11<project name="lirk2-wrap" default="wrap">
    1212
    1313    <target name="wrap">
    1414        <addressedcall target="setup-for-wrapping"/>
    1515        <addressedcall target="compile-wrapper"/>
    16         <addressedcall target="clean-up-after-wrapping"/>
    1716    </target>
    1817
     
    2322            <!-- create and setup the build directory -->
    2423            <mkdir dir="${basedir}/wrapped-installer/build"/>
    25             <copy todir="${basedir}/wrapped-installer/build" file="${lirk3.home}/wrapper/mywrapper.c"/>
     24            <copy todir="${basedir}/wrapped-installer/build" file="${lirk2.home}/linux/wrapper.cpp"/>
    2625
    2726            <!-- copy bundled files -->
    28             <copy todir="${basedir}/wrapped-installer/build" file="${lirk3.home}/search4j/search4j"/>
    29             <copy todir="${basedir}/wrapped-installer/build" file="${lirk3.home}/wrapper/${java.installer}"/>
    30             <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"/>
     27            <copy todir="${basedir}/wrapped-installer/build" file="${lirk2.home}/search4j/search4j"/>
     28            <copy todir="${basedir}/wrapped-installer/build" file="${lirk2.home}/wrapper/${java.installer}"/>
     29            <copy tofile="${basedir}/wrapped-installer/build/greenstone2.jar" file="${basedir}/installer/gsdl-${version}-linux.jar"/>
     30            <copy tofile="${basedir}/wrapped-installer/build/greenstone2-with-java.jar" file="${basedir}/installer/gsdl-${version}-linux-with-java.jar"/>
    3231
    33             <!-- substitute the real java installer filename and min version into various files -->
    34             <rsr file="${basedir}/wrapped-installer/build/mywrapper.c" pattern="@java.installer@" replacement="${java.installer}"/>
    35             <rsr file="${basedir}/wrapped-installer/build/mywrapper.c" pattern="@java.extracted@" replacement="${java.extracted}"/>
    36             <rsr file="${basedir}/wrapped-installer/build/mywrapper.c" pattern="@java.min.version@" replacement="${java.min.version}"/>
     32            <!-- substitute in real values -->
     33            <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.installer@" replacement="${java.installer}"/>
     34            <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.extracted@" replacement="${java.extracted}"/>
     35            <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.min.version@" replacement="${java.min.version}"/>
    3736
    3837        </if>
     
    4443            <echo level="info">create an object file (extension .o) for each file to bundle</echo>
    4544            <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build">
    46                 <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone3_jar_start=greenstone3jar --readonly-text greenstone3.jar greenstone3.jar.o"/>
     45                <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone2_jar_start=greenstone2jar --readonly-text greenstone2.jar greenstone2.jar.o"/>
    4746            </exec>
    4847            <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"/>
     48                <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone2_with_java_jar_start=greenstone2jar --readonly-text greenstone2-with-java.jar greenstone2-with-java.jar.o"/>
    5049            </exec>
    5150            <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build">
     
    5655            </exec>
    5756
    58 
    5957            <!-- get size of greenstone.jar -->
    60             <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone3.jar.ls"><arg line="-l greenstone3.jar"/></exec>
    61             <exec executable="sed" inputstring="${greenstone3.jar.ls}" outputproperty="greenstone3.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
     58            <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone2.jar.ls"><arg line="-l greenstone2.jar"/></exec>
     59            <exec executable="sed" inputstring="${greenstone2.jar.ls}" outputproperty="greenstone2.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
    6260
    6361            <!-- 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>
     62            <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone2-with-java.jar.ls"><arg line="-l greenstone2-with-java.jar"/></exec>
     63            <exec executable="sed" inputstring="${greenstone2-with-java.jar.ls}" outputproperty="greenstone2-with-java.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
    6664
    6765            <!-- get size of search4j -->
     
    7371            <exec executable="sed" inputstring="${java.ls}" outputproperty="java.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec>
    7472
    75 
    7673            <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>
    79             <exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="extern const char search4j[${search4j.size}];"/></exec>
     74            <delete file="wrapper.h"/>
     75            <exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h"><arg line="extern const char greenstone2jar[${greenstone2.jar.size}];"/></exec>
     76            <exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="extern const char search4j[${search4j.size}];"/></exec>
    8077
    8178            <echo level="info">compile the wrapper program</echo>
    8279            <exec executable="g++" dir="${basedir}/wrapped-installer/build">
    83                 <arg line="-Wall -static -static-libgcc -c -o mywrapper.o mywrapper.c"/>
     80                <arg line="-Wall -static -static-libgcc -c -o wrapper.o wrapper.cpp"/>
    8481            </exec>
    8582
    8683            <echo level="info">link, bundling the files to be bundled</echo>
    8784            <exec executable="g++" dir="${basedir}/wrapped-installer/build">
    88                 <arg line="-static -static-libgcc -o  ../greenstone-${version}-linux.bin mywrapper.o greenstone3.jar.o search4j.o"/>
     85                <arg line="-static -static-libgcc -o  ../greenstone-${version}-linux.bin wrapper.o greenstone2.jar.o search4j.o"/>
    8986            </exec>
    9087
    91 
    9288            <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>
    96             <exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="extern const char java[${java.size}];"/></exec>
    97             <exec executable="echo" output="${basedir}/wrapped-installer/build/mywrapper.h" append="true"><arg line="#define java_is_bundled yes"/></exec>
     89            <delete file="wrapper.h"/>
     90            <exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h"><arg line="extern const char greenstone2jar[${greenstone2-with-java.jar.size}];"/></exec>
     91            <exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="extern const char search4j[${search4j.size}];"/></exec>
     92            <exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="extern const char java[${java.size}];"/></exec>
     93            <exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="#define java_is_bundled yes"/></exec>
    9894
    9995            <echo level="info">recompile the wrapper program</echo>
    10096            <exec executable="g++" dir="${basedir}/wrapped-installer/build">
    101                 <arg line="-Wall -static -static-libgcc -c -o mywrapper.o mywrapper.c"/>
     97                <arg line="-Wall -static -static-libgcc -c -o wrapper.o wrapper.cpp"/>
    10298            </exec>
    10399
    104100            <echo level="info">relink, bundling the files to be bundled</echo>
    105101            <exec executable="g++" dir="${basedir}/wrapped-installer/build">
    106                 <arg line="-static -static-libgcc -o  ../greenstone-${version}-linux-with-java.bin mywrapper.o greenstone3-with-java.jar.o search4j.o java.o"/>
     102                <arg line="-static -static-libgcc -o  ../greenstone-${version}-linux-with-java.bin wrapper.o greenstone2-with-java.jar.o search4j.o java.o"/>
    107103            </exec>
    108 
    109 
    110104
    111105        </if>
    112106    </target>
    113107
    114     <target name="clean-up-after-wrapping">
    115         <if><bool><istrue value="${execute}"/></bool>
    116             <delete dir="${basedir}/wrapped-installer/build"/>
    117         </if>
    118     </target>
    119 
    120 
    121 
    122108</project>
  • release-kits/lirk2/installer/antinstall-config.xml

    r15213 r15980  
    77            debug="false"
    88            lookAndFeel="org.tp23.jgoodies.plaf.plastic.PlasticXPLookAndFeel"
    9             name="Greenstone3 @version@ Installer"
    10             windowIcon="/resources/gs3-small.png"
     9            name="Greenstone-@version@ Installer"
     10            windowIcon="/resources/gs2-small.png"
    1111            defaultImageResource="/resources/makewavesdawn.png"
    1212            minJavaVersion="1.4">
     
    1818
    1919    <!--  type="license" shows a license page to click through -->
    20     <page type="license" name="license" resource="/LICENSE.txt"  displayText="" />
     20    <page type="license" name="license" resource="/COPYING"  displayText="" />
    2121
    2222    <!--  install destination page -->
     
    3737        <target target="install-core-components"    defaultValue="true" force="true" displayText="" />
    3838        <target target="install-java"               defaultValue="true" displayText="" /> <!-- bundled java only -->
    39         <target target="install-tomcat"             defaultValue="true" displayText="" />
    40         <target target="install-ant"                    defaultValue="true" displayText="" />
    4139        <target target="install-source-code"        defaultValue="false" displayText="" />
    4240
    4341    </page>
    4442
    45     <page type="input" name="tomcat-config" ifProperty="(${install-tomcat}==true)" displayText="">
    46 
    47         <text property="tomcat.server" defaultValue="localhost" displayText=""/>
    48         <text property="tomcat.port" defaultValue="8080" displayText=""/>
    49         <text property="tomcat.shutdown.port" defaultValue="8005" displayText=""/>
    50 
    51     </page>
    52 
    53     <page type="progress" name="progress" showTargets="false" target="cleanuptarget" displayText="">
    54     </page>
     43    <page type="progress" name="progress" showTargets="false" target="cleanuptarget" displayText=""></page>
    5544
    5645</installer>
  • release-kits/lirk2/installer/build.xml

    r15205 r15980  
    2323    <target name="install-core-components" depends="">
    2424
    25         <!-- create the installation directory -->
    26         <echo message="Creating Installation directory"/>
    2725        <echo>basedir: ${basedir}</echo>
    2826        <echo>installDir: ${installDir}</echo>
    2927        <echo>antinstaller.jar: ${antinstaller.jar}</echo>
     28
     29        <!-- create the installation directory -->
     30        <echo message="Creating Installation directory"/>
    3031        <mkdir dir="${installDir}"/>
    3132
    3233
    33         <!-- install binaries and set executable -->
     34        <!-- install files -->
     35        <echo message="Installing GLI (gli)"/>
     36        <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="gli/**/*"/></patternset></unzip>
     37        <echo/>
     38
    3439        <echo message="Installing Executable Binaries (bin)"/>
    3540        <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="bin/**/*"/></patternset></unzip>
    3641        <echo/>
    3742
    38         <echo message="Installing Documentation (docs)"/>
    39         <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="docs/**/*"/></patternset></unzip>
     43        <echo message="Installing CGI Binaries (cgi-bin)"/>
     44        <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="cgi-bin/**/*"/></patternset></unzip>
    4045        <echo/>
    4146
    42         <echo message="Installing GLI (gli)"/>
    43         <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="gli/**/*"/></patternset></unzip>
     47        <echo message="Installing Config Folder (etc)"/>
     48        <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="etc/**/*"/></patternset></unzip>
    4449        <echo/>
    4550
    46         <echo message="Installing gs2build (gs2build)"/>
    47         <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="gs2build/**/*"/></patternset></unzip>
    48         <echo/>
    49 
    50         <echo message="Installing Libraries (lib)"/>
    51         <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="lib/**/*"/></patternset></unzip>
    52         <echo/>
    53 
    54         <echo message="Installing Web Content (web)"/>
    55         <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="web/**/*"/></patternset></unzip>
     51        <echo message="Installing mappings (mappings)"/>
     52        <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="mappings/**/*"/></patternset></unzip>
    5653        <echo/>
    5754
     
    6057        <echo/>
    6158
    62         <echo message="Installing Resources (resources)"/>
    63         <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="resources/**/*"/></patternset></unzip>
     59        <echo message="Installing Images (images)"/>
     60        <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="images/**/*"/></patternset></unzip>
     61        <echo/>
     62
     63        <echo message="Installing Perl Libraries (perllib)"/>
     64        <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="perllib/**/*"/></patternset></unzip>
     65        <echo/>
     66
     67        <echo message="Installing Indexers (indexers)"/>
     68        <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="indexers/**/*"/></patternset></unzip>
     69        <echo/>
     70
     71        <echo message="Installing Macros (macros)"/>
     72        <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="macros/**/*"/></patternset></unzip>
     73        <echo/>
     74
     75        <echo message="Installing Collect Folder (collect)"/>
     76        <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="collect/**/*"/></patternset></unzip>
    6477        <echo/>
    6578
     
    6780        <unzip src="${antinstaller.jar}" dest="${installDir}">
    6881            <patternset>
    69                 <include name="build.xml"/>
    70                 <include name="build.properties"/>
    71                 <include name="gs3-server.sh"/>
    72                 <include name="gs3-setup.sh"/>
    73                 <include name="LICENSE.txt"/>
    74                 <include name="README.txt"/>
    75                 <include name="server.jar"/>
     82                <include name="config.sub"/>
     83                <include name="configure.in"/>
     84                <include name="install-sh"/>
     85                <include name="setup.bash"/>
     86                <include name="config.h.in"/>
     87                <include name="configtest.pl"/>
     88                <include name="WIN32cfg.h"/>
     89                <include name="acconfig.h"/>
     90                <include name="COPYING"/>
     91                <include name="config.guess"/>
     92                <include name="Install.txt"/>
     93                <include name="configure"/>
     94                <include name="win32.mak"/>
     95                <include name="setup.csh"/>
     96                <include name="Install.sh"/>
     97                <include name="Makefile.in"/>
     98                <include name="micotest.cpp"/>
     99                <include name="aclocal.m4"/>
    76100            </patternset>
    77101        </unzip>
     
    79103
    80104        <echo message="Setting Binaries to Executable"/>
    81         <chmod dir="${installDir}" includes="*.sh" perm="775"/>
    82         <chmod dir="${installDir}/bin/script" includes="*" perm="775"/>
    83         <chmod dir="${installDir}/bin" includes="*" perm="775"/>
    84         <chmod dir="${installDir}/packages/tomcat/bin" includes="*.sh" perm="775"/>
    85         <chmod dir="${installDir}/packages/ant/bin" includes="*" perm="775"/>
    86         <chmod dir="${installDir}/gs2build/bin/linux" includes="*" perm="775"/>
    87         <chmod dir="${installDir}/gs2build/bin/script" includes="**/*" perm="775"/>
     105        <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
     106        <chmod dir="${installDir}/bin/linux" includes="*" perm="775"/>
     107        <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
     108        <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
    88109        <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
    89110        <echo/>
    90 
    91         <!-- change the tomcat ports in build.properties -->
    92         <echo message="Changing tomcat ports in build.properties"/>
    93         <rsr file="${installDir}/build.properties" pattern="(tomcat.port[=:]).*" replacement="$1${tomcat.port}" />
    94         <rsr file="${installDir}/build.properties" pattern="(tomcat.shutdown.port[=:]).*" replacement="$1${tomcat.shutdown.port}" />
    95 
    96         <!-- change the tomcat ports in tomcats server.xml -->
    97         <echo message="Changing tomcat ports tomcat's server.xml"/>
    98         <copy file="${installDir}/resources/tomcat/server.xml" tofile="${installDir}/packages/tomcat/conf/server.xml" overwrite="true"/>
    99         <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="(.*)@port@(.*)" replacement="$1${tomcat.port}$2" />
    100         <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="(.*)@shutdown-port@(.*)" replacement="$1${tomcat.shutdown.port}$2" />
    101        
    102         <!-- copy the greenstone3.xml file to tomcat -->
    103         <echo message="Copying greenstone3.xml to tomcat directory"/>
    104         <copy file="${installDir}/resources/tomcat/greenstone3.xml" tofile="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" overwrite="true"/>
    105         <rsr file="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" pattern="(.*)@gsdl3webhome@(.*)" replacement="$1${installDir}/web$2" />
    106 
    107         <!-- set up global properties -->
    108         <echo message="Setting up global properties"/>
    109         <copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
    110         <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
    111         <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.server@(.*)" replacement="$1localhost$2" />
    112         <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.port@(.*)" replacement="$1${tomcat.port}$2" />
    113 
    114         <!-- set up log4j properties-->
    115         <echo message="Setting up log4j properties"/>
    116         <copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
    117         <rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
    118 
    119 
    120         <!-- in the gs3-setup.sh file, set ANT_HOME and put it in PATH (no need anymore)-->
    121         <!--<echo>In the gs3-setup.sh file, set ANT_HOME and put it in PATH</echo>
    122         <exec executable="echo" output="${installDir}/gs3-setup.sh" append="true">
    123             <arg line="export ANT_HOME=${installDir}/packages/ant; export PATH=$ANT_HOME/bin:$PATH;"/>
    124         </exec>-->
    125111
    126112        <!-- delete unneeded files -->     
     
    137123        <echo message="Installing Source Code (src)"/>
    138124        <mkdir dir="${installDir}/src"/>
    139         <unzip src="${antinstaller.jar}" dest="${installDir}">
    140             <patternset>
    141                 <include name="src/**/*"/>
    142             </patternset>
    143         </unzip>
     125        <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="src/**/*"/></patternset></unzip>
    144126    </target>
    145127
     
    152134    </target>
    153135
    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 
    164136    <target name="cleanuptarget">
    165137    </target>
  • release-kits/lirk2/wrapper/mywrapper.c

    r15205 r15980  
    1212
    1313    string tempdir = (string)argv[0] + ".tmp"; //temporary directory where we will store extracted files
    14     string jarfile = tempdir + "/greenstone3.jar"; //where we will store the jar file
     14    string jarfile = tempdir + "/greenstone2.jar"; //where we will store the jar file
    1515    string search4jfile = tempdir + "/search4j"; //where we will store the jar file
     16    string javafile = tempdir + "/@java.installer@"; //where we will store the java tar file
    1617    bool succeeded = false;
    1718
    1819    //create the temp folder
    19     cout << "Creating temp directory" << endl;
     20    cout << "Creating temp directory..." << endl;
    2021    succeeded = ( 0 == system( ("mkdir " + tempdir).c_str() ) );
    2122    if ( !succeeded ) {
     
    2829    //extract files
    2930    cout << "Extracting installer jar..." << endl;
    30     succeeded = extract_bundled_file( greenstone3jar, sizeof(greenstone3jar), (char*)jarfile.c_str(), false);
     31    succeeded = extract_bundled_file( greenstone2jar, sizeof(greenstone2jar), (char*)jarfile.c_str(), false);
     32
     33    cout << "Extracting search4j tool..." << endl;
     34    succeeded = extract_bundled_file( search4j, sizeof(search4j), (char*)search4jfile.c_str(), true ) && succeeded;
     35
     36    #ifdef java_is_bundled
     37    cout << "Extracting bundled java..." << endl;
     38    succeeded = extract_bundled_file( java, sizeof(java), (char*)javafile.c_str(), true ) && succeeded;
     39    #endif
     40       
    3141    if ( !succeeded ) {
    32         cout << "failed" << endl;
    33         cout << "Failed to extract the JAR file to '" << jarfile << "'" << endl;
    34         cout << "The file may be corrupt or missing" << endl;
    35         cout << "Or this installer may not have sufficient file permissions to write it to disk" << endl;
     42        cout << "Failed to extract one or more resources" << endl;
     43        cout << "This installer may not have sufficient file permissions to write it to disk" << endl;
     44        cout << "Or, the files may be corrupt or missing from this executable" << endl;
    3645        cout << "Exiting" << endl;
    3746        return 1;
    3847    }
    3948
    40     cout << "Extracting search4j tool..." << endl;
    41     succeeded = extract_bundled_file( search4j, sizeof(search4j), (char*)search4jfile.c_str(), true );
     49    //change to the temp directory
     50    chdir( tempdir.c_str() );
     51
     52    #ifdef java_is_bundled
     53    succeeded = (system( "tar -xzf @java.installer@" ) == 0);
    4254    if ( !succeeded ) {
    43         cout << "failed" << endl;
    44         cout << "Failed to extract the search4j tool to '" << jarfile << "'" << endl;
    45         cout << "The file may be corrupt or missing" << endl;
    46         cout << "Or this installer may not have sufficient file permissions to write it to disk" << endl;
     55        cout << "Failed to extract the bundled java archive to the temp directory" << endl;
     56        cout << "You need the tar program on your PATH" << endl;
    4757        cout << "Exiting" << endl;
    4858        return 1;
    4959    }
    50 
    51 
    52     //change to the temp directory
    53     chdir( tempdir.c_str() );
    54 
     60    #endif
    5561
    5662    //check if an appropriate java is found
    5763    bool jvmFound = (system( "./search4j -m @java.min.version@ -h ./@java.extracted@" ) == 0);
    5864
    59     //if the jvm was not found, try to fix it and find it
     65    //if the jvm was not found, report not found
    6066    if ( !jvmFound ) {
     67
    6168        //did not find a good java
    62         cout << "Greenstone requires java @java.min.version@ or greater" << endl;
     69        cout << "Greenstone requires java @java.min.version@ or greater." << endl;
    6370       
    6471        //tell them if java is absent or just too old
    6572        if ( system( "./search4j -h ./@java.extracted@" ) == 0 ) {
    66             cout << "Your java is too old." << endl;
     73            cout << "You have java, but it is too old." << endl;
    6774        } else {
    6875            cout << "Could not find java on your system." << endl;
    6976        }
    70        
    71         //is this an installer with the bundled JRE?
    72        
    73         #ifdef java_is_bundled
    74             //yes, JRE is bundled
    75             /*
    76             cout
    77                 << "This installer comes bundled with a suitible version of java: " << endl
    78                 << "   @java.installer@" << endl
    79                 << "Do you want to install this java? (y/n)" << endl;
    80             char r[1024]; cin >> r;
    81             if ( strcmp( r, "y" ) == 0 || strcmp( r, "Y" ) == 0) {
    82             */
    8377
    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             /*}*/
     78        cout << "Install java (@java.min.version@ or greater) and set JAVA_HOME or JRE_HOME, and try again" << endl;
     79        #ifndef java_is_bundled
     80        cout << "Or, download a greentsone3 installer with bundled java and use that instead of this one" << endl;
    9081        #endif
    9182
    92         #ifndef java_is_bundled
    93             //no, JRE is not bundled
    94             cout << "Install java (@java.min.version@ or greater) and set JAVA_HOME or JRE_HOME, and try again" << endl;
    95             cout << "Or, download a greentsone3 installer with bundled java and use that instead of this one" << endl;
    96         #endif
    97     }
     83    //if we have found it, launch the installer
     84    } else {
    9885
    99     //if we have found it by now, launch the installer
    100     if ( jvmFound ) {
    10186        cout << "Launching Installer ..." << endl;
    10287        int launch_exit_code = 0;
    103         launch_exit_code = system("./search4j -m @java.min.version@ -l greenstone3.jar -h ./@java.extracted@");
     88        launch_exit_code = system("./search4j -m @java.min.version@ -l greenstone2.jar -h ./@java.extracted@");
    10489
    10590        //report how it went
     
    10792            cout << "Setup complete" << endl;
    10893        } else {
    109             cout << "Still could not find a suitible version of java" << endl;
    110             cout << "Please install java, set JAVA_HOME or JRE_HOME, and try again" << endl;
     94            cout << "The installer exited with an error" << endl;
     95            cout << "Greenstone may not be correctly installed" << endl;
    11196        }
    11297
     
    119104    cout << "Deleting the temp directory" << endl;
    120105    system( ("rm -rf " + tempdir).c_str() );
    121 
    122106
    123107    return 0;
Note: See TracChangeset for help on using the changeset viewer.