From 133bfdbc84ab6ebf6baba133da63a79fa7966329 Mon Sep 17 00:00:00 2001 From: richblack Date: Wed, 5 Aug 2026 16:52:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=20Info.plist=20=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=B0=B8=E9=81=A0=E6=98=AF=201.0.0=EF=BC=8Bskill=20=E8=A3=9C?= =?UTF-8?q?=E3=80=8C=E7=94=A8=E6=88=B6=E8=A6=96=E8=A7=92=E9=A9=97=E6=94=B6?= =?UTF-8?q?=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit leo 開 DMG 檢查時抓到:CFBundleShortVersionString = **1.0.0**(Wails 預設), 不是 v0.18.4 ⇒ 使用者在 Finder/「關於」看到的版本永遠不變 ⇒ 無從判斷自己是不是新版(同「版本號是唯一驗收介面」的病)。 真因:wails.json 沒有 info.productVersion,而 wails build **沒有 CLI 旗標**可指定。 修:build-mac.sh/build-win.sh 建置前把版本寫進 wails.json 的 info, 建完用 trap 還原(不污染版控)。 驗:重打後 Info.plist = 0.18.4 ✅、wails.json 無殘留 ✅ DMG 用戶視角實測(掛載後看): 剛好兩項 Arcrun.app + Applications 捷徑 ✅(拖進去的標準畫面) MacOS/ 內含 arcrun-app + arcrun-collector ✅(沒同綑=裝了不會同步) LSUIElement=true ✅(不佔 Dock)|codesign -v 通過 ✅ skill 補兩段: · 3.5「把 DMG/zip 真的打開,用使用者第一次看到的樣子檢查」(含五項判準與漏掉的後果) · 開頭「這支 skill 自己的失效模式」——leo:「你寫完一個 skill 然後每個我要提醒你, 表示這個 skill 無效」。根因是憑印象列步驟沒走過使用者的路; 訂三條鐵律(每條要有可貼的實測輸出/使用者看得到的東西一律真的打開/ 被 leo 問出來的缺口當場補進 skill)。 Co-Authored-By: Claude Opus 5 (1M context) --- cmd/arcrun-app/build-mac.sh | 18 ++++++++++++++++++ cmd/arcrun-app/build-win.sh | 14 ++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/cmd/arcrun-app/build-mac.sh b/cmd/arcrun-app/build-mac.sh index 0ae242e..5e3bfc6 100755 --- a/cmd/arcrun-app/build-mac.sh +++ b/cmd/arcrun-app/build-mac.sh @@ -13,6 +13,24 @@ echo "🏷 版本:${VERSION}" echo "① 編 collector(同綑執行檔,純 stdlib、CGO_ENABLED=0)" ( cd ../.. && CGO_ENABLED=0 go build -ldflags "-s -w" -o "cmd/arcrun-app/arcrun-collector" . ) +# 🔴 2026-08-05(leo 開 DMG 檢查時抓到):Info.plist 的 CFBundleShortVersionString +# 是 **1.0.0**(Wails 預設),不是我們的版本號——因為 wails.json 沒有 info.productVersion, +# 而 `wails build` **沒有** CLI 旗標可指定。 +# ⇒ 建置前把版本寫進 wails.json 的 info,建完還原(不污染版控)。 +# 為什麼要修:使用者「關於」看到的、以及 Finder 顯示的版本都讀這個欄位; +# 永遠顯示 1.0.0 ⇒ 用戶無從判斷自己是不是新版(同 leo「版本號是唯一驗收介面」的病)。 +PLIST_VER="${VERSION#v}" +cp wails.json wails.json.bak +python3 - "$PLIST_VER" <<'PY' +import json, sys +c = json.load(open('wails.json')) +c.setdefault('info', {}) +c['info']['productVersion'] = sys.argv[1] +c['info']['productName'] = 'Arcrun' +json.dump(c, open('wails.json', 'w'), indent=2, ensure_ascii=False) +PY +trap 'mv -f wails.json.bak wails.json 2>/dev/null || true' EXIT + echo "② wails build" wails build -clean -ldflags "-X main.version=${VERSION}" diff --git a/cmd/arcrun-app/build-win.sh b/cmd/arcrun-app/build-win.sh index c9306b2..68c2c89 100755 --- a/cmd/arcrun-app/build-win.sh +++ b/cmd/arcrun-app/build-win.sh @@ -34,6 +34,20 @@ echo "① 編 collector.exe(同綑執行檔,純 stdlib、CGO_ENABLED=0)" ( cd ../.. && GOOS=windows GOARCH=amd64 CGO_ENABLED=0 \ go build -ldflags "-s -w" -o "cmd/arcrun-app/arcrun-collector.exe" . ) +# 🔴 同 build-mac.sh:wails.json 沒 info.productVersion ⇒ exe 內容資訊永遠是 1.0.0。 +# Windows 使用者在「內容→詳細資料」看到的版本讀這個欄位;MSIX 送審也會對照。 +PLIST_VER="${VERSION#v}" +cp wails.json wails.json.bak +python3 - "$PLIST_VER" <<'PY' +import json, sys +c = json.load(open('wails.json')) +c.setdefault('info', {}) +c['info']['productVersion'] = sys.argv[1] +c['info']['productName'] = 'Arcrun' +json.dump(c, open('wails.json', 'w'), indent=2, ensure_ascii=False) +PY +trap 'mv -f wails.json.bak wails.json 2>/dev/null || true' EXIT + echo "② wails build(windows/amd64,CGo 走 mingw)" CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc \ wails build -platform windows/amd64 -clean \