From 29aed15e4eab41b75b6ca72ead142aa20a7690c2 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Fri, 16 Oct 2026 16:15:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=200.3.0=20=E5=B9=B6?= =?UTF-8?q?=E8=A1=A5=E9=BD=90=20timeSync=20=E7=94=9F=E6=88=90=E7=BB=91?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - internal/version/version.go:0.2.1 -> 0.3.0。版本号单一来源,exe 文件名、编译注入(-ldflags)与界面左下角标签共用这一处 - wails.json:info.productVersion 同步为 0.3.0(只影响 exe 文件属性) - frontend/wailsjs/go/models.ts:补上 gui.Config.timeSync 字段。这个绑定只有 wails build 会生成(npm run build 不会),所以上一版加 TimeSync 时漏提交了 - 已执行 ./scripts/build-windows.sh 产出 build/bin/huya-gui-v0.3.0.exe(PE32+ GUI x86-64,内嵌版本号 0.3.0) --- frontend/wailsjs/go/models.ts | 2 ++ internal/version/version.go | 6 +++--- wails.json | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/wailsjs/go/models.ts b/frontend/wailsjs/go/models.ts index 28aac8d..8a4ce68 100755 --- a/frontend/wailsjs/go/models.ts +++ b/frontend/wailsjs/go/models.ts @@ -41,6 +41,7 @@ export namespace gui { autoSelect: boolean; refreshAfterSuccess: boolean; leadMs: number; + timeSync: boolean; frequentBackoffMs: number; errorBackoffMs: number; timeoutSec: number; @@ -74,6 +75,7 @@ export namespace gui { this.autoSelect = source["autoSelect"]; this.refreshAfterSuccess = source["refreshAfterSuccess"]; this.leadMs = source["leadMs"]; + this.timeSync = source["timeSync"]; this.frequentBackoffMs = source["frequentBackoffMs"]; this.errorBackoffMs = source["errorBackoffMs"]; this.timeoutSec = source["timeoutSec"]; diff --git a/internal/version/version.go b/internal/version/version.go index 56c8dd4..8921562 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -5,10 +5,10 @@ package version // // 构建时可用 ldflags 覆盖(构建脚本就是这么做的): // -// go build -ldflags "-X huya-go/internal/version.Version=0.2.1" -var Version = "0.2.1" +// go build -ldflags "-X huya-go/internal/version.Version=0.3.0" +var Version = "0.3.0" -// Display 返回带 v 前缀的展示版本号,例如 v0.2.1。 +// Display 返回带 v 前缀的展示版本号,例如 v0.3.0。 func Display() string { return "v" + Version } diff --git a/wails.json b/wails.json index 7306240..93195d4 100644 --- a/wails.json +++ b/wails.json @@ -9,7 +9,7 @@ "info": { "companyName": "huya-go", "productName": "虎牙抢购助手", - "productVersion": "0.2.1", + "productVersion": "0.3.0", "copyright": "", "comments": "虎牙活动积分兑换/抢购工具" }