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

Check VCRT and show installed/shipped version #4847

Merged
merged 3 commits into from
Sep 30, 2023

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Sep 29, 2023

Description

  • If the installed VCRT is old enough, the task to install it will be hidden.
  • If the version is too low, the installer now shows the installed and shipped version.

For testing, you can change Bld to a lower number in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64 and/or rename it (or Version) to simulate the case where it's not installed.


Aside: The installer currently doesn't have the option to specify the installation directory. I'm not sure if that's intentional. DisableDirPage=false can be added to show the page.

@@ -56,7 +65,8 @@ SetupWindowTitle=Setup - %1 (Nightly)
#endif

[Tasks]
Name: "vcredist"; Description: "Install the required Visual C++ 2015/2017/2019/2022 Redistributable";
; Only show this option if the VCRT can be updated.
Name: "vcredist"; Description: "Install the required Visual C++ 2022 Redistributable ({code:VCRTDescription})"; Check: NeedsNewVCRT();
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe instead of hardcoding Visual C++ 2022 Redistributable we could use VersionInfo.Product here?
it resolves to Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.36.32532, would save some maintenance in future

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you! I was actually looking for something like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, VersionInfo.Product doesn't seem to return anything for me (even though it's shown when stringifying the version info), so I used VersionInfo.FileDescription.

Copy link
Contributor

Choose a reason for hiding this comment

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

both Product and FileDescription have same content on all versions i had on hand, so should be fine

@pajlada pajlada merged commit bdd7d95 into Chatterino:master Sep 30, 2023
17 checks passed
@Nerixyz Nerixyz deleted the feat/check-vcrt branch September 30, 2023 10:31
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.

3 participants