summaryrefslogtreecommitdiff
path: root/pkg/osx/dmgfix
diff options
context:
space:
mode:
authorSimon Howard2011-06-13 22:21:37 +0000
committerSimon Howard2011-06-13 22:21:37 +0000
commit391e7466b1efb7cbede4a1c356a210d9e7ee616b (patch)
tree90d13346d9cd3636df44290ded13d59ae3712543 /pkg/osx/dmgfix
parentfa328faf056affa216f2f3a8764ca0d56262efe9 (diff)
parent822664b4ff873d462370e9e96a9d91e6066c221d (diff)
downloadchocolate-doom-391e7466b1efb7cbede4a1c356a210d9e7ee616b.tar.gz
chocolate-doom-391e7466b1efb7cbede4a1c356a210d9e7ee616b.tar.bz2
chocolate-doom-391e7466b1efb7cbede4a1c356a210d9e7ee616b.zip
Merge from trunk.
Subversion-branch: /branches/raven-branch Subversion-revision: 2347
Diffstat (limited to 'pkg/osx/dmgfix')
-rwxr-xr-xpkg/osx/dmgfix64
1 files changed, 64 insertions, 0 deletions
diff --git a/pkg/osx/dmgfix b/pkg/osx/dmgfix
new file mode 100755
index 00000000..560b17ed
--- /dev/null
+++ b/pkg/osx/dmgfix
@@ -0,0 +1,64 @@
+#!/usr/bin/osascript
+--
+-- Copyright(C) 2009 Simon Howard
+--
+-- This program is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU General Public License
+-- as published by the Free Software Foundation; either version 2
+-- of the License, or (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+-- 02111-1307, USA.
+--
+--
+-- AppleScript script to automatically set the view properties in a
+-- .dmg file - ie. the background image, other Finder view options
+-- and icon positions.
+--
+-- Usage: dmgfix <absolute path to dmg> <disk name> <name of app>
+--
+
+on run argv
+ set dmgFile to POSIX file (item 1 of argv)
+ set diskName to item 2 of argv
+ set appName to item 3 of argv
+
+ tell application "Finder"
+ --activate
+ open dmgFile
+ delay 1
+ set win to the front Finder window
+ set theDisk to disk diskName
+ set the target of win to theDisk
+
+ -- window options:
+
+ set bgfile to file "background.png" of theDisk
+ set the bounds of win to {200, 200, 717, 536}
+ set icon size of icon view options of win to 96
+ set background picture of icon view options of win to bgfile
+ set toolbar visible of win to false
+
+ -- hide background file:
+
+ set bgloc to quoted form of POSIX path of (bgfile as text)
+ do shell script "SetFile -a V " & bgloc
+
+ -- icon positions:
+
+ set position of file "README" of theDisk to {120, 250}
+ set position of file "Software License" of theDisk to {380, 250}
+ set position of file appName of theDisk to {70, 110}
+ set position of file "Applications" of theDisk to {450, 110}
+
+ eject theDisk
+ end tell
+end run
+