Skip to content

Commit

Permalink
Pass flags to bundle the vcredist installer
Browse files Browse the repository at this point in the history
* Pass flags to bundle the vcredist installer.
* Remove extra property set
* Update to match latest installer revision
  • Loading branch information
tristanlabelle authored Oct 15, 2023
1 parent 166ea77 commit e327320
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .azure/vs2022.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2067,6 +2067,8 @@ stages:
-p:ProductVersion=${{ parameters.ProductVersion }}${{ parameters.BuildTag }}
-p:CERTIFICATE=$(certificate.secureFilePath)
-p:PASSPHRASE=$(CERTIFICATE_PASSWORD)
-p:VCRedistInstaller="${env:VCToolsRedistDir}\vc_redist.${env:VSCMD_ARG_TGT_ARCH}.exe"
-p:VSVersion=${env:VSCMD_VER}
-p:INCLUDE_AMD64_SDK=true
-p:INCLUDE_X86_SDK=true
-p:INCLUDE_ARM64_SDK=true
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/swift-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1969,6 +1969,8 @@ jobs:
-p:CERTIFICATE=${env:CERTIFICATE} `
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
-p:BundleFlavor=offline `
-p:VCRedistInstaller="${env:VCToolsRedistDir}\vc_redist.${env:VSCMD_ARG_TGT_ARCH}.exe" `
-p:VSVersion=${env:VSCMD_VER} `
-p:INCLUDE_AMD64_SDK=true `
-p:INCLUDE_X86_SDK=true `
-p:INCLUDE_ARM64_SDK=true `
Expand Down
9 changes: 9 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,15 @@ function Build-Installer() {
SWIFT_DOCC_RENDER_ARTIFACT_ROOT = "${SourceCache}\swift-docc-render-artifact";
}

Isolate-EnvVars {
Invoke-VsDevShell $HostArch
$VCRedistInstallerPath = "${env:VCToolsRedistDir}\vc_redist.$($HostArch.ShortName).exe"
if (Test-Path $VCRedistInstallerPath) {
$Properties["VCRedistInstaller"] = $VCRedistInstallerPath
$Properties["VSVersion"] = $env:VSCMD_VER
}
}

foreach ($Arch in $SDKArchs) {
$Properties["INCLUDE_$($Arch.VSName.ToUpperInvariant())_SDK"] = "true"
$Properties["PLATFORM_ROOT_$($Arch.VSName.ToUpperInvariant())"] = "$($Arch.PlatformInstallRoot)\"
Expand Down

0 comments on commit e327320

Please sign in to comment.