electron-builder
electron-builder copied to clipboard
How to manually install the electronic compressed package to the corresponding directory in windows11
"electron": "11.0.1",
"electron-builder": "22.10.4",
system:windows11
$ electron-builder build --publish never
Command to install 404. I want to manually download the electronic compressed package to the local. Please tell me which directory the compressed package should be placed in so that the electronic-builder can correctly identify it
You can actually use electronDist
config property with a callback to provide a fully resolved path to an electron zip. I've used it with my fork. Sample code:
electronDist: (options: PrepareApplicationStageDirectoryOptions) => {
const { arch, platformName, version, packager } = options;
const distDir = rebrandedElectronPath(arch, packager);
const distPath = path.resolve(distDir, 'dist.zip')
// Funky logic used to bridge our forked electron `dist.zip` artifacts with the naming system electron-builder expects
// Ref: https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/electron/ElectronFramework.ts#L151
const destinationDirname = 'dist'
const destPath = path.resolve(destinationDirname, `electron-v${ version }-${ platformName }-${ arch }.zip`);
console.log("Copying electron fork dist", { distPath, destPath })
fs.copyFileSync(distPath, destPath);
return destinationDirname;
}