diff --git a/packaging/osx/OpenRA.app/Contents/MacOS/OpenRA b/packaging/osx/OpenRA.app/Contents/MacOS/OpenRA index 2969512082..6fee968886 100755 --- a/packaging/osx/OpenRA.app/Contents/MacOS/OpenRA +++ b/packaging/osx/OpenRA.app/Contents/MacOS/OpenRA @@ -54,6 +54,7 @@ fi # Prompt for the mod to run MODBUTTON=`/usr/bin/osascript << EOT tell application "Finder" + activate display dialog "Choose a mod" buttons {"Red Alert", "C&C", "Quit"} \ default button "Red Alert" \ with icon alias (POSIX file "$RESOURCES_PATH/OpenRA.icns") \ diff --git a/packaging/osx/OpenRA.app/Contents/MacOS/display_error b/packaging/osx/OpenRA.app/Contents/MacOS/display_error index 498c9b135e..45ccee114d 100755 --- a/packaging/osx/OpenRA.app/Contents/MacOS/display_error +++ b/packaging/osx/OpenRA.app/Contents/MacOS/display_error @@ -26,6 +26,7 @@ RESOURCES_PATH=`pwd`/../Resources `/usr/bin/osascript << EOT tell application "Finder" + activate display dialog "${2}\n\nSupport is available in our irc channel irc.freenode.net #openra." \ buttons "Quit" \ default button 1 \ diff --git a/packaging/osx/OpenRA.app/Contents/MacOS/download_package b/packaging/osx/OpenRA.app/Contents/MacOS/download_package index dc36c9f7f0..f9854f1edb 100755 --- a/packaging/osx/OpenRA.app/Contents/MacOS/download_package +++ b/packaging/osx/OpenRA.app/Contents/MacOS/download_package @@ -34,13 +34,24 @@ if [ ! -d "$SUPPORT_PATH" ]; then fi cd "$SUPPORT_PATH" +mkdir -p "${2}" if [ -e "downloads/${1}" ]; then - mkdir -p "${2}" - unzip -o "downloads/${1}" -d "${2}" +/usr/bin/osascript << EOT + tell application "Terminal" + activate + do script "cd \"${SUPPORT_PATH}\"; unzip -o \"downloads/${1}\" -d \"${2}\"; touch done; exit;" + end tell +EOT + # Hack around osascript returning before the download finishes + while [ ! -e "done" ]; do + sleep 1 + done + rm "done" else CONTINUE=`/usr/bin/osascript << EOT tell application "Finder" + activate display dialog "OpenRA needs to download ${4}.\n\nDownload size: ${3}" \ buttons {"Download", "Quit"} \ default button "Download" \ @@ -52,19 +63,15 @@ EOT` exit 1 fi - mkdir -p "${2}" - /usr/bin/osascript << EOT tell application "Terminal" activate - do script "cd \"${SUPPORT_PATH}\"; curl --create-dirs -o \"./downloads/${1}\" \"${5}\"; touch \"downloads/done\"; exit;" + do script "cd \"${SUPPORT_PATH}\"; curl --create-dirs -o \"./downloads/${1}\" \"${5}\"; unzip -o \"downloads/${1}\" -d \"${2}\"; touch done; exit;" end tell EOT - # Hack around osascript returning before the download finishes - while [ ! -e "downloads/done" ]; do + while [ ! -e "done" ]; do sleep 1 done - rm "downloads/done" - unzip -o "downloads/${1}" -d "${2}" + rm "done" fi \ No newline at end of file