Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installer includes too many files? #977

Closed
atomb opened this issue Nov 19, 2020 · 1 comment · Fixed by #1358
Closed

Windows installer includes too many files? #977

atomb opened this issue Nov 19, 2020 · 1 comment · Fixed by #1358
Labels
build system Related to Cryptol's build system windows Specific to Cryptol on the Windows platform
Milestone

Comments

@atomb
Copy link
Contributor

atomb commented Nov 19, 2020

The Windows .msi installer we produce for releases is 4x the size of the corresponding tarball. It may partly be using less powerful compression, but I'm suspicious that it might include multiple copies of the binaries, in different locations.

@atomb atomb added windows Specific to Cryptol on the Windows platform build system Related to Cryptol's build system labels Nov 19, 2020
@atomb atomb self-assigned this Dec 11, 2020
@atomb atomb added this to the 2.11.0 milestone Dec 11, 2020
@atomb atomb removed this from the 2.11.0 milestone Mar 23, 2021
@atomb atomb removed their assignment Oct 19, 2021
@RyanGlScott RyanGlScott added this to the 2.14.0 milestone May 16, 2022
@RyanGlScott
Copy link
Contributor

I see what is going on here. The culprit is this line in .github/wix.ps1:

& "$env:WIX\bin\heat.exe" dir "$pwd" -o allfiles.wxs -nologo -var var.pkg -ag -wixvar -cg ALLFILES -srd -dr INSTALLDIR -sfrag

The use of dir "$pwd" causes every single file in the current checkout to be included, which is far more than what we want. I think the appropriate thing to do is to instead use dir "$pwd/dist" after a call to .github/ci.sh bundle_files, which only includes the files that we want for a binary distribution. I've tested this idea locally, and it successfully reduces the size of the resulting cryptol.msi file to 44.5 MB, which is comparable in size to a .tar.gz bindist.

RyanGlScott added a commit that referenced this issue May 23, 2022
Previously, we would include every file in the current `cryptol` checkout in
`cryptol.msi`, which would result in horribly bloated installer files. We now
only include those files under the `dist` directory (created by
`.github/ci.sh bundle_files`), which curates only those files we want to
include in a binary distribution.

While I was in town, I modified the conventioned used in `win32/cryptol.wxs`
so that we no longer need to reference `dist`, which does not show up in
`.tar.gz`-based bindists.

Fixes #977.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Related to Cryptol's build system windows Specific to Cryptol on the Windows platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants