2010-11-03 22:39:45 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-05-18 13:24:06 -04:00
|
|
|
# This is Linux-specific startup script for a bundled version of Ardour
|
|
|
|
|
2015-10-16 20:01:02 -04:00
|
|
|
checkdebug(){
|
|
|
|
for arg in "$@"
|
|
|
|
do
|
|
|
|
case "$arg" in
|
2016-01-08 13:18:56 -05:00
|
|
|
--gdb )
|
2015-10-16 20:01:02 -04:00
|
|
|
DEBUG="T"
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
}
|
2012-07-20 13:05:43 -04:00
|
|
|
|
2015-10-16 20:01:02 -04:00
|
|
|
checkdebug "$@"
|
2011-02-25 17:05:15 -05:00
|
|
|
|
|
|
|
|
2012-05-18 13:24:06 -04:00
|
|
|
# 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)
|
2017-06-23 17:03:59 -04:00
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
2011-01-31 09:48:34 -05:00
|
|
|
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
|
|
|
|
|
|
|
|
# this triggers code in main() that will reset runtime environment variables
|
|
|
|
# to point to directories inside the ardour package
|
|
|
|
|
2021-06-20 23:23:01 -04:00
|
|
|
export UBUNTU_MENUPROXY=""
|
2010-11-03 22:39:45 -04:00
|
|
|
export ARDOUR_BUNDLED=true
|
|
|
|
|
2015-05-04 13:09:37 -04:00
|
|
|
# NSM needs a path to this script
|
2015-10-04 15:16:32 -04:00
|
|
|
export ARDOUR_SELF=`basename "$0"`
|
2015-05-04 13:09:37 -04:00
|
|
|
|
|
|
|
|
2010-11-03 22:39:45 -04:00
|
|
|
# this is edited by the build script to include relevant environment variables
|
|
|
|
|
|
|
|
%ENV%
|
|
|
|
|
2012-05-18 13:24:06 -04:00
|
|
|
# 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
|
2010-11-03 22:39:45 -04:00
|
|
|
export LD_LIBRARY_PATH=$INSTALL_DIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
|
|
|
|
2011-02-25 17:05:15 -05:00
|
|
|
if [ "T" = "$DEBUG" ]; then
|
|
|
|
export ARDOUR_INSIDE_GDB=1
|
2015-07-01 23:04:42 -04:00
|
|
|
exec gdb $INSTALL_DIR/bin/%EXENAME%-%VER%
|
2011-02-25 17:05:15 -05:00
|
|
|
else
|
2023-03-24 15:24:33 -04:00
|
|
|
exec $INSTALL_DIR/bin/%EXENAME%-%VER% "$@"
|
2011-02-25 17:05:15 -05:00
|
|
|
fi
|