diff --git a/README.md b/README.md index badb09a..49dd82a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # NPS -![Version](https://img.shields.io/badge/version-v0.26.36-blue) +![Version](https://img.shields.io/badge/version-v0.26.37-blue) ![License](https://img.shields.io/badge/license-GPL--3.0-green) ![Go](https://img.shields.io/badge/Go-%3E%3D1.22-00ADD8?logo=go) diff --git a/build.sh b/build.sh index f65e58d..5025e08 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #/bash/sh -export VERSION=0.26.33 +export VERSION=0.26.37 export GOPROXY=direct sudo apt-get update diff --git a/cmd/npc/npc-gui/wails.json b/cmd/npc/npc-gui/wails.json index 47fbe4f..274a9a2 100644 --- a/cmd/npc/npc-gui/wails.json +++ b/cmd/npc/npc-gui/wails.json @@ -14,7 +14,7 @@ }, "info": { "productName": "NPS Client", - "productVersion": "0.26.33", + "productVersion": "0.26.37", "companyName": "NPS", "copyright": "Copyright © 2026 NPS" }, diff --git a/docs/changelog/index.md b/docs/changelog/index.md index 1077bf3..f3902fd 100644 --- a/docs/changelog/index.md +++ b/docs/changelog/index.md @@ -1,4 +1,8 @@ # 更新日志 +- 2026-08-08 v0.26.37 + - 修复: + - NPC 安装到系统服务失败 BUG [#338](https://github.com/yisier/nps/issues/338) + - 2026-07-12 v0.26.36 - 新增: - 新增客户端内网地址上报功能,客户端列表展示 npc 内网地址 [#333](https://github.com/yisier/nps/issues/333) diff --git a/lib/install/install.go b/lib/install/install.go index b1df9d2..c593cba 100644 --- a/lib/install/install.go +++ b/lib/install/install.go @@ -407,6 +407,13 @@ func replaceExecutable(srcBin, destBin string) error { if _, err := os.Stat(srcBin); err != nil { return fmt.Errorf("源文件不存在: %s: %w", srcBin, err) } + if dstFi, err := os.Stat(destBin); err == nil { + if srcFi, err := os.Stat(srcBin); err == nil { + if os.SameFile(srcFi, dstFi) { + return nil + } + } + } if err := os.MkdirAll(filepath.Dir(destBin), 0755); err != nil { return err } diff --git a/lib/version/version.go b/lib/version/version.go index a6cde10..cabe186 100644 --- a/lib/version/version.go +++ b/lib/version/version.go @@ -1,6 +1,6 @@ package version -const VERSION = "0.26.36" +const VERSION = "0.26.37" // Compulsory minimum version, Minimum downward compatibility to this version func GetVersion() string {