2006-07-05 15:47:25 -04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Author: Aaron Voisine <aaron@voisine.org>
|
|
|
|
|
2007-05-09 22:23:12 -04:00
|
|
|
if [ ! -x /Applications/Utilities/X11.app ] ; then
|
|
|
|
if [ -f /usr/include/X11/X.h ] ; then
|
|
|
|
osascript -e 'tell application "Ardour2"
|
|
|
|
display dialog "You have installed the X11 SDK, but not X11 itself.\
|
|
|
|
Please install X11 before running Ardour" buttons["OK"]
|
|
|
|
end tell'
|
|
|
|
else
|
|
|
|
osascript -e 'tell application "Ardour2"
|
|
|
|
display dialog "Please install X11 before running Ardour" buttons["OK"]
|
|
|
|
end tell'
|
|
|
|
fi
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -x /usr/local/bin/jackd -a ! -x /usr/bin/jackd ] ; then
|
|
|
|
osascript -e 'tell application "Ardour2"
|
|
|
|
display dialog "You do not appear to have JACK installed.\nPlease install it before running Ardour" buttons["OK"]
|
|
|
|
end tell'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2006-07-05 15:47:25 -04:00
|
|
|
CWD="`dirname \"$0\"`"
|
|
|
|
TMP=/tmp/$UID/TemporaryItems
|
|
|
|
|
|
|
|
ps -wx -ocommand | grep -e '[X]11' > /dev/null
|
|
|
|
if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
|
|
|
|
echo "rm -f ~/.xinitrc" > ~/.xinitrc
|
|
|
|
sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc
|
|
|
|
fi
|
|
|
|
|
2008-01-18 22:49:52 -05:00
|
|
|
if uname -r | grep -sq '^9' ; then
|
|
|
|
# leopard will auto-start X11 for us
|
|
|
|
:
|
|
|
|
else
|
|
|
|
mkdir -p $TMP
|
|
|
|
cp -f "$CWD/bin/getdisplay.sh" $TMP
|
|
|
|
rm -f $TMP/display
|
|
|
|
open-x11 $TMP/getdisplay.sh || \
|
|
|
|
open -a XDarwin $TMP/getdisplay.sh || \
|
|
|
|
echo ":0" > $TMP/display
|
|
|
|
|
|
|
|
while [ "$?" == "0" -a ! -f $TMP/display ]; do sleep 1; done
|
|
|
|
export "DISPLAY=`cat $TMP/display`"
|
|
|
|
|
|
|
|
ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11
|
|
|
|
fi
|
2006-07-05 15:47:25 -04:00
|
|
|
|
|
|
|
cd ~/
|
2007-01-09 18:24:54 -05:00
|
|
|
shift
|
|
|
|
exec "$CWD/bin/exporter" "$*"
|