From: Carl Hetherington Date: Sat, 2 Jul 2022 22:42:35 +0000 (+0200) Subject: Tidy up the run/ directory a little. X-Git-Tag: v2.16.16 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=27312cda2990371d7bf44a94a7513b0117db6ac1 Tidy up the run/ directory a little. --- diff --git a/run/dcpomatic b/run/dcpomatic index 639e88098..8da7d7fab 100755 --- a/run/dcpomatic +++ b/run/dcpomatic @@ -1,11 +1,9 @@ #!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -build=$DIR/../build -export LD_LIBRARY_PATH=$build/src/lib:$build/src/wx:$build/src/asdcplib/src:/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH -export DYLD_LIBRARY_PATH=$build/src/lib:$build/src/wx:$build/src/asdcplib/src:/Users/ci/osx-environment/x86_64/10.10/lib:/Users/ci/workspace/lib -export DCPOMATIC_GRAPHICS=$DIR/../graphics +source $DIR/environment binary=$build/src/tools/dcpomatic2 + if [ "$1" == "--debug" ]; then shift gdb --args $binary $* diff --git a/run/dcpomatic_batch b/run/dcpomatic_batch index 6a8207c14..6ff689ecf 100755 --- a/run/dcpomatic_batch +++ b/run/dcpomatic_batch @@ -1,6 +1,8 @@ #!/bin/bash -export LD_LIBRARY_PATH=build/src/lib:build/src/wx:build/src/asdcplib/src:$LD_LIBRARY_PATH +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $DIR/environment + if [ "$1" == "--debug" ]; then shift gdb --args build/src/tools/dcpomatic2_batch $* diff --git a/run/dcpomatic_cli b/run/dcpomatic_cli index b24090db9..9a5cae647 100755 --- a/run/dcpomatic_cli +++ b/run/dcpomatic_cli @@ -1,8 +1,8 @@ #!/bin/bash -cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $DIR/environment -export LD_LIBRARY_PATH=build/src/lib:build/src:/home/c.hetherington/lib:$LD_LIBRARY_PATH if [ "$1" == "--debug" ]; then shift gdb --args build/src/tools/dcpomatic2_cli "$@" diff --git a/run/dcpomatic_combiner b/run/dcpomatic_combiner index a685c864a..12da46c1f 100755 --- a/run/dcpomatic_combiner +++ b/run/dcpomatic_combiner @@ -1,8 +1,8 @@ #!/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 + if [ "$1" == "--debug" ]; then shift gdb --args build/src/tools/dcpomatic2_combiner $* diff --git a/run/dcpomatic_create b/run/dcpomatic_create index 7f88082bd..693f9a05d 100755 --- a/run/dcpomatic_create +++ b/run/dcpomatic_create @@ -1,9 +1,8 @@ #!/bin/bash -cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $DIR/environment -export LD_LIBRARY_PATH=build/src/lib:build/src/wx:/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 if [ "$1" == "--debug" ]; then shift gdb --args build/src/tools/dcpomatic2_create $* diff --git a/run/dcpomatic_disk b/run/dcpomatic_disk index 591fc01fe..a4b4ead55 100755 --- a/run/dcpomatic_disk +++ b/run/dcpomatic_disk @@ -1,7 +1,8 @@ #!/bin/bash -export LD_LIBRARY_PATH=build/src/lib:build/src/wx:build/src/asdcplib/src:$LD_LIBRARY_PATH -export DYLD_LIBRARY_PATH=build/src/lib:build/src/wx:build/src/asdcplib/src:$HOME/osx-environment/x86_64/lib +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $DIR/environment + if [ "$1" == "--debug" ]; then shift gdb --args build/src/tools/dcpomatic2_disk $* diff --git a/run/dcpomatic_disk_writer b/run/dcpomatic_disk_writer index 6d20f3ae4..b2e1a872d 100755 --- a/run/dcpomatic_disk_writer +++ b/run/dcpomatic_disk_writer @@ -1,10 +1,12 @@ #!/bin/bash -export LD_LIBRARY_PATH=build/src/lib:build/src/wx:build/src/asdcplib/src:$LD_LIBRARY_PATH -export DYLD_LIBRARY_PATH=build/src/lib:build/src/wx:build/src/asdcplib/src:$HOME/osx-environment/x86_64/lib +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $DIR/environment + exe=build/src/tools/dcpomatic2_disk_writer sudo chown root $exe sudo chmod 4755 $exe + if [ "$1" == "--debug" ]; then shift gdb --args $exe $* diff --git a/run/dcpomatic_ecinema b/run/dcpomatic_ecinema deleted file mode 100755 index 3c739c079..000000000 --- a/run/dcpomatic_ecinema +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -export LD_LIBRARY_PATH=build/src/lib:build/src/wx:/home/c.hetherington/lib:$LD_LIBRARY_PATH -export DYLD_LIBRARY_PATH=build/src/lib:build/src/wx:/Users/c.hetherington/osx-environment/64/lib -if [ "$1" == "--debug" ]; then - shift - gdb --args build/src/tools/dcpomatic2_ecinema $* -elif [ "$1" == "--valgrind" ]; then - shift - valgrind --tool="memcheck" build/src/tools/dcpomatic2_ecinema $* -elif [ "$1" == "--callgrind" ]; then - shift - valgrind --tool="callgrind" build/src/tools/dcpomatic2_ecinema $* -elif [ "$1" == "--massif" ]; then - shift - valgrind --tool="massif" build/src/tools/dcpomatic2_ecinema $* -elif [ "$1" == "--i18n" ]; then - shift - LANGUAGE=fr_FR.UTF8 LANG=fr_FR.UTF8 LC_ALL=fr_FR.UTF8 build/src/tools/dcpomatic2_ecinema "$*" -elif [ "$1" == "--perf" ]; then - shift - perf record build/src/tools/dcpomatic2_ecinema $* -else - build/src/tools/dcpomatic2_ecinema $* -fi diff --git a/run/dcpomatic_editor b/run/dcpomatic_editor index 28ef4a9d2..af2a8a836 100755 --- a/run/dcpomatic_editor +++ b/run/dcpomatic_editor @@ -1,8 +1,8 @@ #!/bin/bash -export LD_LIBRARY_PATH=build/src/lib:build/src/wx:build/src/asdcplib/src:$LD_LIBRARY_PATH -export DYLD_LIBRARY_PATH=$build/src/lib:$build/src/wx:$build/src/asdcplib/src:/Users/ci/osx-environment/x86_64/10.10/lib -export DCPOMATIC_GRAPHICS=graphics +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $DIR/environment + if [ "$1" == "--debug" ]; then shift gdb --args build/src/tools/dcpomatic2_editor $* diff --git a/run/dcpomatic_kdm b/run/dcpomatic_kdm index b523f01c6..d0160ef7a 100755 --- a/run/dcpomatic_kdm +++ b/run/dcpomatic_kdm @@ -1,8 +1,8 @@ #!/bin/bash -export LD_LIBRARY_PATH=build/src/lib:build/src/wx:/home/c.hetherington/lib:$LD_LIBRARY_PATH -export DYLD_LIBRARY_PATH=build/src/lib:build/src/wx:/carl/Environment/64/lib -export DCPOMATIC_GRAPHICS=graphics +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $DIR/environment + if [ "$1" == "--debug" ]; then shift gdb --args build/src/tools/dcpomatic2_kdm $* diff --git a/run/dcpomatic_kdm_cli b/run/dcpomatic_kdm_cli index 0f75232cb..e9d0f300a 100755 --- a/run/dcpomatic_kdm_cli +++ b/run/dcpomatic_kdm_cli @@ -1,8 +1,8 @@ #!/bin/bash -cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $DIR/environment -export LD_LIBRARY_PATH=build/src/lib:/home/c.hetherington/lib:$LD_LIBRARY_PATH:build/src if [ "$1" == "--debug" ]; then shift gdb --args build/src/tools/dcpomatic2_kdm_cli "$@" diff --git a/run/dcpomatic_player b/run/dcpomatic_player index 168fa9bb1..1c8a69b9e 100755 --- a/run/dcpomatic_player +++ b/run/dcpomatic_player @@ -1,8 +1,8 @@ #!/bin/bash -export LD_LIBRARY_PATH=build/src/lib:build/src/wx:build/src/asdcplib/src:$LD_LIBRARY_PATH -export DYLD_LIBRARY_PATH=$build/src/lib:$build/src/wx:$build/src/asdcplib/src:/Users/ci/osx-environment/x86_64/10.10/lib -export DCPOMATIC_GRAPHICS=graphics +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $DIR/environment + if [ "$1" == "--debug" ]; then shift gdb --args build/src/tools/dcpomatic2_player $* diff --git a/run/dcpomatic_playlist b/run/dcpomatic_playlist index 3de040e00..e240aab9c 100755 --- a/run/dcpomatic_playlist +++ b/run/dcpomatic_playlist @@ -1,8 +1,8 @@ #!/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 + if [ "$1" == "--debug" ]; then shift gdb --args build/src/tools/dcpomatic2_playlist $* diff --git a/run/dcpomatic_server b/run/dcpomatic_server index 212b599d9..8de760cc0 100755 --- a/run/dcpomatic_server +++ b/run/dcpomatic_server @@ -1,6 +1,8 @@ #!/bin/bash -export LD_LIBRARY_PATH=build/src/lib:build/src/wx:$LD_LIBRARY_PATH +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $DIR/environment + if [ "$1" == "--debug" ]; then gdb --args build/src/tools/dcpomatic2_server elif [ "$1" == "--valgrind" ]; then diff --git a/run/dcpomatic_server_cli b/run/dcpomatic_server_cli index f7f7f1a8d..b1dffe079 100755 --- a/run/dcpomatic_server_cli +++ b/run/dcpomatic_server_cli @@ -1,6 +1,8 @@ #!/bin/bash -export LD_LIBRARY_PATH=build/src/lib:/home/c.hetherington/lib:$LD_LIBRARY_PATH +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +source $DIR/environment + if [ "$1" == "--debug" ]; then shift gdb --args build/src/tools/dcpomatic2_server_cli $* diff --git a/run/environment b/run/environment new file mode 100644 index 000000000..0e74572a0 --- /dev/null +++ b/run/environment @@ -0,0 +1,6 @@ +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +build=$DIR/../build +export LD_LIBRARY_PATH=$build/src/lib:$build/src/wx:$build/src/asdcplib/src:/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH +export DYLD_LIBRARY_PATH=$build/src/lib:$build/src/wx:$build/src/asdcplib/src:/Users/ci/osx-environment/x86_64/10.10/lib:/Users/ci/workspace/lib +DCPOMATIC_GRAPHICS=$DIR/../graphics + diff --git a/run/long-tests b/run/long-tests deleted file mode 100755 index 6c2925495..000000000 --- a/run/long-tests +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -export LD_LIBRARY_PATH=build/src/lib:$LD_LIBRARY_PATH -if [ "$1" == "--debug" ]; then - gdb --args build/test/long-unit-tests -elif [ "$1" == "--valgrind" ]; then - valgrind --tool="memcheck" --leak-check=full build/test/long-unit-tests -else - build/test/long-unit-tests -fi