mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-14 13:56:47 +00:00
Add WiX v3 to Windows 2022. (#4448)
Move WiX to tools and stop installing WiX Votive VSIX, which isn't needed for build.
This commit is contained in:
@@ -5,24 +5,4 @@
|
|||||||
|
|
||||||
Choco-Install -PackageName wixtoolset -ArgumentList "--force"
|
Choco-Install -PackageName wixtoolset -ArgumentList "--force"
|
||||||
|
|
||||||
if (Test-IsWin19)
|
Invoke-PesterTests -TestFile "Tools" -TestName "WiX"
|
||||||
{
|
|
||||||
$extensionUrl = "https://wixtoolset.gallerycdn.vsassets.io/extensions/wixtoolset/wixtoolsetvisualstudio2019extension/1.0.0.4/1563296438961/Votive2019.vsix"
|
|
||||||
$VSver = "2019"
|
|
||||||
}
|
|
||||||
elseif (Test-IsWin16)
|
|
||||||
{
|
|
||||||
$extensionUrl = "https://robmensching.gallerycdn.vsassets.io/extensions/robmensching/wixtoolsetvisualstudio2017extension/0.9.21.62588/1494013210879/250616/4/Votive2017.vsix"
|
|
||||||
$VSver = "2017"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw "Invalid version of Visual Studio is found. Either 2017 or 2019 are required"
|
|
||||||
}
|
|
||||||
|
|
||||||
$extensionName = "Votive$VSver.vsix"
|
|
||||||
|
|
||||||
#Installing VS extension 'Wix Toolset Visual Studio Extension'
|
|
||||||
Install-VsixExtension -Url $extensionUrl -Name $extensionName -VSversion $VSver
|
|
||||||
|
|
||||||
Invoke-PesterTests -TestFile "Wix"
|
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ $toolsList = @(
|
|||||||
(Get-VSWhereVersion),
|
(Get-VSWhereVersion),
|
||||||
(Get-SwigVersion),
|
(Get-SwigVersion),
|
||||||
(Get-WinAppDriver),
|
(Get-WinAppDriver),
|
||||||
|
(Get-WixVersion),
|
||||||
(Get-ZstdVersion),
|
(Get-ZstdVersion),
|
||||||
(Get-YAMLLintVersion)
|
(Get-YAMLLintVersion)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -156,6 +156,12 @@ function Get-WinAppDriver {
|
|||||||
return "WinAppDriver $winAppDriverVersion"
|
return "WinAppDriver $winAppDriverVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-WixVersion {
|
||||||
|
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
||||||
|
$installedApplications = Get-ItemProperty -Path $regKey
|
||||||
|
return ($installedApplications | Where-Object { $_.BundleCachePath -imatch ".*\\WiX\d*\.exe$" } | Select-Object -First 1).DisplayName
|
||||||
|
}
|
||||||
|
|
||||||
function Get-ZstdVersion {
|
function Get-ZstdVersion {
|
||||||
$(zstd --version) -match "v(?<version>\d+\.\d+\.\d+)" | Out-Null
|
$(zstd --version) -match "v(?<version>\d+\.\d+\.\d+)" | Out-Null
|
||||||
$zstdVersion = $Matches.Version
|
$zstdVersion = $Matches.Version
|
||||||
|
|||||||
@@ -13,12 +13,6 @@ function Get-SDKVersion {
|
|||||||
($installedApplications | Where-Object { $_.DisplayName -eq 'Windows SDK' } | Select-Object -First 1).DisplayVersion
|
($installedApplications | Where-Object { $_.DisplayName -eq 'Windows SDK' } | Select-Object -First 1).DisplayVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-WixVersion {
|
|
||||||
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
|
||||||
$installedApplications = Get-ItemProperty -Path $regKey
|
|
||||||
($installedApplications | Where-Object { $_.DisplayName -match "wix" } | Select-Object -First 1).DisplayVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
function Get-WDKVersion {
|
function Get-WDKVersion {
|
||||||
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
||||||
$installedApplications = Get-ItemProperty -Path $regKey
|
$installedApplications = Get-ItemProperty -Path $regKey
|
||||||
@@ -67,14 +61,6 @@ function Get-VisualStudioExtensions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((Test-IsWin16) -or (Test-IsWin19)) {
|
if ((Test-IsWin16) -or (Test-IsWin19)) {
|
||||||
# Wix
|
|
||||||
$wixPackageVersion = Get-WixVersion
|
|
||||||
$wixExtensionVersion = ($vsPackages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version
|
|
||||||
$wixPackages = @(
|
|
||||||
@{Package = 'WIX Toolset'; Version = $wixPackageVersion}
|
|
||||||
@{Package = "WIX Toolset Studio $vs Extension"; Version = $wixExtensionVersion}
|
|
||||||
)
|
|
||||||
|
|
||||||
# WDK
|
# WDK
|
||||||
$wdkPackageVersion = Get-VSExtensionVersion -packageName 'Microsoft.Windows.DriverKit'
|
$wdkPackageVersion = Get-VSExtensionVersion -packageName 'Microsoft.Windows.DriverKit'
|
||||||
$wdkExtensionVersion = Get-WDKVersion
|
$wdkExtensionVersion = Get-WDKVersion
|
||||||
@@ -89,7 +75,6 @@ function Get-VisualStudioExtensions {
|
|||||||
$vsixs
|
$vsixs
|
||||||
$ssdtPackages
|
$ssdtPackages
|
||||||
$sdkPackages
|
$sdkPackages
|
||||||
$wixPackages
|
|
||||||
$wdkPackages
|
$wdkPackages
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -187,6 +187,12 @@ Describe "WebPlatformInstaller" -Skip:(Test-IsWin22) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Describe "WiX" {
|
||||||
|
It "WiX directory exists" {
|
||||||
|
$env:WIX | Should -Exist
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Describe "Zstd" {
|
Describe "Zstd" {
|
||||||
It "zstd" {
|
It "zstd" {
|
||||||
"zstd -V" | Should -ReturnZeroExitCode
|
"zstd -V" | Should -ReturnZeroExitCode
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
Describe "Wix" -Skip:(Test-IsWin22) {
|
|
||||||
BeforeAll {
|
|
||||||
$regKey = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
|
||||||
$installedApplications = Get-ItemProperty -Path $regKey
|
|
||||||
$version = ($installedApplications | Where-Object { $_.DisplayName -and $_.DisplayName.toLower().Contains("wix") } | Select-Object -First 1).DisplayVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
It "Wix Toolset version from registry" {
|
|
||||||
$version | Should -Not -BeNullOrEmpty
|
|
||||||
}
|
|
||||||
|
|
||||||
It "Wix Toolset version from system" {
|
|
||||||
if (Test-IsWin19)
|
|
||||||
{
|
|
||||||
$exVersion = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev16"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$exVersion = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev15"
|
|
||||||
}
|
|
||||||
$exVersion | Should -Not -BeNullOrEmpty
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -168,6 +168,7 @@
|
|||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts": [
|
"scripts": [
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-Wix.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-Vsix.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-Vsix.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-AzureCli.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-AzureCli.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-AzureDevOpsCli.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-AzureDevOpsCli.ps1",
|
||||||
|
|||||||
Reference in New Issue
Block a user