From: Jonathan Dahan Date: Mon, 19 Nov 2012 17:37:46 +0000 (-0500) Subject: allow user to cancel automatic installation of dependencies during install X-Git-Tag: 13.03~192^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6b80b3dadd37e05e6c472f1abca06d4d7e048a21;p=cura.git allow user to cancel automatic installation of dependencies during install --- diff --git a/scripts/osx64/Cura.app/Contents/MacOS/Cura b/scripts/osx64/Cura.app/Contents/MacOS/Cura index e662bd4a..58d6f75b 100755 --- a/scripts/osx64/Cura.app/Contents/MacOS/Cura +++ b/scripts/osx64/Cura.app/Contents/MacOS/Cura @@ -11,12 +11,22 @@ fi displayMessage() { - /usr/bin/osascript > /dev/null <<-EOF + /usr/bin/osascript > /dev/null << EOF tell application "System Events" activate - display dialog "$@" buttons {"Ok"} + set question to display dialog "$@" end tell +return button returned of question EOF + if [ $? != 0 ]; then + /usr/bin/osascript > /dev/null << EOF +tell application "System Events" + activate + display dialog "User Cancelled Install" buttons {"Ok"} +end tell +EOF + exit 1 + fi } #Testing for python2.7, which we need and is not always installed on MacOS 1.6