diff --git a/scripts/after-pack.js b/scripts/after-pack.js index ce174f3..d5bb86c 100644 --- a/scripts/after-pack.js +++ b/scripts/after-pack.js @@ -27,12 +27,14 @@ module.exports = async function afterPack(context) { } // Find all better_sqlite3.node files inside the standalone resources - const resourcesDir = path.join(appOutDir, 'CodePilot.app', 'Contents', 'Resources'); - // On macOS the structure is: /CodePilot.app/Contents/Resources/standalone/... - // But appOutDir might already point to the .app parent, so try both + // macOS: /CodePilot.app/Contents/Resources/standalone/... + // Windows/Linux: /resources/standalone/... const searchRoots = [ - path.join(resourcesDir, 'standalone'), + // macOS paths + path.join(appOutDir, 'CodePilot.app', 'Contents', 'Resources', 'standalone'), path.join(appOutDir, 'Contents', 'Resources', 'standalone'), + // Windows/Linux paths + path.join(appOutDir, 'resources', 'standalone'), ]; let replaced = 0;