mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-01 01:49:06 +08:00
07f3507f11
* [ci]Fix dead links on WiX 3 binaries
26 lines
1.3 KiB
PowerShell
26 lines
1.3 KiB
PowerShell
$ProgressPreference = 'SilentlyContinue'
|
|
|
|
$WixDownloadUrl = "https://github.com/JaneaSystems/wix3/releases/download/wix3-3.14.0.6526/wix314.exe"
|
|
$WixBinariesDownloadUrl = "https://github.com/JaneaSystems/wix3/releases/download/wix3-3.14.0.6526/wix314-binaries.zip"
|
|
|
|
# Download WiX binaries and verify their hash sums
|
|
Invoke-WebRequest -Uri $WixDownloadUrl -OutFile "$($ENV:Temp)\wix314.exe"
|
|
$Hash = (Get-FileHash -Algorithm SHA256 "$($ENV:Temp)\wix314.exe").Hash
|
|
if ($Hash -ne 'FADEB00B1FCCD9BB2FDD6CE28D4C3ECDA339C8906A72586515C14A93CEADB6FE')
|
|
{
|
|
Write-Error "$WixHash"
|
|
throw "wix314.exe has unexpected SHA256 hash: $Hash"
|
|
}
|
|
Invoke-WebRequest -Uri $WixBinariesDownloadUrl -OutFile "$($ENV:Temp)\wix314-binaries.zip"
|
|
$Hash = (Get-FileHash -Algorithm SHA256 "$($ENV:Temp)\wix314-binaries.zip").Hash
|
|
if($Hash -ne '4C89898DF3BCAB13E12F7CA54399C35AD273475AD2CB6284611D00AE2D063C2C')
|
|
{
|
|
throw "wix314-binaries.zip has unexpected SHA256 hash: $Hash"
|
|
}
|
|
|
|
# Install WiX
|
|
Start-Process -Wait -FilePath "$($ENV:Temp)\wix314.exe" -ArgumentList "/install /quiet"
|
|
|
|
# Extract WiX binaries and copy wix.targets to the installed dir
|
|
Expand-Archive -Path "$($ENV:Temp)\wix314-binaries.zip" -Force -DestinationPath "$($ENV:Temp)"
|
|
Copy-Item -Path "$($ENV:Temp)\wix.targets" -Destination "C:\Program Files (x86)\WiX Toolset v3.14\" |