fix: handle older VC redist versions (#5447)

This commit is contained in:
nerix
2024-06-15 12:32:01 +02:00
committed by GitHub
parent 66471075a5
commit 280ac30289
6 changed files with 37 additions and 4 deletions
+3 -3
View File
@@ -120,15 +120,15 @@ begin
Result := VCRTVersion + ' is installed';
end;
// Checks if a new VCRT is needed by comparing the builds.
// Checks if a new VCRT is needed by comparing the minor version (the major one is locked at 14).
function NeedsNewVCRT(): Boolean;
var
VCRTBuild: Cardinal;
begin
Result := True;
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Bld', VCRTBuild) then
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Minor', VCRTBuild) then
begin
if VCRTBuild >= {#SHIPPED_VCRT_BUILD} then
if VCRTBuild >= {#SHIPPED_VCRT_MINOR} then
Result := False;
end;
end;