X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=tools%2Fosx_packaging%2Fstartup_script;h=ba9cf18e474d836fec34d930dacafd4c296a64d5;hb=994df3aaa370125d3fa442baa38392a32c640e69;hp=c7b9b5acf82cb4cf555ad51642a8c62a5e5d150d;hpb=bc89fe0147c04b67141936d109c00dfd4d69cc4b;p=ardour.git diff --git a/tools/osx_packaging/startup_script b/tools/osx_packaging/startup_script index c7b9b5acf8..ba9cf18e47 100644 --- a/tools/osx_packaging/startup_script +++ b/tools/osx_packaging/startup_script @@ -4,21 +4,29 @@ # NOTE: Leopard appears not to set PATH for this script, so be absolutely certain # never to use any other program without fully specifying the path. # -# this is used to detect a missing JACK install which -# is the most common thing causing startup crashes. -# -if test ! -x /usr/local/bin/jackd -a ! -x /usr/bin/jackd ; then +# +# Some versions of Audacity leave /usr/local/lib unreadable/unsearchable. Ardour will not be able to start up if this is +# the case, because we need access to /usr/local/lib/libjack.dylib +# +# except if there's no jack and hence also no /usr/local/lib dir in the first place. +# + +if test -d /usr/local/lib -a ! -x /usr/local/lib -o -d /usr/local/lib -a ! -r /usr/local/lib ; then /usr/bin/osascript -e 'tell application "Finder" -display dialog "You do not have JACK installed. Ardour will not run without it. See http://jackaudio.org/ for info" buttons["OK"] +display dialog "You appear to have previously installed Audacity which altered your filesystem incorrectly. Ardour cannot run until this is corrected. To correct the error, type the following command into a Terminal window: chmod 755 /usr/local/lib" buttons["OK"] end tell' exit 1 fi -# +export ARDOUR_SELF="$0" + +# this needs to be set so that we can restore the environment when we want to find JACK (or similar) +export PREBUNDLE_ENV="$(env)" + # all clear, lets go # this quoting is all needed to handle installation # in folders likes /home/user/Frank's Wild Years CWD="`/usr/bin/dirname \"$0\"`" -exec "$CWD/Ardour2.bin" "$*" +exec "$CWD/Ardour.bin" "$@"