Changeset 28738 for other-projects


Ignore:
Timestamp:
2013-12-03T11:24:41+13:00 (10 years ago)
Author:
ak19
Message:

Start adding files/code to give Mac dmg an icon and link to the Applications folder with a background image explaining how to install. Code untested. dmg-bg.png is a placeholder image. DS_Store is a file which defines the view properties of a folder on a Mac - currently a placeholder and will need to be generated on a Mac

Location:
other-projects/expeditee-release-kits
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/expeditee-release-kits/kits/rke/ant-scripts/wrap.xml

    r28728 r28738  
    146146
    147147            <!-- create app for main installer -->
    148             <copy todir="wrapped-installer/${projectname}${version}${version-extra}.app"><fileset dir="${rk.home}/shared/mac/Wrapper.app"/></copy>
     148            <copy todir="wrapped-installer/${projectname}${version}${version-extra}.app">
     149                <fileset dir="${rk.home}/shared/mac/Wrapper.app"/>
     150            </copy>
    149151            <copy todir="wrapped-installer/${projectname}${version}${version-extra}.app/Contents/Resources" file="${rk.home}/shared/core/icon/icon.icns"/>
    150152            <chmod file="wrapped-installer/${projectname}${version}${version-extra}.app/Contents/MacOS/Expeditee" perm="ug+x"/>
    151153
    152154            <!-- copy bundled files -->
    153             <copy todir="wrapped-installer/${projectname}${version}${version-extra}.app/Contents/Resources"><fileset dir="compiled"/></copy>
     155            <copy todir="wrapped-installer/${projectname}${version}${version-extra}.app/Contents/Resources">
     156                <fileset dir="compiled"/>
     157            </copy>
    154158            <copy tofile="wrapped-installer/${projectname}${version}${version-extra}.app/Contents/Resources/jre_bin" file="${rk.home}/shared/mac/${java.installer}"/>
    155159
     
    160164            </rsr>
    161165
     166
    162167            <!-- turn app into a dmg -->
    163168
    164169            <!-- get size of app -->
    165             <exec executable="du" dir="wrapped-installer" outputproperty="app.du"><arg line="-ks ${projectname}${version}${version-extra}.app"/></exec>
    166             <exec executable="sed" inputstring="${app.du}" outputproperty="app.size"><arg line="-e 's/^\([0-9]*\).*$/\1/g'"/></exec>
     170            <exec executable="du" dir="wrapped-installer" outputproperty="app.du">
     171                <arg line="-ks ${projectname}${version}${version-extra}.app"/>
     172            </exec>
     173            <exec executable="sed" inputstring="${app.du}" outputproperty="app.size">
     174                <arg line="-e 's/^\([0-9]*\).*$/\1/g'"/>
     175            </exec>
    167176            <math result="dmg.size" operand1="${app.size}" operation="+" operand2="${dmg.overhead}" datatype="int"/>
    168177
    169178            <!-- create disk image -->
    170179            <property name="dmg.name" value="${projectname}-${version}${version-extra}-${os.suffix}"/>
    171             <exec dir="products" executable="hdiutil" failonerror="true"><arg line="create -ov -size ${dmg.size}k -fs HFS+ -volname ${dmg.name} ${dmg.name}.dmg"/></exec>
     180            <exec dir="products" executable="hdiutil" failonerror="true">
     181                <arg line="create -ov -size ${dmg.size}k -fs HFS+ -volname ${dmg.name} ${dmg.name}-tmp.dmg"/>
     182            </exec>
    172183            <!-- mount it -->
    173             <exec executable="hdiutil" dir="products" failonerror="true"><arg line="attach ${dmg.name}.dmg"/></exec>
     184            <exec executable="hdiutil" dir="products" failonerror="true">
     185                <arg line="attach ${dmg.name}-tmp.dmg"/>
     186            </exec>
    174187            <!-- copy file into it -->
    175             <exec executable="cp"><arg line="-r wrapped-installer/${projectname}${version}${version-extra}.app /Volumes/${dmg.name}"/></exec>
     188            <exec executable="cp">
     189                <arg line="-r wrapped-installer/${projectname}${version}${version-extra}.app /Volumes/${dmg.name}"/>
     190            </exec>
     191            <!-- add background image, icon and .DS_STORE -->
     192            <mkdir dir="/Volumes/${dmg.name}/.background"/>
     193            <copy file="${rk.home}/shared/mac/dmg-bg.png"
     194                tofile="/Volumes/${dmg.name}/.background/background.png"
     195                overwrite="true"/>
     196            <copy file="${rk.home}/shared/core/icon/icon.icns"
     197                tofile="/Volumes/${dmg.name}/.VolumeIcon.icns"
     198                overwrite="true"/>
     199            <copy file="${rk.home}/shared/mac/DS_Store"
     200                tofile="/Volumes/${dmg.name}/.DS_Store"
     201                overwrite="true"/>
     202            <!-- add symlink to applications folder -->
     203            <symlink link="/Volumes/${dmg.name}" resource="/Applications"/>
    176204            <!-- unmount it-->
    177             <exec executable="hdiutil" failonerror="true"><arg line="detach /Volumes/${dmg.name}"/></exec>
     205            <exec executable="hdiutil" failonerror="true">
     206                <arg line="detach /Volumes/${dmg.name}"/>
     207            </exec>
     208            <!-- Compress it to a new image -->
     209            <exec executable="hdiutil" os="Mac OS X" failonerror="true">
     210                <arg line="convert ${dmg.name}-tmp.dmg -format UDZO -o ${dmg.name}.dmg"/>
     211            </exec>
     212            <!-- Delete the temporary image -->
     213            <delete file="${dmg.name}-tmp.dmg" quiet="yes" failonerror="false"/>
    178214        </if></else></if></else></if>
    179215
Note: See TracChangeset for help on using the changeset viewer.