use helper-script to detect JACK when starting a bundle that doesn't come with JACK

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4215 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-11-19 16:52:26 +00:00
parent a4b461f207
commit 9dc755ea23
2 changed files with 40 additions and 2 deletions

View file

@ -128,8 +128,23 @@ sed -e "s?@APPNAME@?$appname?" \
cp Info.plist $APPROOT
cp -R Resources $APPROOT
#
# if we build a bundle without jack, then
# make the Ardour2 executable a helper
# script that checks to see if JACK is
# installed.
#
if test x$WITH_JACK != x ; then
MAIN_EXECUTABLE=Ardour2
else
cp startup_script $APPROOT/MacOS/Ardour2
chmod 775 $APPROOT/MacOS/Ardour2
MAIN_EXECUTABLE=Ardour2.bin
fi
echo "Copying ardour executable ...."
cp ../../gtk2_ardour/ardour-$release_version $APPROOT/MacOS/Ardour2
cp ../../gtk2_ardour/ardour-$release_version $APPROOT/MacOS/$MAIN_EXECUTABLE
if test x$SAE != x ; then
cp ../../gtk2_ardour/evtest $APPROOT/MacOS/gtkevents
cp Ardour2-SAE.icns $Resources/appIcon.icns
@ -276,7 +291,7 @@ done
# now fix up the executables
echo "Fixing up executable dependency names ..."
executables="Ardour2"
executables=$MAIN_EXECUTABLE
if test x$WITH_JACK != x ; then
executables="$executables jackd"
fi

View file

@ -0,0 +1,23 @@
#!/bin/sh
#
# 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
osascript -e 'tell application "Terminal"
display dialog "You do not have JACK installed.\
Ardour will not run without it.\
See http://jackaudio.org/ for info" buttons["OK"]
end tell'
exit 1
fi
#
# all clear, lets go
#
CWD=`dirname $0`
exec $CWD/Ardour2.bin