Debian Codegraph @

misc/macos/macos-dmg-setup.applescript.in

raw
1 tell application "Finder"
2 tell disk "@CPACK_DMG_VOLUME_NAME@"
3 open
4 set current view of container window to icon view
5 set toolbar visible of container window to false
6 set statusbar visible of container window to false
7
8 set viewOptions to the icon view options of container window
9 set arrangement of viewOptions to not arranged
10 set icon size of viewOptions to 96
11
12 try
13 set background picture of viewOptions to file ".background:background.png"
14 end try
15
16 if "@CPACK_DMG_SUBDIRECTORY@" is not "" then
17 if not (exists folder "@CPACK_DMG_SUBDIRECTORY@") then
18 make new folder at container window with properties {name:"@CPACK_DMG_SUBDIRECTORY@"}
19 end if
20
21 move item "@[email protected]" to folder "@CPACK_DMG_SUBDIRECTORY@"
22 move item "@SERVER_NAME@" to folder "@CPACK_DMG_SUBDIRECTORY@"
23 move item "@BASEGAME@" to folder "@CPACK_DMG_SUBDIRECTORY@"
24
25 if exists item "missionpack" then
26 move item "missionpack" to folder "@CPACK_DMG_SUBDIRECTORY@"
27 end if
28
29 set position of item "@CPACK_DMG_SUBDIRECTORY@" to {100, 80}
30 set bounds of container window to {100, 100, 600, 320}
31 else
32 set position of item "@[email protected]" to {100, 80}
33 set position of item "@SERVER_NAME@" to {100, 260}
34 set position of item "@BASEGAME@" to {250, 260}
35
36 if exists item "missionpack" then
37 set position of item "missionpack" to {400, 260}
38 end if
39
40 set bounds of container window to {100, 100, 600, 500}
41 end if
42
43 set position of item "Applications" to {400, 80}
44
45 close
46 open
47 update without registering applications
48 delay 1
49 end tell
50 end tell