Changeset 16741 for release-kits/mark2/ant-scripts/wrap.xml
- Timestamp:
- 2008-08-13T11:40:57+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
release-kits/mark2/ant-scripts/wrap.xml
r16654 r16741 3 3 4 4 <target name="wrap"> 5 <if><bool><istrue value="${execute}"/></bool> 5 <!-- create and setup the build directory --> 6 <delete dir="${basedir}/wrapped-installer"/> 7 <mkdir dir="${basedir}/wrapped-installer"/> 8 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app"><fileset dir="${mark2.home}/mac/Wrapper.app"/></copy> 9 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources"><fileset dir="${mark2.home}/greenstone2/icon/icon.icns"/></copy> 10 <chmod file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/MacOS/JavaApplicationStub" perm="ug+x"/> 6 11 7 <!-- create and setup the build directory --> 8 <delete dir="${basedir}/wrapped-installer"/> 9 <mkdir dir="${basedir}/wrapped-installer"/> 10 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app"><fileset dir="${mark2.home}/mac/Wrapper.app"/></copy> 11 <chmod file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/MacOS/JavaApplicationStub" perm="ug+x"/> 12 <!-- copy bundled files --> 13 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources/Java" file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar"/> 12 14 13 <!-- copy bundled files --> 14 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources/Java" file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar"/> 15 <!-- substitute in real values --> 16 <rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@jar@" replacement="Greenstone-${version}-MacOS-${processor}.jar"/> 17 <rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@version@" replacement="${version}"/> 15 18 16 <!-- substitute in real values --> 17 <rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@jar@" replacement="Greenstone-${version}-MacOS-${processor}.jar"/> 18 <rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@version@" replacement="${version}"/> 19 <!-- get size of app --> 20 <exec executable="du" dir="${basedir}/wrapped-installer" outputproperty="app.du"><arg line="-ks Greenstone${version}.app"/></exec> 21 <echo>app.du: ${app.du}</echo> 22 <exec executable="sed" inputstring="${app.du}" outputproperty="app.size"><arg line="-e 's/^\([0-9]*\).*$/\1/g'"/></exec> 23 <echo>app.size: ${app.size}</echo> 24 <math result="dmg.size" operand1="${app.size}" operation="+" operand2="2048" datatype="int"/> 25 <echo>dmg.size: ${dmg.size}</echo> 19 26 20 <!-- get size of app --> 21 <exec executable="du" dir="${basedir}/wrapped-installer" outputproperty="app.du"><arg line="-ks Greenstone${version}.app"/></exec> 22 <echo>app.du: ${app.du}</echo> 23 <exec executable="sed" inputstring="${app.du}" outputproperty="app.size"><arg line="-e 's/^\([0-9]*\).*$/\1/g'"/></exec> 24 <echo>app.size: ${app.size}</echo> 25 <math result="dmg.size" operand1="${app.size}" operation="+" operand2="2048" datatype="int"/> 26 <echo>dmg.size: ${dmg.size}</echo> 27 28 <!-- create disk image --> 29 <exec dir="${basedir}/wrapped-installer" executable="hdiutil"><arg line="create -size ${dmg.size}k -fs HFS+ -volname Greenstone${version} Greenstone${version}.dmg"/></exec> 30 <!-- mount it --> 31 <exec executable="hdiutil" dir="${basedir}/wrapped-installer"><arg line="attach Greenstone${version}.dmg"/></exec> 32 <!-- copy file into it --> 33 <exec executable="cp" dir="${basedir}/wrapped-installer"><arg line="-r Greenstone${version}.app /Volumes/Greenstone${version}"/></exec> 34 <!-- unmount it--> 35 <exec executable="hdiutil" dir="${basedir}/wrapped-installer"><arg line="detach /Volumes/Greenstone${version}"/></exec> 36 </if> 27 <!-- create disk image --> 28 <exec dir="${basedir}/wrapped-installer" executable="hdiutil"><arg line="create -size ${dmg.size}k -fs HFS+ -volname Greenstone${version} Greenstone${version}.dmg"/></exec> 29 <!-- mount it --> 30 <exec executable="hdiutil" dir="${basedir}/wrapped-installer"><arg line="attach Greenstone${version}.dmg"/></exec> 31 <!-- copy file into it --> 32 <exec executable="cp" dir="${basedir}/wrapped-installer"><arg line="-r Greenstone${version}.app /Volumes/Greenstone${version}"/></exec> 33 <!-- unmount it--> 34 <exec executable="hdiutil" dir="${basedir}/wrapped-installer"><arg line="detach /Volumes/Greenstone${version}"/></exec> 37 35 </target> 38 36
Note:
See TracChangeset
for help on using the changeset viewer.