完善三平台安装包与服务控制流程
统一服务默认端口为 59188,完善 Windows 服务权限与 macOS LaunchAgent 管理。 实现 Windows 与 macOS 托盘状态机、服务启停等待、单实例保护、日志目录入口和退出前清理后台服务。 统一 Linux、Windows、macOS 与 Docker 的 Playwright Chromium runtime 构建流程,增加缓存、架构校验和 Linux 原生 runner,避免 QEMU。 完善 Windows、macOS、Linux 安装包及签名打包脚本,修正 Chromium 嵌入、服务注册和安装卸载流程。 同步 README、AGENTS、官网首页、Wiki 与前端开发文档,统一端口、初始化、服务、日志、托盘和安装说明。
This commit is contained in:
1 parent
94f4e070f6
commit
2df324647a
35 files changed
+1546
-214
No files matched your search
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
@@ -56,6 +57,28 @@ func TestLoadOrCreateDataKeyPersists(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestOpenServerLogWriterUsesConfiguredDirectory(t *testing.T) {
|
||||
logDir := t.TempDir()
|
||||
t.Setenv("XIANYU_LOG_DIR", logDir)
|
||||
|
||||
writer, closeLog, err := openServerLogWriter("")
|
||||
if err != nil {
|
||||
t.Fatalf("open log writer: %v", err)
|
||||
}
|
||||
if _, err := io.WriteString(writer, "test log\n"); err != nil {
|
||||
t.Fatalf("write log: %v", err)
|
||||
}
|
||||
closeLog()
|
||||
|
||||
content, err := os.ReadFile(filepath.Join(logDir, "server.log"))
|
||||
if err != nil {
|
||||
t.Fatalf("read log file: %v", err)
|
||||
}
|
||||
if string(content) != "test log\n" {
|
||||
t.Fatalf("unexpected log content: %q", content)
|
||||
}
|
||||
}
|
||||
|
||||
func TestResolveDataDirKeepsExplicitDirectory(t *testing.T) {
|
||||
explicit := filepath.Join(t.TempDir(), "ydisks-data")
|
||||
got, err := resolveDataDir(explicit)
|
||||
|
||||
Reference in new issue
Block a user