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

Last change on this file since 19768 was 19615, checked in by oranfry, 15 years ago

fixed to creating cdrom components on linux and mac

File size: 2.4 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">
[19510]5
6 <mkdir dir="products"/>
7
[16741]8 <!-- create and setup the build directory -->
9 <delete dir="${basedir}/wrapped-installer"/>
10 <mkdir dir="${basedir}/wrapped-installer"/>
[14982]11
[19510]12 <!-- create app for main installer -->
[19537]13 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app"><fileset dir="${mark2.home}/mac/Wrapper.app"/></copy>
14 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources" file="${mark2.home}/greenstone2/icon/icon.icns"/>
15 <chmod file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/MacOS/JavaApplicationStub" perm="ug+x"/>
[15142]16
[19537]17 <!-- copy bundled files -->
18 <copy todir="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Resources/Java" file="${basedir}/installer/Greenstone-${version}-MacOS-${processor}.jar"/>
[14982]19
[19537]20 <!-- substitute in real values -->
21 <rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@jar@" replacement="Greenstone-${version}-MacOS-${processor}.jar"/>
22 <rsr file="${basedir}/wrapped-installer/Greenstone${version}.app/Contents/Info.plist" pattern="@version@" replacement="${version}"/>
[19510]23
24
[19537]25 <!-- turn app into a dmg -->
[19510]26
[17077]27 <!-- get size of app -->
28 <exec executable="du" dir="${basedir}/wrapped-installer" outputproperty="app.du"><arg line="-ks Greenstone${version}.app"/></exec>
[16741]29 <echo>app.du: ${app.du}</echo>
[17077]30 <exec executable="sed" inputstring="${app.du}" outputproperty="app.size"><arg line="-e 's/^\([0-9]*\).*$/\1/g'"/></exec>
[16741]31 <echo>app.size: ${app.size}</echo>
[16808]32 <math result="dmg.size" operand1="${app.size}" operation="+" operand2="${dmg.overhead}" datatype="int"/>
[16741]33 <echo>dmg.size: ${dmg.size}</echo>
[15142]34
[19460]35
[16741]36 <!-- create disk image -->
[16808]37 <property name="dmg.name" value="Greenstone-${version}-MacOS-${processor}"/>
[19133]38 <exec dir="${basedir}/products" executable="hdiutil"><arg line="create -ov -size ${dmg.size}k -fs HFS+ -volname ${dmg.name} ${dmg.name}.dmg"/></exec>
[16741]39 <!-- mount it -->
[18500]40 <exec executable="hdiutil" dir="${basedir}/products"><arg line="attach ${dmg.name}.dmg"/></exec>
[16741]41 <!-- copy file into it -->
[18500]42 <exec executable="cp"><arg line="-r ${basedir}/wrapped-installer/Greenstone${version}.app /Volumes/${dmg.name}"/></exec>
[16741]43 <!-- unmount it-->
[18500]44 <exec executable="hdiutil"><arg line="detach /Volumes/${dmg.name}"/></exec>
[19537]45
[14982]46 </target>
47
48</project>
Note: See TracBrowser for help on using the repository browser.