Skip to content

Commit

Permalink
macOS GitHub Action now runs Apple Script to set appearance of the DM…
Browse files Browse the repository at this point in the history
…G in Finder.

Also creates the Applications directory alias.
  • Loading branch information
openforeveryone committed Mar 20, 2024
1 parent 3d13cd8 commit 4f82197
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
cp images/background.png WordSearchCreator-Staging/.background/
hdiutil create -volname "WordSearchCreator" -srcfolder WordSearchCreator-Staging -ov -format UDRW WordSearchCreator-RW.dmg
hdiutil attach WordSearchCreator-RW.dmg
osascript setupDMGAppearance.applescript
hdiutil detach /Volumes/WordSearchCreator/
hdiutil convert WordSearchCreator-RW.dmg -format UDZO -o WordSearchCreator.dmg
Expand Down
17 changes: 17 additions & 0 deletions setupDMGAppearance.applescript
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
tell application "Finder"
tell disk "WordSearchCreator"
open

set the bounds of container window to {100, 100, 650, 425}
set current view of container window to icon view
set toolbar visible of container window to false
set statusbar visible of container window to false
set arrangement of icon view options of container window to not arranged
set background picture of icon view options of container window to file ".background:background.png"
make new alias to POSIX file "/Applications" at POSIX file "/Volumes/WordSearchCreator/"
set position of item "Word Search Creator.app" of container window to {145, 180}
set position of item "Applications" of container window to {410, 180}

close
end tell
end tell

0 comments on commit 4f82197

Please sign in to comment.