source: release-kits/mark3/ant-scripts/wrap.xml@ 16744

Last change on this file since 16744 was 16744, checked in by oranfry, 16 years ago

changes to mark3 after ant cleaned up

File size: 2.3 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="mark3-wrap" default="wrap">
3
4 <target name="wrap">
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="${mark3.home}/mac/Wrapper.app"/></copy>
9 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources"><fileset dir="${mark2.home}/greenstone3/icon/icon.icns"/></copy>
10 <chmod file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/MacOS/JavaApplicationStub" perm="ug+x"/>
11
12 <!-- copy bundled files -->
13 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources/Java" file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar"/>
14
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}"/>
18
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>
26
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>
35 </target>
36
37</project>
Note: See TracBrowser for help on using the repository browser.