Skip to content

Commit 258c420

Browse files
Update build.ps1 for installer changes for VCRuntime merge modules
1 parent 3eea9d6 commit 258c420

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

utils/build.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,10 +1579,10 @@ function Build-Installer($Arch) {
15791579

15801580
Isolate-EnvVars {
15811581
Invoke-VsDevShell $Arch
1582-
$VCRedistInstallerPath = "${env:VCToolsRedistDir}\vc_redist.$($Arch.ShortName).exe"
1583-
if (Test-Path $VCRedistInstallerPath) {
1584-
$Properties["VCRedistInstaller"] = $VCRedistInstallerPath
1585-
$Properties["VSVersion"] = $env:VSCMD_VER
1582+
# Avoid hard-coding the VC tools version number
1583+
$VCRedistDir = (Get-ChildItem "${env:VCToolsRedistDir}\$($HostArch.ShortName)" -Filter "Microsoft.VC*.CRT").FullName
1584+
if ($VCRedistDir) {
1585+
$Properties["VCRedistDir"] = "$VCRedistDir\"
15861586
}
15871587
}
15881588

0 commit comments

Comments
 (0)