#!/bin/bash -e GQRX_VERSION="$(Gqrx.app/Contents/Info.plist NSPrincipalClass NSApplication CFBundleExecutable gqrx CFBundleIdentifier dk.gqrx.gqrx CFBundleName Gqrx CFBundleIconFile gqrx.icns CFBundleShortVersionString $GQRX_VERSION CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType APPL IFMajorVersion 1 IFMinorVersion 0 EOM /bin/cat </tmp/Entitlements.plist com.apple.security.cs.allow-unsigned-executable-memory EOM cp build/src/gqrx Gqrx.app/Contents/MacOS cp resources/icons/gqrx.icns Gqrx.app/Contents/Resources cp "$CONDA_PREFIX"/lib/SoapySDR/modules*/* Gqrx.app/Contents/soapy-modules if [ "$1" = "true" ]; then "${MACDEPLOYQT6}" Gqrx.app -verbose=1 -no-strip -always-overwrite -sign-for-notarization="${IDENTITY}" -libpath=Gqrx.app/Contents/Frameworks else "${MACDEPLOYQT6}" Gqrx.app -verbose=1 -no-strip -always-overwrite -libpath=Gqrx.app/Contents/Frameworks fi for f in Gqrx.app/Contents/Frameworks/*.dylib Gqrx.app/Contents/soapy-modules/* Gqrx.app/Contents/MacOS/gqrx do if [ "$1" = "true" ]; then codesign --force --verify --verbose --timestamp --options runtime --entitlements /tmp/Entitlements.plist --sign "${IDENTITY}" "$f" else codesign --remove-signature "$f" fi done