Files
zerorigin-toolbox/README.md
T
zerorigin2019 37827eb8c7 接入自签名代码签名:主 exe、watchdog、安装包与卸载器统一签名
mygo.json 增加 windows.signCommand -> scripts/codesign/sign-file.ps1(PowerShell Set-AuthenticodeSignature,不依赖 Windows SDK)。新增 new-cert.ps1 生成 10 年期自签名证书、trust.ps1 导入当前用户 Root + TrustedPublisher(certutil 静默导入)。公钥 certs/ZeroOrigin-CodeSign.cer 进仓库,*.pfx 进 .gitignore。AGENTS.md / 架构文档 / README 同步签名流程与三条坑。
2026-11-16 11:06:28 +08:00

50 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ZerOriginToolBox(零源工具箱)
Windows 轻量自动化工具箱:**单个 mygo 进程**(托盘常驻 + 原生设置窗口 + 触发器/规则/动作引擎)
+ watchdog 监督进程。无 WebView、无 IPC、默认不需要管理员权限。
- 鼠标角落 / 屏幕边缘滚轮 / 全局热键 三类触发器,支持优先级、冷却与全屏抑制;
- 音量走 Core Audio COM、亮度走 DDC/CI,调节时弹出截图 + `glass.Blur` 自绘毛玻璃提示条;
- 配置热重载、便携模式、崩溃取证三件套(crash.log / go-crash.log / heartbeat.json);
- 托盘「检查更新…」,便携版可**签名自更新**(Ed25519,就地替换 exe 与 watchdog.exe)。
架构与踩坑记录见 [`AGENTS.md`](AGENTS.md) 与 [`docs/zero-origin-toolbox-architecture.md`](docs/zero-origin-toolbox-architecture.md)。
## 这个仓库同时承担两件事
1. **源码**:`cmd/`(zerorigin 主进程、watchdog、诊断工具)、`internal/`、`docs/`。
2. **自更新分发**:**请不要删除或改名 Release `latest` 里的附件**。那是便携版客户端检查更新用的
`updates.url`,URL 已经写死进每一个已发布的 exe,删掉就等于让所有用户断更。
## 发版流程
1. 改 `mygo.json` 的 `version`;
2. 在 `CHANGELOG.md` 里加 `## <版本号>` 段(mygo 用它做更新窗口的发布说明);
3. `build.bat`(完整构建才产出安装版;`quick` 会跳过 setup。需要
`%APPDATA%\mygo\update-keys\mygo-update.key` 才会签名并产出更新包);
4. 发布:
```powershell
$env:GITEA_TOKEN = "<个人访问令牌>"
./scripts/publish-gitea.ps1 -Owner zerorigin -Repo zerorigin-toolbox
```
脚本会先传归档与 delta,最后传 manifest,并先删除同名的旧 manifest 附件。
## 代码签名(自签名)
构建产物(`ZerOriginTool.exe`、`watchdog.exe`、安装包与卸载器)都带 Authenticode 签名,
用于消除本机的「发布商:未知发布者」提示:
- 公钥证书:[`certs/ZeroOrigin-CodeSign.cer`](certs/ZeroOrigin-CodeSign.cer);
- 新机器先导入信任(当前用户,无需管理员):
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\codesign\trust.ps1
```
- 私钥备份在 `%APPDATA%\ZerOriginTool\codesign\`(**不进仓库**,换机/重装前请备份)。
自签名只对**导入过这张根证书的机器**有效;对外分发仍会提示未知发布者,要彻底解决需要
CA 签发的代码签名证书。