Commit f907b70e authored by David Smith's avatar David Smith Committed by david

The installer.mac target now sets a custom background image for the .dmg and...

The installer.mac target now sets a custom background image for the .dmg and can control icon placement and window/icon size. Also turned the compression on the dmg up, and the launch daemon is placed in /Library/ rather than /System/Library/ to follow Apple's recommendations. Refs JM-767

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6254 b35dd754-fafc-0310-a699-88a17e54d16e
parent a0e93c32
......@@ -1283,21 +1283,16 @@
<property name="mac.pkg.dir" value="${basedir}/macpkg"/>
<property name="mac.dmg.dir" value="${basedir}/Wildfire"/>
<property name="mac.dmg.file" value="${basedir}/wildfire.dmg"/>
<property name="mac.dmg.template" value="${basedir}/build/osx/template.dmg"/>
<property name="mac.template" value="${basedir}/build/osx/template"/>
<target name="mac.delete">
<delete dir="${mac.pkg.dir}"/>
<delete dir="${mac.dmg.dir}"/>
<delete file="${mac.dmg.file}"/>
<delete dir="${mac.template}"/>
</target>
<target name="mac.prepare" > <!-- depends="mac.delete,wildfire"> -->
<unzip src="${basedir}/build/osx/template.dmg.zip" dest="${basedir}/build/osx/"/>
<copy file="${mac.dmg.template}" tofile="${basedir}/tmp.dmg"/>
<mkdir dir="${mac.dmg.dir}/usr/local/wildfire"/>
<exec executable="hdiutil" failonerror="true">
<arg line="attach '${basedir}/tmp.dmg' -noautoopen -mountpoint '${mac.dmg.dir}'"/>
</exec>
<target name="mac.prepare" depends="mac.delete,wildfire">
<copy todir="${mac.pkg.dir}/usr/local/wildfire">
<fileset dir="${target.dir}/wildfire">
<exclude name="**/wildfired"/>
......@@ -1305,9 +1300,9 @@
<exclude name="**/redhat-postinstall.sh"/>
</fileset>
</copy>
<mkdir dir="${mac.pkg.dir}/System/Library/LaunchDaemons"/>
<mkdir dir="${mac.pkg.dir}/Library/LaunchDaemons"/>
<copy file="${basedir}/build/osx/org.jivesoftware.wildfire.plist"
todir="${mac.pkg.dir}/System/Library/LaunchDaemons"/>
todir="${mac.pkg.dir}/Library/LaunchDaemons"/>
<mkdir dir="${mac.dmg.dir}"/>
<exec executable="chown">
<arg line="-R root:wheel ${mac.pkg.dir}"/>
......@@ -1319,6 +1314,10 @@
</fileset>
<fileset dir="${basedir}/build/osx/resources"/>
</chmod>
<mkdir dir="${mac.template}/.background"/>
<copy todir="${mac.template}/.background">
<fileset file="${basedir}/build/osx/dmgBackground.png"/>
</copy>
</target>
<!-- Create a Mac OS X installer -->
......@@ -1328,18 +1327,33 @@
<arg value="-proj"/>
<arg value="${basedir}/build/osx/wildfire.pmproj"/>
<arg value="-p"/>
<arg value="${mac.dmg.dir}/Wildfire.pkg"/>
<arg value="${mac.template}/Wildfire.pkg"/>
<arg value="-v"/>
<arg value="-ds"/>
</exec>
</target>
<target name="installer-mac" depends="mac.pkg" description="Creates a Mac OS X package">
<target name="installer.mac" depends="mac.pkg" description="Creates a Mac OS X package">
<exec executable="hdiutil" failonerror="true">
<arg line="create -srcfolder '${mac.template}' -volname 'Wildfire' -fs HFS+ -fsargs '-c c=64,a=16,e=16' -format UDRW '${basedir}/tmp.dmg'"/>
</exec>
<exec executable="hdiutil" failonerror="true">
<arg line="attach '${basedir}/tmp.dmg' -readwrite -noverify -noautoopen -mountpoint '${mac.dmg.dir}'"/>
</exec>
<exec executable="osascript" dir="${basedir}/build/osx/" failonerror="true">
<arg value="dmg_wildfire.scpt"/>
<arg value="Wildfire"/>
<arg value="images"/>
<arg value="660"/>
<arg value="660"/>
<arg value="300"/>
<arg value="150"/>
<arg value="128"/>
</exec>
<exec executable="hdiutil" failonerror="true">
<arg line="detach ${mac.dmg.dir} -quiet -force"/>
</exec>
<exec executable="hdiutil" failonerror="true">
<arg line="convert ${basedir}/tmp.dmg -format UDZO -o ${mac.dmg.file}"/>
<arg line="convert ${basedir}/tmp.dmg -format UDZO -imagekey zlib-level=9 -o ${mac.dmg.file}"/>
</exec>
<delete file="${basedir}/tmp.dmg"/>
</target>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment