Final MacOS .app fix

This commit is contained in:
Alexandre 2021-11-16 14:18:33 -06:00
parent 10733f7a5d
commit a6e6c93a50
2 changed files with 5 additions and 2 deletions

View File

@ -14,5 +14,7 @@ get_first_arg() {
# Get current path
CURRENT_PATH=$(get_first_arg $(otool -L $EXEC | grep $WANTED_LIB))
# Change to the new path
install_name_tool -change $CURRENT_PATH $NEW_PATH $EXEC
# Change to the new path if found
if [ ! -z "$CURRENT_PATH" ]; then
install_name_tool -change $CURRENT_PATH $NEW_PATH $EXEC
fi

View File

@ -161,6 +161,7 @@ cp $LIBRTLSDR_PATH $DOTAPP/Contents/Frameworks/librtlsdr.dylib
sh macos/delete_rpath.sh librtlsdr $DOTAPP/Contents/Plugins/rtl_sdr_source.dylib
# sh macos/delete_rpath.sh libusb $DOTAPP/Contents/Frameworks/librtlsdr.dylib # NOT NEEDED????
sh macos/set_library_path.sh librtlsdr @rpath/librtlsdr.dylib $DOTAPP/Contents/Plugins/rtl_sdr_source.dylib
sh macos/set_library_path.sh libusb @rpath/libusb.dylib $DOTAPP/Contents/Plugins/rtl_sdr_source.dylib # On intel needed too apparently
sh macos/set_library_path.sh libusb @rpath/libusb.dylib $DOTAPP/Contents/Frameworks/librtlsdr.dylib
install_name_tool -add_rpath @loader_path/../Frameworks $DOTAPP/Contents/Frameworks/librtlsdr.dylib
codesign --remove-signature $DOTAPP/Contents/Frameworks/librtlsdr.dylib