#!/bin/sh
+# This is Linux-specific startup script for a bundled version of Ardour
+
+ARGS=""
+
while [ $# -gt 0 ] ; do
- echo "arg = $1"
case $1 in
- -d)
+ --debug)
DEBUG="T";
shift ;;
*)
- #catch all for unknown arguments
- echo ""
- echo "!!! ERROR !!! - Unknown argument $1"
- echo ""
- exit 1
- ;;
+ ARGS=$ARGS$1" ";
+ shift; ;;
esac
done
-#LD_LIBRARY_PATH needs to be set (empty) so that epa can swap between the original and the bundled version
+# LD_LIBRARY_PATH needs to be set here so that epa can swap between the original and the bundled version
+# (the original one will be stored in PREBUNDLE_ENV)
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
-
export PREBUNDLE_ENV="$(env)"
BIN_DIR=$(dirname $(readlink -f $0))
%ENV%
-export GTK_PATH=$INSTALL_DIR${GTK_PATH:+:$GTK_PATH}
-export GTK_MODULES="" # Disable extra modules from being loaded by gtk (example, libcanberra-gtk-module.so)
+# Disable extra modules from being loaded by gtk (example, libcanberra-gtk-module.so)
+export GTK_MODULES=""
+# Set this so that the executable will find all the right libraries inside the bundle
export LD_LIBRARY_PATH=$INSTALL_DIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
# create install-location-dependent config files for Pango and GDK image loaders
if [ "T" = "$DEBUG" ]; then
export ARDOUR_INSIDE_GDB=1
- exec gdb $INSTALL_DIR/bin/ardour-3.0 "$@"
+ exec gdb $INSTALL_DIR/bin/ardour-3.0
else
- exec $INSTALL_DIR/bin/ardour-3.0 "$@"
+ exec $INSTALL_DIR/bin/ardour-3.0 $ARGS
fi