feat(daemon-beta t7): 托盤多資料夾選單(每根一列:點開 Finder/子選單停止看守/動態重建)+build-mac.sh(fyne package+LSUIElement=true 隱 Dock——leo 07-24 裁決);編譯通過,真機驗歸 leo

This commit is contained in:
2026-07-24 12:32:44 +08:00
parent c0bf83def4
commit 5017d0381e
2 changed files with 120 additions and 28 deletions
+30
View File
@@ -0,0 +1,30 @@
#!/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 → 選單列出資料夾清單"