Changeset 16684 for release-kits/lirk3/ant-scripts
- Timestamp:
- 2008-08-08T13:07:16+12:00 (16 years ago)
- Location:
- release-kits/lirk3/ant-scripts
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
release-kits/lirk3/ant-scripts/build.xml
r16243 r16684 1 1 <?xml version="1.0" encoding="utf-8" ?> 2 3 2 <!-- 4 3 .......................................................... … … 17 16 <property name="bundled.version.ant" value="1.6.5"/> 18 17 19 <!-- set current month and year-->20 <exec executable="date" outputproperty="current.month"><arg value="+%b"/></exec>21 <exec executable="date" outputproperty="current.year"><arg value="+%Y"/></exec>22 23 18 <!-- for the benefit of the shared scripts, set release-kit home --> 24 19 <property name="rk.home" value="${lirk3.home}" /> 20 <property name="rk.os" value="linux" /> 25 21 26 22 27 23 <!-- IMPORT OTHER ANT SCRIPTS --> 28 24 <import file="shared-ant-scripts/init.xml"/> 25 <import file="shared-ant-scripts/rk3-targets.xml"/> 29 26 <import file="compile.xml"/> 30 27 <import file="create-distribution.xml"/> … … 34 31 <!-- THE MAIN TARGET --> 35 32 <target name="lirk3" depends="init"> 36 <a ddressedcall target="compile"/>37 <a ddressedcall target="create-distribution"/>38 <a ddressedcall target="create-installer"/>39 <a ddressedcall target="wrap"/>33 <antcall target="compile"/> 34 <antcall target="create-distribution"/> 35 <antcall target="create-installer"/> 36 <antcall target="wrap"/> 40 37 </target> 41 38 39 <target name="a"> 40 <echo>some code in a</echo> 41 <antcall target="a-a"/> 42 <echo>some code in a</echo> 43 </target> 44 <target name="a-a"> 45 <echo>some code in a-a</echo> 46 </target> 47 <target name="b"> 48 <echo>some code in b</echo> 49 </target> 50 <target name="c"> 51 <echo>some code in c</echo> 52 </target> 53 54 42 55 </project> -
release-kits/lirk3/ant-scripts/compile.xml
r16622 r16684 1 1 <?xml version="1.0" encoding="utf-8" ?> 2 2 <project name="lirk3-compile" default="compile"> 3 4 3 5 4 <target name="compile"> 6 5 7 6 <!-- checkout --> 8 <a ddressedcall target="checkout-greenstone3" />7 <antcall target="checkout-greenstone3" /> 9 8 10 9 <!-- preparation --> 11 <a ddressedcall target="set-version-number-property" />12 <a ddressedcall target="dist-prepare-unix" />13 <a ddressedcall target="tweak-configure-scripts" />10 <antcall target="set-version-number-property" /> 11 <antcall target="dist-prepare-unix" /> 12 <antcall target="tweak-configure-scripts" /> 14 13 15 14 <!-- update --> 16 <a ddressedcall target="dist-update-unix" />15 <antcall target="dist-update-unix" /> 17 16 18 17 <!-- configure --> 19 <a ddressedcall target="dist-configure-unix" />20 <a ddressedcall target="tweak-makefiles" />18 <antcall target="dist-configure-unix" /> 19 <antcall target="tweak-makefiles" /> 21 20 22 21 <!-- build --> 23 <addressedcall target="dist-build-unix" /> 24 <addressedcall target="fix-wget" /> 25 <addressedcall target="linux-strip-execs" /> 22 <antcall target="dist-build-unix" /> 23 <antcall target="linux-strip-execs" /> 26 24 27 25 <!-- documentation --> 28 <a ddressedcall target="prepare-documentation" />26 <antcall target="prepare-documentation" /> 29 27 30 28 </target> 31 29 32 30 <target name="checkout-greenstone3"> 33 <if><bool><istrue value="${execute}"/></bool> 34 <svn> 35 <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/> 36 </svn> 37 </if> 31 <svn> 32 <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/> 33 </svn> 38 34 </target> 39 35 40 36 <target name="set-version-number-property"> 41 <if><bool><istrue value="${execute}"/></bool> 42 <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" /> 43 </if> 37 <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" /> 44 38 </target> 45 39 46 40 <target name="dist-prepare-unix"> 47 <if><bool><istrue value="${execute}"/></bool> 48 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-unix" inheritAll="false"/> 49 </if> 41 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-unix" inheritAll="false"/> 50 42 </target> 51 43 <target name="tweak-configure-scripts"> 52 <a ddressedcall target="mgpp-add-static" />53 <a ddressedcall target="mg-add-static" />54 <a ddressedcall target="gs2build-add-static" />44 <antcall target="mgpp-add-static" /> 45 <antcall target="mg-add-static" /> 46 <antcall target="gs2build-add-static" /> 55 47 </target> 56 48 57 49 <target name="dist-update-unix"> 58 <if><bool><istrue value="${execute}"/></bool> 59 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="update-unix" inheritAll="false"/> 60 </if> 50 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="update-unix" inheritAll="false"/> 61 51 </target> 62 52 63 53 <target name="dist-configure-unix"> 64 65 <if><bool><istrue value="${execute}"/></bool> 66 <exec dir="greenstone3/gs2build" executable="autoconf" output="greenstone3/gs2build/configure"> 67 <arg line="configure.in"/> 68 </exec> 69 <chmod file="greenstone3/gs2build/configure" perm="+x"/> 70 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="configure-unix" inheritAll="false"/> 71 </if> 72 54 <exec dir="greenstone3/gs2build" executable="autoconf" output="greenstone3/gs2build/configure"> 55 <arg line="configure.in"/> 56 </exec> 57 <chmod file="greenstone3/gs2build/configure" perm="+x"/> 58 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="configure-unix" inheritAll="false"/> 73 59 </target> 74 60 75 61 <target name="tweak-makefiles"> 76 <a ddressedcall target="wv-add-static" />77 <a ddressedcall target="xlhtml-add-static" />78 <a ddressedcall target="ppthtml-add-static" />79 <a ddressedcall target="rtftohtml-add-static" />80 <a ddressedcall target="gdbm-add-static" />62 <antcall target="wv-add-static" /> 63 <antcall target="xlhtml-add-static" /> 64 <antcall target="ppthtml-add-static" /> 65 <antcall target="rtftohtml-add-static" /> 66 <antcall target="gdbm-add-static" /> 81 67 </target> 82 68 83 69 <target name="dist-build-unix"> 84 <if><bool><istrue value="${execute}"/></bool> 85 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="build-unix" inheritAll="false"/> 86 </if> 87 </target> 88 89 <target name="fix-wget"> 90 <if><bool><istrue value="${execute}"/></bool> 91 <!-- fix this !!! --> 92 <delete file="greenstone3/gs2build/packages/wget/wget-1.9/src/wget"/> 93 </if> 70 <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="build-unix" inheritAll="false"/> 94 71 </target> 95 72 96 73 <target name="linux-strip-execs"> 97 <if><bool><istrue value="${execute}"/></bool> 98 <exec dir="greenstone3/gs2build/bin/linux" executable="find"> 99 <arg line="! -name . -exec strip {} ;"/> 100 </exec> 101 </if> 74 <exec dir="greenstone3/gs2build/bin/linux" executable="find"> 75 <arg line="! -name . -exec strip {} ;"/> 76 </exec> 102 77 </target> 103 78 104 79 <target name="prepare-documentation"> 105 <if><bool><istrue value="${execute}"/></bool> 106 <mkdir dir="greenstone3/gsdl-manuals"/> 107 <svn> 108 <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/> 109 <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/> 110 </svn> 111 <javac srcdir="greenstone3/gsdl-manuals/shared" 112 destdir="greenstone3/gsdl-manuals/shared" 113 debug="on"> 114 <include name="*.java"/> 115 </javac> 116 <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/> 80 <mkdir dir="greenstone3/gsdl-manuals"/> 81 <svn> 82 <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/> 83 <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/> 84 </svn> 85 <javac srcdir="greenstone3/gsdl-manuals/shared" 86 destdir="greenstone3/gsdl-manuals/shared" 87 debug="on"> 88 <include name="*.java"/> 89 </javac> 90 <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/> 117 91 118 119 120 121 122 123 124 92 <path id="documentation.compile.classpath"> 93 <fileset dir="greenstone3/gsdl-manuals"> 94 <include name="**/*.jar"/> 95 </fileset> 96 <pathelement path="greenstone3/gsdl-manuals/shared"/> 97 <pathelement path="greenstone3/gsdl-manuals/manuals"/> 98 </path> 125 99 126 127 128 129 130 100 <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml"> 101 <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" /> 102 <arg value="greenstone3/gli/help/en/help.xml" /> 103 <arg value="greenstone3" /> 104 </java> 131 105 132 <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/> 133 <echo>Run generate-pdf.sh</echo> 134 <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh"> 135 <arg line="generate-pdf.sh u en" /> 136 </exec> 137 </if> 106 <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/> 107 <echo>Run generate-pdf.sh</echo> 108 <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh"> 109 <arg line="generate-pdf.sh u en" /> 110 </exec> 138 111 </target> 139 112 … … 145 118 146 119 <target name="mgpp-add-static"> 147 <if><bool><istrue value="${execute}"/></bool> 148 <rsr file="greenstone3/gs2build/common-src/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" /> 149 <exec dir="greenstone3/gs2build/common-src/indexers/mgpp" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mgpp/configure"> 150 <arg line="configure.in"/> 151 </exec> 152 </if> 120 <rsr file="greenstone3/gs2build/common-src/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" /> 121 <exec dir="greenstone3/gs2build/common-src/indexers/mgpp" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mgpp/configure"> 122 <arg line="configure.in"/> 123 </exec> 153 124 </target> 125 154 126 <target name="mg-add-static"> 155 <if><bool><istrue value="${execute}"/></bool> 156 <rsr file="greenstone3/gs2build/common-src/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" /> 157 <exec dir="greenstone3/gs2build/common-src/indexers/mg" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mg/configure"> 158 <arg line="configure.in"/> 159 </exec> 160 </if> 127 <rsr file="greenstone3/gs2build/common-src/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" /> 128 <exec dir="greenstone3/gs2build/common-src/indexers/mg" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mg/configure"> 129 <arg line="configure.in"/> 130 </exec> 161 131 </target> 132 162 133 <target name="gs2build-add-static"> 163 <if><bool><istrue value="${execute}"/></bool> 164 <rsr file="greenstone3/gs2build/common-src/packages/configure" pattern="^ENVIRONMENT=""$" replacement="ENVIRONMENT="LDFLAGS=-static"" /> 165 <rsr file="greenstone3/gs2build/build-src/packages/configure" pattern="^ENVIRONMENT=""$" replacement="ENVIRONMENT="LDFLAGS=-static"" /> 166 <rsr file="greenstone3/gs2build/configure.in" pattern="^LDFLAGS=.*" replacement="LDFLAGS=-static" /> 167 </if> 134 <rsr file="greenstone3/gs2build/common-src/packages/configure" pattern="^ENVIRONMENT=""$" replacement="ENVIRONMENT="LDFLAGS=-static"" /> 135 <rsr file="greenstone3/gs2build/build-src/packages/configure" pattern="^ENVIRONMENT=""$" replacement="ENVIRONMENT="LDFLAGS=-static"" /> 136 <rsr file="greenstone3/gs2build/configure.in" pattern="^LDFLAGS=.*" replacement="LDFLAGS=-static" /> 168 137 </target> 169 138 170 139 <target name="wv-add-static"> 171 <if><bool><istrue value="${execute}"/></bool> 172 <rsr file="greenstone3/gs2build/build-src/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" /> 173 </if> 140 <rsr file="greenstone3/gs2build/build-src/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" /> 174 141 </target> 142 175 143 <target name="xlhtml-add-static"> 176 <if><bool><istrue value="${execute}"/></bool> 177 <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" /> 178 </if> 144 <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" /> 179 145 </target> 146 180 147 <target name="ppthtml-add-static"> 181 <if><bool><istrue value="${execute}"/></bool> 182 <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" /> 183 </if> 148 <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" /> 184 149 </target> 150 185 151 <target name="rtftohtml-add-static"> 186 <if><bool><istrue value="${execute}"/></bool> 187 <rsr file="greenstone3/gs2build/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml(.{2})EXEEXT(.{1})" replacement="-o rtftohtml$1EXEEXT$2 -static" /> 188 </if> 152 <rsr file="greenstone3/gs2build/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml(.{2})EXEEXT(.{1})" replacement="-o rtftohtml$1EXEEXT$2 -static" /> 189 153 </target> 154 190 155 <target name="gdbm-add-static"> 191 <if><bool><istrue value="${execute}"/></bool> 192 <rsr file="greenstone3/src/packages/javagdbm/jni/Makefile" pattern="^(GDBM_LIBS)\s*=\s*(.*)-lgdbm(.*)$" replacement="$1=$2/usr/lib/libgdbm.a$3" /> 193 </if> 156 <rsr file="greenstone3/src/packages/javagdbm/jni/Makefile" pattern="^(GDBM_LIBS)\s*=\s*(.*)-lgdbm(.*)$" replacement="$1=$2/usr/lib/libgdbm.a$3" /> 194 157 </target> 195 158 196 159 197 198 160 </project> -
release-kits/lirk3/ant-scripts/create-distribution.xml
r16269 r16684 2 2 <project name="lirk3-create-distribution" default="create-distribution"> 3 3 4 5 4 <target name="create-distribution"> 6 7 5 <!-- create distribution --> 8 <a ddressedcall target="export-greenstone3" />9 <a ddressedcall target="dist-set-version-number-property" />10 <a ddressedcall target="dist-set-gli-version" />11 <a ddressedcall target="create-distributions-1" />12 <a ddressedcall target="create-distributions-2" />13 <a ddressedcall target="create-distributions-3" />14 <a ddressedcall target="copy-over-build-xml" />15 <a ddressedcall target="insert-user-manual"/>16 <a ddressedcall target="insert-compiled-binaries"/>17 6 <antcall target="export-greenstone3" /> 7 <antcall target="dist-set-version-number-property" /> 8 <antcall target="dist-set-gli-version" /> 9 <antcall target="create-distributions-1" /> 10 <antcall target="create-distributions-2" /> 11 <antcall target="create-distributions-3" /> 12 <antcall target="copy-over-build-xml" /> 13 <antcall target="insert-user-manual"/> 14 <antcall target="insert-compiled-binaries"/> 15 <antcall target="rename-build-xml-for-transit"/> 18 16 </target> 19 17 20 18 <target name="export-greenstone3"> 21 <if><bool><istrue value="${execute}"/></bool> 22 <mkdir dir="distribution"/> 23 <delete dir="distribution/greenstone3"/> 24 <svn> 25 <export srcurl="${svn.root}/greenstone3/${branch.path}" destPath="distribution/greenstone3"/> 26 <export srcurl="${svn.root}/gli/${branch.path}" destPath="distribution/greenstone3/gli"/> 27 </svn> 28 </if> 19 <mkdir dir="distribution"/> 20 <delete dir="distribution/greenstone3"/> 21 <svn> 22 <export srcurl="${svn.root}/greenstone3/${branch.path}" destPath="distribution/greenstone3"/> 23 <export srcurl="${svn.root}/gli/${branch.path}" destPath="distribution/greenstone3/gli"/> 24 </svn> 29 25 </target> 30 26 31 27 <target name="dist-set-version-number-property"> 32 <if><bool><istrue value="${execute}"/></bool> 33 <rsr file="distribution/greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" /> 34 </if> 28 <rsr file="distribution/greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" /> 35 29 </target> 36 30 37 31 <target name="dist-set-gli-version"> 38 <if><bool><istrue value="${execute}"/></bool> 39 <ant antfile="${lirk3.home}/ant-scripts/shared-ant-scripts/operations-on-gli.xml" dir="${basedir}/distribution/greenstone3/gli" target="set-version-numbers"/> 40 </if> 32 <ant antfile="${lirk3.home}/ant-scripts/shared-ant-scripts/operations-on-gli.xml" dir="${basedir}/distribution/greenstone3/gli" target="set-version-numbers"/> 41 33 </target> 42 34 43 35 44 36 <target name="create-distributions-1"> 45 <if><bool><istrue value="${execute}"/></bool> 46 <ant antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-1" inheritAll="false"> 47 <property name="app.version" value="${version}"/> 48 <property name="branch.path" value="${branch.path}"/> 49 </ant> 50 </if> 37 <ant antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-1" inheritAll="false"> 38 <property name="app.version" value="${version}"/> 39 <property name="branch.path" value="${branch.path}"/> 40 </ant> 51 41 </target> 52 42 53 43 <target name="create-distributions-2"> 54 <if><bool><istrue value="${execute}"/></bool> 55 <ant antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-2" inheritAll="false"> 56 <property name="app.version" value="${version}"/> 57 <property name="branch.path" value="${branch.path}"/> 58 </ant> 59 </if> 44 <ant antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-2" inheritAll="false"> 45 <property name="app.version" value="${version}"/> 46 <property name="branch.path" value="${branch.path}"/> 47 </ant> 60 48 </target> 61 49 62 50 <target name="create-distributions-3"> 63 <if><bool><istrue value="${execute}"/></bool> 64 <ant antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-3" inheritall="false"> 65 <property name="app.version" value="${version}"/> 66 <property name="branch.path" value="${branch.path}"/> 67 </ant> 68 </if> 51 <ant antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" dir="distribution/greenstone3" target="create-distribution-3" inheritall="false"> 52 <property name="app.version" value="${version}"/> 53 <property name="branch.path" value="${branch.path}"/> 54 </ant> 69 55 </target> 70 56 71 57 <target name="copy-over-build-xml"> 72 <if><bool><istrue value="${execute}"/></bool> 73 <move file="distribution/greenstone3/modified-build.xml" tofile="distribution/greenstone3/build.xml"/> 74 </if> 58 <move file="distribution/greenstone3/modified-build.xml" tofile="distribution/greenstone3/build.xml"/> 75 59 </target> 76 60 77 61 <target name="insert-user-manual"> 78 <if><bool><istrue value="${execute}"/></bool> 79 <copy file="greenstone3/gsdl-manuals/manuals/build/en/pdf/User_en.pdf" tofile="distribution/greenstone3/docs/manual/gs2_user_en.pdf"/> 80 </if> 62 <copy file="greenstone3/gsdl-manuals/manuals/build/en/pdf/User_en.pdf" tofile="distribution/greenstone3/docs/manual/gs2_user_en.pdf"/> 81 63 </target> 82 64 83 65 <target name="insert-compiled-binaries"> 84 <if><bool><istrue value="${execute}"/></bool> 66 <delete dir="distribution/greenstone3/lib/jni"/> 67 <exec executable="cp"><arg line="-r greenstone3/lib/jni distribution/greenstone3/lib"/></exec> 85 68 86 <delete dir="distribution/greenstone3/lib/jni"/>87 <exec executable="cp"><arg line="-r greenstone3/lib/jni distribution/greenstone3/lib"/></exec>69 <delete dir="distribution/greenstone3/gs2build/bin/linux"/> 70 <exec executable="cp"><arg line="-r greenstone3/gs2build/bin/linux distribution/greenstone3/gs2build/bin"/></exec> 88 71 89 <delete dir="distribution/greenstone3/gs2build/bin/linux"/> 90 <exec executable="cp"><arg line="-r greenstone3/gs2build/bin/linux distribution/greenstone3/gs2build/bin"/></exec> 91 92 <delete dir="distribution/greenstone3/gs2build/bin/java"/> 93 <exec executable="cp"><arg line="-r greenstone3/gs2build/bin/java distribution/greenstone3/gs2build/bin"/></exec> 94 95 </if> 72 <delete dir="distribution/greenstone3/gs2build/bin/java"/> 73 <exec executable="cp"><arg line="-r greenstone3/gs2build/bin/java distribution/greenstone3/gs2build/bin"/></exec> 96 74 </target> 97 75 98 99 76 <target name="rename-build-xml-for-transit"> 77 <move file="distribution/greenstone3/build.xml" tofile="distribution/greenstone3/greenstone3-build.xml"/> 78 </target> 100 79 101 80 </project> -
release-kits/lirk3/ant-scripts/create-installer.xml
r16277 r16684 3 3 4 4 <target name="create-installer"> 5 <addressedcall target="setup-for-installer-creation"/> 6 <addressedcall target="compile-installer"/> 5 <antcall target="calculate-component-sizes"/> <!-- from rk3-targets --> 6 <antcall target="copy-installer-files"/> 7 <antcall target="make-installer-files-concrete"/> <!-- from rk3-targets --> 8 <antcall target="compile-installer"/> 7 9 </target> 8 10 9 <target name="setup-for-installer-creation"> 10 <if><bool><istrue value="${execute}"/></bool> 11 <target name="copy-installer-files"> 11 12 12 <!-- get the size of packages --> 13 <exec executable="du" dir="${basedir}/distribution/greenstone3/packages" outputproperty="du.tomcat"><arg line="-hs tomcat"/></exec> 14 <exec executable="sed" inputstring="${du.tomcat}" outputproperty="component.size.tomcat"><arg line="-e 's/^\(.*\)\s.*$/\1b/g'"/></exec> 13 <echo>Project Path: ${basedir}/distribution/greenstone3</echo> 15 14 16 <exec executable="du" dir="${basedir}/distribution/greenstone3/packages" outputproperty="du.ant"><arg line="-hs ant"/></exec> 17 <exec executable="sed" inputstring="${du.ant}" outputproperty="component.size.ant"><arg line="-e 's/^\(.*\)\s.*$/\1b/g'"/></exec> 15 <echo>Getting things ready to compile the installer</echo> 16 <mkdir dir="${basedir}/installer/resources"/> 17 <copy todir="${basedir}/installer" file="${lirk3.home}/installer/antinstall-config.xml" overwrite="true" /> 18 <copy todir="${basedir}/installer" file="${lirk3.home}/installer/build.xml" overwrite="true" /> 19 <copy todir="${basedir}/installer/classes" overwrite="true"> 20 <fileset dir="${lirk3.home}/greenstone3/installer-classes"/> 21 <fileset dir="${lirk3.home}/ant-scripts/tasks/orans" includes="RegexSearchReplace.class" /> 22 </copy> 18 23 19 <echo>Project Path: ${basedir}/distribution/greenstone3</echo> 24 <echo>component.size.core: ${component.size.core}</echo> 25 <echo>component.size.sourcecode: ${component.size.sourcecode}</echo> 26 <echo>component.size.tomcat: ${component.size.tomcat}</echo> 27 <echo>component.size.ant: ${component.size.ant}</echo> 20 28 21 <echo>Getting things ready to compile the installer</echo> 22 <mkdir dir="${basedir}/installer/resources"/> 23 <copy todir="${basedir}/installer" file="${lirk3.home}/installer/antinstall-config.xml" overwrite="true" /> 24 <copy todir="${basedir}/installer" file="${lirk3.home}/installer/build.xml" overwrite="true" /> 25 <copy todir="${basedir}/installer/classes" overwrite="true"> 26 <fileset dir="${lirk3.home}/greenstone3/installer-classes"/> 27 <fileset dir="${lirk3.home}/ant-scripts/tasks/orans" includes="RegexSearchReplace.class" /> 28 </copy> 29 <if> 30 <bool><equals arg1="windows" arg2="${rk.os}"/></bool> 31 <echo>component.size.windows-java: ${component.size.windows-java}</echo> 29 32 30 <!-- put the concrete values of things in the config --> 31 <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/> 32 <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.linux-java@" replacement="${component.size.linux-java}"/> 33 <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/> 34 <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.ant@" replacement="${component.size.ant}"/> 33 <else><if> 34 <bool><equals arg1="linux" arg2="${rk.os}"/></bool> 35 <echo>component.size.linux-java: ${component.size.linux-java}</echo> 36 </if> 35 37 36 <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/> 37 <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/> 38 39 40 <!-- put the concrete values of things in the text --> 41 42 <!-- default --> 43 <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/> 44 <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 45 <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/> 46 <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 47 <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 48 49 <!-- chinese --> 50 <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/> 51 <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/> 52 <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/> 53 <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/> 54 <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/> 38 </else> 55 39 56 40 </if> 41 57 42 </target> 58 43 59 44 <target name="compile-installer"> 60 <if><bool><istrue value="${execute}"/></bool> 45 <installer file="${basedir}/installer/greenstone3-with-java.jar" 46 compress="true" 47 extractType="NonExtractor" 48 installConfig="${basedir}/installer/antinstall-config.xml" 49 buildFile="${basedir}/installer/build.xml" 50 antInstallLib="${lirk3.home}/packages/ant-installer/lib" 51 antLib="${lirk3.home}/packages/ant/lib" 52 validateConfig="true" 53 failOnError="false" 54 icons="bluecurve"> 61 55 62 <installer file="${basedir}/installer/greenstone3-with-java.jar" 63 compress="true" 64 extractType="NonExtractor" 65 installConfig="${basedir}/installer/antinstall-config.xml" 66 buildFile="${basedir}/installer/build.xml" 67 antInstallLib="${lirk3.home}/packages/ant-installer/lib" 68 antLib="${lirk3.home}/packages/ant/lib" 69 validateConfig="true" 70 failOnError="false" 71 icons="bluecurve"> 56 <!-- copy all the important files into the archive to be extracted for install --> 57 <zipfileset dir="${basedir}/installer/classes" includes="**/*" /> <!-- installer classes --> 58 <zipfileset dir="${basedir}/distribution/greenstone3" includes="**/*"/> 72 59 73 <!-- copy all the important files into the archive to be extracted for install --> 74 <zipfileset dir="${basedir}/installer/classes" includes="**/*" /> <!-- installer classes --> 75 <zipfileset dir="${basedir}/distribution/greenstone3" includes="**/*"/> 60 </installer> 76 61 77 </installer> 62 <!-- delete the 'bundled java only' lines from the installer config --> 63 <rsr file="${basedir}/installer/antinstall-config.xml" pattern=".*<!-- bundled java only -->" replacement=""/> 78 64 79 <!-- delete the 'bundled java only' lines from the installer config --> 80 <rsr file="${basedir}/installer/antinstall-config.xml" pattern=".*<!-- bundled java only -->" replacement=""/> 65 <installer file="${basedir}/installer/greenstone3.jar" 66 compress="true" 67 extractType="NonExtractor" 68 installConfig="${basedir}/installer/antinstall-config.xml" 69 buildFile="${basedir}/installer/build.xml" 70 antInstallLib="${lirk3.home}/packages/ant-installer/lib" 71 antLib="${lirk3.home}/packages/ant/lib" 72 validateConfig="true" 73 icons="bluecurve"> 81 74 82 <installer file="${basedir}/installer/greenstone3.jar" 83 compress="true" 84 extractType="NonExtractor" 85 installConfig="${basedir}/installer/antinstall-config.xml" 86 buildFile="${basedir}/installer/build.xml" 87 antInstallLib="${lirk3.home}/packages/ant-installer/lib" 88 antLib="${lirk3.home}/packages/ant/lib" 89 validateConfig="true" 90 icons="bluecurve"> 91 92 <zipfileset dir="${basedir}/installer/classes" includes="**/*"/> 93 <zipfileset dir="${basedir}/distribution/greenstone3" includes="**/*"/> 94 </installer> 95 </if> 75 <zipfileset dir="${basedir}/installer/classes" includes="**/*"/> 76 <zipfileset dir="${basedir}/distribution/greenstone3" includes="**/*"/> 77 </installer> 96 78 </target> 97 79 -
release-kits/lirk3/ant-scripts/operations-on-gs3home.xml
r16622 r16684 340 340 341 341 </project> 342 343 -
release-kits/lirk3/ant-scripts/wrap.xml
r16243 r16684 3 3 4 4 <target name="wrap"> 5 <a ddressedcall target="setup-for-wrapping"/>6 <a ddressedcall target="compile-wrapper"/>5 <antcall target="setup-for-wrapping"/> 6 <antcall target="compile-wrapper"/> 7 7 </target> 8 8 9 9 <target name="setup-for-wrapping"> 10 <if><bool><istrue value="${execute}"/></bool>11 10 12 13 14 15 16 11 <!-- create and setup the build directory --> 12 <mkdir dir="${basedir}/wrapped-installer/build"/> 13 <copy todir="${basedir}/wrapped-installer/build" file="${lirk3.home}/linux/wrapper.cpp" overwrite="true" /> 14 <copy todir="${basedir}/wrapped-installer/build" file="${lirk3.home}/packages/search4j/libsearch4j.cpp" overwrite="true" /> 15 <copy todir="${basedir}/wrapped-installer/build" file="${lirk3.home}/packages/search4j/libsearch4j.h" overwrite="true" /> 17 16 18 19 20 21 17 <!-- copy bundled files --> 18 <copy todir="${basedir}/wrapped-installer/build" file="${lirk3.home}/linux/${linux-java.installer}"/> 19 <copy todir="${basedir}/wrapped-installer/build" file="${basedir}/installer/greenstone3.jar"/> 20 <copy todir="${basedir}/wrapped-installer/build" file="${basedir}/installer/greenstone3-with-java.jar"/> 22 21 23 24 25 26 27 22 <!-- substitute the real java installer filename and min version into various files --> 23 <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.installer@" replacement="${linux-java.installer}"/> 24 <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@installer.name@" replacement="greenstone3"/> 25 <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.extracted@" replacement="${linux-java.extracted}"/> 26 <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.min.version@" replacement="${java.min.version}"/> 28 27 29 </if>30 28 </target> 31 29 32 30 <target name="compile-wrapper"> 33 <if><bool><istrue value="${execute}"/></bool> 34 35 <echo level="info">create an object file (extension .o) for each file to bundle</echo> 36 <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build"> 37 <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone3_jar_start=greenstone3jar --readonly-text greenstone3.jar greenstone3.jar.o"/> 38 </exec> 39 <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build"> 40 <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"/> 41 </exec> 42 <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build"> 43 <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_${linux-java.installer}_start=java --readonly-text ${linux-java.installer} java.o"/> 44 </exec> 31 <echo level="info">create an object file (extension .o) for each file to bundle</echo> 32 <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build"> 33 <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone3_jar_start=greenstone3jar --readonly-text greenstone3.jar greenstone3.jar.o"/> 34 </exec> 35 <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build"> 36 <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"/> 37 </exec> 38 <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer/build"> 39 <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_${linux-java.installer}_start=java --readonly-text ${linux-java.installer} java.o"/> 40 </exec> 45 41 46 42 47 48 49 43 <!-- get size of greenstone.jar --> 44 <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone3.jar.ls"><arg line="-l greenstone3.jar"/></exec> 45 <exec executable="sed" inputstring="${greenstone3.jar.ls}" outputproperty="greenstone3.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec> 50 46 51 52 53 47 <!-- get size of greenstone-with-java.jar --> 48 <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="greenstone3-with-java.jar.ls"><arg line="-l greenstone3-with-java.jar"/></exec> 49 <exec executable="sed" inputstring="${greenstone3-with-java.jar.ls}" outputproperty="greenstone3-with-java.jar.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec> 54 50 55 56 57 51 <!-- get size of java --> 52 <exec executable="ls" dir="${basedir}/wrapped-installer/build" outputproperty="java.ls"><arg line="-l ${linux-java.installer}"/></exec> 53 <exec executable="sed" inputstring="${java.ls}" outputproperty="java.size"><arg line="-e 's/^[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *[^\ ]*\ *\([0-9]*\).*$/\1/g'"/></exec> 58 54 59 55 60 61 62 56 <echo level="info">creating the header file for no java version</echo> 57 <delete file="wrapper.h"/> 58 <exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h"><arg line="extern const char greenstone3jar[${greenstone3.jar.size}];"/></exec> 63 59 64 65 66 67 60 <echo level="info">compile the wrapper program</echo> 61 <exec executable="g++" dir="${basedir}/wrapped-installer/build"> 62 <arg line="-Wall -static -static-libgcc -c -o wrapper.o wrapper.cpp"/> 63 </exec> 68 64 69 70 71 72 65 <echo level="info">compile libsearch4j</echo> 66 <exec executable="g++" dir="${basedir}/wrapped-installer/build"> 67 <arg line="-Wall -static -static-libgcc -c -o libsearch4j.o libsearch4j.cpp"/> 68 </exec> 73 69 74 75 76 77 70 <echo level="info">link, bundling the files to be bundled</echo> 71 <exec executable="g++" dir="${basedir}/wrapped-installer/build"> 72 <arg line="-static -static-libgcc -o ../greenstone-${version}-linux.bin wrapper.o libsearch4j.o greenstone3.jar.o"/> 73 </exec> 78 74 79 75 80 81 82 83 84 76 <echo level="info">creating the header file for bundled java version</echo> 77 <delete file="wrapper.h"/> 78 <exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h"><arg line="extern const char greenstone3jar[${greenstone3-with-java.jar.size}];"/></exec> 79 <exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="extern const char java[${java.size}];"/></exec> 80 <exec executable="echo" output="${basedir}/wrapped-installer/build/wrapper.h" append="true"><arg line="#define java_is_bundled yes"/></exec> 85 81 86 87 88 89 82 <echo level="info">recompile the wrapper program</echo> 83 <exec executable="g++" dir="${basedir}/wrapped-installer/build"> 84 <arg line="-Wall -static -static-libgcc -c -o wrapper.o wrapper.cpp"/> 85 </exec> 90 86 91 92 93 94 87 <echo level="info">relink, bundling the files to be bundled</echo> 88 <exec executable="g++" dir="${basedir}/wrapped-installer/build"> 89 <arg line="-static -static-libgcc -o ../greenstone-${version}-linux-with-java.bin wrapper.o libsearch4j.o greenstone3-with-java.jar.o java.o"/> 90 </exec> 95 91 96 </if>97 92 </target> 98 93
Note:
See TracChangeset
for help on using the changeset viewer.