Robin Gareus
490138e2bf
It should have been XDG_CONFIG_HOME and ardour4, anyway. Ardour4 checks for config dirs, allows to import A3 config and also handles the case if the dir can't be created itself.
56 lines
1.3 KiB
Bash
56 lines
1.3 KiB
Bash
#!/bin/sh
|
|
|
|
# This is Linux-specific startup script for a bundled version of Ardour
|
|
|
|
ARGS=""
|
|
|
|
while [ $# -gt 0 ] ; do
|
|
case $1 in
|
|
|
|
--debug)
|
|
DEBUG="T";
|
|
shift ;;
|
|
*)
|
|
ARGS=$ARGS$1" ";
|
|
shift; ;;
|
|
esac
|
|
done
|
|
|
|
# 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))
|
|
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
|
|
|
|
export ARDOUR_BUNDLED=true
|
|
|
|
# NSM needs a path to this script
|
|
export ARDOUR_SELF="$0"
|
|
|
|
|
|
# this is edited by the build script to include relevant environment variables
|
|
|
|
%ENV%
|
|
|
|
# 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}
|
|
|
|
if [ "T" = "$DEBUG" ]; then
|
|
export ARDOUR_INSIDE_GDB=1
|
|
exec gdb $INSTALL_DIR/bin/ardour-%VER%
|
|
else
|
|
exec $INSTALL_DIR/bin/ardour-%VER% $ARGS
|
|
fi
|
|
|
|
|
|
|