feat: add menu bar app and bundle script
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/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'
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key><string>local.sst.app</string>
|
||||
<key>CFBundleName</key><string>Sst</string>
|
||||
<key>CFBundleExecutable</key><string>Sst</string>
|
||||
<key>CFBundlePackageType</key><string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key><string>0.1.0</string>
|
||||
<key>CFBundleVersion</key><string>1</string>
|
||||
<key>LSMinimumSystemVersion</key><string>14.0</string>
|
||||
<key>LSUIElement</key><true/>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Sst neemt je stem op zolang je Fn ingedrukt houdt, om die lokaal naar tekst om te zetten.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
PLIST
|
||||
|
||||
codesign --force --sign - --identifier local.sst.app "$APP"
|
||||
echo "Gebouwd: $APP"
|
||||
Reference in New Issue
Block a user