feat: prepare Zhinian desktop client for pilot release
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user