summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-23 13:42:20 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-05-23 13:42:20 (GMT)
commit64d36131958c27dc135eea592f2c9944352d7544 (patch)
tree5ee7008d78e32f79ac2ffdca4caab79d1129ccaa
parent16b42d842eb55989fc5ed5841b9e019872c78bf1 (diff)
parentd3812437036e95329fbee0773282b88e8b013fbe (diff)
downloadCMake-64d36131958c27dc135eea592f2c9944352d7544.zip
CMake-64d36131958c27dc135eea592f2c9944352d7544.tar.gz
CMake-64d36131958c27dc135eea592f2c9944352d7544.tar.bz2
Merge topic 'make_osx_packaging_more_robust'
d3812437 Make packaging script wait for the disk image to be mounted.
-rw-r--r--Packaging/CMakeDMGSetup.scpt19
1 files changed, 17 insertions, 2 deletions
diff --git a/Packaging/CMakeDMGSetup.scpt b/Packaging/CMakeDMGSetup.scpt
index c7ddcfb..37e7bd1 100644
--- a/Packaging/CMakeDMGSetup.scpt
+++ b/Packaging/CMakeDMGSetup.scpt
@@ -4,6 +4,21 @@ on run argv
tell application "Finder"
tell disk image_name
+ -- wait for the image to finish mounting
+ set open_attempts to 0
+ repeat while open_attempts < 4
+ try
+ open
+ delay 1
+ set open_attempts to 5
+ close
+ on error errStr number errorNumber
+ set open_attempts to open_attempts + 1
+ delay 10
+ end try
+ end repeat
+ delay 5
+
-- open the image the first time and save a DS_Store with just
-- background and icon setup
open
@@ -12,7 +27,7 @@ on run argv
set background picture of theViewOptions to file ".background:background.tif"
set arrangement of theViewOptions to not arranged
set icon size of theViewOptions to 128
- delay 1
+ delay 5
close
-- next setup the position of the app and Applications symlink
@@ -28,7 +43,7 @@ on run argv
set position of item "Applications" to { 378, 200 }
end tell
update without registering applications
- delay 1
+ delay 5
close
-- one last open and close so you can see everything looks correct