Skip to content

Commit de5d38e

Browse files
author
timlinux
committed
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
1 parent ba487b8 commit de5d38e

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

mac/3-dmg.sh

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
#
4+
# A bash script to create a dmg image file of the
5+
# final application bundle
6+
# (c) Tim Sutton 2007
7+
8+
DMGNAME=QGISAlaskaUncompressed.dmg
9+
COMPRESSEDDMGNAME=QGISAlaska.dmg
10+
set -x
11+
12+
echo "Removing old dmg if it exists"
13+
rm ~/Desktop/${DMGNAME}
14+
rm ~/Desktop/${COMPRESSEDDMGNAME}
15+
hdiutil create -size 300m -fs HFS+ -volname "QGISAlaska" ~/Desktop/${DMGNAME}
16+
17+
# Mount the disk image
18+
hdiutil attach ~/Desktop/${DMGNAME}
19+
20+
# Obtain device information
21+
DEVS=$(hdiutil attach ~/Desktop/${DMGNAME} | cut -f 1)
22+
DEV=$(echo $DEVS | cut -f 1 -d ' ')
23+
VOLUME=$(mount |grep ${DEV} | cut -f 3 -d ' ')
24+
25+
# copy in the application bundle
26+
cp -Rp /Applications/QGISAlaska.app ${VOLUME}/QGISAlaska.app
27+
28+
# copy in background image and folder settings for icon sizes etc
29+
tar xvfz alaska_extra_dmg_files.tar.gz -C ${VOLUME}
30+
cp ../LICENSE ${VOLUME}/LICENSE.txt
31+
32+
# Unmount the disk image
33+
hdiutil detach $DEV
34+
35+
# Convert the disk image to read-only
36+
hdiutil convert ~/Desktop/${DMGNAME} \
37+
-format UDZO -o ~/Desktop/${COMPRESSEDDMGNAME}
38+

0 commit comments

Comments
 (0)