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

Windows MSI built on Linux is 3× larger than if built on Windows

Open andersk opened this issue 3 years ago • 10 comments

  • Version: 22.9.1
  • Electron Version: 11.0.3
  • Electron Type (current, beta, nightly): current
  • Target: Windows MSI

When I tried building zulip-desktop for Windows on the provided Docker image, the resulting MSI was 180 MB, compared to the 60 MB I get from building it on Windows.

This can be reproduced with other apps, e.g. electron-webpack-quick-start:

$ git clone -q https://github.com/electron-userland/electron-webpack-quick-start.git
$ cd electron-webpack-quick-start
$ curl -sO https://raw.githubusercontent.com/electron/electron/v11.0.3/spec/fixtures/assets/icon.ico
$ docker run --rm -ti -v $PWD:/project electronuserland/builder:wine
root@672d26c2db30:/project# yarn add electron-builder@latest
…
├─ [email protected]
…
root@672d26c2db30:/project# yarn upgrade
…
root@672d26c2db30:/project# yarn dist --win msi
…
root@672d26c2db30:/project# du -sb dist/*.msi dist/win-unpacked
174474240       dist/electron-webpack-quick-start 0.0.0.msi
178057532       dist/win-unpacked

Building this on Windows instead gives a 57520128 byte MSI. The win-unpacked folder is about the same size (172943202 bytes), so I suspect a compression issue with the MSI.

andersk avatar Dec 02 '20 06:12 andersk

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Feb 02 '21 04:02 stale[bot]

Yes, this still reproduces with the latest version of electron-builder. (Which is the same as the latest version of electron-builder when I originally reported the bug. Maybe this stalebot configuration is a bit aggressive?)

andersk avatar Feb 02 '21 05:02 andersk

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Jun 07 '21 13:06 stale[bot]

Yes, still relevant with version 22.11.5

kolaente avatar Jun 07 '21 14:06 kolaente

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Aug 28 '21 17:08 stale[bot]

Yes, still relevant with the latest version.

kolaente avatar Aug 28 '21 17:08 kolaente

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Apr 17 '22 17:04 stale[bot]

Still an issue in 23.0.3.

andersk avatar Apr 17 '22 17:04 andersk

It looks like compression doesn't work if you're not on a native windows OS. The win-upacked dir is ~500Mb and the .msi is slightly higher than that (which makes sense).

On a native windows OS, the win-unpacked dir is ~500Mb but then the .msi is only 151Mb, which is much closer to what I'd expect.

FizzBuzz791 avatar May 20 '22 04:05 FizzBuzz791

Still an issue in 23.1.0.

webdevmario avatar Jul 15 '22 12:07 webdevmario