Skip to content

Commit 96e8e1a

Browse files
Update installer build to pass VCRedistDir
1 parent 6c71c71 commit 96e8e1a

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.azure/vs2022.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2168,8 +2168,7 @@ stages:
21682168
-p:ProductVersion=${{ parameters.ProductVersion }}${{ parameters.BuildTag }}
21692169
-p:CERTIFICATE=$(certificate.secureFilePath)
21702170
-p:PASSPHRASE=$(CERTIFICATE_PASSWORD)
2171-
-p:VCRedistInstaller="$(env.VCToolsRedistDir)\vc_redist.$(env.VSCMD_ARG_TGT_ARCH).exe"
2172-
-p:VSVersion=$(env.VSCMD_VER)
2171+
-p:VCRedistDir="${env:VCToolsRedistDir}\${env:VSCMD_ARG_TGT_ARCH}\Microsoft.VC143.CRT\"
21732172
-p:INCLUDE_AMD64_SDK=true
21742173
-p:INCLUDE_X86_SDK=true
21752174
-p:INCLUDE_ARM64_SDK=true

.github/workflows/swift-toolchain.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,8 +2015,7 @@ jobs:
20152015
-p:CERTIFICATE=${env:CERTIFICATE} `
20162016
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
20172017
-p:BundleFlavor=offline `
2018-
-p:VCRedistInstaller="${env:VCToolsRedistDir}\vc_redist.${env:VSCMD_ARG_TGT_ARCH}.exe" `
2019-
-p:VSVersion=${env:VSCMD_VER} `
2018+
-p:VCRedistDir="${env:VCToolsRedistDir}\${env:VSCMD_ARG_TGT_ARCH}\Microsoft.VC143.CRT\" `
20202019
-p:INCLUDE_AMD64_SDK=true `
20212020
-p:INCLUDE_X86_SDK=true `
20222021
-p:INCLUDE_ARM64_SDK=true `

build.ps1

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,13 @@ $SDKArchs = @($SDKs | ForEach-Object {
234234
})
235235

236236
# Build functions
237+
function Invoke-BuildStep([string]$Name) {
238+
& $Name @Args
239+
if ($Name.Replace("Build-", "") -eq $BuildTo) {
240+
exit 0
241+
}
242+
}
243+
237244
function Get-ProjectBinaryCache($Arch, $ID) {
238245
return "$BinaryCache\" + ($Arch.BuildID + $ID)
239246
}
@@ -1564,10 +1571,9 @@ function Build-Installer() {
15641571

15651572
Isolate-EnvVars {
15661573
Invoke-VsDevShell $HostArch
1567-
$VCRedistInstallerPath = "${env:VCToolsRedistDir}\vc_redist.$($HostArch.ShortName).exe"
1568-
if (Test-Path $VCRedistInstallerPath) {
1569-
$Properties["VCRedistInstaller"] = $VCRedistInstallerPath
1570-
$Properties["VSVersion"] = $env:VSCMD_VER
1574+
$VCRedistDir = (Get-ChildItem "${env:VCToolsRedistDir}\$($HostArch.ShortName)" -Filter "Microsoft.VC*.CRT").FullName
1575+
if ($VCRedistDir) {
1576+
$Properties["VCRedistDir"] = "$VCRedistDir\"
15711577
}
15721578
}
15731579

0 commit comments

Comments
 (0)