summaryrefslogtreecommitdiff
path: root/tools/linux_packaging/ardour.sh.in
blob: c36e91bc246eee778536a45b0718075adafd63fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

BIN_DIR=$(dirname $(readlink -f $0))
INSTALL_DIR=$(dirname $BIN_DIR)
LIB_DIR=$INSTALL_DIR/lib
ETC_DIR=$INSTALL_DIR/etc
USER_ARDOUR_DIR=$HOME/.ardour2

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%

export GTK_PATH=$INSTALL_DIR${GTK_PATH:+:$GTK_PATH}
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

exec $INSTALL_DIR/bin/ardour-2.8.11 "$@"