fix: resolve Windows compilation errors and warnings

- Add Manager trait import for windows_startup_cmd.rs
- Add explicit type annotations for PathBuf in windows_startup_cmd.rs
- Fix unused import warning in screenshot_capture_service.rs
- Prefix unused variables with underscore in runner.rs and aster_agent_cmd.rs
- Update package.json with Node.js engine requirement
This commit is contained in:
coso
2026-03-10 09:20:40 +08:00
parent 276e2064c2
commit 2adf8c2bc2
33 changed files with 1484 additions and 305 deletions
@@ -13,12 +13,12 @@ navigation:
### 前置要求
| 工具 | 版本 |
|------|------|
| Node.js | >= 18 |
| pnpm | >= 8 |
| Rust | >= 1.70 |
| Tauri CLI | >= 2.0 |
| 工具 | 版本 |
| --------- | ------- |
| Node.js | >= 22 |
| pnpm | >= 8 |
| Rust | >= 1.70 |
| Tauri CLI | >= 2.0 |
### 安装依赖
+23 -18
View File
@@ -17,10 +17,12 @@ navigation:
```bash
# 使用 nvm 安装
nvm install 18
nvm use 18
nvm install 22
nvm use 22
```
Windows 用户请使用 Node.js 官方安装器安装 22.x,并重新打开终端后通过 `node -v` 确认版本。
2. **安装 pnpm**
```bash
@@ -40,15 +42,18 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
4. **安装 Tauri 依赖**
**macOS:**
```bash
xcode-select --install
```
**Windows:**
- 安装 Visual Studio Build Tools
- 安装 WebView2(开发模式必需;对外分发时建议使用带离线 WebView2 的 NSIS 安装器)
**Linux:**
```bash
sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libayatana-appindicator3-dev librsvg2-dev
```
@@ -64,6 +69,7 @@ pnpm tauri dev
```
开发模式特性:
- 前端热重载
- Rust 代码变更自动重新编译
- 开发者工具可用
@@ -111,11 +117,11 @@ pnpm tauri build --debug
### 构建产物
| 平台 | 产物位置 |
|------|----------|
| macOS | `src-tauri/target/release/bundle/dmg/` |
| 平台 | 产物位置 |
| ------- | --------------------------------------- |
| macOS | `src-tauri/target/release/bundle/dmg/` |
| Windows | `src-tauri/target/release/bundle/nsis/` |
| Linux | `src-tauri/target/release/bundle/deb/` |
| Linux | `src-tauri/target/release/bundle/deb/` |
### 跨平台构建
@@ -141,7 +147,6 @@ pnpm tauri build --target x86_64-pc-windows-msvc --config src-tauri/tauri.window
> 建议对外分发 `-setup.exe`,不要把默认 `.msi` 作为首选下载项。
#### Linux 构建
```bash
@@ -195,12 +200,12 @@ git push origin v1.0.1
### 构建矩阵
| 平台 | 架构 | Runner |
|------|------|--------|
| macOS | arm64 | macos-latest |
| macOS | x64 | macos-13 |
| Windows | x64 | windows-2022 |
| Linux | x64 | ubuntu-latest |
| 平台 | 架构 | Runner |
| ------- | ----- | ------------- |
| macOS | arm64 | macos-latest |
| macOS | x64 | macos-13 |
| Windows | x64 | windows-2022 |
| Linux | x64 | ubuntu-latest |
## 调试
@@ -217,11 +222,11 @@ RUST_LOG=debug pnpm tauri dev
### 日志位置
| 平台 | 路径 |
|------|------|
| macOS | `~/Library/Logs/ProxyCast/` |
| Windows | `%APPDATA%\ProxyCast\logs\` |
| Linux | `~/.local/share/proxycast/logs/` |
| 平台 | 路径 |
| ------- | -------------------------------- |
| macOS | `~/Library/Logs/ProxyCast/` |
| Windows | `%APPDATA%\ProxyCast\logs\` |
| Linux | `~/.local/share/proxycast/logs/` |
## 常见问题