diff --git a/forge.config.js b/forge.config.js index 1182111..bd215b1 100644 --- a/forge.config.js +++ b/forge.config.js @@ -1,3 +1,6 @@ +const fs = require('fs'); +const path = require('path'); + module.exports = { packagerConfig: { asar: true, @@ -49,4 +52,14 @@ module.exports = { }, }, ], + hooks: { + // Fix sqlite links out of the package https://www.update.rocks/blog/fixing-the-python3/ + packageAfterPrune: async (forgeConfig, buildPath, electronVersion, platform, arch) => { + if (platform === 'darwin' || platform === 'linux') { + console.log('We need to remove the problematic link file on macOS/Linux'); + console.log(`Build path ${buildPath}`); + fs.unlinkSync(path.join(buildPath, 'node_modules/sqlite3/build/node_gyp_bins/python3')); + } + }, + }, };