1 --- old/bridge/bridge.go 2024-11-03 02:07:33.553972040 +0800
2 +++ new/bridge/bridge.go 2024-11-03 02:10:09.239584378 +0800
5 func InitBridge(fs embed.FS) {
7 - exePath, err := os.Executable()
12 for _, v := range os.Args {
14 Env.FromTaskSch = true
19 - Env.BasePath = filepath.Dir(exePath)
20 - Env.AppName = filepath.Base(exePath)
21 + Env.AppName = "GUI.for.SingBox"
22 + Env.BasePath = filepath.Join(os.Getenv("HOME"), ".config", Env.AppName)
24 // step2: Create a persistent data symlink
25 if Env.OS == "darwin" {
29 func (a *App) RestartApp() FlagResult {
30 - exePath := Env.BasePath + "/" + Env.AppName
31 + exePath := Env.AppName
33 cmd := exec.Command(exePath)