3 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4 source $DIR/environment
5 binary=$build/src/tools/dcpomatic2
7 if [ "$1" == "--debug" ]; then
10 elif [ "$1" == "--valgrind" ]; then
12 valgrind --tool="memcheck" --suppressions=suppressions --track-fds=yes --show-leak-kinds=all --leak-check=full $binary $*
13 elif [ "$1" == "--callgrind" ]; then
15 valgrind --tool="callgrind" $binary $*
16 elif [ "$1" == "--massif" ]; then
18 valgrind --tool="massif" $binary $*
19 elif [ "$1" == "--i18n" ]; then
21 LANGUAGE=de_DE.UTF8 LANG=de_DE.UTF8 LC_ALL=de_DE.UTF8 $binary "$*"
22 elif [ "$1" == "--perf" ]; then
24 perf record $binary $*
25 elif [ "$1" == "--scaled" ]; then
27 ~/src/run_scaled/run_scaled --sleep=5 --scale=0.5 $binary $*
28 elif [ "$1" == "--screenshot" ]; then
30 GTK_PATH=/usr/local/lib/gtk-3.0 GTK_MODULES=gtk-vector-screenshot $binary "$*"
32 $binary $* 2> >(grep -v Gtk-CRITICAL | grep -v Gtk-WARNING)