diff options
Diffstat (limited to 'Build-SampleSet.ps1')
| -rw-r--r-- | Build-SampleSet.ps1 | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/Build-SampleSet.ps1 b/Build-SampleSet.ps1 index 270a7eaa..8638d517 100644 --- a/Build-SampleSet.ps1 +++ b/Build-SampleSet.ps1 @@ -103,20 +103,22 @@ else { Write-Error "Could not determine build environment." exit 1 } + +# Determine WDK Visual Studio Component version # -# Get the WDK extension version from installed packages -$wdk_extension_ver = Get-ChildItem "${env:ProgramData}\Microsoft\VisualStudio\Packages\Microsoft.Windows.DriverKit,version=*" | Select-Object -ExpandProperty Name -$wdk_extension_ver = ([regex]'(\d+\.)(\d+\.)(\d+\.)(\d+)').Matches($wdk_extension_ver).Value -if (-not $wdk_extension_ver) { - # Be lenient with EWDK builds that do not include the package information - if ($build_environment -match '^EWDK') { - $wdk_extension_ver = "(package not found)" - } - else { - Write-Error "No version of the WDK Visual Studio Extension could be found. The WDK Extension is not installed." +# Be lenient with EWDK builds that do not include the component information +if ($build_environment -match '^EWDK') { + $wdk_vs_component_ver = "(WDK Visual Studio Component Version is not included for EWDK builds)" +} else { + # Get the WDK extension version from installed packages + $wdk_vs_component_ver = Get-ChildItem "${env:ProgramData}\Microsoft\VisualStudio\Packages\Microsoft.Windows.DriverKit,version=*" -ErrorAction SilentlyContinue + if (-not $wdk_vs_component_ver) { + Write-Error "WDK Visual Studio Component version not found. Please ensure the WDK Component is installed." exit 1 } + $wdk_vs_component_ver = [regex]::Match($wdk_vs_component_ver.Name, '(\d+\.){3}\d+').Value } + # # # InfVerif_AdditionalOptions @@ -179,22 +181,22 @@ $jresult = @{ $SolutionsTotal = $sampleSet.Count * $Configurations.Count * $Platforms.Count -Write-Output "WDK Build Environment: $build_environment" -Write-Output "WDK Build Number: $build_number" +Write-Output "WDK Build Environment: $build_environment" +Write-Output "WDK Build Number: $build_number" if (($build_environment -eq "GitHub") -or ($build_environment -eq "NuGet")) { -Write-Output "WDK Nuget Version: $nuget_package_version" +Write-Output "WDK Nuget Version: $nuget_package_version" } -Write-Output "WDK Extension Version: $wdk_extension_ver" -Write-Output "Samples: $($sampleSet.Count)" -Write-Output "Configurations: $($Configurations.Count) ($Configurations)" -Write-Output "Platforms: $($Platforms.Count) ($Platforms)" -Write-Output "InfVerif_AdditionalOptions: $InfVerif_AdditionalOptions" -Write-Output "Combinations: $SolutionsTotal" -Write-Output "LogicalProcessors: $LogicalProcessors" -Write-Output "ThrottleFactor: $ThrottleFactor" -Write-Output "ThrottleLimit: $ThrottleLimit" -Write-Output "WDS_WipeOutputs: $env:WDS_WipeOutputs" -Write-Output "Disk Remaining (GB): $(((Get-Volume ((Get-Item ".").PSDrive.Name)).SizeRemaining) / 1GB)" +Write-Output "WDK Visual Studio Component Version: $wdk_vs_component_ver" +Write-Output "Samples: $($sampleSet.Count)" +Write-Output "Configurations: $($Configurations.Count) ($Configurations)" +Write-Output "Platforms: $($Platforms.Count) ($Platforms)" +Write-Output "InfVerif_AdditionalOptions: $InfVerif_AdditionalOptions" +Write-Output "Combinations: $SolutionsTotal" +Write-Output "LogicalProcessors: $LogicalProcessors" +Write-Output "ThrottleFactor: $ThrottleFactor" +Write-Output "ThrottleLimit: $ThrottleLimit" +Write-Output "WDS_WipeOutputs: $env:WDS_WipeOutputs" +Write-Output "Disk Remaining (GB): $(((Get-Volume ((Get-Item ".").PSDrive.Name)).SizeRemaining) / 1GB)" Write-Output "" Write-Output "T: Combinations" Write-Output "B: Built" |
