summaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-02-04 13:03:45 +0100
committerCarl Hetherington <cth@carlh.net>2024-02-04 13:03:45 +0100
commit2310a084216fc737fad879b79ae9f845ac461c1b (patch)
tree30a84fb627877a9f87046063062a636cd95d5af5 /run
parent52dc2f13d5cd03403da20e1764ba474c829a1a26 (diff)
parent32dcd32b2c87766a1248bb078826ce9b83efacc4 (diff)
Merge branch 'main' into v2.17.x
Diffstat (limited to 'run')
-rwxr-xr-xrun/dcpomatic16
-rwxr-xr-xrun/dcpomatic_disk8
-rwxr-xr-xrun/dcpomatic_disk_writer12
3 files changed, 32 insertions, 4 deletions
diff --git a/run/dcpomatic b/run/dcpomatic
index 429139dac..45f857ae2 100755
--- a/run/dcpomatic
+++ b/run/dcpomatic
@@ -4,9 +4,23 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source $DIR/environment
binary=$build/src/tools/dcpomatic2
+if [[ "$(uname -m)" == arm64 ]]; then
+ env=arm64/11.0
+else
+ env=x86_64/10.10
+fi
+
+export DYLD_LIBRARY_PATH=/Users/cah/osx-environment/$env/lib:/usr/local/lib
+
+# export ASAN_OPTIONS=verbosity=1:malloc_context_size=20:detect_leaks=1
+
if [ "$1" == "--debug" ]; then
shift
- gdb --args $binary $*
+ if [[ "$(uname)" == Darwin ]]; then
+ /Applications/Xcode.app/Contents/Developer/usr/bin/lldb $binary $*
+ else
+ gdb --args $binary $*
+ fi
elif [ "$1" == "--valgrind" ]; then
shift
valgrind --tool="memcheck" --suppressions=suppressions --track-fds=yes --show-leak-kinds=all --leak-check=full $binary $*
diff --git a/run/dcpomatic_disk b/run/dcpomatic_disk
index 8c13183b6..ff5d8e7e5 100755
--- a/run/dcpomatic_disk
+++ b/run/dcpomatic_disk
@@ -3,6 +3,14 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source $DIR/environment
+if [[ "$(uname -m)" == arm64 ]]; then
+ env=arm64/11.0
+else
+ env=x86_64/10.10
+fi
+
+export DYLD_LIBRARY_PATH=/Users/cah/osx-environment/$env/lib:/usr/local/lib
+
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 b2e1a872d..2dff961fb 100755
--- a/run/dcpomatic_disk_writer
+++ b/run/dcpomatic_disk_writer
@@ -3,9 +3,15 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source $DIR/environment
+if [[ "$(uname -m)" == arm64 ]]; then
+ env=arm64/11.0
+else
+ env=x86_64/10.10
+fi
+
+export DYLD_LIBRARY_PATH=/Users/cah/osx-environment/$env/lib:/usr/local/lib
+
exe=build/src/tools/dcpomatic2_disk_writer
-sudo chown root $exe
-sudo chmod 4755 $exe
if [ "$1" == "--debug" ]; then
shift
@@ -29,5 +35,5 @@ elif [ "$1" == "--scaled" ]; then
shift
~/src/run_scaled/run_scaled --sleep=5 --scale=0.5 $exe $*
else
- $exe $*
+ sudo DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH $exe $*
fi