build-tools
build-tools copied to clipboard
e build electron:dist doesn't remove symbol dist.zip is very large.
When I use
e build electron:dist -v
It generates dist.zip, but the size is greater than 1g. Can I add strip binaries by e command?
electron/script/strip-binaries.py -d out/Release
function runStrip(config) {
depot.ensure();
//console.log(evmConfig.outDir(config));
const gnPath = 'electron/script/strip-binaries.py';
const execArgs = ['-d', `out/${config.gen.out}` ];
const execOpts = { cwd: path.resolve(config.root, 'src') };
//delete dist.zip file
const distfile = [path.resolve(evmConfig.outDir(config),'dist.zip')];
if (fs.existsSync(distfile[0])){
console.log('dist.zip delete.');
depot.execFileSync(config, 'rm', distfile, execOpts);
}else{
console.log('dist.zip not found.');
}
//strip electron
depot.execFileSync(config, gnPath, execArgs, execOpts);
}
set it in release.gn: symbol_level = 0 The electron file will be about 70m.
Closing this in light of comments on https://github.com/electron/build-tools/pull/197