feat: add Linux support, pnpm build fixes, and website updates
- Add Linux x64 platform support (运行.sh, build script, docs) - Fix pnpm-first build logic across all launcher scripts - Update website: 3→4 platforms, Linux in 3-step guide - Update docs: Qwen free tier, StepFun model, 省钱提示 - Fix .gitignore for build artifacts
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1,9 +1,5 @@
|
|||||||
# U-Claw build outputs (too large for git)
|
# U-Claw build output bundle (generated release artifact)
|
||||||
U-Claw/runtime/
|
U-Claw/
|
||||||
U-Claw/openclaw/node_modules/
|
|
||||||
U-Claw/openclaw/dist/
|
|
||||||
U-Claw/openclaw/.git/
|
|
||||||
U-Claw/backups/
|
|
||||||
|
|
||||||
# OpenClaw source (users download separately)
|
# OpenClaw source (users download separately)
|
||||||
openclaw-2026.3.7/
|
openclaw-2026.3.7/
|
||||||
|
|||||||
17
README.md
17
README.md
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
## Features / 特性
|
## Features / 特性
|
||||||
|
|
||||||
- 🚀 **One-click install / 一键安装** — macOS + Windows, double-click to start
|
- 🚀 **Easy startup / 快速启动** — macOS + Linux + Windows, ready to run from USB
|
||||||
- 📦 **Fully offline / 完全离线** — No internet needed for installation
|
- 📦 **Fully offline / 完全离线** — No internet needed for installation
|
||||||
- 🇨🇳 **China-optimized / 中国优化** — 8 Chinese AI models (DeepSeek, Kimi, Qwen, GLM, MiniMax, Doubao, Qianfan, Mimo)
|
- 🇨🇳 **China-optimized / 中国优化** — 8 Chinese AI models (DeepSeek, Kimi, Qwen, GLM, MiniMax, Doubao, Qianfan, Mimo)
|
||||||
- 💬 **Multi-platform / 多平台** — QQ (official) / Feishu / WeChat / Telegram / Discord / WhatsApp / Slack
|
- 💬 **Multi-platform / 多平台** — QQ (official) / Feishu / WeChat / Telegram / Discord / WhatsApp / Slack
|
||||||
@@ -46,6 +46,7 @@
|
|||||||
|
|
||||||
# After extracting / 解压后:
|
# After extracting / 解压后:
|
||||||
# Mac: double-click "启动菜单.command"
|
# Mac: double-click "启动菜单.command"
|
||||||
|
# Linux: bash ./运行.sh
|
||||||
# Win: double-click "启动菜单.bat"
|
# Win: double-click "启动菜单.bat"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -84,7 +85,7 @@ Just copy the `U-Claw/` folder. That's it.
|
|||||||
U-Claw/ (~1.3GB, 8GB USB minimum)
|
U-Claw/ (~1.3GB, 8GB USB minimum)
|
||||||
│
|
│
|
||||||
├── 启动菜单.command / .bat ← Launcher menu (YuLinMuFeng style)
|
├── 启动菜单.command / .bat ← Launcher menu (YuLinMuFeng style)
|
||||||
├── 运行.command / .bat ← Quick start (skip menu)
|
├── 运行.command / .sh / .bat ← Quick start (skip menu)
|
||||||
├── 安装到电脑.command / .bat ← Install to computer (permanent)
|
├── 安装到电脑.command / .bat ← Install to computer (permanent)
|
||||||
├── 使用说明.txt ← Basic instructions
|
├── 使用说明.txt ← Basic instructions
|
||||||
├── 中国用户指南.txt ← China quick-start guide
|
├── 中国用户指南.txt ← China quick-start guide
|
||||||
@@ -93,6 +94,7 @@ U-Claw/ (~1.3GB, 8GB USB minimum)
|
|||||||
├── runtime/ ← Node.js 22 runtimes
|
├── runtime/ ← Node.js 22 runtimes
|
||||||
│ ├── node-mac-arm64/ ← Mac Apple Silicon (M1-M4)
|
│ ├── node-mac-arm64/ ← Mac Apple Silicon (M1-M4)
|
||||||
│ ├── node-mac-x64/ ← Mac Intel
|
│ ├── node-mac-x64/ ← Mac Intel
|
||||||
|
│ ├── node-linux-x64/ ← Linux x64
|
||||||
│ └── node-win-x64/ ← Windows 64-bit
|
│ └── node-win-x64/ ← Windows 64-bit
|
||||||
│
|
│
|
||||||
├── openclaw/ ← OpenClaw + node_modules + dist
|
├── openclaw/ ← OpenClaw + node_modules + dist
|
||||||
@@ -188,6 +190,7 @@ openclaw config set channels.qqbot.allowFrom "your_qq_number"
|
|||||||
## System Requirements / 系统要求
|
## System Requirements / 系统要求
|
||||||
|
|
||||||
- **macOS**: 12+ (Intel or Apple Silicon)
|
- **macOS**: 12+ (Intel or Apple Silicon)
|
||||||
|
- **Linux**: x64 with glibc and bash
|
||||||
- **Windows**: 10/11 (64-bit)
|
- **Windows**: 10/11 (64-bit)
|
||||||
- **RAM**: 2GB+ (4GB+ recommended)
|
- **RAM**: 2GB+ (4GB+ recommended)
|
||||||
- **USB**: 8GB+ (16GB recommended)
|
- **USB**: 8GB+ (16GB recommended)
|
||||||
@@ -202,10 +205,10 @@ openclaw config set channels.qqbot.allowFrom "your_qq_number"
|
|||||||
|
|
||||||
### What the build script does / 构建脚本做了什么
|
### What the build script does / 构建脚本做了什么
|
||||||
|
|
||||||
1. Downloads Node.js 22 for 3 platforms (Mac ARM64 + Mac x64 + Win x64), prefers China mirror
|
1. Downloads Node.js 22 for 4 platforms (Mac ARM64 + Mac x64 + Linux x64 + Win x64), prefers China mirror
|
||||||
2. Copies OpenClaw source to `U-Claw/openclaw/`
|
2. Copies OpenClaw source to `U-Claw/openclaw/`
|
||||||
3. Runs `npm install` with China mirror (registry.npmmirror.com)
|
3. Installs `pnpm` and runs `pnpm install` with China mirror (registry.npmmirror.com)
|
||||||
4. Runs `npm run build` to build OpenClaw
|
4. Runs `pnpm build` to build OpenClaw
|
||||||
5. Copies launcher scripts and docs
|
5. Copies launcher scripts and docs
|
||||||
6. Output: ~1.3GB ready to copy to USB
|
6. Output: ~1.3GB ready to copy to USB
|
||||||
|
|
||||||
@@ -261,6 +264,10 @@ A: Yes, unlimited. MIT license, copy freely.
|
|||||||
A: No. U-Claw bundles Windows Node.js, runs natively via `.bat`.
|
A: No. U-Claw bundles Windows Node.js, runs natively via `.bat`.
|
||||||
不需要。自带 Windows 版 Node.js。
|
不需要。自带 Windows 版 Node.js。
|
||||||
|
|
||||||
|
**Q: Linux supported? / Linux 支持吗?**
|
||||||
|
A: Yes for x64 Linux. Use `bash ./运行.sh` from the release bundle.
|
||||||
|
支持,面向 x64 Linux。解压后运行 `bash ./运行.sh` 即可。
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT](LICENSE) — Free to use, modify, distribute.
|
[MIT](LICENSE) — Free to use, modify, distribute.
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ echo ""
|
|||||||
# ---- 1. 创建 U-Claw 目录结构 ----
|
# ---- 1. 创建 U-Claw 目录结构 ----
|
||||||
info "创建 U-Claw 目录结构..."
|
info "创建 U-Claw 目录结构..."
|
||||||
rm -rf "$UCLAW_DIR"
|
rm -rf "$UCLAW_DIR"
|
||||||
mkdir -p "$UCLAW_DIR"/{runtime/{node-mac-arm64,node-mac-x64,node-win-x64},openclaw,memory,persona,skills,tools}
|
mkdir -p "$UCLAW_DIR"/{runtime/{node-mac-arm64,node-mac-x64,node-linux-x64,node-win-x64},openclaw,memory,persona,skills,tools}
|
||||||
|
|
||||||
# ---- 2. 下载 Node.js 各平台版本 ----
|
# ---- 2. 下载 Node.js 各平台版本 ----
|
||||||
DOWNLOAD_DIR="$SCRIPT_DIR/.download-cache"
|
DOWNLOAD_DIR="$SCRIPT_DIR/.download-cache"
|
||||||
@@ -76,9 +76,10 @@ download_node() {
|
|||||||
ok "Node.js ${PLATFORM}-${ARCH} 就绪"
|
ok "Node.js ${PLATFORM}-${ARCH} 就绪"
|
||||||
}
|
}
|
||||||
|
|
||||||
# 下载三个平台的 Node.js
|
# 下载四个平台的 Node.js
|
||||||
download_node "darwin" "arm64" "tar.gz" "node-mac-arm64" # Mac Apple Silicon
|
download_node "darwin" "arm64" "tar.gz" "node-mac-arm64" # Mac Apple Silicon
|
||||||
download_node "darwin" "x64" "tar.gz" "node-mac-x64" # Mac Intel
|
download_node "darwin" "x64" "tar.gz" "node-mac-x64" # Mac Intel
|
||||||
|
download_node "linux" "x64" "tar.gz" "node-linux-x64" # Linux x64
|
||||||
download_node "win" "x64" "zip" "node-win-x64" # Windows x64
|
download_node "win" "x64" "zip" "node-win-x64" # Windows x64
|
||||||
|
|
||||||
# ---- 3. 复制 OpenClaw 源码 ----
|
# ---- 3. 复制 OpenClaw 源码 ----
|
||||||
@@ -139,6 +140,7 @@ if [ -d "$SCRIPTS_SRC" ]; then
|
|||||||
cp "$SCRIPTS_SRC/启动菜单.command" "$UCLAW_DIR/" 2>/dev/null || true
|
cp "$SCRIPTS_SRC/启动菜单.command" "$UCLAW_DIR/" 2>/dev/null || true
|
||||||
cp "$SCRIPTS_SRC/启动菜单.bat" "$UCLAW_DIR/" 2>/dev/null || true
|
cp "$SCRIPTS_SRC/启动菜单.bat" "$UCLAW_DIR/" 2>/dev/null || true
|
||||||
cp "$SCRIPTS_SRC/运行.command" "$UCLAW_DIR/" 2>/dev/null || true
|
cp "$SCRIPTS_SRC/运行.command" "$UCLAW_DIR/" 2>/dev/null || true
|
||||||
|
cp "$SCRIPTS_SRC/运行.sh" "$UCLAW_DIR/" 2>/dev/null || true
|
||||||
cp "$SCRIPTS_SRC/运行.bat" "$UCLAW_DIR/" 2>/dev/null || true
|
cp "$SCRIPTS_SRC/运行.bat" "$UCLAW_DIR/" 2>/dev/null || true
|
||||||
cp "$SCRIPTS_SRC/安装到电脑.command" "$UCLAW_DIR/" 2>/dev/null || true
|
cp "$SCRIPTS_SRC/安装到电脑.command" "$UCLAW_DIR/" 2>/dev/null || true
|
||||||
cp "$SCRIPTS_SRC/安装到电脑.bat" "$UCLAW_DIR/" 2>/dev/null || true
|
cp "$SCRIPTS_SRC/安装到电脑.bat" "$UCLAW_DIR/" 2>/dev/null || true
|
||||||
@@ -150,7 +152,7 @@ if [ -d "$SCRIPTS_SRC" ]; then
|
|||||||
# 复制二维码
|
# 复制二维码
|
||||||
cp "$SCRIPT_DIR/微信二维码.jpg" "$UCLAW_DIR/" 2>/dev/null || true
|
cp "$SCRIPT_DIR/微信二维码.jpg" "$UCLAW_DIR/" 2>/dev/null || true
|
||||||
cp "$SCRIPT_DIR/小红书二维码.jpg" "$UCLAW_DIR/" 2>/dev/null || true
|
cp "$SCRIPT_DIR/小红书二维码.jpg" "$UCLAW_DIR/" 2>/dev/null || true
|
||||||
chmod +x "$UCLAW_DIR/启动菜单.command" "$UCLAW_DIR/运行.command" "$UCLAW_DIR/安装到电脑.command" 2>/dev/null || true
|
chmod +x "$UCLAW_DIR/启动菜单.command" "$UCLAW_DIR/运行.command" "$UCLAW_DIR/运行.sh" "$UCLAW_DIR/安装到电脑.command" 2>/dev/null || true
|
||||||
ok "用户脚本已复制(含启动菜单、中国用户指南、微信二维码)"
|
ok "用户脚本已复制(含启动菜单、中国用户指南、微信二维码)"
|
||||||
else
|
else
|
||||||
warn "找不到 uclaw-scripts/ 目录,请手动复制脚本到 U-Claw/"
|
warn "找不到 uclaw-scripts/ 目录,请手动复制脚本到 U-Claw/"
|
||||||
@@ -166,6 +168,7 @@ echo " 总大小: $TOTAL_SIZE"
|
|||||||
echo ""
|
echo ""
|
||||||
du -sh "$UCLAW_DIR"/runtime/node-mac-arm64 2>/dev/null | awk '{print " Node.js Mac ARM64: "$1}'
|
du -sh "$UCLAW_DIR"/runtime/node-mac-arm64 2>/dev/null | awk '{print " Node.js Mac ARM64: "$1}'
|
||||||
du -sh "$UCLAW_DIR"/runtime/node-mac-x64 2>/dev/null | awk '{print " Node.js Mac x64: "$1}'
|
du -sh "$UCLAW_DIR"/runtime/node-mac-x64 2>/dev/null | awk '{print " Node.js Mac x64: "$1}'
|
||||||
|
du -sh "$UCLAW_DIR"/runtime/node-linux-x64 2>/dev/null | awk '{print " Node.js Linux x64: "$1}'
|
||||||
du -sh "$UCLAW_DIR"/runtime/node-win-x64 2>/dev/null | awk '{print " Node.js Win x64: "$1}'
|
du -sh "$UCLAW_DIR"/runtime/node-win-x64 2>/dev/null | awk '{print " Node.js Win x64: "$1}'
|
||||||
du -sh "$UCLAW_DIR"/openclaw 2>/dev/null | awk '{print " OpenClaw + 依赖: "$1}'
|
du -sh "$UCLAW_DIR"/openclaw 2>/dev/null | awk '{print " OpenClaw + 依赖: "$1}'
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ OpenClaw 是一个**开源 AI 助手框架**,你可以把它理解为:
|
|||||||
```
|
```
|
||||||
1. 插入 U-Claw U 盘
|
1. 插入 U-Claw U 盘
|
||||||
2. Mac: 双击「启动菜单.command」
|
2. Mac: 双击「启动菜单.command」
|
||||||
|
Linux: 运行 `bash ./运行.sh`
|
||||||
Win: 双击「启动菜单.bat」
|
Win: 双击「启动菜单.bat」
|
||||||
3. 选择 [1] 一键安装到电脑
|
3. 选择 [1] 一键安装到电脑
|
||||||
4. 等待完成(约 2-3 分钟)
|
4. 等待完成(约 2-3 分钟)
|
||||||
|
|||||||
@@ -150,10 +150,12 @@ U-Claw 已预装 52 个技能,以下是最实用的:
|
|||||||
遇到问题?
|
遇到问题?
|
||||||
══════════════════════
|
══════════════════════
|
||||||
|
|
||||||
1. 插 U 盘,双击「启动菜单」
|
1. 插 U 盘
|
||||||
2. 选 [8] 诊断修复
|
2. Mac/Windows: 打开「启动菜单」
|
||||||
3. 如果修不好,选 [11] 重置
|
Linux: 运行 `bash ./运行.sh`
|
||||||
4. 重置前会自动提醒你备份
|
3. 选 [8] 诊断修复
|
||||||
|
4. 如果修不好,选 [11] 重置
|
||||||
|
5. 重置前会自动提醒你备份
|
||||||
|
|
||||||
加入社区:
|
加入社区:
|
||||||
- 官网: u-claw.org
|
- 官网: u-claw.org
|
||||||
|
|||||||
@@ -21,10 +21,11 @@ U 盘里有什么?
|
|||||||
═══════════════
|
═══════════════
|
||||||
U-Claw/
|
U-Claw/
|
||||||
├── 运行.command <- Mac 用户双击这个
|
├── 运行.command <- Mac 用户双击这个
|
||||||
|
├── 运行.sh <- Linux 用户运行: bash ./运行.sh
|
||||||
├── 运行.bat <- Windows 用户双击这个
|
├── 运行.bat <- Windows 用户双击这个
|
||||||
├── 安装到电脑.command <- Mac 永久安装
|
├── 安装到电脑.command <- Mac 永久安装
|
||||||
├── 安装到电脑.bat <- Windows 永久安装
|
├── 安装到电脑.bat <- Windows 永久安装
|
||||||
├── runtime/ <- Node.js 运行环境 (Mac/Win)
|
├── runtime/ <- Node.js 运行环境 (Mac/Linux/Win)
|
||||||
├── openclaw/ <- OpenClaw 源码 + 依赖
|
├── openclaw/ <- OpenClaw 源码 + 依赖
|
||||||
├── memory/ <- AI 记忆文件
|
├── memory/ <- AI 记忆文件
|
||||||
├── persona/ <- AI 人格配置
|
├── persona/ <- AI 人格配置
|
||||||
@@ -50,6 +51,12 @@ U-Claw/
|
|||||||
3. 双击 "运行.bat"
|
3. 双击 "运行.bat"
|
||||||
4. 等待启动完成
|
4. 等待启动完成
|
||||||
|
|
||||||
|
Linux 用户:
|
||||||
|
1. 插入 U 盘
|
||||||
|
2. 打开 U-Claw 文件夹
|
||||||
|
3. 运行: chmod +x 运行.sh && ./运行.sh
|
||||||
|
4. 等待启动完成
|
||||||
|
|
||||||
首次运行可能需要几分钟安装依赖(已预打包,无需联网)
|
首次运行可能需要几分钟安装依赖(已预打包,无需联网)
|
||||||
|
|
||||||
|
|
||||||
@@ -65,12 +72,17 @@ U-Claw/
|
|||||||
2. 按提示操作
|
2. 按提示操作
|
||||||
3. 安装后在命令提示符输入 openclaw 即可使用
|
3. 安装后在命令提示符输入 openclaw 即可使用
|
||||||
|
|
||||||
|
Linux 用户:
|
||||||
|
暂不提供一键安装到系统。
|
||||||
|
直接运行 `bash ./运行.sh` 即可使用。
|
||||||
|
|
||||||
安装位置: ~/.uclaw/ (Mac) 或 %USERPROFILE%\.uclaw\ (Win)
|
安装位置: ~/.uclaw/ (Mac) 或 %USERPROFILE%\.uclaw\ (Win)
|
||||||
|
|
||||||
|
|
||||||
系统要求
|
系统要求
|
||||||
═══════════════
|
═══════════════
|
||||||
- macOS 12+ (Intel 或 Apple Silicon)
|
- macOS 12+ (Intel 或 Apple Silicon)
|
||||||
|
- Linux x64 (glibc 环境,bash)
|
||||||
- Windows 10/11 (64位)
|
- Windows 10/11 (64位)
|
||||||
- 内存: 2GB 以上(推荐 4GB+)
|
- 内存: 2GB 以上(推荐 4GB+)
|
||||||
- 磁盘: 2GB 可用空间
|
- 磁盘: 2GB 可用空间
|
||||||
|
|||||||
@@ -8,8 +8,22 @@ set "OPENCLAW_DIR=%UCLAW_DIR%openclaw"
|
|||||||
set "NODE_DIR=%UCLAW_DIR%runtime\node-win-x64"
|
set "NODE_DIR=%UCLAW_DIR%runtime\node-win-x64"
|
||||||
set "NODE_BIN=%NODE_DIR%\node.exe"
|
set "NODE_BIN=%NODE_DIR%\node.exe"
|
||||||
set "NPM_BIN=%NODE_DIR%\npm.cmd"
|
set "NPM_BIN=%NODE_DIR%\npm.cmd"
|
||||||
|
set "PNPM_BIN=%NODE_DIR%\pnpm.cmd"
|
||||||
set "PATH=%NODE_DIR%;%PATH%"
|
set "PATH=%NODE_DIR%;%PATH%"
|
||||||
|
|
||||||
|
goto MENU
|
||||||
|
|
||||||
|
:ENSURE_PNPM
|
||||||
|
if exist "%PNPM_BIN%" goto :eof
|
||||||
|
echo 缺少 pnpm,正在补充安装...
|
||||||
|
call "%NPM_BIN%" install -g pnpm --registry=https://registry.npmmirror.com
|
||||||
|
if not exist "%PNPM_BIN%" (
|
||||||
|
echo [错误] pnpm 安装失败,无法继续构建
|
||||||
|
pause
|
||||||
|
goto MENU
|
||||||
|
)
|
||||||
|
goto :eof
|
||||||
|
|
||||||
:MENU
|
:MENU
|
||||||
cls
|
cls
|
||||||
echo.
|
echo.
|
||||||
@@ -118,7 +132,13 @@ if not exist "%OPENCLAW_DIR%\node_modules" (
|
|||||||
call "%NPM_BIN%" install --registry=https://registry.npmmirror.com
|
call "%NPM_BIN%" install --registry=https://registry.npmmirror.com
|
||||||
)
|
)
|
||||||
cd /d "%OPENCLAW_DIR%"
|
cd /d "%OPENCLAW_DIR%"
|
||||||
call "%NPM_BIN%" run build
|
call :ENSURE_PNPM
|
||||||
|
call "%PNPM_BIN%" run build
|
||||||
|
if not exist "%OPENCLAW_DIR%\dist" (
|
||||||
|
echo [错误] 构建失败,请检查上方错误信息
|
||||||
|
pause
|
||||||
|
goto MENU
|
||||||
|
)
|
||||||
echo.
|
echo.
|
||||||
echo 构建完成!
|
echo 构建完成!
|
||||||
pause
|
pause
|
||||||
@@ -136,17 +156,24 @@ if not exist "%OPENCLAW_DIR%\node_modules" (
|
|||||||
if not exist "%OPENCLAW_DIR%\dist" (
|
if not exist "%OPENCLAW_DIR%\dist" (
|
||||||
echo 先构建...
|
echo 先构建...
|
||||||
cd /d "%OPENCLAW_DIR%"
|
cd /d "%OPENCLAW_DIR%"
|
||||||
call "%NPM_BIN%" run build 2>nul
|
call :ENSURE_PNPM
|
||||||
|
call "%PNPM_BIN%" run build
|
||||||
|
if not exist "%OPENCLAW_DIR%\dist" (
|
||||||
|
echo [错误] 构建失败,请检查上方错误信息
|
||||||
|
pause
|
||||||
|
goto MENU
|
||||||
|
)
|
||||||
)
|
)
|
||||||
cd /d "%OPENCLAW_DIR%"
|
cd /d "%OPENCLAW_DIR%"
|
||||||
REM 首次运行走 onboard,之后直接启动
|
REM 首次运行走 onboard,之后直接启动
|
||||||
if not exist "%USERPROFILE%\.openclaw\openclaw.json" (
|
if not exist "%USERPROFILE%\.openclaw\openclaw.json" (
|
||||||
echo 首次配置...
|
echo 首次配置...
|
||||||
"%NODE_BIN%" openclaw.mjs onboard --install-daemon
|
"%NODE_BIN%" openclaw.mjs onboard --install-daemon
|
||||||
|
if errorlevel 1 goto MENU
|
||||||
)
|
)
|
||||||
echo.
|
echo.
|
||||||
echo 启动 OpenClaw 服务...
|
echo 启动 OpenClaw 服务...
|
||||||
"%NODE_BIN%" openclaw.mjs 2>nul || call "%NPM_BIN%" start
|
"%NODE_BIN%" openclaw.mjs || call "%NPM_BIN%" start
|
||||||
pause
|
pause
|
||||||
goto MENU
|
goto MENU
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,23 @@ else
|
|||||||
fi
|
fi
|
||||||
NODE_BIN="$NODE_DIR/bin/node"
|
NODE_BIN="$NODE_DIR/bin/node"
|
||||||
NPM_BIN="$NODE_DIR/bin/npm"
|
NPM_BIN="$NODE_DIR/bin/npm"
|
||||||
|
PNPM_BIN="$NODE_DIR/bin/pnpm"
|
||||||
export PATH="$NODE_DIR/bin:$PATH"
|
export PATH="$NODE_DIR/bin:$PATH"
|
||||||
|
|
||||||
|
ensure_pnpm() {
|
||||||
|
if [ -x "$PNPM_BIN" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e " ${YELLOW}缺少 pnpm,正在补充安装...${NC}"
|
||||||
|
"$NPM_BIN" install -g pnpm --registry=https://registry.npmmirror.com 2>&1
|
||||||
|
|
||||||
|
if [ ! -x "$PNPM_BIN" ]; then
|
||||||
|
echo -e " ${RED}错误: pnpm 安装失败,无法继续构建${NC}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# 检查安装状态
|
# 检查安装状态
|
||||||
check_status() {
|
check_status() {
|
||||||
HAS_MODULES="no"
|
HAS_MODULES="no"
|
||||||
@@ -122,7 +137,10 @@ ensure_deps() {
|
|||||||
if [ ! -d "$OPENCLAW_DIR/dist" ]; then
|
if [ ! -d "$OPENCLAW_DIR/dist" ]; then
|
||||||
echo -e " ${YELLOW}正在构建...${NC}"
|
echo -e " ${YELLOW}正在构建...${NC}"
|
||||||
cd "$OPENCLAW_DIR"
|
cd "$OPENCLAW_DIR"
|
||||||
"$NODE_BIN" "$NPM_BIN" run build 2>&1
|
if ! ensure_pnpm; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
"$PNPM_BIN" run build 2>&1
|
||||||
if [ ! -d "$OPENCLAW_DIR/dist" ]; then
|
if [ ! -d "$OPENCLAW_DIR/dist" ]; then
|
||||||
echo -e " ${RED}构建失败!请检查上方错误信息${NC}"
|
echo -e " ${RED}构建失败!请检查上方错误信息${NC}"
|
||||||
return 1
|
return 1
|
||||||
@@ -158,7 +176,14 @@ do_build() {
|
|||||||
echo ""
|
echo ""
|
||||||
ensure_deps
|
ensure_deps
|
||||||
cd "$OPENCLAW_DIR"
|
cd "$OPENCLAW_DIR"
|
||||||
"$NODE_BIN" "$NPM_BIN" run build 2>&1
|
if ! ensure_pnpm; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
"$PNPM_BIN" run build 2>&1
|
||||||
|
if [ ! -d "$OPENCLAW_DIR/dist" ]; then
|
||||||
|
echo -e " ${RED}构建失败!请检查上方错误信息${NC}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo -e " ${GREEN}构建完成!${NC}"
|
echo -e " ${GREEN}构建完成!${NC}"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,22 @@ set "OPENCLAW_DIR=%UCLAW_DIR%openclaw"
|
|||||||
set "NODE_DIR=%UCLAW_DIR%runtime\node-win-x64"
|
set "NODE_DIR=%UCLAW_DIR%runtime\node-win-x64"
|
||||||
set "NODE_BIN=%NODE_DIR%\node.exe"
|
set "NODE_BIN=%NODE_DIR%\node.exe"
|
||||||
set "NPM_BIN=%NODE_DIR%\npm.cmd"
|
set "NPM_BIN=%NODE_DIR%\npm.cmd"
|
||||||
|
set "PNPM_BIN=%NODE_DIR%\pnpm.cmd"
|
||||||
|
|
||||||
|
goto MAIN
|
||||||
|
|
||||||
|
:ENSURE_PNPM
|
||||||
|
if exist "%PNPM_BIN%" goto :eof
|
||||||
|
echo 缺少 pnpm,正在补充安装...
|
||||||
|
call "%NPM_BIN%" install -g pnpm --registry=https://registry.npmmirror.com
|
||||||
|
if not exist "%PNPM_BIN%" (
|
||||||
|
echo [错误] pnpm 安装失败,无法继续构建
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
:MAIN
|
||||||
|
|
||||||
if not exist "%NODE_BIN%" (
|
if not exist "%NODE_BIN%" (
|
||||||
echo [错误] 找不到 Node.js 运行环境
|
echo [错误] 找不到 Node.js 运行环境
|
||||||
@@ -43,7 +59,13 @@ if not exist "%OPENCLAW_DIR%\node_modules" (
|
|||||||
if not exist "%OPENCLAW_DIR%\dist" (
|
if not exist "%OPENCLAW_DIR%\dist" (
|
||||||
echo 首次运行,正在构建...
|
echo 首次运行,正在构建...
|
||||||
cd /d "%OPENCLAW_DIR%"
|
cd /d "%OPENCLAW_DIR%"
|
||||||
call "%NPM_BIN%" run build 2>nul
|
call :ENSURE_PNPM
|
||||||
|
call "%PNPM_BIN%" run build
|
||||||
|
if not exist "%OPENCLAW_DIR%\dist" (
|
||||||
|
echo [错误] 构建失败,请检查上方错误信息
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
echo.
|
echo.
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -54,10 +76,11 @@ REM 首次运行走 onboard,之后直接启动
|
|||||||
if not exist "%USERPROFILE%\.openclaw\openclaw.json" (
|
if not exist "%USERPROFILE%\.openclaw\openclaw.json" (
|
||||||
echo 首次配置...
|
echo 首次配置...
|
||||||
"%NODE_BIN%" openclaw.mjs onboard --install-daemon
|
"%NODE_BIN%" openclaw.mjs onboard --install-daemon
|
||||||
|
if errorlevel 1 exit /b 1
|
||||||
)
|
)
|
||||||
echo.
|
echo.
|
||||||
echo 启动 OpenClaw 服务...
|
echo 启动 OpenClaw 服务...
|
||||||
"%NODE_BIN%" openclaw.mjs 2>nul || call "%NPM_BIN%" start
|
"%NODE_BIN%" openclaw.mjs || call "%NPM_BIN%" start
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo OpenClaw 已退出
|
echo OpenClaw 已退出
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ fi
|
|||||||
|
|
||||||
NODE_BIN="$NODE_DIR/bin/node"
|
NODE_BIN="$NODE_DIR/bin/node"
|
||||||
NPM_BIN="$NODE_DIR/bin/npm"
|
NPM_BIN="$NODE_DIR/bin/npm"
|
||||||
|
PNPM_BIN="$NODE_DIR/bin/pnpm"
|
||||||
|
|
||||||
if [ ! -f "$NODE_BIN" ]; then
|
if [ ! -f "$NODE_BIN" ]; then
|
||||||
echo -e " ${RED}错误: 找不到 Node.js 运行环境${NC}"
|
echo -e " ${RED}错误: 找不到 Node.js 运行环境${NC}"
|
||||||
@@ -49,6 +50,21 @@ echo ""
|
|||||||
|
|
||||||
export PATH="$NODE_DIR/bin:$PATH"
|
export PATH="$NODE_DIR/bin:$PATH"
|
||||||
|
|
||||||
|
ensure_pnpm() {
|
||||||
|
if [ -x "$PNPM_BIN" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e " ${YELLOW}缺少 pnpm,正在补充安装...${NC}"
|
||||||
|
"$NPM_BIN" install -g pnpm --registry=https://registry.npmmirror.com 2>&1
|
||||||
|
|
||||||
|
if [ ! -x "$PNPM_BIN" ]; then
|
||||||
|
echo -e " ${RED}错误: pnpm 安装失败,无法继续构建${NC}"
|
||||||
|
read -p " 按回车键退出..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# 检查依赖
|
# 检查依赖
|
||||||
if [ ! -d "$OPENCLAW_DIR/node_modules" ]; then
|
if [ ! -d "$OPENCLAW_DIR/node_modules" ]; then
|
||||||
echo -e " ${YELLOW}首次运行,正在安装依赖...${NC}"
|
echo -e " ${YELLOW}首次运行,正在安装依赖...${NC}"
|
||||||
@@ -65,7 +81,8 @@ fi
|
|||||||
if [ ! -d "$OPENCLAW_DIR/dist" ]; then
|
if [ ! -d "$OPENCLAW_DIR/dist" ]; then
|
||||||
echo -e " ${YELLOW}首次运行,正在构建...${NC}"
|
echo -e " ${YELLOW}首次运行,正在构建...${NC}"
|
||||||
cd "$OPENCLAW_DIR"
|
cd "$OPENCLAW_DIR"
|
||||||
"$NODE_BIN" "$NPM_BIN" run build 2>&1
|
ensure_pnpm
|
||||||
|
"$PNPM_BIN" run build 2>&1
|
||||||
if [ ! -d "$OPENCLAW_DIR/dist" ]; then
|
if [ ! -d "$OPENCLAW_DIR/dist" ]; then
|
||||||
echo -e " ${RED}构建失败,请检查错误信息${NC}"
|
echo -e " ${RED}构建失败,请检查错误信息${NC}"
|
||||||
read -p " 按回车键退出..."
|
read -p " 按回车键退出..."
|
||||||
|
|||||||
82
uclaw-scripts/运行.sh
Normal file
82
uclaw-scripts/运行.sh
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# ============================================================
|
||||||
|
# U-Claw 虾盘 - Linux 一键启动
|
||||||
|
# 用法: bash ./运行.sh
|
||||||
|
# ============================================================
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
UCLAW_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
OPENCLAW_DIR="$UCLAW_DIR/openclaw"
|
||||||
|
NODE_DIR="$UCLAW_DIR/runtime/node-linux-x64"
|
||||||
|
NODE_BIN="$NODE_DIR/bin/node"
|
||||||
|
NPM_BIN="$NODE_DIR/bin/npm"
|
||||||
|
PNPM_BIN="$NODE_DIR/bin/pnpm"
|
||||||
|
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
CYAN='\033[0;36m'
|
||||||
|
RED='\033[0;31m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo -e "${CYAN}"
|
||||||
|
echo " ╔══════════════════════════════════════╗"
|
||||||
|
echo " ║ U-Claw 虾盘 v1.0 ║"
|
||||||
|
echo " ║ OpenClaw Linux 启动 ║"
|
||||||
|
echo " ╚══════════════════════════════════════╝"
|
||||||
|
echo -e "${NC}"
|
||||||
|
|
||||||
|
if [ ! -x "$NODE_BIN" ]; then
|
||||||
|
echo -e " ${RED}错误: 找不到 Linux Node.js 运行环境${NC}"
|
||||||
|
echo " 请确保 runtime/node-linux-x64 目录完整"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export PATH="$NODE_DIR/bin:$PATH"
|
||||||
|
|
||||||
|
ensure_pnpm() {
|
||||||
|
if [ -x "$PNPM_BIN" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e " ${YELLOW}缺少 pnpm,正在补充安装...${NC}"
|
||||||
|
"$NPM_BIN" install -g pnpm --registry=https://registry.npmmirror.com
|
||||||
|
|
||||||
|
if [ ! -x "$PNPM_BIN" ]; then
|
||||||
|
echo -e " ${RED}错误: pnpm 安装失败,无法继续构建${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
echo -e " Node.js 版本: ${GREEN}$("$NODE_BIN" --version)${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
if [ ! -d "$OPENCLAW_DIR/node_modules" ]; then
|
||||||
|
echo -e " ${YELLOW}首次运行,正在安装依赖...${NC}"
|
||||||
|
cd "$OPENCLAW_DIR"
|
||||||
|
"$NPM_BIN" install --registry=https://registry.npmmirror.com
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$OPENCLAW_DIR/dist" ]; then
|
||||||
|
echo -e " ${YELLOW}首次运行,正在构建...${NC}"
|
||||||
|
cd "$OPENCLAW_DIR"
|
||||||
|
ensure_pnpm
|
||||||
|
"$PNPM_BIN" run build
|
||||||
|
if [ ! -d "$OPENCLAW_DIR/dist" ]; then
|
||||||
|
echo -e " ${RED}构建失败,请检查错误信息${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$OPENCLAW_DIR"
|
||||||
|
|
||||||
|
if [ ! -f "$HOME/.openclaw/openclaw.json" ]; then
|
||||||
|
echo -e " ${YELLOW}首次配置...${NC}"
|
||||||
|
"$NODE_BIN" openclaw.mjs onboard --install-daemon
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e " ${CYAN}启动 OpenClaw 服务...${NC}"
|
||||||
|
"$NODE_BIN" openclaw.mjs || "$NPM_BIN" start
|
||||||
@@ -324,7 +324,7 @@
|
|||||||
<div class="stat-label en hidden">Chinese AI models</div>
|
<div class="stat-label en hidden">Chinese AI models</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat">
|
<div class="stat">
|
||||||
<div class="stat-num">3</div>
|
<div class="stat-num">4</div>
|
||||||
<div class="stat-label zh">平台支持</div>
|
<div class="stat-label zh">平台支持</div>
|
||||||
<div class="stat-label en hidden">OS platforms</div>
|
<div class="stat-label en hidden">OS platforms</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -385,8 +385,8 @@
|
|||||||
<div class="tag tag-red en hidden">One-Click</div>
|
<div class="tag tag-red en hidden">One-Click</div>
|
||||||
<h3 class="zh">雨林木风风格启动菜单</h3>
|
<h3 class="zh">雨林木风风格启动菜单</h3>
|
||||||
<h3 class="en hidden">YuLinMuFeng-Style Launcher</h3>
|
<h3 class="en hidden">YuLinMuFeng-Style Launcher</h3>
|
||||||
<p class="zh">16 个功能:安装、修复、备份、还原、重置。双击就能用,小白也能搞定。</p>
|
<p class="zh">16 个功能:安装、修复、备份、还原、重置。macOS / Windows / Linux 三系统,双击就能用。</p>
|
||||||
<p class="en hidden">16 functions: install, repair, backup, restore, reset. Double-click and go.</p>
|
<p class="en hidden">16 functions: install, repair, backup, restore, reset. macOS / Windows / Linux.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="feature-card">
|
<div class="feature-card">
|
||||||
<div class="tag tag-green zh">中国优化</div>
|
<div class="tag tag-green zh">中国优化</div>
|
||||||
@@ -438,8 +438,8 @@
|
|||||||
<span class="en hidden">3 Steps</span>
|
<span class="en hidden">3 Steps</span>
|
||||||
</h2>
|
</h2>
|
||||||
<p class="section-sub">
|
<p class="section-sub">
|
||||||
<span class="zh">双口 U 盘(USB-A + USB-C),Mac 和 Windows 都能插</span>
|
<span class="zh">双口 U 盘(USB-A + USB-C),Mac / Windows / Linux 通用</span>
|
||||||
<span class="en hidden">Dual-port USB (USB-A + USB-C), works on Mac and Windows</span>
|
<span class="en hidden">Dual-port USB (USB-A + USB-C), works on Mac, Windows & Linux</span>
|
||||||
</p>
|
</p>
|
||||||
<div class="steps">
|
<div class="steps">
|
||||||
<div class="step">
|
<div class="step">
|
||||||
@@ -454,8 +454,8 @@
|
|||||||
<div class="step-num">2</div>
|
<div class="step-num">2</div>
|
||||||
<div>
|
<div>
|
||||||
<h3 class="zh">双击启动菜单</h3><h3 class="en hidden">Double-click Launcher</h3>
|
<h3 class="zh">双击启动菜单</h3><h3 class="en hidden">Double-click Launcher</h3>
|
||||||
<p class="zh">Mac 双击「启动菜单.command」,Win 双击「启动菜单.bat」</p>
|
<p class="zh">Mac 双击「启动菜单.command」,Win 双击「启动菜单.bat」,Linux 运行「运行.sh」</p>
|
||||||
<p class="en hidden">Mac: "启动菜单.command", Win: "启动菜单.bat"</p>
|
<p class="en hidden">Mac: "启动菜单.command", Win: "启动菜单.bat", Linux: "运行.sh"</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="step">
|
<div class="step">
|
||||||
|
|||||||
Reference in New Issue
Block a user