[Windows] Implement installation helpers refactoring (#8865)

* [Windows] Refactor base Installer helper functions

* Fix helper name

* Fix name gen logic and improve error handling

* Fix hash checking logic

* Fix Install-VsixExtension invocation

* Fix variable name in Install-OpenSSL.ps1

* Fix type for git downloadUrl
This commit is contained in:
Vasilii Polikarpov
2023-11-22 15:14:08 +01:00
committed by GitHub
parent 46f21c4413
commit d3e630f774
46 changed files with 361 additions and 462 deletions

View File

@@ -3,14 +3,18 @@
## Desc: Install Visual C++ Redistributable
################################################################################
$vc2010x86Name = "vcredist_x86.exe"
$vc2010x86URI = "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/${vc2010x86Name}"
$vc2010x64Name = "vcredist_x64.exe"
$vc2010x64URI = "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/${Vc2010x64Name}"
$baseUrl = "https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC"
$argumentList = ("/install", "/quiet", "/norestart")
$vcSignatureThumbprint = "ABDCA79AF9DD48A0EA702AD45260B3C03093FB4B"
$signatureThumbrint = "ABDCA79AF9DD48A0EA702AD45260B3C03093FB4B"
Install-Binary -Url $vc2010x86URI -Name $vc2010x86Name -ArgumentList $argumentList -ExpectedSignature $vcSignatureThumbprint
Install-Binary -Url $vc2010x64URI -Name $vc2010x64Name -ArgumentList $argumentList -ExpectedSignature $vcSignatureThumbprint
Install-Binary `
-Url "${baseUrl}/vcredist_x86.exe" `
-InstallArgs $argumentList `
-ExpectedSignature $signatureThumbrint
Install-Binary `
-Url "${baseUrl}/vcredist_x64.exe" `
-InstallArgs $argumentList `
-ExpectedSignature $signatureThumbrint
Invoke-PesterTests -TestFile "Tools" -TestName "VCRedist"