feat: prepare Zhinian desktop client for pilot release

This commit is contained in:
inman
2026-04-29 10:23:20 +08:00
parent f9361e686a
commit 47b83b79fc
149 changed files with 15341 additions and 3590 deletions

View File

@@ -23,6 +23,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
const ROOT = path.resolve(__dirname, '..');
const OUTPUT_ROOT = path.join(ROOT, 'build', 'openclaw-plugins');
const NODE_MODULES = path.join(ROOT, 'node_modules');
const STATIC_PLUGIN_ROOT = path.join(ROOT, 'resources', 'openclaw-plugins');
// On Windows, pnpm virtual store paths can exceed MAX_PATH (260 chars).
// Adding \\?\ prefix bypasses the limit for Win32 fs calls.
@@ -241,4 +242,17 @@ for (const plugin of PLUGINS) {
bundleOnePlugin(plugin);
}
if (fs.existsSync(STATIC_PLUGIN_ROOT)) {
for (const entry of fs.readdirSync(STATIC_PLUGIN_ROOT, { withFileTypes: true })) {
if (!entry.isDirectory()) continue;
const sourceDir = path.join(STATIC_PLUGIN_ROOT, entry.name);
const outputDir = path.join(OUTPUT_ROOT, entry.name);
const manifestPath = path.join(sourceDir, 'openclaw.plugin.json');
if (!fs.existsSync(manifestPath)) continue;
echo`📦 Copying static plugin ${entry.name} -> ${outputDir}`;
fs.rmSync(outputDir, { recursive: true, force: true });
fs.cpSync(sourceDir, outputDir, { recursive: true, dereference: true });
}
}
echo`✅ Plugin mirrors ready: ${OUTPUT_ROOT}`;