build-tools icon indicating copy to clipboard operation
build-tools copied to clipboard

e build electron:dist doesn't remove symbol dist.zip is very large.

Open bigben0123 opened this issue 5 years ago • 2 comments

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

bigben0123 avatar Sep 29 '20 01:09 bigben0123

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);
}

bigben0123 avatar Sep 29 '20 03:09 bigben0123

set it in release.gn: symbol_level = 0 The electron file will be about 70m.

bigben0123 avatar Oct 20 '20 01:10 bigben0123

Closing this in light of comments on https://github.com/electron/build-tools/pull/197

codebytere avatar Sep 15 '22 17:09 codebytere