Commit Graph

17 Commits

Author SHA1 Message Date
hfshfg
78bcb7fd8e fix(release): Windows-only portable bundle with pre-installed deps
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)
2026-05-04 11:02:56 +08:00
hfshfg
9ecbbd445c feat: 内置虾盘云 + 设备指纹绑定 + Release 流水线
- 新增 portable/lib/{fingerprint,xiapan-client,bootstrap-xiapan}.mjs:
  跨平台设备指纹(Win USB/disk + Mac UUID + Linux machine-id + seed 兜底)
  生成 sk-uc-{fingerprint} 形式的虾盘云 apiKey,启动时 merge 到 openclaw.json
- Config.html 顶部新增「已绑定虾盘云」横幅:指纹来源 + Key + 余额 + 充值/解绑
- config-server 增加 /api/xiapan/{status,bind,unbind} 三个端点
- Electron app 在 whenReady 调 bootstrap,新增 sync-lib.js 让 build 前自动同步
- 锁 OpenClaw 版本到 2026.4.29(OPENCLAW_VERSION 单一来源)
- 删除死代码 portable/充值.html
- 新增 .github/workflows/release.yml:tag 触发,出 portable zip + Electron exe/dmg
- README 增加内置虾盘云说明 + 直接下载发行版指引
2026-05-02 17:07:42 +08:00
hfshfg
b6ba958b79 fix(portable): node-extract path + unreachable legacy-config sync
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>
2026-05-01 15:36:34 +08:00
dongsheng123132
49b875b081 feat: add uninstall.sh for one-click uninstall 2026-04-13 18:17:14 +08:00
hfshfg
220599584e feat: add WeChat QR code login to config-server
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>
2026-04-09 22:03:20 +08:00
hfshfg
3f6f960ffc fix: 修复 bat 编码乱码、Config.html 打不开、missing scope 问题
- fix(bat): 所有 Windows .bat 文件加 UTF-8 BOM,修复中文乱码
  (portable 和 usb-release 共 7 个文件,close #3)
- fix(usb-release/Windows-Start.bat): 首次启动打开 Config.html
  时补加 file:/// 前缀,修复浏览器无法打开本地文件的问题
  (close #12)
- fix(Config.html): gateway.auth 加入 scopes: ['operator.admin'],
  修复配置模型时报 missing scope: operator.admin 错误
  (portable / usb-release / u-claw-app 三个版本同步,close #11)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 09:31:16 +08:00
hfshfg
6569bcddf6 fix: Windows-Start.bat 启动修复 + Config Center 全面升级
Windows-Start.bat:
- 去掉 EnableDelayedExpansion,避免感叹号解析问题
- 用 config-server (18788端口) 替代直接打开 Config.html
- 去掉有 bug 的 token 读取(引号嵌套问题)
- 去掉 powershell 日志管道,简化启动流程
- 对齐 H 盘已验证可用的方案

Config Center (config-server/public/index.html):
- 步骤式引导:选模型 → 填 Key → 启动
- 11 个模型:MiniMax/Kimi/DeepSeek/智谱GLM/通义千问/豆包/OpenAI/Claude/Groq/硅基流动/自定义
- 4 个聊天平台:Telegram/QQ/飞书/企业微信
- Gateway 状态实时检测
- 正确的 OpenClaw v3 配置格式

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 10:47:52 +08:00
dongsheng123132
83996e42db feat: enhance Windows scripts to match Mac feature parity
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>
2026-03-16 15:51:54 +08:00
dongsheng123132
4fcd22d4e3 cleanup: remove Linux scripts, unify core dir, fix Intel Mac bug
- 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
2026-03-14 00:08:56 +08:00
dongsheng123132
7766d59e55 merge: resolve conflict in Windows-Start.bat, add Linux scripts and maintain lib 2026-03-13 17:35:55 +08:00
hfshfg
8ae4d87e4f feat: add independent config server to replace Config.html
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
2026-03-12 20:26:15 +08:00
hfshfg
874e2445f8 Improve Windows startup and diagnostics
- 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>
2026-03-12 19:29:27 +08:00
hfshfg
25bc0076b0 fix: Windows support & cross-platform architecture
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>
2026-03-12 18:50:55 +08:00
hfshfg
11220537a0 fix: correct Windows batch file syntax and config path consistency
Fixed critical Windows-specific bugs in portable USB scripts:
- Replaced Unix /dev/null with Windows nul in all batch files
- Unified config file path to use .openclaw/openclaw.json consistently
- Windows-Start.bat now uses same config structure as Windows-Menu.bat

Files modified:
- portable/Windows-Start.bat: Fix /dev/null syntax, unify config path
- portable/Windows-Menu.bat: Fix multiple /dev/null occurrences
- usb-scripts/Windows-Install.bat: Fix /dev/null syntax

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-12 17:50:20 +08:00
dongsheng123132
ed454f78ac fix: correct openclaw.mjs path in Windows scripts, remove broken build step
Same fixes as Mac scripts: use full node_modules path for openclaw.mjs
and remove non-existent npm run build step.
2026-03-12 12:03:17 +08:00
dongsheng123132
75b5daab57 fix: Windows first-run opens Config.html instead of onboard
- Windows-Start.bat now detects first run and opens Config.html
- Added custom/relay model option for API proxy platforms
2026-03-11 00:58:55 +08:00
dongsheng123132
c1e94d4dd9 feat: add navigation page and rename scripts to English prefixes
- Add U-Claw.html navigation page with OS auto-detection and live status
- Rename scripts: start → Mac-Start/Windows-Start, menu → Mac-Menu/Windows-Menu
- Update installer scripts to reference new v2 directory structure (app/core)
- Update .gitignore to exclude build artifacts and marketing assets
2026-03-10 22:55:20 +08:00