fruitjam-doom/pkg/osx/dmgfix
Simon Howard 7684ddcfd8 Clean up file headers.
This change rewrites and simplifies the copyright headers at the top
of all source files:

 * Remove "Emacs style mode select" line; this line was included in
   the headers for the originally released source files and appears
   to be to set the file type for old versions of Emacs. I'm not sure
   entirely why it was required but I don't think it is any more.
 * Remove "You should have received a copy of..." text from copyright
   header. This refers to the old 59 Temple Place address where the
   FSF headquarters used to be located and is no longer correct.
   Rather than change to the new address, just remove the paragraph
   as it is superfluous anyway. This fixes #311.
 * Remove ---- separator lines so that the file headers are barer
   and more simplified.
2014-05-05 00:20:54 -04:00

59 lines
1.9 KiB
AppleScript
Executable file

#!/usr/bin/osascript
--
-- Copyright(C) 2009-2014 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.
--
--
-- 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