Skip to content

feat: Check MSVC redist version in WiX installer - #8342

Merged
sithlord48 merged 2 commits into
masterfrom
msi-redist-version
Mar 12, 2025
Merged

feat: Check MSVC redist version in WiX installer#8342
sithlord48 merged 2 commits into
masterfrom
msi-redist-version

Conversation

@nbolton

@nbolton nbolton commented Mar 11, 2025

Copy link
Copy Markdown
Member

Related to: #8331

This will help to rule out any issues with older runtimes by preventing installs where the latest runtime isn't installed.

To do this, I had to make a custom DLL and call it from the MSI. Tested by manually changing the 'Minor' value on the MSVC registry key.

Todo:

  • Test that failure condition shows CMake error (i.e. no MSVC redist installed)
  • Test Before="InstallInitialize" works as expected (was Before="InstallServices")

Error message:
Image

Comment thread CMakeLists.txt Outdated
@nbolton
nbolton requested a review from sithlord48 March 11, 2025 16:27
@nbolton
nbolton force-pushed the msi-redist-version branch 4 times, most recently from 6236e59 to 1b42485 Compare March 11, 2025 16:59
Comment thread CMakeLists.txt Outdated
Comment thread deploy/windows/wix-patch.xml.in Outdated
Comment thread deploy/windows/wix-patch.xml.in Outdated
@nbolton
nbolton force-pushed the msi-redist-version branch 3 times, most recently from ade83de to a3bad13 Compare March 11, 2025 20:38
Comment thread CMakeLists.txt Outdated
@sithlord48

Copy link
Copy Markdown
Member

Did a quick test on a vm and the configuration step seams to have picked up the proper vc installed.

@nbolton

nbolton commented Mar 12, 2025

Copy link
Copy Markdown
Member Author

Did a quick test on a vm and the configuration step seams to have picked up the proper vc installed.

Cool. Yeah it's a real faff to test.

Edit: You can use DebugView to see what's going on with the WiX/MSI DLL in the background. In case you didn't know.

@nbolton
nbolton force-pushed the msi-redist-version branch 4 times, most recently from 3c72d1b to c54b7e5 Compare March 12, 2025 11:20
sithlord48
sithlord48 previously approved these changes Mar 12, 2025

@sithlord48 sithlord48 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good !

@nbolton
nbolton force-pushed the msi-redist-version branch from 5562a69 to 5545f67 Compare March 12, 2025 11:43
@sithlord48
sithlord48 self-requested a review March 12, 2025 11:46
@sithlord48
sithlord48 enabled auto-merge (rebase) March 12, 2025 11:51
@sithlord48
sithlord48 merged commit 39e7f60 into master Mar 12, 2025
@sithlord48
sithlord48 deleted the msi-redist-version branch March 12, 2025 12:04
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