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

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

fixes to mark3

File size: 2.3 KB
RevLine 
[14982]1<?xml version="1.0" encoding="utf-8" ?>
[16655]2<project name="mark3-wrap" default="wrap">
[14982]3
4 <target name="wrap">
[16744]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>
[16772]9 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources" file="${mark3.home}/greenstone3/icon/icon.icns"/>
[16744]10 <chmod file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/MacOS/JavaApplicationStub" perm="ug+x"/>
[14982]11
[16744]12 <!-- copy bundled files -->
13 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources/Java" file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar"/>
[15142]14
[16744]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}"/>
[14982]18
[16772]19 <!-- get size of app -->
20 <exec executable="du" dir="${basedir}/wrapped-installer" outputproperty="app.du"><arg line="-ks Greenstone${version}.app"/></exec>
[16744]21 <echo>app.du: ${app.du}</echo>
[16772]22 <exec executable="sed" inputstring="${app.du}" outputproperty="app.size"><arg line="-e 's/^\([0-9]*\).*$/\1/g'"/></exec>
[16744]23 <echo>app.size: ${app.size}</echo>
[16772]24 <math result="dmg.size" operand1="${app.size}" operation="+" operand2="${dmg.overhead}" datatype="int"/>
[16744]25 <echo>dmg.size: ${dmg.size}</echo>
[15142]26
[16744]27 <!-- create disk image -->
[16772]28 <property name="dmg.name" value="Greenstone-${version}-MacOS-${processor}"/>
29 <exec dir="${basedir}/wrapped-installer" executable="hdiutil"><arg line="create -size ${dmg.size}k -fs HFS+ -volname ${dmg.name} ${dmg.name}.dmg"/></exec>
[16744]30 <!-- mount it -->
[16772]31 <exec executable="hdiutil" dir="${basedir}/wrapped-installer"><arg line="attach ${dmg.name}.dmg"/></exec>
[16744]32 <!-- copy file into it -->
[16772]33 <exec executable="cp" dir="${basedir}/wrapped-installer"><arg line="-r Greenstone${version}.app /Volumes/${dmg.name}"/></exec>
[16744]34 <!-- unmount it-->
[16772]35 <exec executable="hdiutil" dir="${basedir}/wrapped-installer"><arg line="detach /Volumes/${dmg.name}"/></exec>
[14982]36 </target>
37
38</project>
Note: See TracBrowser for help on using the repository browser.