#!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")/.." swift build -c release --product Sst BIN=".build/release/Sst" APP="build/Sst.app" rm -rf "$APP" mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources" cp "$BIN" "$APP/Contents/MacOS/Sst" # SwiftPM resource bundles (if any dependency ships them) live next to the binary. for b in .build/release/*.bundle; do [ -e "$b" ] && cp -R "$b" "$APP/Contents/Resources/" done cat > "$APP/Contents/Info.plist" <<'PLIST' CFBundleIdentifierlocal.sst.app CFBundleNameSst CFBundleExecutableSst CFBundlePackageTypeAPPL CFBundleShortVersionString0.1.0 CFBundleVersion1 LSMinimumSystemVersion14.0 LSUIElement NSMicrophoneUsageDescription Sst neemt je stem op zolang je Fn ingedrukt houdt, om die lokaal naar tekst om te zetten. PLIST codesign --force --sign - --identifier local.sst.app "$APP" echo "Gebouwd: $APP" echo "Na een herbouw: tccutil reset Accessibility local.sst.app; tccutil reset ListenEvent local.sst.app; tccutil reset Microphone local.sst.app (en geef de rechten opnieuw)."