shithub: choc

Download patch

ref: dd45fd96528fa67a866dfd174714eebb0f94af25
parent: 9690b06aaa27fdeb539b9d279d977bdaf98b3f48
author: Simon Howard <fraggle@soulsphere.org>
date: Fri Mar 16 18:32:53 EDT 2018

osx: Fix AppleScript script under High Sierra.

Some of the old script broke with this new OS release.

--- a/pkg/osx/dmgfix
+++ b/pkg/osx/dmgfix
@@ -29,17 +29,25 @@
         --activate
         open dmgFile
         delay 1
-        set win to the front Finder window
         set theDisk to disk diskName
-        set the target of win to theDisk
+        open POSIX file "/"
 
         -- window options:
 
         set bgfile to file "background.png" of theDisk
-        set the bounds of win to {200, 200, 717, 545}
-        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
+        set win to the front Finder window
+        tell win
+            set target to theDisk
+            set current view to icon view
+            set sidebar width to 0
+            set toolbar visible to false
+            set statusbar visible to false
+            set bounds to {200, 200, 717, 545}
+        end tell
+        tell icon view options of win
+            set icon size to 96
+            set background picture to bgfile
+        end tell
 
         -- hide background file: