Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Third alternative mac post build script for building dmg
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8429 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Loading branch information
timlinux
committed
May 14, 2008
1 parent
ba487b8
commit de5d38e
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# A bash script to create a dmg image file of the | ||
# final application bundle | ||
# (c) Tim Sutton 2007 | ||
|
||
DMGNAME=QGISAlaskaUncompressed.dmg | ||
COMPRESSEDDMGNAME=QGISAlaska.dmg | ||
set -x | ||
|
||
echo "Removing old dmg if it exists" | ||
rm ~/Desktop/${DMGNAME} | ||
rm ~/Desktop/${COMPRESSEDDMGNAME} | ||
hdiutil create -size 300m -fs HFS+ -volname "QGISAlaska" ~/Desktop/${DMGNAME} | ||
|
||
# Mount the disk image | ||
hdiutil attach ~/Desktop/${DMGNAME} | ||
|
||
# Obtain device information | ||
DEVS=$(hdiutil attach ~/Desktop/${DMGNAME} | cut -f 1) | ||
DEV=$(echo $DEVS | cut -f 1 -d ' ') | ||
VOLUME=$(mount |grep ${DEV} | cut -f 3 -d ' ') | ||
|
||
# copy in the application bundle | ||
cp -Rp /Applications/QGISAlaska.app ${VOLUME}/QGISAlaska.app | ||
|
||
# copy in background image and folder settings for icon sizes etc | ||
tar xvfz alaska_extra_dmg_files.tar.gz -C ${VOLUME} | ||
cp ../LICENSE ${VOLUME}/LICENSE.txt | ||
|
||
# Unmount the disk image | ||
hdiutil detach $DEV | ||
|
||
# Convert the disk image to read-only | ||
hdiutil convert ~/Desktop/${DMGNAME} \ | ||
-format UDZO -o ~/Desktop/${COMPRESSEDDMGNAME} | ||
|