mkvtoolnix/packaging/macos/fix_library_paths.sh
Moritz Bunkus 58c36681ab
macOS packaging: include Qt styles plugin in DMG
New in Qt 5.11 or so: platform-specific styling is now a separate
plugin from the platform plugin.
2018-07-15 19:13:28 +02:00

16 lines
284 B
Bash
Executable File

#!/bin/zsh
while [[ -n $1 ]]; do
FILE=$1
shift
otool -L ${FILE} | \
grep -v : | \
grep -v @executable_path | \
awk '/libQt/ { print $1 }' | { \
while read LIB ; do
install_name_tool -change ${LIB} @executable_path/libs/${LIB:t} ${FILE}
done
}
done