feat: add one-click setup scripts for desktop app (Mac + Windows)

- setup.sh: auto-downloads Node.js + npm deps + runtime from China mirrors
- setup.bat: same for Windows, guides to install Node.js if missing
- Both set Electron mirror to npmmirror.com for China users
- Updated README with new setup instructions
This commit is contained in:
dongsheng123132
2026-03-12 13:25:18 +08:00
parent ed454f78ac
commit 71e4f5b357
3 changed files with 304 additions and 3 deletions

View File

@@ -143,9 +143,26 @@ bash Mac-Start.command # Mac
```bash
cd u-claw-app
npm install --registry=https://registry.npmmirror.com
npm start # 开发模式运行
npm run build:mac # 打包
# Mac / Linux 一键安装(自动下载 Node.js runtime + 依赖,全部国内镜像)
bash setup.sh
# Windows 一键安装
setup.bat
```
`setup.sh` / `setup.bat` 会自动:
1. 检查或下载 Node.js v22国内镜像 npmmirror.com
2. 安装 npm 依赖 + Electron国内镜像
3. 下载打包用 Node.js runtime
4. 询问是否立即启动
安装完成后:
```bash
npm run dev # 开发模式运行
npm run build:mac-arm64 # 打包 Mac ARM64 DMG
npm run build:mac-x64 # 打包 Mac Intel DMG
npm run build:win # 打包 Windows EXE需在 Windows 上)
```
### 提交代码