forked from microsoft/Windows-driver-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.dsc.yaml
76 lines (76 loc) · 3.61 KB
/
configuration.dsc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
properties:
resources:
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: vsPackage
directives:
description: Install Visual Studio Community 2022
allowPrerelease: true
settings:
id: Microsoft.VisualStudio.2022.Community
source: winget
- resource: Microsoft.VisualStudio.DSC/VSComponents
id: vsComponents
dependsOn:
- vsPackage
directives:
description: Install required VS workloads
maxVersion: "1.0.15"
allowPrerelease: true
settings:
productId: Microsoft.VisualStudio.Product.Community
channelId: VisualStudio.17.Release
includeRecommended: false
components:
- Microsoft.VisualStudio.Component.VC.CoreBuildTools
- Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core
- Microsoft.VisualStudio.Component.VC.Tools.x86.x64
- Microsoft.VisualStudio.Component.VC.Tools.ARM64
- Microsoft.VisualStudio.Component.VC.Tools.ARM64EC
- Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre
- Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre
- Microsoft.VisualStudio.Component.VC.Runtimes.ARM64EC.Spectre
- Microsoft.VisualStudio.Component.VC.Redist.14.Latest
- Microsoft.VisualStudio.Component.Windows10SDK
- Microsoft.VisualStudio.Component.VC.ATL
- Microsoft.VisualStudio.Component.VC.ATL.ARM64
- Microsoft.VisualStudio.Component.VC.ATL.Spectre
- Microsoft.VisualStudio.Component.VC.ATL.ARM64.Spectre
- Microsoft.VisualStudio.Component.VC.ATLMFC
- Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre
- Microsoft.VisualStudio.Component.VC.ASAN
- Microsoft.VisualStudio.Component.NuGet.BuildTools
- Microsoft.VisualStudio.Component.VC.MFC.ARM64
- Microsoft.VisualStudio.Component.VC.MFC.ARM64.Spectre
- Microsoft.VisualStudio.Workload.NativeDesktop
- Microsoft.VisualStudio.Component.Windows11SDK.22621
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: wdkPackage
dependsOn:
- vsComponents
directives:
description: Install Windows Driver Kit
allowPrerelease: true
settings:
id: Microsoft.WindowsWDK.10.0.22621
source: winget
- 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 -latest -products Microsoft.VisualStudio.Product.Community -requires Microsoft.Windows.DriverKit -property installationVersion
SetScript: |
$path = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -latest -products * -property enginePath | Join-Path -ChildPath 'VSIXInstaller.exe'
if (Test-Path $path) { & $path /q "${env:ProgramFiles(x86)}\Windows Kits\10\Vsix\VS2022\10.0.22621.0\WDK.vsix" }
TestScript: |
$versionString = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -nologo -latest -products Microsoft.VisualStudio.Product.Community -requires Microsoft.Windows.DriverKit -Property installationVersion
if (-not $versionString) { return $false }
$versionArray = $versionString.Split('.')
if ($versionArray[0] -le 17) { return $false }
return $true
configurationVersion: 0.2.0