X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=run%2Fdcpomatic_player;h=0c565c25186c7c268d08ca9f7973884801cfcc3c;hb=HEAD;hp=9dc1954cf2736b67f60e177d7fc43e84e6ca62da;hpb=1436de822ff18b0f3a6dafbea1e212ac068cc0fd;p=dcpomatic.git diff --git a/run/dcpomatic_player b/run/dcpomatic_player index 9dc1954cf..0c565c251 100755 --- a/run/dcpomatic_player +++ b/run/dcpomatic_player @@ -1,26 +1,30 @@ #!/bin/bash -export LD_LIBRARY_PATH=build/src/lib:build/src/wx:build/src/asdcplib/src:/home/c.hetherington/lib:$LD_LIBRARY_PATH -export DYLD_LIBRARY_PATH=build/src/lib:build/src/wx:build/src/asdcplib/src:/Users/c.hetherington/osx-environment/64/lib -export DCPOMATIC_GRAPHICS=graphics +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $DIR/environment +binary=build/src/tools/dcpomatic2_player + if [ "$1" == "--debug" ]; then shift gdb --args build/src/tools/dcpomatic2_player $* elif [ "$1" == "--valgrind" ]; then shift - valgrind --tool="memcheck" --suppressions=suppressions --track-fds=yes build/src/tools/dcpomatic2_player $* + valgrind --tool="memcheck" --suppressions=suppressions --track-fds=yes $binary $* elif [ "$1" == "--callgrind" ]; then shift - valgrind --tool="callgrind" build/src/tools/dcpomatic2_player $* + valgrind --tool="callgrind" $binary $* elif [ "$1" == "--massif" ]; then shift - valgrind --tool="massif" build/src/tools/dcpomatic2_player $* + valgrind --tool="massif" $binary $* elif [ "$1" == "--i18n" ]; then shift - LANGUAGE=fr_FR.UTF8 LANG=fr_FR.UTF8 LC_ALL=fr_FR.UTF8 build/src/tools/dcpomatic2_player "$*" + LANGUAGE=fr_FR.UTF8 LANG=fr_FR.UTF8 LC_ALL=fr_FR.UTF8 $binary "$*" elif [ "$1" == "--perf" ]; then shift - perf record build/src/tools/dcpomatic2_player $* + perf record $binary $* +elif [ "$1" == "--screenshot" ]; then + shift + GTK_PATH=/usr/local/lib/gtk-3.0 GTK_MODULES=gtk-vector-screenshot $binary "$*" else - build/src/tools/dcpomatic2_player $* + $binary $* fi