source: release-kits/mark2/ant-scripts/wrap.xml@ 17077

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

force the use of command line svn to stop seg faults and bus errors on the old mac any probably other machines

File size: 2.3 KB
RevLine 
[14982]1<?xml version="1.0" encoding="utf-8" ?>
[16453]2<project name="mark2-wrap" default="wrap">
[14982]3
4 <target name="wrap">
[16741]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>
[16808]9 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources" file="${mark2.home}/greenstone2/icon/icon.icns"/>
[16741]10 <chmod file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/MacOS/JavaApplicationStub" perm="ug+x"/>
[14982]11
[16741]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
[16741]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
[17077]19 <!-- get size of app -->
20 <exec executable="du" dir="${basedir}/wrapped-installer" outputproperty="app.du"><arg line="-ks Greenstone${version}.app"/></exec>
[16741]21 <echo>app.du: ${app.du}</echo>
[17077]22 <exec executable="sed" inputstring="${app.du}" outputproperty="app.size"><arg line="-e 's/^\([0-9]*\).*$/\1/g'"/></exec>
[16741]23 <echo>app.size: ${app.size}</echo>
[16808]24 <math result="dmg.size" operand1="${app.size}" operation="+" operand2="${dmg.overhead}" datatype="int"/>
[16741]25 <echo>dmg.size: ${dmg.size}</echo>
[15142]26
[16741]27 <!-- create disk image -->
[16808]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>
[16741]30 <!-- mount it -->
[16808]31 <exec executable="hdiutil" dir="${basedir}/wrapped-installer"><arg line="attach ${dmg.name}.dmg"/></exec>
[16741]32 <!-- copy file into it -->
[16808]33 <exec executable="cp" dir="${basedir}/wrapped-installer"><arg line="-r Greenstone${version}.app /Volumes/${dmg.name}"/></exec>
[16741]34 <!-- unmount it-->
[16808]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.