多语支持
This commit is contained in:
33
README.md
33
README.md
@@ -8,7 +8,7 @@
|
||||
`C:\Program Files\crosec\ectool.exe`
|
||||
若路径不同,在程序「高级」选项卡中修改。
|
||||
2. **以管理员身份运行**本程序(清单已要求提升权限;LHM 与 EC 通信通常需要管理员)。
|
||||
3. 本机安装 [.NET 8 运行时](https://dotnet.microsoft.com/download/dotnet/8.0)(若使用 `dotnet publish --self-contained false` 发布,目标机需运行时)。
|
||||
3. **客户机**:`.\build.ps1 -publish`(及带 `-msi` 时)默认**自包含单文件**发布,**已内含 .NET 8 运行时**,`dist\` 仅含数个 exe,无需再装运行时。若需多 DLL 或依赖系统 .NET 8 以减小体积,可加 `-multiFile` 或 `-frameworkDependent`。
|
||||
|
||||
## 编译
|
||||
|
||||
@@ -16,28 +16,49 @@
|
||||
.\build.ps1
|
||||
```
|
||||
|
||||
发布到 `dist\`:
|
||||
### 发布 MSI 安装包(推荐)
|
||||
|
||||
```powershell
|
||||
.\build.ps1 -publish
|
||||
.\build.ps1 -publish -msi
|
||||
```
|
||||
|
||||
需已安装 [.NET 8 SDK](https://dotnet.microsoft.com/download)。
|
||||
`-publish` 只生成 `dist\`;加上 **`-msi`** 才用 WiX 生成安装包(需已安装 WiX)。输出两个 MSI:
|
||||
|
||||
| 文件 | 说明 |
|
||||
|------|------|
|
||||
| `dist-installer\ChromeboxFanControl-Setup.msi` | **桌面版**:GUI + 可选 Windows 服务(功能树中可勾选) |
|
||||
| `dist-installer\ChromeboxFanControlService-Setup.msi` | **服务版**:仅后台服务,适合无头部署 |
|
||||
|
||||
**构建机**需 [.NET 8 SDK](https://dotnet.microsoft.com/download) 与 [WiX Toolset 3](https://wixtoolset.org/docs/wix3/)。**构建前请关闭正在运行的 ChromeboxFanControl.exe**。
|
||||
|
||||
以**管理员身份**运行 MSI。若尚未安装 ectool,可访问 [Chrultrabook 的 ectool 安装说明](https://docs.chrultrabook.com/docs/installing/ectool.html)。服务模式下配置从 `%ProgramData%\ChromeboxFanControl\config.json` 读取。
|
||||
|
||||
### 仅发布到 dist\(用于调试或手动打包)
|
||||
|
||||
| 命令 | 说明 |
|
||||
|------|------|
|
||||
| `.\build.ps1 -publish` | 同时发布桌面版与服务版到 `dist\`(默认单文件) |
|
||||
| `.\build.ps1 -publishGui` | 仅发布 GUI |
|
||||
| `.\build.ps1 -publishService` | 仅发布服务并合并进 `dist\` |
|
||||
| `.\build.ps1 -publish -multiFile` | 保留多 DLL 输出(默认单 exe) |
|
||||
| `.\build.ps1 -publish -frameworkDependent` | 依赖系统 .NET 8(无 bundled 运行时) |
|
||||
|
||||
## 配置
|
||||
|
||||
- 安装目录旁的 **`appsettings.json`**:默认选项。
|
||||
- **`%AppData%\ChromeboxFanControl\config.json`**:保存后会覆盖同名项(用户配置)。
|
||||
- **`%AppData%\ChromeboxFanControl\config.json`**:GUI 模式下保存后覆盖(用户配置)。
|
||||
- **`%ProgramData%\ChromeboxFanControl\config.json`**:Windows 服务模式下读取的配置;可与 GUI 共用同一份配置逻辑。
|
||||
|
||||
重要字段:
|
||||
|
||||
| 项 | 说明 |
|
||||
|----|------|
|
||||
| `Language` | 界面语言:`auto`(跟随系统)、`en`、`zh-Hans`、`zh-Hant`。修改后需重启生效。 |
|
||||
| `FanRpmArgs` | 读取转速时传给 ectool 的参数(默认 `pwmgetfanrpm` `0`),请用本机 `ectool help` 核对。 |
|
||||
| `FanDutyArgs` | 读取占空比时传给 ectool 的参数(如 `pwmget` `0`);空则跳过,显示目标占空比。 |
|
||||
| `AutoFanCtrlArgs` | 退出程序时恢复 EC 自动风扇(默认 `autofanctrl`),若命令名不同请修改。 |
|
||||
| `TempSource` | `AverageCore` 或 `MaxCore`。 |
|
||||
| `CurvePoints` | 13 个 0–100 的占空比控制点(与 Chrultrabook-Tools 曲线逻辑一致)。 |
|
||||
| `CurvePoints` | 14 个 0–100 的占空比控制点(对应温度断点 0,40,45,…,100°C,线性插值)。 |
|
||||
|
||||
## 使用说明
|
||||
|
||||
|
||||
Reference in New Issue
Block a user