Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate WDK VSIX Install #1219

Merged
merged 12 commits into from
Sep 24, 2024
2 changes: 1 addition & 1 deletion .github/scripts/Install-Vsix.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<#

.SYNOPSIS
Download and install the latest WDK VSIX.
DEPRECATED
middlemose marked this conversation as resolved.
Show resolved Hide resolved

#>

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/Code-Scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ jobs:
with:
submodules: 'recursive'

- name: Install WDK VSIX
run: .\.github\scripts\Install-Vsix.ps1

- name: Install Nuget Packages
run: nuget restore .\packages.config -PackagesDirectory .\packages\

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
with:
submodules: 'recursive'

- name: Install WDK VSIX
run: .\.github\scripts\Install-Vsix.ps1

- name: Install Nuget Packages
run: nuget restore .\packages.config -PackagesDirectory .\packages\

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
with:
submodules: 'recursive'

- name: Install WDK VSIX
run: .\.github\scripts\Install-Vsix.ps1

- name: Install Nuget Packages
run: nuget restore .\packages.config -PackagesDirectory .\packages\

Expand Down
36 changes: 16 additions & 20 deletions Build-SampleSet.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,13 @@ finally {
$build_environment=""
$build_number=0
middlemose marked this conversation as resolved.
Show resolved Hide resolved
$nuget_package_version=0
$vsix_version=""
#
# In Github we build using NuGet and get the version from packages and vsix version from env var set from the install vsix step.
middlemose marked this conversation as resolved.
Show resolved Hide resolved
#
if ($env:GITHUB_REPOSITORY) {
$build_environment="GitHub"
$nuget_package_version=([regex]'(?<=x64\.)(\d+\.)(\d+\.)(\d+\.)(\d+)').Matches((Get-Childitem .\packages\*WDK.x64* -Name)).Value
$build_number=$nuget_package_version.split('.')[2]
$vsix_version = $env:SAMPLES_VSIX_VERSION
}
#
# WDK NuGet will require presence of a folder 'packages'. The version is sourced from repo .\Env-Vars.ps1.
Expand Down Expand Up @@ -107,16 +105,12 @@ else {
exit 1
}
#
# Get the vsix version from packages if not set
if (-not $vsix_version) {
$vsix_version = ls "${env:ProgramData}\Microsoft\VisualStudio\Packages\Microsoft.Windows.DriverKit,version=*" | Select -ExpandProperty Name
if ($vsix_version) {
$vsix_version = $vsix_version.split('=')[1]
}
else {
Write-Error "No version of the WDK VSIX could be found. The WDK VSIX is not installed."
exit 1
}
# Get the WDK extension version from installed packages
$wdk_extension_ver = ls "${env:ProgramData}\Microsoft\VisualStudio\Packages\Microsoft.Windows.DriverKit,version=*" | Select -ExpandProperty Name
$wdk_extension_ver = ([regex]'(\d+\.)(\d+\.)(\d+\.)(\d+)').Matches($wdk_extension_ver).Value
middlemose marked this conversation as resolved.
Show resolved Hide resolved
if (-not $wdk_extension_ver) {
Write-Error "No version of the WDK Visual Studio Extension could be found. The WDK Extension is not installed."
exit 1
}
#
#
Expand Down Expand Up @@ -180,20 +174,22 @@ $jresult = @{

$SolutionsTotal = $sampleSet.Count * $Configurations.Count * $Platforms.Count

Write-Output ("Build Environment: " + $build_environment)
Write-Output ("Build Number: " + $build_number)
if (($build_environment -eq "GitHub") -or ($build_environment -eq "NuGet")) { Write-Output ("Nuget Package Version: " + $nuget_package_version) }
Write-Output ("WDK VSIX Version: " + $vsix_version)
Write-Output ("Samples: " + $sampleSet.Count)
Write-Output ("Configurations: " + $Configurations.Count + " (" + $Configurations + ")")
Write-Output ("Platforms: " + $Platforms.Count + " (" + $Platforms + ")")
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 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 ($DriveLetter = (Get-Item ".").PSDrive.Name)).SizeRemaining / 1GB)))
Write-Output "Disk Remaining (GB): $(((Get-Volume ((Get-Item ".").PSDrive.Name)).SizeRemaining) / 1GB)"
middlemose marked this conversation as resolved.
Show resolved Hide resolved
Write-Output ""
Write-Output "T: Combinations"
Write-Output "B: Built"
Expand Down
2 changes: 1 addition & 1 deletion Building-Locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ To build the Windows Driver Samples you need a "driver build environment". In e
>nuget restore -PackagesDirectory .\packages
```

* When this is done you should have a .\packages folder that looks exactly as follows:
* When this is done you should have a .\packages folder that looks like example below:
middlemose marked this conversation as resolved.
Show resolved Hide resolved
```
>cd path\to\your\repos\Windows-driver-samples
>dir /b packages
Expand Down
19 changes: 2 additions & 17 deletions configuration.dsc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ properties:
- Microsoft.VisualStudio.Component.VC.MFC.ARM64
- Microsoft.VisualStudio.Component.VC.MFC.ARM64.Spectre
- Microsoft.VisualStudio.Workload.NativeDesktop
- Component.Microsoft.Windows.DriverKit
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: sdkPackage
directives:
Expand All @@ -62,20 +63,4 @@ properties:
id: Microsoft.WindowsWDK.10.0.26100
source: winget
useLatest: true
- resource: PSDscResources/Script
id: wdkVsix
dependsOn:
- wdkPackage
- vsComponents
directives:
description: Install Windows Driver Kit VSIX
settings:
GetScript: |
return & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -version '[17.0,18.0)' -requires Microsoft.Windows.DriverKit -property installationVersion
SetScript: |
$installerPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -latest -products * -property enginePath | Join-Path -ChildPath 'VSIXInstaller.exe'
if (Test-Path $installerPath) { & $installerPath /q "${env:ProgramFiles(x86)}\Windows Kits\10\Vsix\VS2022\10.0.26100.0\${env:PROCESSOR_ARCHITECTURE}\WDK.vsix" }
TestScript: |
$versionString = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -version '[17.0,18.0)' -requires Microsoft.Windows.DriverKit -property installationVersion
return $versionString -match "^17\."
configurationVersion: 0.2.0
configurationVersion: 0.2.1
3 changes: 2 additions & 1 deletion configuration_vsonly.dsc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ properties:
- Microsoft.VisualStudio.Component.VC.MFC.ARM64
- Microsoft.VisualStudio.Component.VC.MFC.ARM64.Spectre
- Microsoft.VisualStudio.Workload.NativeDesktop
configurationVersion: 0.2.0
- Component.Microsoft.Windows.DriverKit
configurationVersion: 0.2.1
middlemose marked this conversation as resolved.
Show resolved Hide resolved
Loading