@@ -172,6 +172,9 @@ $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.e
172172$VSInstallRoot = & $vswhere - nologo - latest - products " *" - all - prerelease - property installationPath
173173$msbuild = " $VSInstallRoot \MSBuild\Current\Bin\$BuildArchName \MSBuild.exe"
174174
175+ # Hoist to global scope as this is used in two sites.
176+ $WiXVersion = " 4.0.5"
177+
175178# Avoid $env:ProgramFiles in case this script is running as x86
176179$UnixToolsBinDir = " $env: SystemDrive \Program Files\Git\usr\bin"
177180
@@ -621,7 +624,8 @@ function Fetch-Dependencies {
621624 }
622625
623626 function Extract-ZipFile {
624- param (
627+ param
628+ (
625629 [string ]$ZipFileName ,
626630 [string ]$BinaryCache ,
627631 [string ]$ExtractPath
@@ -647,7 +651,8 @@ function Fetch-Dependencies {
647651 }
648652
649653 function Extract-Toolchain {
650- param (
654+ param
655+ (
651656 [string ]$InstallerExeName ,
652657 [string ]$BinaryCache ,
653658 [string ]$ToolchainName
@@ -678,13 +683,15 @@ function Fetch-Dependencies {
678683 }
679684 }
680685
681- $WiXVersion = " 4.0.4"
686+ if ($SkipBuild -and $SkipPackaging ) { return }
687+
682688 $WiXURL = " https://www.nuget.org/api/v2/package/wix/$WiXVersion "
683- $WiXHash = " A9CA12214E61BB49430A8C6E5E48AC5AE6F27DC82573B5306955C4D35F2D34E2 "
689+ $WiXHash = " DF9BDB347183716F82EFE2CECB8C54BB3554AA907A69F47A41741D6FA4D0A754 "
684690 DownloadAndVerify $WixURL " $BinaryCache \WiX-$WiXVersion .zip" $WiXHash
685-
686691 Extract- ZipFile WiX- $WiXVersion.zip $BinaryCache WiX- $WiXVersion
687692
693+ if ($SkipBuild ) { return }
694+
688695 DownloadAndVerify $PinnedBuild " $BinaryCache \$PinnedToolchain .exe" $PinnedSHA256
689696
690697 # TODO(compnerd) stamp/validate that we need to re-extract
@@ -2376,15 +2383,13 @@ function Stage-BuildArtifacts($Arch) {
23762383 } else {
23772384 New-Item - Type Directory - Path " $ ( $Arch.BinaryCache ) \installer\$ ( $Arch.VSName ) \" - ErrorAction Ignore | Out-Null
23782385 }
2379- Invoke-Program " $BinaryCache \wix-4.0.4 \tools\net6.0\any\wix.exe" -- burn detach " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $Arch.VSName ) \installer.exe" - engine " $Stage \installer-engine.exe" - intermediateFolder " $ ( $Arch.BinaryCache ) \installer\$ ( $Arch.VSName ) \"
2386+ Invoke-Program " $BinaryCache \wix-$WiXVersion \tools\net6.0\any\wix.exe" -- burn detach " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $Arch.VSName ) \installer.exe" - engine " $Stage \installer-engine.exe" - intermediateFolder " $ ( $Arch.BinaryCache ) \installer\$ ( $Arch.VSName ) \"
23802387}
23812388
23822389# -------------------------------------------------------------------
23832390try {
23842391
2385- if (-not $SkipBuild ) {
2386- Fetch- Dependencies
2387- }
2392+ Fetch- Dependencies
23882393
23892394if (-not $SkipBuild ) {
23902395 Invoke-BuildStep Build-CMark $BuildArch
0 commit comments