packaging changes for GTK engines on OS X
[ardour.git] / tools / linux_packaging / ardour.sh.in
index 72c70380c5ee10dd9834e9b8c522cf1526529620..6545e80b405c35d54069a17f9ba2a3480f73a64a 100644 (file)
@@ -1,25 +1,24 @@
 #!/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))
@@ -41,8 +40,9 @@ export ARDOUR_BUNDLED=true
 
 %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
@@ -53,9 +53,9 @@ sed "s?@ROOTDIR@/loaders?$LIB_DIR/loaders?" < $ETC_DIR/gdk-pixbuf.loaders.in > $
 
 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