feat(软件标识): 统一双端应用标识

This commit is contained in:
xiaoqidun committed 2026-10-25 14:17:25 +08:00
1 parent 299229c584
commit 82b5275ad7
1 file changed
+6 -9
+6 -9
View File
@@ -43,9 +43,6 @@ import (
"github.com/xiaoqidun/ofdgo/internal/webui" "github.com/xiaoqidun/ofdgo/internal/webui"
) )
// applicationID 标识原生应用,与版本及可执行文件路径无关
const applicationID = "me.aite.ofdgo"
const applicationVersionURL = "https://ofdgo.aite.me/" const applicationVersionURL = "https://ofdgo.aite.me/"
const applicationDownloadURL = "https://ofdgo.aite.me/releases/" const applicationDownloadURL = "https://ofdgo.aite.me/releases/"
@@ -977,16 +974,16 @@ func (h *Host) close() {
// 入参: dataDir 自定义浏览器数据目录 // 入参: dataDir 自定义浏览器数据目录
// 返回: guigo.Options 窗口配置, error 配置错误 // 返回: guigo.Options 窗口配置, error 配置错误
func windowOptions(dataDir string) (guigo.Options, error) { func windowOptions(dataDir string) (guigo.Options, error) {
appID := "ofdgo"
if runtime.GOOS == "windows" {
appID = "OFDGo"
}
if dataDir == "" { if dataDir == "" {
cache, err := os.UserCacheDir() cache, err := os.UserCacheDir()
if err != nil { if err != nil {
return guigo.Options{}, err return guigo.Options{}, err
} }
name := "ofdgo" dataDir = filepath.Join(cache, appID)
if runtime.GOOS == "windows" {
name = "OFDGo"
}
dataDir = filepath.Join(cache, name)
} }
dataDir, err := filepath.Abs(dataDir) dataDir, err := filepath.Abs(dataDir)
if err != nil { if err != nil {
@@ -997,7 +994,7 @@ func windowOptions(dataDir string) (guigo.Options, error) {
return guigo.Options{}, err return guigo.Options{}, err
} }
return guigo.Options{ return guigo.Options{
AppID: applicationID, AppID: appID,
Title: "OFDGo - OFD编辑器", Title: "OFDGo - OFD编辑器",
TitleBar: guigo.TitleBarContent, TitleBar: guigo.TitleBarContent,
TitleBarColors: guigo.TitleBarColors{ TitleBarColors: guigo.TitleBarColors{