From 8459c48c63ed52ddc214595b6e5e9be0a261b31c Mon Sep 17 00:00:00 2001 From: Alex Birch Date: Thu, 15 Mar 2018 00:17:49 +0000 Subject: [PATCH] @executable_path would only ever work for the .app distribution. @loader_path works more generally, where we want to be relative to our own binary. --- Builds/MacOSX/relink-build-for-distribution.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Builds/MacOSX/relink-build-for-distribution.sh b/Builds/MacOSX/relink-build-for-distribution.sh index c64f0bc..e783a91 100755 --- a/Builds/MacOSX/relink-build-for-distribution.sh +++ b/Builds/MacOSX/relink-build-for-distribution.sh @@ -48,7 +48,6 @@ GTHREAD="libgthread-2.0.0.dylib" INTL="libintl.8.dylib" PCRE="libpcre.1.dylib" -FRAMEWORKEXEC="@executable_path/../Frameworks" FRAMEWORKLOAD="@loader_path/../Frameworks" for i in "${BUILDS[@]}" @@ -75,7 +74,7 @@ chmod +w "$FRAMEWORKS/"* # we want to change this link to point to the fluidsynth library we copied into: Contents/MacOS/Frameworks/libfluidsynth.1.7.1.dylib # we tell it to look for it with a relative path: @executable_path/../Frameworks/libfluidsynth.1.7.1.dylib # and yes, it's fine to point it at our 1.7.1.dylib even though it expects 1.dylib. Because 1.dylib was always a symlink to the more specific version (1.7.1) anyway. -install_name_tool -change /usr/local/opt/fluid-synth/lib/libfluidsynth.1.dylib "$FRAMEWORKEXEC/$FLUIDSYNTH" "$BINARY" +install_name_tool -change /usr/local/opt/fluid-synth/lib/libfluidsynth.1.dylib "$FRAMEWORKLOAD/$FLUIDSYNTH" "$BINARY" # changes to our libfluidsynth (depends on glib, gthread, intl): # change our 1.7.1.dylib to identify itself as 1.dylib, to meet our targets' expectations