2008-12-12 09:43:24 -05:00
#!/bin/sh
#
# 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.
#
2013-06-10 11:03:00 -04:00
#
2014-11-11 09:17:33 -05:00
# Some versions of Audacity leave /usr/local/lib unreadable/unsearchable. Ardour will not be able to start up if this is
2013-06-10 11:03:00 -04:00
# the case, because we need access to /usr/local/lib/libjack.dylib
#
2014-11-11 09:17:33 -05:00
# except if there's no jack and hence also no /usr/local/lib dir in the first place.
#
2013-06-10 11:03:00 -04:00
2014-11-11 09:17:33 -05:00
if test -d /usr/local/lib -a ! -x /usr/local/lib -o -d /usr/local/lib -a ! -r /usr/local/lib ; then
2013-06-10 11:03:00 -04:00
/usr/bin/osascript -e 'tell application "Finder"
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
2012-07-23 14:48:12 -04:00
# this needs to be set so that we can restore the environment when we want to find JACK (or similar)
export PREBUNDLE_ENV="$(env)"
2008-12-12 09:43:24 -05:00
# 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\"`"
2015-03-23 08:33:08 -04:00
exec "$CWD/Ardour.bin" "$@"