2010-11-03 22:39:45 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2011-02-25 17:05:15 -05:00
|
|
|
while [ $# -gt 0 ] ; do
|
|
|
|
echo "arg = $1"
|
|
|
|
case $1 in
|
|
|
|
|
|
|
|
-d)
|
|
|
|
DEBUG="T";
|
|
|
|
shift ;;
|
2011-03-23 10:09:48 -04:00
|
|
|
*) break;;
|
2011-02-25 17:05:15 -05:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2011-01-31 09:48:34 -05:00
|
|
|
#LD_LIBRARY_PATH needs to be set (empty) so that epa can swap between the original and the bundled version
|
|
|
|
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
|
|
|
|
|
|
|
export PREBUNDLE_ENV="$(env)"
|
|
|
|
|
2010-11-03 22:39:45 -04:00
|
|
|
BIN_DIR=$(dirname $(readlink -f $0))
|
|
|
|
INSTALL_DIR=$(dirname $BIN_DIR)
|
|
|
|
LIB_DIR=$INSTALL_DIR/lib
|
|
|
|
ETC_DIR=$INSTALL_DIR/etc
|
2011-02-01 14:36:59 -05:00
|
|
|
USER_ARDOUR_DIR=$HOME/.config/ardour3
|
2010-11-03 22:39:45 -04:00
|
|
|
|
|
|
|
if [ ! -d $USER_ARDOUR_DIR ] ; then
|
|
|
|
mkdir -p $USER_ARDOUR_DIR || exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# this triggers code in main() that will reset runtime environment variables
|
|
|
|
# to point to directories inside the ardour package
|
|
|
|
|
|
|
|
export ARDOUR_BUNDLED=true
|
|
|
|
|
|
|
|
# this is edited by the build script to include relevant environment variables
|
|
|
|
|
|
|
|
%ENV%
|
|
|
|
|
2012-01-11 12:15:54 -05:00
|
|
|
export GTK_PATH=$INSTALL_DIR/libs/clearlooks${GTK_PATH:+:$GTK_PATH}
|
2011-01-31 09:48:34 -05:00
|
|
|
export GTK_MODULES="" # Disable extra modules from being loaded by gtk (example, libcanberra-gtk-module.so)
|
2010-11-03 22:39:45 -04:00
|
|
|
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
|
|
|
|
# We have to do this every time because its possible that BIN_DIR has changed
|
|
|
|
|
|
|
|
sed "s?@ROOTDIR@/modules?$LIB_DIR/modules?" < $ETC_DIR/pango.modules.in > $USER_ARDOUR_DIR/pango.modules
|
|
|
|
sed "s?@ROOTDIR@/loaders?$LIB_DIR/loaders?" < $ETC_DIR/gdk-pixbuf.loaders.in > $USER_ARDOUR_DIR/gdk-pixbuf.loaders
|
|
|
|
|
2011-02-25 17:05:15 -05:00
|
|
|
if [ "T" = "$DEBUG" ]; then
|
|
|
|
export ARDOUR_INSIDE_GDB=1
|
|
|
|
exec gdb $INSTALL_DIR/bin/ardour-3.0 "$@"
|
|
|
|
else
|
|
|
|
exec $INSTALL_DIR/bin/ardour-3.0 "$@"
|
|
|
|
fi
|
2010-11-03 22:39:45 -04:00
|
|
|
|
|
|
|
|
|
|
|
|