chore: 停发并归档 Electron 桌面版,产品只保留便携 U 盘版
桌面 Electron 版是商业版 ClawX 已做得更好的事的劣化版,且启动坑多 (冷启动建编译缓存 >30s 撞写死的 30s 硬超时,绿色版每次解压 837MB 永远冷启动)。U-Claw 的本质是「插上 U 盘解压即用」,故停发桌面版, 只发便携版。 - release.yml: 删除 desktop-windows / desktop-mac 两个 job;publish 只依赖 portable-windows-full;发布说明去掉桌面安装版/dmg,只留便携版 - u-claw-app/DEPRECATED.md: 新增归档说明(停发原因、坑、如何捡回) - u-claw-app/src/main.js: 顺带修 gateway 超时 30s→180s + spawn 加固定 NODE_COMPILE_CACHE(让归档代码处于可用状态) - 删除 usb-release/: portable/ 的老前身,2026-04 后无人维护、全仓库零 引用,是「为什么有两个 U 盘版」的混乱源 - README.md / CLAUDE.md: 分发形态更新为便携版唯一主发 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,12 @@ const http = require('http');
|
||||
const APP_NAME = 'U-Claw';
|
||||
const DEFAULT_PORT = 18789;
|
||||
const MAX_PORT = 18799;
|
||||
const GATEWAY_STARTUP_TIMEOUT = 30000;
|
||||
// First cold start builds the V8 compile cache for OpenClaw (a large app) — on a
|
||||
// fresh machine / freshly-extracted portable exe this can take 30–60s+. Give it
|
||||
// room so we never hard-fail with a scary dialog before the engine is up. The
|
||||
// loading.html splash polls and the window navigates as soon as the gateway is
|
||||
// ready, so a long ceiling only matters on a genuinely stuck start.
|
||||
const GATEWAY_STARTUP_TIMEOUT = 180000;
|
||||
|
||||
// ── Paths ──
|
||||
const isDev = process.argv.includes('--dev');
|
||||
@@ -214,12 +219,20 @@ function startGateway(port) {
|
||||
const nodeBin = getNodeBin();
|
||||
console.log(`[${APP_NAME}] Using Node.js: ${nodeBin}`);
|
||||
|
||||
// Persist the V8 compile cache to a fixed local dir under userData so the
|
||||
// gateway's heavy first-run compile is paid only once. userDataPath is stable
|
||||
// across launches even for the portable exe (which self-extracts to a random
|
||||
// temp dir each time), so the cache survives and subsequent starts are fast.
|
||||
const compileCacheDir = path.join(userDataPath, '.cache', 'v8-compile-cache');
|
||||
try { fs.mkdirSync(compileCacheDir, { recursive: true }); } catch {}
|
||||
|
||||
const env = {
|
||||
...process.env,
|
||||
OPENCLAW_HOME: userDataPath,
|
||||
OPENCLAW_STATE_DIR: configDir,
|
||||
OPENCLAW_CONFIG_PATH: configPath,
|
||||
OPENCLAW_EMBEDDED_IN: APP_NAME,
|
||||
NODE_COMPILE_CACHE: compileCacheDir,
|
||||
};
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
|
||||
Reference in New Issue
Block a user