Changeset 15980 for release-kits/lirk2
- Timestamp:
- 2008-06-13T12:38:22+12:00 (16 years ago)
- Location:
- release-kits/lirk2
- Files:
-
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
release-kits/lirk2
- Property svn:externals
-
old new 1 1 lib http://svn.greenstone.org/release-kits/shared/lib 2 2 search4j http://svn.greenstone.org/release-kits/shared/search4j 3 linux http://svn.greenstone.org/release-kits/shared/linux 3 4
-
- Property svn:externals
-
release-kits/lirk2/ant-scripts/build.xml
r15956 r15980 15 15 <import file="compile.xml"/> 16 16 <import file="create-distribution.xml"/> 17 <!--18 17 <import file="create-installer.xml"/> 19 18 <import file="wrap.xml"/> 20 -->21 19 22 20 <target name="lirk2" depends="init"> 23 21 <addressedcall target="compile"/> 24 22 <addressedcall target="create-distribution"/> 25 <!--26 23 <addressedcall target="create-installer"/> 27 24 <addressedcall target="wrap"/> 28 -->29 25 </target> 30 26 -
release-kits/lirk2/ant-scripts/create-distribution.xml
r15957 r15980 15 15 <addressedcall target="export-gsdl-gli-indexers" /> 16 16 <addressedcall target="dist-set-version" /> 17 <addressedcall target="drop-in-binaries" /> 18 <addressedcall target="drop-in-demo-collection" /> 17 19 <addressedcall target="compile-gli" /> 18 20 <addressedcall target="create-gli-client-zip" /> … … 23 25 <if><bool><istrue value="${execute}"/></bool> 24 26 25 <mkdir dir="distribution "/>26 <delete dir="distribution /gsdl"/>27 <mkdir dir="distributions"/> 28 <delete dir="distributions/web"/> 27 29 <svn> 28 <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distribution /gsdl"/>30 <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distributions/web"/> 29 31 </svn> 30 32 31 33 <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"/> 33 35 </svn> 34 36 35 37 <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"/> 37 39 </svn> 38 40 … … 44 46 45 47 <echo level="info">Setting version in src/lib/gsdlconf.h</echo> 46 <rsr file="${basedir}/ gsdl/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) ".*"" replacement="$1 "${version}"" />48 <rsr file="${basedir}/distributions/web/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) ".*"" replacement="$1 "${version}"" /> 47 49 48 50 <echo level="info">Setting version in Install.sh</echo> 49 <rsr file="${basedir}/ gsdl/Install.sh" pattern="(echo "Version: ).*(" .*)" replacement="$1${version}$2" />51 <rsr file="${basedir}/distributions/web/Install.sh" pattern="(echo "Version: ).*(" .*)" replacement="$1${version}$2" /> 50 52 51 53 <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}" /> 53 55 54 56 </if> 55 57 </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 56 77 57 78 <target name="compile-gli"> … … 59 80 60 81 <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"/> 62 83 63 84 <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"/> 65 86 66 87 <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"/> 69 90 70 91 <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"> 72 93 <arg line="gli/GLIServer.jar bin/java" /> 73 94 </exec> … … 104 125 105 126 <echo level="info">Changing Install.sh to web release</echo> 106 <rsr file="${basedir}/distribution/gsdl/Install.sh" pattern="^(iscdrom=).*" replacement="$1"no"" /> 127 <rsr file="${basedir}/distributions/web/Install.sh" pattern="^(iscdrom=).*" replacement="$1"no"" /> 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> 107 140 108 141 </if> 109 142 </target> 110 143 111 112 113 114 115 144 </project> -
release-kits/lirk2/ant-scripts/create-installer.xml
r15304 r15980 9 9 --> 10 10 11 <project name="lirk 3-create-installer" default="create-installer">11 <project name="lirk2-create-installer" default="create-installer"> 12 12 13 13 <target name="create-installer"> 14 14 <addressedcall target="setup-for-installer-creation"/> 15 15 <addressedcall target="compile-installer"/> 16 <addressedcall target="clean-up-after-installer-creation"/>17 16 </target> 18 17 … … 20 19 <if><bool><istrue value="${execute}"/></bool> 21 20 22 <echo>Project Path: ${basedir}/distribution/g reenstone3</echo>21 <echo>Project Path: ${basedir}/distribution/gsdl</echo> 23 22 <mkdir dir="${basedir}/installer"/> 24 <copy todir="${basedir}/installer" file="${lirk 3.home}/installer/antinstall-config.xml"/>25 <copy todir="${basedir}/installer" file="${lirk 3.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> 27 26 28 27 <!-- put the concrete values of things in the config --> 29 28 <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}"/> 30 30 <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/> 31 31 <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${java.extracted}"/> 32 33 32 34 33 <!-- put the concrete values of things in the text --> … … 37 36 <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 38 37 <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 38 42 39 <!-- chinese --> 40 <!-- 43 41 <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/> 44 42 <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> … … 46 44 <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 47 45 <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 46 --> 47 48 48 49 49 </if> … … 53 53 <if><bool><istrue value="${execute}"/></bool> 54 54 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" 56 57 compress="true" 57 58 extractType="NonExtractor" 58 59 installConfig="${basedir}/installer/antinstall-config.xml" 59 60 buildFile="${basedir}/installer/build.xml" 60 antInstallLib="${lirk 3.home}/bin/ant-installer/lib"61 antLib="${lirk 3.home}/bin/ant-installer/antlib"61 antInstallLib="${lirk2.home}/bin/ant-installer/lib" 62 antLib="${lirk2.home}/bin/ant-installer/antlib" 62 63 validateConfig="true" 63 64 failOnError="false" 64 65 icons="bluecurve"> 65 66 66 <!-- copy all the important files into the archive to be extracted for install -->67 67 <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="**/*"/> 81 70 82 71 </installer> … … 85 74 <rsr file="${basedir}/installer/antinstall-config.xml" pattern=".*<!-- bundled java only -->" replacement=""/> 86 75 87 <installer file="${basedir}/installer/greenstone3.jar" 76 <!-- create the installer without java --> 77 <installer file="${basedir}/installer/gsdl-${version}-linux.jar" 88 78 compress="true" 89 79 extractType="NonExtractor" 90 80 installConfig="${basedir}/installer/antinstall-config.xml" 91 81 buildFile="${basedir}/installer/build.xml" 92 antInstallLib="${lirk 3.home}/bin/ant-installer/lib"93 antLib="${lirk 3.home}/bin/ant-installer/antlib"82 antInstallLib="${lirk2.home}/bin/ant-installer/lib" 83 antLib="${lirk2.home}/bin/ant-installer/antlib" 94 84 validateConfig="true" 85 failOnError="false" 95 86 icons="bluecurve"> 96 87 97 <!-- copy all the important files into the archive to be extracted for install -->98 88 <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="**/*"/> 100 91 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>111 92 </installer> 112 93 … … 114 95 </target> 115 96 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 124 97 </project> -
release-kits/lirk2/ant-scripts/init.xml
r15956 r15980 51 51 <!-- the version numbers of bundled things --> 52 52 <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"/>55 53 56 54 <!--<property name="java.installer" value="jre_6u5_linux_i586"/>--> -
release-kits/lirk2/ant-scripts/wrap.xml
r15205 r15980 9 9 --> 10 10 11 <project name="lirk 3-wrap" default="wrap">11 <project name="lirk2-wrap" default="wrap"> 12 12 13 13 <target name="wrap"> 14 14 <addressedcall target="setup-for-wrapping"/> 15 15 <addressedcall target="compile-wrapper"/> 16 <addressedcall target="clean-up-after-wrapping"/>17 16 </target> 18 17 … … 23 22 <!-- create and setup the build directory --> 24 23 <mkdir dir="${basedir}/wrapped-installer/build"/> 25 <copy todir="${basedir}/wrapped-installer/build" file="${lirk 3.home}/wrapper/mywrapper.c"/>24 <copy todir="${basedir}/wrapped-installer/build" file="${lirk2.home}/linux/wrapper.cpp"/> 26 25 27 26 <!-- copy bundled files --> 28 <copy todir="${basedir}/wrapped-installer/build" file="${lirk 3.home}/search4j/search4j"/>29 <copy todir="${basedir}/wrapped-installer/build" file="${lirk 3.home}/wrapper/${java.installer}"/>30 <copy to dir="${basedir}/wrapped-installer/build" file="${basedir}/installer/greenstone3.jar"/>31 <copy to dir="${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"/> 32 31 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}"/> 37 36 38 37 </if> … … 44 43 <echo level="info">create an object file (extension .o) for each file to bundle</echo> 45 44 <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build"> 46 <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone 3_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"/> 47 46 </exec> 48 47 <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build"> 49 <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone 3_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"/> 50 49 </exec> 51 50 <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build"> … … 56 55 </exec> 57 56 58 59 57 <!-- get size of greenstone.jar --> 60 <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone 3.jar.ls"><arg line="-l greenstone3.jar"/></exec>61 <exec executable="sed" inputstring="${greenstone 3.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> 62 60 63 61 <!-- get size of greenstone-with-java.jar --> 64 <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone 3-with-java.jar.ls"><arg line="-l greenstone3-with-java.jar"/></exec>65 <exec executable="sed" inputstring="${greenstone 3-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> 66 64 67 65 <!-- get size of search4j --> … … 73 71 <exec executable="sed" inputstring="${java.ls}" outputproperty="java.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec> 74 72 75 76 73 <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> 80 77 81 78 <echo level="info">compile the wrapper program</echo> 82 79 <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"/> 84 81 </exec> 85 82 86 83 <echo level="info">link, bundling the files to be bundled</echo> 87 84 <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"/> 89 86 </exec> 90 87 91 92 88 <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> 98 94 99 95 <echo level="info">recompile the wrapper program</echo> 100 96 <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"/> 102 98 </exec> 103 99 104 100 <echo level="info">relink, bundling the files to be bundled</echo> 105 101 <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"/> 107 103 </exec> 108 109 110 104 111 105 </if> 112 106 </target> 113 107 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 122 108 </project> -
release-kits/lirk2/installer/antinstall-config.xml
r15213 r15980 7 7 debug="false" 8 8 lookAndFeel="org.tp23.jgoodies.plaf.plastic.PlasticXPLookAndFeel" 9 name="Greenstone 3@version@ Installer"10 windowIcon="/resources/gs 3-small.png"9 name="Greenstone-@version@ Installer" 10 windowIcon="/resources/gs2-small.png" 11 11 defaultImageResource="/resources/makewavesdawn.png" 12 12 minJavaVersion="1.4"> … … 18 18 19 19 <!-- 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="" /> 21 21 22 22 <!-- install destination page --> … … 37 37 <target target="install-core-components" defaultValue="true" force="true" displayText="" /> 38 38 <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="" />41 39 <target target="install-source-code" defaultValue="false" displayText="" /> 42 40 43 41 </page> 44 42 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> 55 44 56 45 </installer> -
release-kits/lirk2/installer/build.xml
r15205 r15980 23 23 <target name="install-core-components" depends=""> 24 24 25 <!-- create the installation directory -->26 <echo message="Creating Installation directory"/>27 25 <echo>basedir: ${basedir}</echo> 28 26 <echo>installDir: ${installDir}</echo> 29 27 <echo>antinstaller.jar: ${antinstaller.jar}</echo> 28 29 <!-- create the installation directory --> 30 <echo message="Creating Installation directory"/> 30 31 <mkdir dir="${installDir}"/> 31 32 32 33 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 34 39 <echo message="Installing Executable Binaries (bin)"/> 35 40 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="bin/**/*"/></patternset></unzip> 36 41 <echo/> 37 42 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> 40 45 <echo/> 41 46 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> 44 49 <echo/> 45 50 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> 56 53 <echo/> 57 54 … … 60 57 <echo/> 61 58 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> 64 77 <echo/> 65 78 … … 67 80 <unzip src="${antinstaller.jar}" dest="${installDir}"> 68 81 <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"/> 76 100 </patternset> 77 101 </unzip> … … 79 103 80 104 <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"/> 88 109 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/> 89 110 <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>-->125 111 126 112 <!-- delete unneeded files --> … … 137 123 <echo message="Installing Source Code (src)"/> 138 124 <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> 144 126 </target> 145 127 … … 152 134 </target> 153 135 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 136 <target name="cleanuptarget"> 165 137 </target> -
release-kits/lirk2/wrapper/mywrapper.c
r15205 r15980 12 12 13 13 string tempdir = (string)argv[0] + ".tmp"; //temporary directory where we will store extracted files 14 string jarfile = tempdir + "/greenstone 3.jar"; //where we will store the jar file14 string jarfile = tempdir + "/greenstone2.jar"; //where we will store the jar file 15 15 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 16 17 bool succeeded = false; 17 18 18 19 //create the temp folder 19 cout << "Creating temp directory " << endl;20 cout << "Creating temp directory..." << endl; 20 21 succeeded = ( 0 == system( ("mkdir " + tempdir).c_str() ) ); 21 22 if ( !succeeded ) { … … 28 29 //extract files 29 30 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 31 41 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; 36 45 cout << "Exiting" << endl; 37 46 return 1; 38 47 } 39 48 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); 42 54 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; 47 57 cout << "Exiting" << endl; 48 58 return 1; 49 59 } 50 51 52 //change to the temp directory 53 chdir( tempdir.c_str() ); 54 60 #endif 55 61 56 62 //check if an appropriate java is found 57 63 bool jvmFound = (system( "./search4j -m @java.min.version@ -h ./@java.extracted@" ) == 0); 58 64 59 //if the jvm was not found, try to fix it and find it65 //if the jvm was not found, report not found 60 66 if ( !jvmFound ) { 67 61 68 //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; 63 70 64 71 //tell them if java is absent or just too old 65 72 if ( system( "./search4j -h ./@java.extracted@" ) == 0 ) { 66 cout << "You r javais too old." << endl;73 cout << "You have java, but it is too old." << endl; 67 74 } else { 68 75 cout << "Could not find java on your system." << endl; 69 76 } 70 71 //is this an installer with the bundled JRE?72 73 #ifdef java_is_bundled74 //yes, JRE is bundled75 /*76 cout77 << "This installer comes bundled with a suitible version of java: " << endl78 << " @java.installer@" << endl79 << "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 */83 77 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; 90 81 #endif 91 82 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 { 98 85 99 //if we have found it by now, launch the installer100 if ( jvmFound ) {101 86 cout << "Launching Installer ..." << endl; 102 87 int launch_exit_code = 0; 103 launch_exit_code = system("./search4j -m @java.min.version@ -l greenstone 3.jar -h ./@java.extracted@");88 launch_exit_code = system("./search4j -m @java.min.version@ -l greenstone2.jar -h ./@java.extracted@"); 104 89 105 90 //report how it went … … 107 92 cout << "Setup complete" << endl; 108 93 } 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; 111 96 } 112 97 … … 119 104 cout << "Deleting the temp directory" << endl; 120 105 system( ("rm -rf " + tempdir).c_str() ); 121 122 106 123 107 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.