CMakeDMGSetup.scpt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. on run argv
  2. set image_name to item 1 of argv
  3. tell application "Finder"
  4. tell disk image_name
  5. -- open the image the first time and save a DS_Store with just
  6. -- background and icon setup
  7. open
  8. set current view of container window to icon view
  9. set theViewOptions to the icon view options of container window
  10. set background picture of theViewOptions to file ".background:background.tif"
  11. set arrangement of theViewOptions to not arranged
  12. set icon size of theViewOptions to 128
  13. delay 1
  14. close
  15. -- next setup the position of the app and Applications symlink
  16. -- plus hide all the window decoration
  17. open
  18. update without registering applications
  19. tell container window
  20. set sidebar width to 0
  21. set statusbar visible to false
  22. set toolbar visible to false
  23. set the bounds to { 400, 100, 900, 465 }
  24. set position of item "CMake.app" to { 133, 200 }
  25. set position of item "Applications" to { 378, 200 }
  26. end tell
  27. update without registering applications
  28. delay 1
  29. close
  30. -- one last open and close so you can see everything looks correct
  31. open
  32. delay 5
  33. close
  34. end tell
  35. delay 1
  36. end tell
  37. end run