Root cause: portable zip was 1MB skeleton; first launch triggered
`npm install` of OpenClaw + 36 bundled deps on customer's USB drive.
On exFAT-formatted USB this hangs/takes 20+ minutes, gateway never
binds 18789, dashboard shows "Gateway 未启动".
Fix follows StanleyChanH/openclaw-offline-package pattern (153MB
single-platform zip, gateway starts directly):
- release.yml: only build Windows bundle (~150-200MB). Mac users
fall back to setup.sh. Reasoning: 99% of customers are Windows;
bundling 3 platforms × Node ~30MB + 3× node_modules dedup pain
is what blew the previous attempt past GitHub's 2GB cap (see
5916ff5 history). Smaller scope = simpler + safer.
- Windows-Start.bat / Mac-Start.command: warn if node_modules
missing; fallback `npm install` adds --ignore-scripts --no-audit
--no-fund for speed.
- Release notes: NTFS U-disk recommendation.
Lessons applied (from 5916ff5):
- Stay on linux runner with --ignore-scripts (Stanley pattern)
- Drop mac-x64 / mac-arm64 Node from bundle (setup.sh handles Mac)
- rm -rf node-llama-cpp / sharp / canvas explicitly
- Hard size guard: fail CI if zip > 1500MB (buffer below 2GB cap)
Three changes for v2.1.2:
1. bootstrap-xiapan now writes "agents.defaults.model.primary/fallbacks"
(uclaw-cloud/deepseek-v4-flash + 3 fallbacks) and an empty models[],
matching the ClawX commercial schema. Lets OpenClaw runtime auto-discover
models from /v1/models instead of hard-coding a list that drifts.
2. config-server tries ports 18788..18798 with EADDRINUSE fallback and
persists the live port to data/.openclaw/runtime.json so future tooling
can discover it. Fixes silent failure when a second portable instance
started while 18788 was occupied.
3. u-claw-app/package.json version 2.0.0 -> 2.1.2 so .exe/.dmg filenames
align with the release tag.
OpenClaw 2026.4.29 renamed the per-model field from "label" to "name". The
old field is now an Unrecognized key, which fails schema validation at
gateway startup and exits OpenClaw before any HTTP listener binds.
Symptom (v2.1.0 first-launch):
- models.providers.uclaw-cloud.models.0.name: Invalid input: expected string, received undefined
- models.providers.uclaw-cloud.models.0: Unrecognized key: "label"
- throwInvalidConfig() at io-DaEsZ_NY.js:2901 -> process exit
Found via end-to-end H: drive test of v2.1.0 portable zip.
Two real bugs in the portable launchers:
1. Windows-Install.bat: xcopy reads from %TEMP%\node-<ver>-win-x64
but Expand-Archive extracts into %TEMP%\node-extract\node-<ver>-win-x64.
Result: empty runtime\node-win-x64\ on networked install path.
2. Mac-Start.command + Windows-Start.bat: legacy-config sync block
was placed AFTER the default-config block, so the "config.json
exists but openclaw.json doesn't" branch was unreachable. Existing
USB users with config.json never got their settings migrated;
they got the empty default instead.
Reordered so legacy migration runs first, default only as fallback.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When users run setup.ps1 from PowerShell with cwd outside the repo
(e.g. C:\Users\Admin>), npm 11 walks up looking for package.json and
errors with ENOENT before honoring --prefix. setup.bat already pushd's
into core; setup.ps1 was missing the equivalent Push-Location guard.
Fixes#27 (setup.ps1 ENOENT package.json reported by lawler-code).
Add in-app WeChat scanning via Tencent iLink API:
- server.js: QR code PNG renderer, WeChat API proxy, plugin auto-install
- index.html: WeChat channel card with QR display and polling UI
- Windows-Start.bat: auto-install WeChat plugin on startup
- Windows-Install.bat: copy WeChat plugin during installation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PR #13 (luckylibin) version includes:
- QQ plugin installation step (was missing)
- --all-platforms flag to download Mac Node.js runtimes
- More robust error handling
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Windows-Start.bat:
- Fix duplicate browser tab opening (was opening 3 tabs)
- Read gateway token from config instead of hardcoding
- Add config sync from legacy location
- Use delayed browser open for gateway startup time
Windows-Menu.bat:
- Fix Node version display bug (double %% issue)
- System info: add Windows version, architecture, memory, disk size
- Check updates: auto-fetch latest version from npmmirror, one-click upgrade
- Disk cleanup: show directory sizes, clean old backups/logs/npm cache
- Log management: add export to desktop, clean logs older than 7 days
- Restore backup: numbered list selection instead of typing folder name
- Kill processes: add confirmation prompt before killing
- Chat platforms: individual setup guidance per platform
Windows-Install.bat:
- Add Node.js online download fallback (was exit-only when missing)
- Add system Node.js version check (require v20+)
- Generated start.bat now has port detection loop
- Show install size on completion
Windows-Diagnose.bat:
- Add system info logging (Windows version, architecture)
- Add config file and model configuration check
- Expand port scan to full 18789-18799 range
- Show OpenClaw version in test output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mac-Menu, Mac-Diagnose, and Windows-Diagnose were missing the
core-mac/core-win → core migration shim, causing them to fail
on existing USB drives that still have the old directory name.
- Delete usb-scripts/, Linux-*.sh, setup-linux-usb.sh, migrate.js
- Rename core-mac/core-win → core (with migration shims for existing USBs)
- Fix Mac-Menu.command ARM64 hardcode — now detects Intel/Apple Silicon
- setup.sh: remove Linux branch, Windows download only with --all-platforms
- Update README.md and CLAUDE.md to reflect Mac + Windows only
Replaces the problematic file:// protocol Config.html with a stable
Node.js HTTP server following industry standard patterns (n8n, Langflow).
Changes:
- Add portable/config-server/ with REST API (GET/POST /api/config)
- Add simplified Chinese/English web UI for AI model and QQ Bot config
- Update Windows-Start.bat to launch both services simultaneously
- Config Center on port 18788
- OpenClaw Gateway on port 18789
- Remove Config.html file:// protocol issues
- Use zero-dependency pure Node.js standard library
Benefits:
- No file:// CORS or WebSocket issues
- Industry-standard localhost HTTP pattern
- Simplified configuration interface for Chinese users
- Unified startup experience
🤖 Generated with Claude Code
- Windows-Start.bat: Always open dashboard instead of Config.html
The dashboard can guide first-time setup, avoiding file:// protocol issues
- Windows-Diagnose.bat: Add Chinese output for better user experience
Error counting and friendly suggestions included
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major fixes for Windows portable version:
1. **Fixed critical bugs:**
- Replace Unix /dev/null with Windows nul in all .bat files
- Unified config path to data/.openclaw/openclaw.json
- Fixed cross-platform node_modules compatibility issue
2. **Implemented separated core directories:**
- app/core-mac/ for Mac dependencies
- app/core-win/ for Windows dependencies
- Prevents cross-platform file system conflicts
- Shared data/ directory for configs and memory
3. **Enhanced setup.sh:**
- Now downloads both Mac and Windows Node.js runtimes
- Ensures U-Claw works on both platforms after setup
4. **Added diagnostic tools:**
- Windows-Diagnose.bat for troubleshooting
- Mac-Diagnose.command for troubleshooting
- Auto-generates diagnostic-log.txt
5. **Improved user experience:**
- Added Welcome.html - Simple 3-step guide in Chinese
- All scripts updated to use platform-specific core directories
- Better error messages and user guidance
Files modified:
- portable/Windows-Start.bat: Use core-win, fix syntax
- portable/Windows-Menu.bat: Use core-win, fix syntax
- portable/Mac-Start.command: Use core-mac
- portable/Mac-Menu.command: Use core-mac
- portable/setup.sh: Download both platforms, use core-mac
Files added:
- portable/Windows-Diagnose.bat: Diagnostic tool
- portable/Mac-Diagnose.command: Diagnostic tool
- portable/Welcome.html: User-friendly welcome page
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Skills (40KB total, in portable/skills-cn/):
- deepseek-helper: DeepSeek API usage and model selection
- china-weather: Chinese city weather via wttr.in
- xiaohongshu-writer: 小红书爆款笔记写作
- wechat-article: 微信公众号文章写作
- douyin-script: 抖音/快手短视频脚本
- bilibili-helper: B站内容优化
- china-search: 百度/搜狗/Bing国内搜索
- zhihu-writer: 知乎回答写作
- weibo-poster: 微博内容创作
- china-translate: 中英互译+本地化
setup.sh auto-copies skills-cn/ into OpenClaw skills directory.
No external dependency on ClawHub for these skills.
- build-usb.sh: one-click USB drive builder (downloads Node.js + OpenClaw
from China mirrors, packages into USB-ready directory)
- Mac-Install.command: install from USB to Mac (~/.uclaw/), offline-first
with China mirror fallback
- Windows-Install.bat: same for Windows
- README.md rewritten to position project as "USB drive builder toolkit"
- openclaw.mjs is at node_modules/openclaw/openclaw.mjs, not core root
- Remove npm run build (openclaw doesn't need a build step via npm)
- Fix both Mac-Start.command and Mac-Menu.command