add a wrapper to launch the vst-scanner manually
authorRobin Gareus <robin@gareus.org>
Wed, 3 Aug 2016 17:56:22 +0000 (19:56 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 3 Aug 2016 17:56:22 +0000 (19:56 +0200)
gtk2_ardour/arscan [new file with mode: 0755]

diff --git a/gtk2_ardour/arscan b/gtk2_ardour/arscan
new file mode 100755 (executable)
index 0000000..ab79995
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+TOP=`dirname "$0"`/..
+. $TOP/build/gtk2_ardour/ardev_common_waf.sh
+export UBUNTU_MENUPROXY=""
+
+if [ $# -gt 0 ] ; then
+    case $1 in
+        -g|--gdb) DBG=gdb; shift ;;
+    esac
+    case $1 in
+        --valgrind) DBG=valgrind; shift ;;
+    esac
+    case $1 in
+        --callgrind) DBG=callgrind; shift ;;
+    esac
+fi
+
+if test -z "$DBG"; then
+       exec $TOP/build/libs/fst/ardour-vst-scanner "$@"
+fi
+
+if test "$DBG" = "valgrind"; then
+       export ARDOUR_RUNNING_UNDER_VALGRIND=TRUE
+       exec valgrind \
+               --error-limit=no --num-callers=50 \
+               --tool=memcheck \
+               --track-origins=yes \
+                --leak-check=full --show-leak-kinds=all \
+               --suppressions=${TOP}/tools/valgrind.supp \
+               $TOP/build/libs/fst/ardour-vst-scanner "$@"
+fi
+
+if test "$DBG" = "callgrind"; then
+       exec valgrind \
+               --error-limit=no --num-callers=50 \
+               --tool=callgrind \
+               --separate-callers=3 \
+               --separate-threads=yes \
+               --collect-systime=yes \
+               --collect-jumps=yes \
+               $TOP/build/libs/fst/ardour-vst-scanner "$@"
+fi
+
+if test -n "`which gdb`"; then
+       exec gdb --args $TOP/build/libs/fst/ardour-vst-scanner "$@"
+fi
+if test -n "`which lldb`"; then
+       exec lldb -- $TOP/build/libs/fst/ardour-vst-scanner "$@"
+fi