diff --git a/macos_bundle.sh b/macos_bundle.sh index ebf0de27b..06272b04e 100755 --- a/macos_bundle.sh +++ b/macos_bundle.sh @@ -49,16 +49,14 @@ EOM cp build/src/gqrx Gqrx.app/Contents/MacOS cp resources/icons/gqrx.icns Gqrx.app/Contents/Resources -# see https://apple.stackexchange.com/questions/437618/why-is-homebrew-installed-in-opt-homebrew-on-apple-silicon-macs -MACDEPLOYQT6=/usr/local/opt/qt@6/bin/macdeployqt -if [ -f /opt/homebrew/opt/qt@6/bin/macdeployqt ]; then - MACDEPLOYQT6=/opt/homebrew/opt/qt@6/bin/macdeployqt -fi -cp /*/*/lib/SoapySDR/modules*/libPlutoSDRSupport.so Gqrx.app/Contents/soapy-modules -cp /*/*/lib/SoapySDR/modules*/libremoteSupport.so Gqrx.app/Contents/soapy-modules +PREFIX=$(brew --prefix) +MACDEPLOYQT6=${PREFIX}/opt/qt@6/bin/macdeployqt +# NOTE: PlutoSDR is built locally, so it will not in the brew path +cp /usr/local/lib/SoapySDR/modules*/libPlutoSDRSupport.so Gqrx.app/Contents/soapy-modules +cp ${PREFIX}/lib/SoapySDR/modules*/libremoteSupport.so Gqrx.app/Contents/soapy-modules chmod 644 Gqrx.app/Contents/soapy-modules/* -dylibbundler -s /usr/local/opt/icu4c/lib/ -od -b -x Gqrx.app/Contents/MacOS/gqrx -x Gqrx.app/Contents/soapy-modules/libPlutoSDRSupport.so -x Gqrx.app/Contents/soapy-modules/libremoteSupport.so -d Gqrx.app/Contents/libs/ +dylibbundler -s ${PREFIX}/opt/icu4c/lib/ -od -b -x Gqrx.app/Contents/MacOS/gqrx -x Gqrx.app/Contents/soapy-modules/libPlutoSDRSupport.so -x Gqrx.app/Contents/soapy-modules/libremoteSupport.so -d Gqrx.app/Contents/libs/ ${MACDEPLOYQT6} Gqrx.app -no-strip -always-overwrite # TODO: Remove macdeployqt workaround if [ "$1" = "true" ]; then ${MACDEPLOYQT6} Gqrx.app -no-strip -always-overwrite -sign-for-notarization=$IDENTITY