osx-dmg.sh revision 408e9460dd70bf3c99f32030e78a901bf959da89
#
# Inkscape packaging script for Mac OS X
#
# The script creates a read-write disk image,
# copies Inkscape in it, customizes its appearance through
# an applescript and compresses the disk image for distribution
#
# Authors:
# Jean-Olivier Irisson <jo.irisson@gmail.com>
# Michael Wybrow <mjwybrow@users.sourceforge.net>
#
# Copyright 2006
# Licensed under GNU General Public License
#
VOLNAME="Inkscape"
FIRSTTIME="false"
# Create temp directory with desired contents of the release volume.
# Copy Inkscape.app folder.
# link to Applications in order to drag and drop inkscape onto it.
# Copy a background image inside a hidden directory so the image
# file itself won't be shown.
# Copy the .DS_Store file which contains information about window size,
# appearance, etc. Most of this can be set with Apple script but involves
# user intervention so we just keep a copy of the correct settings and
# use that instead.
# Create a new RW image from the temp directory.
/usr/bin/hdiutil create -srcfolder "tmp-dmg" -volname "$VOLNAME" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW "$RWNAME"
# We're finished with the temp directory, remove it.
# Mount the created image.
DEV_NAME=`/usr/bin/hdiutil attach -readwrite -noverify -noautoopen "$RWNAME" | egrep '^/dev/' | sed 1q | awk '{print $1}'`
# Have the disk image window open automatically when mounted.
# Unmount the disk image.
# Create the offical release image by compressing the RW one.