gui-for-singbox: 1.9.6 -> 1.9.7 (#406615)
This commit is contained in:
@@ -1,39 +1,31 @@
|
||||
--- a/bridge/bridge.go 2024-12-25 20:53:45.504021585 +0000
|
||||
+++ b/bridge/bridge.go 2024-12-25 21:02:20.318422528 +0000
|
||||
@@ -38,11 +38,6 @@
|
||||
|
||||
func InitBridge(fs embed.FS) {
|
||||
// step1: Set Env
|
||||
--- a/bridge/bridge.go 2025-05-13 07:36:58.578038227 +0000
|
||||
+++ b/bridge/bridge.go 2025-05-13 07:39:01.667180229 +0000
|
||||
@@ -41,13 +41,13 @@
|
||||
}
|
||||
|
||||
func CreateApp(fs embed.FS) *App {
|
||||
- exePath, err := os.Executable()
|
||||
- if err != nil {
|
||||
- panic(err)
|
||||
- }
|
||||
-
|
||||
for _, v := range os.Args {
|
||||
if v == "tasksch" {
|
||||
Env.FromTaskSch = true
|
||||
@@ -50,8 +45,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
- Env.BasePath = filepath.Dir(exePath)
|
||||
- Env.AppName = filepath.Base(exePath)
|
||||
+ Env.AppName = "GUI.for.SingBox"
|
||||
+ xdgDataHome := os.Getenv("XDG_DATA_HOME")
|
||||
+ if xdgDataHome == "" {
|
||||
+ homeDir, _ := os.UserHomeDir()
|
||||
+ xdgDataHome = filepath.Join(homeDir, ".local", "share")
|
||||
+ }
|
||||
}
|
||||
-
|
||||
- Env.BasePath = filepath.Dir(exePath)
|
||||
- Env.AppName = filepath.Base(exePath)
|
||||
+ Env.BasePath = filepath.Join(xdgDataHome, Env.AppName)
|
||||
|
||||
// step2: Create a persistent data symlink
|
||||
if Env.OS == "darwin" {
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
if slices.Contains(os.Args, "tasksch") {
|
||||
Env.FromTaskSch = true
|
||||
@@ -76,7 +76,7 @@
|
||||
}
|
||||
|
||||
|
||||
func (a *App) RestartApp() FlagResult {
|
||||
- exePath := Env.BasePath + "/" + Env.AppName
|
||||
+ exePath := "@basepath@/bin" + "/" + Env.AppName
|
||||
|
||||
|
||||
cmd := exec.Command(exePath)
|
||||
HideExecWindow(cmd)
|
||||
SetCmdWindowHidden(cmd)
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
nodejs,
|
||||
pnpm_9,
|
||||
fetchFromGitHub,
|
||||
buildGoModule,
|
||||
lib,
|
||||
wails,
|
||||
webkitgtk_4_0,
|
||||
pkg-config,
|
||||
@@ -17,13 +17,13 @@
|
||||
|
||||
let
|
||||
pname = "gui-for-singbox";
|
||||
version = "1.9.6";
|
||||
version = "1.9.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "GUI-for-Cores";
|
||||
repo = "GUI.for.SingBox";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-qmYZWLzGAjUlbORhr67KqhTTeOxskAb7/HO+pPZ6uQE=";
|
||||
hash = "sha256-2wmg0qPXFRuVd5jU1RT9QuqEaG/h2R+VSNeniVZELLk=";
|
||||
};
|
||||
|
||||
metaCommon = {
|
||||
@@ -45,7 +45,7 @@ let
|
||||
pnpmDeps = pnpm_9.fetchDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
sourceRoot = "${finalAttrs.src.name}/frontend";
|
||||
hash = "sha256-RIkdnDyHjl5C0+Hdtne1NYEh46+yylW7Q/agT7AtDBo=";
|
||||
hash = "sha256-5tz1FItH9AvZhJjka8i5Kz22yf/tEmRPkDhz6iswZzc=";
|
||||
};
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/frontend";
|
||||
@@ -81,7 +81,7 @@ buildGoModule {
|
||||
--replace-fail '@basepath@' "$out"
|
||||
'';
|
||||
|
||||
vendorHash = "sha256-4MPKAI1/F/sgfUORulhcpKJYHX7LpLknlzZx4DqnCfY=";
|
||||
vendorHash = "sha256-Coq8GtaIS7ClmOTFw6PSgGDFW/CpGpKPvXgNw8qz3Hs=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
wails
|
||||
@@ -114,12 +114,8 @@ buildGoModule {
|
||||
icon = "gui-for-singbox";
|
||||
genericName = "GUI.for.SingBox";
|
||||
desktopName = "GUI.for.SingBox";
|
||||
categories = [
|
||||
"Network"
|
||||
];
|
||||
keywords = [
|
||||
"Proxy"
|
||||
];
|
||||
categories = [ "Network" ];
|
||||
keywords = [ "Proxy" ];
|
||||
})
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user