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

Add a Windows msi installer #280

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add a Windows msi installer #280

wants to merge 6 commits into from

Conversation

feschber
Copy link
Owner

No description provided.

@feschber
Copy link
Owner Author

feschber commented Mar 17, 2025

Todos

  • include the gtk dlls
  • check if any other dlls are requried
  • dont bundle msvc runtime dlls
  • fix multiple installs possible
  • update CI

@nbolton
Copy link
Contributor

nbolton commented Mar 17, 2025

Do Rust binaries depend on MSVC? Just curious. I'm pretty sure Rust uses MSVC Toolchain by default.

If it does, you may want to add an MSVC dependency to the WiX config. Here's how I did it recently: https://github.com/deskflow/deskflow/blob/0e3cee628751ed7be70f065e182ea9c7614f2378/deploy/windows/wix-patch.xml.in

You can also use WiX burn to bundle the MSVC redist MSI with your MSI to create a .exe that installs both (this is the recommended approach since Microsoft discourages DLL side loading and has deprecated merge modules which were historically used to install the MSVC deps).

@feschber
Copy link
Owner Author

Do Rust binaries depend on MSVC? Just curious. I'm pretty sure Rust uses MSVC Toolchain by default.

If it does, you may want to add an MSVC dependency to the WiX config. Here's how I did it recently: https://github.com/deskflow/deskflow/blob/0e3cee628751ed7be70f065e182ea9c7614f2378/deploy/windows/wix-patch.xml.in

You can also use WiX burn to bundle the MSVC redist MSI with your MSI to create a .exe that installs both (this is the recommended approach since Microsoft discourages DLL side loading and has deprecated merge modules which were historically used to install the MSVC deps).

Yes, it seems to require C:\windows\system32\VCRUNTIME140.dll and C:\windows\system32\VCRUNTIME140_1.dll.
I just copied those from C:\windows\system32 for the time being to get it working but it definitely seemed very hacky.

I guess you are refering to https://learn.microsoft.com/en-us/cpp/windows/redistributing-components-by-using-merge-modules?view=msvc-160 / https://learn.microsoft.com/en-us/cpp/windows/deployment-in-visual-cpp?view=msvc-160#central-deployment?

Is there any proper documentation on how to do this? I found the wix documentation to be somewhat incomplete.

@nbolton
Copy link
Contributor

nbolton commented Mar 18, 2025

Is there any proper documentation on how to do this?

Unfortunately, I did not, just had to muddle my way through it, sadly. For WiX, docs.firegiant.com seems to be the best but Microsoft docs for creating MSI files seems hard to discover. I can't remember where I read about side-loading and merge modules being discouraged and why... but this seems firmly ingrained in my memory. Microsoft really wants us to redistribute their MSI redistributable... I think it's easier for them to keep up to date and patch security vulnerabilities.

@feschber
Copy link
Owner Author

Is there any proper documentation on how to do this?

Unfortunately, I did not, just had to muddle my way through it, sadly. For WiX, docs.firegiant.com seems to be the best but Microsoft docs for creating MSI files seems hard to discover. I can't remember where I read about side-loading and merge modules being discouraged and why... but this seems firmly ingrained in my memory. Microsoft really wants us to redistribute their MSI redistributable... I think it's easier for them to keep up to date and patch security vulnerabilities.

Thank you! It seems reasonable for various reasons to not have every application ship their own copy of the dlls. I'm going to check out burn as you mentioned or maybe just tell people to install the vcruntime on their own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants