diff --git a/cmake/apple/install_apple.sh.in b/cmake/apple/install_apple.sh.in index 546fbb6c5..aaaa56f2a 100644 --- a/cmake/apple/install_apple.sh.in +++ b/cmake/apple/install_apple.sh.in @@ -7,12 +7,7 @@ set -e # STK rawwaves directory -STK_RAWWAVE_LIST=( $HOME/stk-*/rawwaves ) -STK_RAWWAVE=${STK_RAWWAVE_LIST[0]} - -if [ ! -d "$STK_RAWWAVE" ]; then - STK_RAWWAVE=$(brew --prefix stk)/share/stk/rawwaves -fi +STK_RAWWAVE=$(brew --prefix stk)/share/stk/rawwaves # Place to create ".app" bundle APP="@CMAKE_BINARY_DIR@/@PROJECT_NAME_UCASE@.app" @@ -21,20 +16,16 @@ MSG_COLOR='\x1B[1;36m' COLOR_RESET='\x1B[0m' echo -e "$MSG_COLOR\n\nCreating App Bundle \"$APP\"...$COLOR_RESET" -# Locate macdeployqt, assume homebrew & Qt5 -which macdeployqt > /dev/null 2>&1 -if [ $? -ne 0 ]; then - brew --prefix qt@5.5 > /dev/null 2>&1 - if [ $? -eq 0 ]; then - # Prefer Qt 5.5 (QTBUG-53533) - PATH=$PATH:$(brew --prefix qt@5.5)/bin - else - # Fallback Qt 5.6+ - PATH=$PATH:$(brew --prefix qt5)/bin - fi - export PATH +# Prefer Qt 5.5 (QTBUG-53533) +qtpath=$(brew --prefix qt@5.5)/bin + +# Fallback Qt 5.6+ +if [ ! -d "$qtpath" ]; then + qtpath=$(brew--prefix qt5)/bin fi +export PATH=$PATH:$qtpath + # Remove any old .app bundles rm -Rf "$APP"