summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-11 21:42:48 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-11 21:42:48 -0400
commit12cc7f5db604b693973abd948b2ff214eaec1686 (patch)
treececc949cbc82725f315ba74fa6a9533c7d52a4b1
parent96808b8d883b7775fdf5be1b9a413d07bab299d7 (diff)
use DYLD_ROOT_PATH
With this, I can use jimmy's autobuilt dmg, which fails with the other two variables due to containing two versions of libiconv.
-rwxr-xr-xstandalone/osx/git-annex.app/Contents/MacOS/runshell20
1 files changed, 11 insertions, 9 deletions
diff --git a/standalone/osx/git-annex.app/Contents/MacOS/runshell b/standalone/osx/git-annex.app/Contents/MacOS/runshell
index 870c292eb..719c85cec 100755
--- a/standalone/osx/git-annex.app/Contents/MacOS/runshell
+++ b/standalone/osx/git-annex.app/Contents/MacOS/runshell
@@ -31,15 +31,17 @@ cd "$orig"
PATH=$base/bin:$PATH
export PATH
-# Using DYLD_FALLBACK_LIBRARY_PATH rather than DYLD_LIBRARY_PATH, so as
-# not to force binaries to link against possibly the wrong versions of
-# libraries found in the path. With DYLD_FALLBACK_LIBRARY_PATH, the
-# system's versions of libraries will be used when possible, and otherwise
-# it will fall back to using the libraries bundled with this app.
-for lib in $(cat $base/libdirs); do
- DYLD_FALLBACK_LIBRARY_PATH="$base/$lib:$DYLD_FALLBACK_LIBRARY_PATH"
-done
-export DYLD_FALLBACK_LIBRARY_PATH
+# This makes the linker first look in the library directories bundled
+# in this app. Only if it fails to find a library there will a system
+# library be used.
+#
+# This seems to work better than DYLD_LIBRARY_PATH, which can force
+# the wrong version of a library to be used, if the app bundles two
+# different versions of a single library. And it seems to work better
+# than DYLD_FALLBACK_LIBRARY_PATH, which fails to override old system
+# versions of libraries when a program in the app needs a newer version.
+DYLD_ROOT_PATH=$base
+export DYLD_ROOT_PATH
GIT_EXEC_PATH=$base/git-core
export GIT_EXEC_PATH