⚠️ 精简版。完整的工具链安装、跨平台差异、故障排查见docs/environment.md。本文件保留作为快速参考。 macOS 专属(签名 / 公证 / DMG)见docs/macos.md。
# Windows
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\install-toolchain\windows.ps1
# macOS
bash scripts/install-toolchain/macos.sh
# Linux
bash scripts/install-toolchain/linux.shnpm run tauri devnpm run buildnpm run tauri buildmacOS DMG 必须在 Mac 或 GitHub macOS Runner 中构建:
npm ci
npm run tauri build -- \
--target aarch64-apple-darwin \
--bundles dmg \
--config src-tauri/tauri.macos.conf.jsonGitHub Actions 入口为 .github/workflows/build-macos.yml。构建产物位于
src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/,详细说明见
docs/macos.md。
Linux 上没有安装包目标,只产裸 release 二进制:
bash scripts/install-toolchain/linux.sh
npm run tauri build # → src-tauri/target/release/zcode-switcher- 源码修改、依赖安装、构建和测试应在开发目录进行。
- GitHub 发布目录只保留准备提交的干净文件,不放
node_modules、dist、src-tauri/target、安装包、日志和临时截图。