From ea6fd60b5b94b5f556a2317e5fa4b3659d64c9f9 Mon Sep 17 00:00:00 2001 From: Adonais Romero González Date: Fri, 22 Sep 2023 10:49:57 -0700 Subject: Move winget configuration file --- .github/CODEOWNERS | 3 -- configuration.dsc.yaml | 75 +++++++++++++++++++++++++++++++++++ configurations/configuration.dsc.yaml | 75 ----------------------------------- 3 files changed, 75 insertions(+), 78 deletions(-) create mode 100644 configuration.dsc.yaml delete mode 100644 configurations/configuration.dsc.yaml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4b535025..0631c196 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,8 +4,5 @@ # Code Scanning workflow /.github/workflows/Code-Scanning.yml @microsoft/driver-samples-maintainers -# Configuration description files -/configurations/ @microsoft/driver-samples-maintainers - # Root files /* @microsoft/driver-samples-maintainers diff --git a/configuration.dsc.yaml b/configuration.dsc.yaml new file mode 100644 index 00000000..62abdf99 --- /dev/null +++ b/configuration.dsc.yaml @@ -0,0 +1,75 @@ +# 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 + 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 diff --git a/configurations/configuration.dsc.yaml b/configurations/configuration.dsc.yaml deleted file mode 100644 index 62abdf99..00000000 --- a/configurations/configuration.dsc.yaml +++ /dev/null @@ -1,75 +0,0 @@ -# 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 - 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 -- cgit v1.3.1