3 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4 source $DIR/environment
5 binary=$build/src/tools/dcpomatic2
7 if [[ "$(uname -m)" == arm64 ]]; then
13 export DYLD_LIBRARY_PATH=/Users/cah/osx-environment/$env/lib:/usr/local/lib
15 # export ASAN_OPTIONS=verbosity=1:malloc_context_size=20:detect_leaks=1
17 if [ "$1" == "--debug" ]; then
20 elif [ "$1" == "--valgrind" ]; then
22 valgrind --tool="memcheck" --suppressions=suppressions --track-fds=yes --show-leak-kinds=all --leak-check=full $binary $*
23 elif [ "$1" == "--callgrind" ]; then
25 valgrind --tool="callgrind" $binary $*
26 elif [ "$1" == "--massif" ]; then
28 valgrind --tool="massif" $binary $*
29 elif [ "$1" == "--i18n" ]; then
31 LANGUAGE=de_DE.UTF8 LANG=de_DE.UTF8 LC_ALL=de_DE.UTF8 $binary "$*"
32 elif [ "$1" == "--perf" ]; then
34 perf record $binary $*
35 elif [ "$1" == "--scaled" ]; then
37 ~/src/run_scaled/run_scaled --sleep=5 --scale=0.5 $binary $*
38 elif [ "$1" == "--screenshot" ]; then
40 GTK_PATH=/usr/local/lib/gtk-3.0 GTK_MODULES=gtk-vector-screenshot $binary "$*"
42 $binary $* 2> >(grep -v Gtk-CRITICAL | grep -v Gtk-WARNING)