The menu bar icon is now a hamburger whose panel gathers every other
app's status item via the Accessibility API, so tray icons no longer
need to be hunted down across the menu bar. Items can be opened from
the panel, and a best-effort toggle pushes them off the real menu bar
so they only live there.
💘 Generated with Crush
Assisted-by: Crush:deepseek-v4.1-flash
67 lines
2.0 KiB
Bash
Executable File
67 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
VERSION="${1:-0.2.0}"
|
|
|
|
swift build -c release
|
|
|
|
BIN=".build/release/SimpleTopBar"
|
|
APP="SimpleTopBar.app"
|
|
IDENT=""
|
|
|
|
# Prefer a Developer ID Application identity so the app gets clean Gatekeeper
|
|
# behavior; fall back to ad-hoc signing (no TCC-stable identity) otherwise.
|
|
if command -v security >/dev/null 2>&1; then
|
|
IDENT=$(security find-identity -v -p codesigning 2>/dev/null | awk '/Developer ID Application:/ { print $2; exit }')
|
|
fi
|
|
|
|
rm -rf "$APP"
|
|
mkdir -p "$APP/Contents/MacOS"
|
|
cp "$BIN" "$APP/Contents/MacOS/SimpleTopBar"
|
|
|
|
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>CFBundleExecutable</key>
|
|
<string>SimpleTopBar</string>
|
|
<key>CFBundleIdentifier</key>
|
|
<string>dev.tzgyn.simpletopbar</string>
|
|
<key>CFBundleInfoDictionaryVersion</key>
|
|
<string>6.0</string>
|
|
<key>CFBundleName</key>
|
|
<string>SimpleTopBar</string>
|
|
<key>CFBundlePackageType</key>
|
|
<string>APPL</string>
|
|
<key>CFBundleIconFile</key>
|
|
<string>Icon</string>
|
|
<key>CFBundleShortVersionString</key>
|
|
<string>${VERSION}</string>
|
|
<key>CFBundleVersion</key>
|
|
<string>${VERSION}</string>
|
|
<key>LSMinimumSystemVersion</key>
|
|
<string>13.0</string>
|
|
<key>LSUIElement</key>
|
|
<true/>
|
|
<key>NSHighResolutionCapable</key>
|
|
<true/>
|
|
<key>NSPrincipalClass</key>
|
|
<string>NSApplication</string>
|
|
</dict>
|
|
</plist>
|
|
PLIST
|
|
|
|
chmod +x scripts/make-icon.sh
|
|
./scripts/make-icon.sh
|
|
|
|
if [ -n "$IDENT" ]; then
|
|
security unlock-keychain "$HOME/Library/Keychains/login.keychain-db" 2>/dev/null || true
|
|
codesign --force --options runtime --sign "$IDENT" "$APP"
|
|
echo "Built $APP ${VERSION} (signed with Developer ID '$IDENT') — open $APP"
|
|
else
|
|
codesign --force --sign - "$APP"
|
|
echo "Built $APP ${VERSION} (ad-hoc signed) — open $APP"
|
|
fi
|