13
0
livetrax/tools/osx_packaging/startup_script
Robin Gareus 6b69fd5640 NSM preparation for OSX and windows
Note that on those platforms the application name
is a full path. This is permitted by the specs:

“executable_name MUST be the executable name that the program was launched with. For C programs, this is simply the value of argv[0]” [http://non.tuxfamily.org/nsm/API.html#n:1.2.1.1.]

but the current implementation of nsm expects the basename
only and searched $PATH.
2015-05-05 00:25:06 +02:00

33 lines
1.2 KiB
Bash

#!/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.
#
#
# 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 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/Ardour.bin" "$@"