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

@@ -596,6 +596,21 @@ exports.default = async function afterPack(context) {
}
}
const staticPluginRoot = join(__dirname, '..', 'resources', 'openclaw-plugins');
if (existsSync(staticPluginRoot)) {
for (const entry of readdirSync(staticPluginRoot, { withFileTypes: true })) {
if (!entry.isDirectory()) continue;
const sourceDir = join(staticPluginRoot, entry.name);
if (!existsSync(join(sourceDir, 'openclaw.plugin.json'))) continue;
const pluginDestDir = join(pluginsDestRoot, entry.name);
console.log(`[after-pack] Copying static plugin ${entry.name} -> ${pluginDestDir}`);
rmSync(pluginDestDir, { recursive: true, force: true });
cpSync(sourceDir, pluginDestDir, { recursive: true, dereference: true });
cleanupUnnecessaryFiles(pluginDestDir);
patchPluginIds(pluginDestDir, entry.name);
}
}
// 1.2 Copy built-in extension node_modules that electron-builder skipped.
// OpenClaw 3.31+ ships built-in extensions (discord, qqbot, etc.) under
// dist/extensions/<ext>/node_modules/. These are skipped by extraResources