Skip to content

Commit

Permalink
use brew prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzawa-san authored and argilo committed Nov 9, 2024
1 parent 272f037 commit 9cecc27
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions macos_bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9cecc27

Please sign in to comment.