From 9dc755ea23d027727d4b5f86e4d74b5d4a5003ee Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 19 Nov 2008 16:52:26 +0000 Subject: 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 --- tools/osx_packaging/osx_build | 19 +++++++++++++++++-- tools/osx_packaging/startup_script | 23 +++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 tools/osx_packaging/startup_script (limited to 'tools') diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index 6dd798f427..6707902d34 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -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 diff --git a/tools/osx_packaging/startup_script b/tools/osx_packaging/startup_script new file mode 100644 index 0000000000..4c0dff1ee1 --- /dev/null +++ b/tools/osx_packaging/startup_script @@ -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 + -- cgit v1.2.3