3 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4 source $DIR/environment
5 binary=build/src/tools/dcpomatic2_player
7 if [[ "$(uname -m)" == arm64 ]]; then
14 export DYLD_LIBRARY_PATH=/Users/cah/osx-environment/$env/lib:/usr/local/lib
16 if [ "$1" == "--debug" ]; then
18 gdb --args build/src/tools/dcpomatic2_player $*
19 elif [ "$1" == "--valgrind" ]; then
21 valgrind --tool="memcheck" --suppressions=suppressions --track-fds=yes $binary $*
22 elif [ "$1" == "--callgrind" ]; then
24 valgrind --tool="callgrind" $binary $*
25 elif [ "$1" == "--massif" ]; then
27 valgrind --tool="massif" $binary $*
28 elif [ "$1" == "--i18n" ]; then
30 LANGUAGE=fr_FR.UTF8 LANG=fr_FR.UTF8 LC_ALL=fr_FR.UTF8 $binary "$*"
31 elif [ "$1" == "--perf" ]; then
33 perf record $binary $*
34 elif [ "$1" == "--screenshot" ]; then
36 GTK_PATH=/usr/local/lib/gtk-3.0 GTK_MODULES=gtk-vector-screenshot $binary "$*"