electron-builder icon indicating copy to clipboard operation
electron-builder copied to clipboard

Additional unversial exe package is generated

Open qishibo opened this issue 1 year ago • 3 comments

  • Electron-Builder Version: 23.0.2
  • Node Version: v16.20.0
  • Electron Version:12.2.3
  • Electron Type (current, beta, nightly):
  • Target: {"target": "nsis", "arch": ["x64", "arm64"]}

if I build arm64 and x64 nsis target, and my build field like bellow

"win": {
  "target": [
    {"target": "nsis", "arch": ["x64", "arm64"]}
  ]
},
"nsis": {
  "artifactName": "${productName}-Setup-${version}-${arch}.${ext}",
}

after building I got 3 exes instead of 2(arm64 and x64), it seems that an universial package is generated, and its size is about 2 times bigger than arm64 and x64. I am quite confused about this, can I remove the universal version??

image

qishibo avatar Oct 13 '24 12:10 qishibo

tried again in local machine, if I don't want this universal version, how can I config to reduct this

image

qishibo avatar Oct 15 '24 02:10 qishibo

I took a solid look at the code and am unable to determine the reason as to why a universal package needs to be generated. The logic is quite complex though and AFAICT I don't think it's possible to remove the universal package from being generated. AFAICT, the logic exists here: https://github.com/electron-userland/electron-builder/blob/f941f18a003a3762949a36e4a06e98e1014d3ed1/packages/app-builder-lib/src/targets/nsis/NsisTarget.ts#L237-L252

mmaietta avatar Oct 15 '24 16:10 mmaietta

Looks like there's been a request to disable the universal package before as well: https://github.com/electron-userland/electron-builder/issues/8298

mmaietta avatar Oct 15 '24 16:10 mmaietta

X-posting

Would anyone be willing to test out this patch-package?

Patch found here: https://github.com/electron-userland/electron-builder/issues/8298#issuecomment-2432884953

mmaietta avatar Oct 23 '24 17:10 mmaietta

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Dec 23 '24 00:12 github-actions[bot]

Is there any progress?

m1rn avatar Dec 24 '24 13:12 m1rn