Skip to content

Commit 4d033de

Browse files
authored
Improve macOS installer dylib path patching (#1936)
* Improve macOS installer dylib path patching * Use set -x instead of echo
1 parent f744ae2 commit 4d033de

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

installer/utils/mac_utils.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export BUNDLE_CONTENTS=$PWD/../data/$PRODUCT_DISPLAYED_NAME.app/Contents/
66
export LIB_PATH=@executable_path/../Lib
77

88
function fix_dependencies {
9-
set -ueo pipefail
9+
set -ueox pipefail
1010
local target="$1"
1111
pushd "$(dirname "$target")"
1212
local prefix=$(grealpath -e "$2")
@@ -25,10 +25,15 @@ function fix_dependencies {
2525
continue;
2626
fi
2727
normalized=$(grealpath -e "$dep")
28+
if [[ "$normalized" == "/usr/local"/* ]] ; then
29+
relative=$(basename "$normalized")
30+
fi
31+
2832
if [[ "$normalized" == "$prefix"/* ]] ; then
2933
relative=$(grealpath -e --relative-to "$prefix" "$normalized")
30-
change="$change -change \"$dep\" \"$subst/$relative\""
3134
fi
35+
36+
change="$change -change \"$dep\" \"$subst/$relative\""
3237
done
3338
popd
3439
if [[ -n "$change" ]] ; then

0 commit comments

Comments
 (0)