This commit is contained in:
2026-05-22 14:36:34 +08:00
parent 40f13989c2
commit 1336695068
11 changed files with 115 additions and 16 deletions

View File

@@ -19,7 +19,7 @@ import (
var currentHwnd atomic.Uintptr
func setupFileLogging() {
logPath := filepath.Join(appDir(), "debug.log")
logPath := filepath.Join(userDataDir(), "debug.log")
f, err := os.OpenFile(logPath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
if err != nil {
return
@@ -57,9 +57,16 @@ func main() {
}
defer removeLockFile()
webviewTmp, err := os.MkdirTemp("", "hpltoolbox-wv2-*")
if err != nil {
log.Fatalf("Failed to create webview temp dir: %v", err)
}
defer os.RemoveAll(webviewTmp)
w := webview.NewWithOptions(webview.WebViewOptions{
Debug: false,
AutoFocus: true,
DataPath: webviewTmp,
WindowOptions: webview.WindowOptions{
Title: "HPL Toolbox",
Width: 1100,