Files
arcrun-collector/cmd/arcrun-tray/build-mac.sh
T

31 lines
1.3 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# build-mac.sh — 打包 Arcrun RAG 托盤 appdaemon-beta t7/t8,真機執行)。
#
# leo 07-24 裁決:**選單列托盤 icon 是唯一指示器,不佔 Dock**——
# fyne 預設 bundle 會出現 Dock icon,打包後把 LSUIElement=true 寫進 Info.plist 即隱。
#
# 用法(真機、需 Xcode CLT):
# cd collector/cmd/arcrun-tray && bash build-mac.sh
# 產物:Arcrun RAG.app(含同綑 arcrun-collector)。簽章/公證另行(見 README)。
set -euo pipefail
cd "$(dirname "$0")"
echo "① 編 collector(同綑執行檔)"
( cd ../.. && go build -o "cmd/arcrun-tray/arcrun-collector" . )
echo "② fyne package"
go run fyne.io/fyne/v2/cmd/fyne@latest package -os darwin -icon icon.png -name "Arcrun RAG"
APP="Arcrun RAG.app"
PLIST="$APP/Contents/Info.plist"
echo "③ LSUIElement=true(托盤唯一指示器,隱 Dock icon——leo 07-24 裁決)"
/usr/libexec/PlistBuddy -c "Add :LSUIElement bool true" "$PLIST" 2>/dev/null \
|| /usr/libexec/PlistBuddy -c "Set :LSUIElement true" "$PLIST"
echo "④ 同綑 collector 進 app bundle(托盤 collectorBinPath 找同層)"
cp arcrun-collector "$APP/Contents/MacOS/arcrun-collector"
echo "✅ 完成:$APP"
echo "驗法:open '$APP' → 選單列出現 icon、Dock **不出現** icon → 選單列出資料夾清單"