@@ -206,9 +206,6 @@ $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.e
206
206
$VSInstallRoot = & $vswhere - nologo - latest - products " *" - all - prerelease - property installationPath
207
207
$msbuild = " $VSInstallRoot \MSBuild\Current\Bin\$BuildArchName \MSBuild.exe"
208
208
209
- # Hoist to global scope as this is used in two sites.
210
- $WiXVersion = " 4.0.6"
211
-
212
209
# Avoid $env:ProgramFiles in case this script is running as x86
213
210
$UnixToolsBinDir = " $env: SystemDrive \Program Files\Git\usr\bin"
214
211
@@ -332,6 +329,13 @@ $BuildArch = switch ($BuildArchName) {
332
329
default { throw " Unsupported processor architecture" }
333
330
}
334
331
332
+ $WiX = @ {
333
+ Version = " 4.0.6" ;
334
+ URL = " https://www.nuget.org/api/v2/package/wix/4.0.6" ;
335
+ SHA256 = " A94DD42AE1FB56B32DA180E2173CEDA4F0D10B4C8871C5EE59ECB502131A1EB6" ;
336
+ Path = [IO.Path ]::Combine(" $BinaryCache \WiX-4.0.6" , " tools" , " net6.0" , " any" );
337
+ }
338
+
335
339
$KnownPythons = @ {
336
340
" 3.9.10" = @ {
337
341
AMD64 = @ {
@@ -381,7 +385,6 @@ $KnownNDKs = @{
381
385
}
382
386
}
383
387
384
-
385
388
$IsCrossCompiling = $HostArchName -ne $BuildArchName
386
389
387
390
$TimingData = New-Object System.Collections.Generic.List[System.Object ]
@@ -811,7 +814,7 @@ function Get-Dependencies {
811
814
812
815
# The new runtime MSI is built to expand files into the immediate directory. So, setup the installation location.
813
816
New-Item - ItemType Directory - ErrorAction Ignore $BinaryCache \toolchains\$PinnedToolchain \LocalApp\Programs\Swift\Runtimes\$ (Get-PinnedToolchainVersion )\usr\bin | Out-Null
814
- Invoke-Program $BinaryCache \WiX - $WiXVersion \tools\net6. 0 \any\ wix.exe -- burn extract $BinaryCache \$InstallerExeName - out $BinaryCache \toolchains\ - outba $BinaryCache \toolchains\
817
+ Invoke-Program " $ ( $WiX .Path ) \ wix.exe" -- burn extract $BinaryCache \$InstallerExeName - out $BinaryCache \toolchains\ - outba $BinaryCache \toolchains\
815
818
Get-ChildItem " $BinaryCache \toolchains\WixAttachedContainer" - Filter " *.msi" | ForEach-Object {
816
819
$LogFile = [System.IO.Path ]::ChangeExtension($_.Name , " log" )
817
820
$TARGETDIR = if ($_.Name -eq " rtl.msi" ) { " $BinaryCache \toolchains\$ToolchainName \LocalApp\Programs\Swift\Runtimes\$ ( Get-PinnedToolchainVersion ) \usr\bin" } else { " $BinaryCache \toolchains\$ToolchainName " }
@@ -826,10 +829,8 @@ function Get-Dependencies {
826
829
Write-Host - ForegroundColor Cyan " [$ ( [DateTime ]::Now.ToString(" yyyy-MM-dd HH:mm:ss" )) ] Get-Dependencies..."
827
830
}
828
831
829
- $WiXURL = " https://www.nuget.org/api/v2/package/wix/$WiXVersion "
830
- $WiXHash = " A94DD42AE1FB56B32DA180E2173CEDA4F0D10B4C8871C5EE59ECB502131A1EB6"
831
- DownloadAndVerify $WixURL " $BinaryCache \WiX-$WiXVersion .zip" $WiXHash
832
- Expand-ZipFile WiX- $WiXVersion.zip $BinaryCache WiX- $WiXVersion
832
+ DownloadAndVerify $WiX.URL " $BinaryCache \WiX-$ ( $WiX.Version ) .zip" $WiX.SHA256
833
+ Expand-ZipFile WiX- $ ($WiX.Version ).zip $BinaryCache WiX- $ ($WiX.Version )
833
834
834
835
if ($SkipBuild ) { return }
835
836
@@ -3135,7 +3136,7 @@ function Copy-BuildArtifactsToStage($Arch) {
3135
3136
} else {
3136
3137
New-Item - Type Directory - Path " $BinaryCache \$ ( $Arch.LLVMTarget ) \installer\$ ( $Arch.VSName ) " - ErrorAction Ignore | Out-Null
3137
3138
}
3138
- Invoke-Program " $BinaryCache \wix- $WiXVersion \tools\net6.0\any \wix.exe" -- burn detach " $BinaryCache \$ ( $Arch.LLVMTarget ) \installer\Release\$ ( $Arch.VSName ) \installer.exe" - engine " $Stage \installer-engine.exe" - intermediateFolder " $BinaryCache \$ ( $Arch.LLVMTarget ) \installer\$ ( $Arch.VSName ) \"
3139
+ Invoke-Program " $ ( $WiX .Path ) \wix.exe" -- burn detach " $BinaryCache \$ ( $Arch.LLVMTarget ) \installer\Release\$ ( $Arch.VSName ) \installer.exe" - engine " $Stage \installer-engine.exe" - intermediateFolder " $BinaryCache \$ ( $Arch.LLVMTarget ) \installer\$ ( $Arch.VSName ) \"
3139
3140
}
3140
3141
3141
3142
# -------------------------------------------------------------------
0 commit comments