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

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

got mark3 working

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 <if><bool><istrue value="${execute}"/></bool>
6
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="${mark3.home}/mac/Wrapper.app"/></copy>
11 <chmod file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/MacOS/JavaApplicationStub" perm="ug+x"/>
12
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
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
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>
37 </target>
38
39</project>
Note: See TracBrowser for help on using the repository browser.