forked from AlexandreRouma/SDRPlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·36 lines (28 loc) · 1.4 KB
/
Copy pathdeploy.sh
File metadata and controls
executable file
·36 lines (28 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/zsh
# Build + deploy channel_bank.dylib into the local testing app, and re-sign.
#
# Signing strategy (macOS 26.x / Tahoe — IMPORTANT):
# `codesign --deep` is deprecated and on Tahoe it silently skips re-signing
# nested plugins that already carry a linker-signed signature. Result: the
# bundle reseals, the plugin keeps its stale signature, the kernel's runtime
# page-hash check fails, and the app dies on launch with SIGKILL (Code
# Signature Invalid). Sign the plugin explicitly FIRST, then the bundle.
set -e
APP="/Applications/SDR++MODULETESTING.app"
DYLIB="build/misc_modules/channel_bank/channel_bank.dylib"
PLUGIN_DEST="$APP/Contents/Plugins/channel_bank.dylib"
LEGACY_DEST="$APP/Contents/channel_bank.dylib"
cd "$(dirname "$0")"
SDKROOT=$(xcrun --show-sdk-path) cmake --build build --target channel_bank
# Do not keep stale channel_bank copies around. The app should load the module
# from Contents/Plugins only.
rm -f "$PLUGIN_DEST" "$LEGACY_DEST"
cp "$DYLIB" "$PLUGIN_DEST"
# Clear any xattrs Spotlight/quarantine/Time Machine may have left on the
# fresh file. Some xattrs cause codesign to behave oddly.
xattr -c "$PLUGIN_DEST" 2>/dev/null || true
# Re-sign the plugin EXPLICITLY (no --deep — see header).
codesign --force --sign - "$PLUGIN_DEST"
# Now re-seal the bundle so its outer signature covers the new plugin hash.
codesign --force --sign - "$APP"
echo "Done — deployed and re-signed."