Changeset 21311 for main/trunk/release-kits/rk2
- Timestamp:
- 2009-12-09T15:28:16+13:00 (13 years ago)
- Location:
- main/trunk/release-kits/rk2/ant-scripts
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/release-kits/rk2/ant-scripts/build.xml
r20721 r21311 28 28 <import file="create-cdrom-components.xml"/> 29 29 30 <import file="components.xml"/> 31 30 32 <!-- THE MAIN TARGET --> 31 33 <target name="rk2" depends="init,gs2-init"> … … 43 45 <echo/> 44 46 <echo>Optional Properties:</echo> 45 <echo>branch.path the branch of Greenstone 3to make a release of. Eg: tags/2.81. Default: trunk.</echo>46 <echo>branch.revision the revision of Greenstone 3to make a release of. Eg: 18273. Default: HEAD.</echo>47 <echo>branch.path the branch of Greenstone to make a release of. Eg: tags/2.81. Default: trunk.</echo> 48 <echo>branch.revision the revision of Greenstone to make a release of. Eg: 18273. Default: HEAD.</echo> 47 49 <echo/> 48 50 </target> -
main/trunk/release-kits/rk2/ant-scripts/compile.xml
r21202 r21311 195 195 <target name="compile-c-code"> 196 196 <copy file="${wirk2.home}/resources/compile.bat" todir="${basedir}/compiled" overwrite="true"/> 197 <exec dir="${basedir}/compiled" executable="${basedir}/compiled/compile.bat" /> 197 <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="clean"/></exec> 198 <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="APACHE_HTTPD=1"/></exec> 199 <exec dir="${basedir}/compiled" executable="nmake"><arg value="/f"/><arg value="win32.mak"/><arg value="LOCAL_LIBRARY=1"/></exec> 198 200 <mkdir dir="products"/> 199 201 <copy file="${basedir}/compiled/server.exe" tofile="${basedir}/products/server-${version}.exe"/> -
main/trunk/release-kits/rk2/ant-scripts/create-cdrom-components.xml
r20721 r21311 2 2 <project name="rk2-create-cdrom-components" default="create-cdrom-components"> 3 3 4 <!-- 5 cd components 6 produce components for cdrom distributions, to be picked up and used by cdrk2 release kit 7 split components into linux only files (linux) and general files (all) 8 --> 9 4 10 <target name="create-cdrom-components"> 11 <antcall target="compile-cdrom-installer"/> <!-- from init --> 12 <antcall target="prepare-cdrom-components"/> 13 <antcall target="compile-cdrom-wrapper"/> 14 <antcall target="create-cdrom-components-archive"/> 15 </target> 16 17 <target name="prepare-cdrom-components"> 18 19 <!-- clean up --> 20 <delete dir="cdrom"/> 21 22 <!-- setup directory structure --> 23 <mkdir dir="cdrom/build"/> 24 <mkdir dir="cdrom/dist/Software"/> 25 <mkdir dir="cdrom/dist/Java/Jars"/> 26 27 <!-- create core component --> 28 <mkdir dir="cdrom/dist/Software/core/all"/> 29 <mkdir dir="cdrom/dist/Software/core/${rk.os}"/> 30 31 32 <!-- core linux --> 33 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool> 34 <copy todir="cdrom/dist/Software/core/all" overwrite="true"> 35 <fileset dir="components/tmp/core"/> 36 </copy> 37 <move todir="cdrom/dist/Software/core/linux" overwrite="true"> 38 <fileset dir="cdrom/dist/Software/core/all"> 39 <include name="bin/linux"/> 40 <include name="bin/linux/**/*"/> 41 <include name="bin/windows"/> 42 <include name="bin/windows/**/*"/> 43 <include name="cgi-bin/library.cgi"/> 44 <include name="cgi-bin/oaiserver.cgi"/> 45 <include name="apache-httpd/**/*"/> 46 <include name="*.sh"/> 47 <include name="*.csh"/> 48 <include name="*.bash"/> 49 </fileset> 50 </move> 51 <!-- delete the apache manual to save space --> 52 <delete dir="cdrom/dist/Software/core/linux/apache-httpd/linux/manual"/> 53 54 <!-- core windows --> 55 <else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 56 <copy todir="cdrom/dist/Software/core/windows" overwrite="true"> 57 <fileset dir="components/tmp/core"> 58 <include name="bin/windows"/> 59 <include name="server.exe"/> 60 <include name="bin/windows/**/*"/> 61 <include name="cgi-bin/library.cgi"/> 62 <include name="cgi-bin/oaiserver.cgi"/> 63 <include name="*.bat"/> 64 <include name="gli/*.bat"/> 65 </fileset> 66 </copy> 67 68 <!-- core mac --> 69 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 70 <copy todir="cdrom/dist/Software/core/mac" overwrite="true"> 71 <fileset dir="components/tmp/core"> 72 <include name="bin/darwin"/> 73 <include name="bin/darwin/**/*"/> 74 <include name="bin/windows"/> 75 <include name="bin/windows/**/*"/> 76 <include name="cgi-bin/library.cgi"/> 77 <include name="cgi-bin/oaiserver.cgi"/> 78 <include name="apache-httpd"/> 79 <include name="apache-httpd/**/*"/> 80 <include name="*.sh"/> 81 <include name="*.csh"/> 82 <include name="*.bash"/> 83 </fileset> 84 </copy> 85 <!-- delete the httpd manual to save space --> 86 <delete dir="cdrom/dist/Software/core/mac/apache-httpd/darwin/manual"/> 87 88 </if></else></if></else></if> 89 90 <!-- imagemagick --> 91 <mkdir dir="cdrom/dist/Software/imagemagick/${rk.os}"/> 92 <copy todir="cdrom/dist/Software/imagemagick/${rk.os}" overwrite="true"> 93 <fileset dir="components/tmp/imagemagick"/> 94 </copy> 95 96 <!-- ghostscript: windows and mac only --> 97 <if><bool><or><equals arg1="${rk.os}" arg2="windows"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 98 <mkdir dir="cdrom/dist/Software/ghostscript/${rk.os}"/> 99 <copy todir="cdrom/dist/Software/ghostscript/${rk.os}" overwrite="true"> 100 <fileset dir="components/tmp/ghostscript"/> 101 </copy> 102 </if> 103 104 <!-- jre linux --> 105 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool> 106 <mkdir dir="cdrom/dist/Java/Linux"/> 107 <exec executable="cp"> 108 <arg value="${rk2.home}/linux/jre_bin"/> 109 <arg value="cdrom/dist/Java/Linux"/> 110 </exec> 111 <!-- 112 don't extract to save space 113 <exec dir="cdrom/dist/Java/Linux" executable="${rk2.home}/linux/jre_bin"/> 114 <exec dir="cdrom/dist/Java/Linux" executable="tar"><arg value="-xf"/><arg value="jre.tar"/></exec> 115 <delete file="cdrom/dist/Java/Linux/jre.tar"/> 116 --> 117 <!-- jre windows --> 118 <else><if><bool><or><equals arg1="${rk.os}" arg2="windows"/></or></bool> 119 <mkdir dir="cdrom/dist/Java/Windows"/> 120 <exec dir="cdrom/dist/Java/Windows" executable="${rk2.home}/windows/wrapper/jre.exe"/> 121 122 </if></else></if> 123 124 <!-- jar installer: windows and linux only --> 125 <if><bool><or><equals arg1="${rk.os}" arg2="windows"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 126 <copy file="installer/cdrom.jar" tofile="cdrom/dist/Java/Jars/${rk.os}.jar"/> 127 </if> 128 129 </target> 130 131 <target name="compile-cdrom-wrapper"> 132 5 133 <!-- windows --> 6 134 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 135 <antcall target="get-copy-of-wrapper-source"><param name="todir" value="cdrom/build"/></antcall> 136 <exec executable="rc" dir="cdrom/build"> 137 <arg line="wrapper.rc"/> 138 </exec> 139 <exec executable="cl" dir="cdrom/build"> 140 <arg line="/c -GX -DCDROM wrapper.cpp"/> 141 </exec> 142 <exec executable="link" dir="cdrom/build"> 143 <arg line="/OUT:../dist/Greenstone-${version}-windows.exe gdi32.lib advapi32.lib shell32.lib user32.lib wrapper.obj wrapper.RES"/> 144 </exec> 7 145 8 146 <!-- linux --> 9 147 <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool> 148 <copy file="${rk.home}/linux/wrapper.cpp" todir="cdrom/build" overwrite="true"/> 149 150 <echo level="info">compile the cdrom wrapper</echo> 151 <exec executable="g++" dir="cdrom/build"> 152 <arg line="-Wall -static -static-libgcc -c -DCDROM -o wrapper.o wrapper.cpp"/> 153 </exec> 154 155 <echo level="info">link the compiled code</echo> 156 <exec executable="g++" dir="cdrom/build"> 157 <arg line="-static -static-libgcc -o ../dist/Greenstone-${version}-linux wrapper.o"/> 158 </exec> 10 159 11 160 <!-- mac --> 12 161 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 13 162 163 <mkdir dir="wrapped-installer/cdrom"/> 164 <!-- create app for cdrom installer --> 165 <copy todir="cdrom/dist/Greenstone-${version}-MacOS.app"><fileset dir="${rk2.home}/mac/Wrapper.app"/></copy> 166 <copy todir="cdrom/dist/Greenstone-${version}-MacOS.app/Contents/Resources" file="${rk2.home}/greenstone2/icon/icon.icns"/> 167 <chmod file="cdrom/dist/Greenstone-${version}-MacOS.app/Contents/MacOS/JavaApplicationStub" perm="+x"/> 168 169 <!-- copy bundled files --> 170 <copy todir="cdrom/dist/Greenstone-${version}-MacOS.app/Contents/Resources/Java" file="${basedir}/installer/cdrom.jar"/> 171 172 <!-- substitute in real values --> 173 <rsr file="cdrom/dist/Greenstone-${version}-MacOS.app/Contents/Info.plist" pattern="@jar@" replacement="cdrom.jar"/> 174 <rsr file="cdrom/dist/Greenstone-${version}-MacOS.app/Contents/Info.plist" pattern="@version@" replacement="${version}"/> 175 14 176 </if></else></if></else></if> 15 177 … … 17 179 18 180 181 182 <target name="create-cdrom-components-archive"> 183 <mkdir dir="products"/> 184 <!-- windows --> 185 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 186 <tar destfile="products/cdrom-components-${version}-windows.tar.gz" compression="gzip"> 187 <tarfileset dir="cdrom/dist"><include name="**/*"/></tarfileset> 188 </tar> 189 190 <!-- linux and mac --> 191 <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 192 <exec dir="cdrom/dist" executable="bash"> 193 <arg value="-c"/> 194 <arg value="tar -czf ../../products/cdrom-components-${version}-linux.tar.gz *"/> 195 </exec> 196 </if></else></if> 197 </target> 198 199 19 200 </project> -
main/trunk/release-kits/rk2/ant-scripts/create-components.xml
r20721 r21311 3 3 4 4 <target name="create-components"> 5 <!-- windows -->6 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>7 5 8 < !-- linux -->9 < else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>6 <antcall target="prepare-component"><param name="component" value="core"/></antcall> 7 <antcall target="compress-component"><param name="component" value="core"/></antcall> 10 8 11 < !-- mac -->12 < else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>9 <antcall target="prepare-component"><param name="component" value="imagemagick"/></antcall> 10 <antcall target="compress-component"><param name="component" value="imagemagick"/></antcall> 13 11 14 </if></else></if></else></if> 12 <!-- windows and mac only --> 13 <if><bool><or><equals arg1="${rk.os}" arg2="windows"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 14 <antcall target="prepare-component"><param name="component" value="ghostscript"/></antcall> 15 <antcall target="compress-component"><param name="component" value="ghostscript"/></antcall> 16 </if> 15 17 16 18 </target> -
main/trunk/release-kits/rk2/ant-scripts/create-distribution.xml
r20721 r21311 11 11 <!-- windows --> 12 12 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 13 14 <antcall target="copy-server"/> 15 <antcall target="remove-unneeded-files" /> 16 17 <antcall target="create-needed-empty-files"><param name="gsdl.basedir" value="distributions/web"/></antcall> 18 <antcall target="create-binary-zip-windows"/> 13 <antcall target="copy-server"/> 14 <antcall target="remove-unneeded-files" /> 15 <antcall target="create-needed-empty-files"><param name="gsdl.basedir" value="distributions/web"/></antcall> 16 <antcall target="create-binary-zip-windows"/> 19 17 20 18 <!-- linux --> 21 19 <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool> 22 23 <antcall target="insert-export-to-cd-package"><param name="gsdl.basedir" value="distributions/web"/></antcall> <!-- from rk2-targets --> 24 <antcall target="export-imagemagick-linux-binaries"/> 25 <antcall target="export-wvware-linux-binaries"/> 26 <antcall target="remove-unneeded-files" /> 27 <antcall target="create-needed-empty-files"><param name="gsdl.basedir" value="distributions/web"/></antcall> 20 <antcall target="insert-export-to-cd-package"><param name="gsdl.basedir" value="distributions/web"/></antcall> <!-- from rk2-targets --> 21 <antcall target="export-imagemagick-linux-binaries"/> 22 <antcall target="export-wvware-linux-binaries"/> 23 <antcall target="remove-unneeded-files" /> 24 <antcall target="create-needed-empty-files"><param name="gsdl.basedir" value="distributions/web"/></antcall> 28 25 29 26 <!-- mac --> 30 27 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 31 <antcall target="insert-export-to-cd-package"><param name="gsdl.basedir" value="distributions/web"/></antcall> <!-- from rk2-targets --> 32 33 <antcall target="export-imagemagick-darwin-binaries" /> 34 <antcall target="export-ghostscript-darwin-binaries" /> 35 <antcall target="remove-unneeded-files"/> 36 <antcall target="create-needed-empty-files"><param name="gsdl.basedir" value="distributions/web"/></antcall> 28 <antcall target="insert-export-to-cd-package"><param name="gsdl.basedir" value="distributions/web"/></antcall> <!-- from rk2-targets --> 29 <antcall target="export-imagemagick-darwin-binaries" /> 30 <antcall target="export-ghostscript-darwin-binaries" /> 31 <antcall target="remove-unneeded-files"/> 32 <antcall target="create-needed-empty-files"><param name="gsdl.basedir" value="distributions/web"/></antcall> 37 33 38 34 </if></else></if></else></if> -
main/trunk/release-kits/rk2/ant-scripts/create-installer.xml
r20721 r21311 3 3 4 4 <target name="create-installer"> 5 <antcall target="copy-installer-files"/> 6 <antcall target="make-installer-files-concrete"/> 7 <antcall target="compile-binary-installer"/> 8 </target> 9 10 <target name="copy-installer-files" depends="copy-main-installer-files,copy-greenstone2-installer-files"> 11 12 <copy todir="installer/classes" overwrite="true" file="distributions/web/LICENSE.txt"/> 13 <unjar src="${rk2.home}/core/ant-tasks/greenstone/anttasks.jar" dest="installer/classes"/> 14 <unjar src="${rk2.home}/core/lib/crypt.jar" dest="installer/classes"/> 15 5 16 <!-- windows --> 6 17 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 18 <fileset dir="${rk2.home}/windows/7za" includes="7za.exe"/> 19 <!-- linux and mac --> 20 <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool> 21 <unjar src="${rk2.home}/core/ant-tasks/7z-ant/7z.jar" dest="installer/classes"/> 22 </if></else></if> 7 23 8 <!-- linux --> 9 <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool> 10 11 <!-- mac --> 12 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 13 14 </if></else></if></else></if> 15 24 <delete dir="installer/classes/META-INF"/> 16 25 </target> 17 26 -
main/trunk/release-kits/rk2/ant-scripts/wrap.xml
r20721 r21311 3 3 4 4 <target name="wrap"> 5 6 <mkdir dir="products"/> 7 5 8 <!-- windows --> 6 9 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool> 7 10 11 <!--create a directory to build the wrapped installer in --> 12 <mkdir dir="${basedir}/wrapped-installer"/> 13 14 <!-- copy wrapper source into place --> 15 <antcall target="get-copy-of-wrapper-source"><param name="todir" value="wrapped-installer"/></antcall> 16 17 <!-- tweak files for wrapping --> 18 <rsr file="${basedir}/wrapped-installer/wrapper.cpp"> 19 <job pattern="@java.installer@" replacement="${windows-java.installer}"/> 20 <job pattern="@java.min.version@" replacement="${java.min.version}"/> 21 <job pattern="@bundled.version.java@" replacement="${bundled.version.windows-java}"/> 22 <job pattern="@java.extracted@" replacement="${java.extracted}"/> 23 </rsr> 24 25 <!-- split the resources into chunks, creating a resource script of the chunks --> 26 <copy todir="${basedir}/wrapped-installer" file="${rk2.home}/windows/wrapper/wrapper.rc" overwrite="true"/> 27 <rsplit 28 resource="${rk2.home}/windows/wrapper/${windows-java.installer}" 29 outputDir="${basedir}/wrapped-installer" 30 resourceScript="${basedir}/wrapped-installer/wrapper.rc" 31 resourceName="JAVA" 32 resourceType="EXE" 33 chunkSize="${resources.chunksize}"/> 34 <rsplit 35 resource="${basedir}/installer/Greenstone-${version}-${os.suffix}.jar" 36 outputDir="${basedir}/wrapped-installer" 37 resourceScript="${basedir}/wrapped-installer/wrapper.rc" 38 resourceName="JAR" 39 resourceType="JAR" 40 chunkSize="${resources.chunksize}" 41 /> 42 43 <!-- compile the resources --> 44 <exec executable="rc" dir="${basedir}/wrapped-installer"> 45 <arg line="wrapper.rc"/> 46 </exec> 47 48 <!-- compile the wrapper --> 49 <exec executable="cl" dir="${basedir}/wrapped-installer"> 50 <arg line="/c -GX /DWINDOWS=yes libsearch4j.cpp /out:libsearch4j.obj"/> 51 </exec> 52 53 <exec executable="cl" dir="${basedir}/wrapped-installer"> 54 <arg line="/c -GX /DWINDOWS=yes wrapper.cpp /out:wrapper.obj"/> 55 </exec> 56 57 <!-- link the wrapper --> 58 <exec executable="link" dir="${basedir}/wrapped-installer"> 59 <arg line="/OUT:..\products\Greenstone-${version}-${os.suffix}.exe gdi32.lib advapi32.lib shell32.lib user32.lib libsearch4j.obj wrapper.obj wrapper.res"/> 60 </exec> 61 8 62 <!-- linux --> 9 63 <else><if><bool><equals arg1="${rk.os}" arg2="linux"/></bool> 64 <!-- create and setup the build directory --> 65 <mkdir dir="${basedir}/wrapped-installer"/> 66 <copy todir="${basedir}/wrapped-installer" file="${rk2.home}/linux/wrapper.cpp"/> 67 <copy todir="${basedir}/wrapped-installer" file="${rk2.home}/core/search4j/libsearch4j.cpp"/> 68 <copy todir="${basedir}/wrapped-installer" file="${rk2.home}/core/search4j/libsearch4j.h"/> 69 70 <!-- copy bundled files --> 71 <copy todir="${basedir}/wrapped-installer" file="${rk2.home}/linux/${linux-java.installer}"/> 72 <copy tofile="${basedir}/wrapped-installer/greenstone2.jar" file="${basedir}/installer/Greenstone-${version}-linux.jar"/> 73 74 <!-- substitute in real values --> 75 <rsr file="${basedir}/wrapped-installer/wrapper.cpp"> 76 <job pattern="@java.installer@" replacement="${linux-java.installer}"/> 77 <job pattern="@installer.name@" replacement="greenstone2"/> 78 <job pattern="@java.extracted@" replacement="${java.extracted}"/> 79 <job pattern="@java.min.version@" replacement="${java.min.version}"/> 80 </rsr> 81 82 <!-- create an object file (extension .o) for each file to bundle --> 83 <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer"> 84 <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_greenstone2_jar_start=greenstone2jar --readonly-text greenstone2.jar greenstone2.jar.o"/> 85 </exec> 86 <exec executable="/usr/bin/objcopy" dir="${basedir}/wrapped-installer"> 87 <arg line="-I binary -O elf32-i386 -B i386 --redefine-sym _binary_${linux-java.installer}_start=java --readonly-text ${linux-java.installer} java.o"/> 88 </exec> 89 90 <!-- compile libsearch4j --> 91 <exec executable="g++" dir="wrapped-installer"> 92 <arg line="-Wall -static -static-libgcc -c -o libsearch4j.o libsearch4j.cpp"/> 93 </exec> 94 95 <!-- creating wrapper header file --> 96 <delete file="wrapper.h"/> 97 <exec executable="echo" output="${basedir}/wrapped-installer/wrapper.h"><arg line="extern const char greenstone2jar[${greenstone2.jar.size}];"/></exec> 98 <exec executable="echo" output="${basedir}/wrapped-installer/wrapper.h" append="true"><arg line="extern const char java[${java.size}];"/></exec> 99 <exec executable="echo" output="${basedir}/wrapped-installer/wrapper.h" append="true"><arg line="#define java_is_bundled yes"/></exec> 100 101 <!-- compile the wrapper program --> 102 <exec executable="g++" dir="wrapped-installer"> 103 <arg line="-Wall -static -static-libgcc -c -o wrapper.o wrapper.cpp"/> 104 </exec> 105 106 <!-- link the compiled code and bundled files --> 107 <exec executable="g++" dir="${basedir}/wrapped-installer"> 108 <arg line="-static -static-libgcc -o ../products/Greenstone-${version}-linux wrapper.o libsearch4j.o greenstone2.jar.o java.o"/> 109 </exec> 10 110 11 111 <!-- mac --> 12 112 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool> 13 113 114 <!-- create and setup the build directory --> 115 <delete dir="${basedir}/wrapped-installer"/> 116 <mkdir dir="${basedir}/wrapped-installer"/> 117 118 <!-- create app for main installer --> 119 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app"><fileset dir="${rk2.home}/mac/Wrapper.app"/></copy> 120 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources" file="${rk2.home}/greenstone2/icon/icon.icns"/> 121 <chmod file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/MacOS/JavaApplicationStub" perm="ug+x"/> 122 123 <!-- copy bundled files --> 124 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources/Java" file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar"/> 125 126 <!-- substitute in real values --> 127 <rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@jar@" replacement="Greenstone-${version}-MacOS-${processor}.jar"/> 128 <rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@version@" replacement="${version}"/> 129 130 <!-- turn app into a dmg --> 131 132 <!-- get size of app --> 133 <exec executable="du" dir="${basedir}/wrapped-installer" outputproperty="app.du"><arg line="-ks Greenstone${version}.app"/></exec> 134 <echo>app.du: ${app.du}</echo> 135 <exec executable="sed" inputstring="${app.du}" outputproperty="app.size"><arg line="-e 's/^\([0-9]*\).*$/\1/g'"/></exec> 136 <echo>app.size: ${app.size}</echo> 137 <math result="dmg.size" operand1="${app.size}" operation="+" operand2="${dmg.overhead}" datatype="int"/> 138 <echo>dmg.size: ${dmg.size}</echo> 139 140 141 <!-- create disk image --> 142 <property name="dmg.name" value="Greenstone-${version}-${os.suffix}"/> 143 <exec dir="${basedir}/products" executable="hdiutil"><arg line="create -ov -size ${dmg.size}k -fs HFS+ -volname ${dmg.name} ${dmg.name}.dmg"/></exec> 144 <!-- mount it --> 145 <exec executable="hdiutil" dir="${basedir}/products"><arg line="attach ${dmg.name}.dmg"/></exec> 146 <!-- copy file into it --> 147 <exec executable="cp"><arg line="-r ${basedir}/wrapped-installer/Greenstone${version}.app /Volumes/${dmg.name}"/></exec> 148 <!-- unmount it--> 149 <exec executable="hdiutil"><arg line="detach /Volumes/${dmg.name}"/></exec> 14 150 </if></else></if></else></if> 15 151
Note:
See TracChangeset
for help on using the changeset viewer.