-
Notifications
You must be signed in to change notification settings - Fork 354
Convert HowToContribute to a winget configuration file #334
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| { | ||
| "version": "1.0", | ||
| "components": [ | ||
| "Microsoft.VisualStudio.Component.Roslyn.Compiler", | ||
| "Microsoft.Component.MSBuild", | ||
| "Microsoft.VisualStudio.Component.CoreBuildTools", | ||
| "Microsoft.VisualStudio.Workload.MSBuildTools", | ||
| "Microsoft.VisualStudio.Component.Windows10SDK", | ||
| "Microsoft.VisualStudio.Component.VC.CoreBuildTools", | ||
| "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", | ||
| "Microsoft.VisualStudio.Component.VC.Redist.14.Latest", | ||
| "Microsoft.VisualStudio.Component.Windows11SDK.26100", | ||
| "Microsoft.VisualStudio.Component.VC.CMake.Project", | ||
| "Microsoft.VisualStudio.Component.TestTools.BuildTools", | ||
| "Microsoft.VisualStudio.Component.VC.ASAN", | ||
| "Microsoft.VisualStudio.Component.TextTemplating", | ||
| "Microsoft.VisualStudio.Component.VC.CoreIde", | ||
| "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core", | ||
| "Microsoft.VisualStudio.Component.Vcpkg", | ||
| "Microsoft.VisualStudio.Component.Windows10SDK.20348", | ||
| "Microsoft.VisualStudio.Workload.VCTools", | ||
| "Microsoft.VisualStudio.Component.VC.Tools.ARM64EC", | ||
| "Microsoft.VisualStudio.Component.VC.Tools.ARM64", | ||
| "Microsoft.VisualStudio.Component.VC.ATL.ARM64.Spectre", | ||
| "Microsoft.VisualStudio.Component.VC.ATL.Spectre", | ||
| "Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre", | ||
| "Microsoft.VisualStudio.Component.VC.MFC.ARM64.Spectre", | ||
| "Microsoft.VisualStudio.Component.VC.Runtimes.ARM64EC.Spectre", | ||
| "Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre", | ||
| "Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre" | ||
| ], | ||
| "extensions": [] | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,150 @@ | ||||||||||||||||||||||||||
| # yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2 | ||||||||||||||||||||||||||
| properties: | ||||||||||||||||||||||||||
| assertions: | ||||||||||||||||||||||||||
| - resource: Microsoft.Windows.Developer/OsVersion | ||||||||||||||||||||||||||
| directives: | ||||||||||||||||||||||||||
| description: Verify Windows 11 for VS Code development | ||||||||||||||||||||||||||
| allowPrerelease: true | ||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||
| MinVersion: '10.0.22000' | ||||||||||||||||||||||||||
| resources: | ||||||||||||||||||||||||||
| # Enable Developer Mode for Windows development | ||||||||||||||||||||||||||
| - resource: Microsoft.Windows.Settings/WindowsSettings | ||||||||||||||||||||||||||
| id: developerMode | ||||||||||||||||||||||||||
| directives: | ||||||||||||||||||||||||||
| description: Enable Developer Mode for development tools and debugging | ||||||||||||||||||||||||||
| allowPrerelease: true | ||||||||||||||||||||||||||
| securityContext: elevated | ||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||
| DeveloperMode: true | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Install Git version control sgsystem | ||||||||||||||||||||||||||
| - resource: Microsoft.WinGet.DSC/WinGetPackage | ||||||||||||||||||||||||||
| id: gitPackage | ||||||||||||||||||||||||||
| directives: | ||||||||||||||||||||||||||
| description: Install Git for version control | ||||||||||||||||||||||||||
| allowPrerelease: true | ||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||
| id: Git.Git | ||||||||||||||||||||||||||
| source: winget | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Install Node.js (LTS version >=20.x) | ||||||||||||||||||||||||||
| - resource: Microsoft.WinGet.DSC/WinGetPackage | ||||||||||||||||||||||||||
| id: nodePackage | ||||||||||||||||||||||||||
| directives: | ||||||||||||||||||||||||||
| description: Install Node.js LTS for VS Code development | ||||||||||||||||||||||||||
| allowPrerelease: true | ||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||
| id: OpenJS.NodeJS.LTS | ||||||||||||||||||||||||||
| source: winget | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Install Python for node-gyp | ||||||||||||||||||||||||||
| - resource: Microsoft.WinGet.DSC/WinGetPackage | ||||||||||||||||||||||||||
| id: pythonPackage | ||||||||||||||||||||||||||
| directives: | ||||||||||||||||||||||||||
| description: Install Python for node-gyp native module compilation | ||||||||||||||||||||||||||
| allowPrerelease: true | ||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||
| id: Python.Python.3.12 | ||||||||||||||||||||||||||
| source: winget | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Install Visual Studio Build Tools 2022 | ||||||||||||||||||||||||||
| - resource: Microsoft.WinGet.DSC/WinGetPackage | ||||||||||||||||||||||||||
| id: vsBuildTools | ||||||||||||||||||||||||||
| directives: | ||||||||||||||||||||||||||
| description: Install Visual Studio Build Tools 2022 for C++ compilation | ||||||||||||||||||||||||||
| allowPrerelease: true | ||||||||||||||||||||||||||
| securityContext: elevated | ||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||
| id: Microsoft.VisualStudio.2022.BuildTools | ||||||||||||||||||||||||||
| source: winget | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Configure Visual Studio components using .vsconfig | ||||||||||||||||||||||||||
| - resource: Microsoft.VisualStudio.DSC/VSComponents | ||||||||||||||||||||||||||
| dependsOn: | ||||||||||||||||||||||||||
| - vsBuildTools | ||||||||||||||||||||||||||
| directives: | ||||||||||||||||||||||||||
| description: Install required VS workloads and components for VS Code development | ||||||||||||||||||||||||||
| allowPrerelease: true | ||||||||||||||||||||||||||
| securityContext: elevated | ||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||
| productId: Microsoft.VisualStudio.Product.BuildTools | ||||||||||||||||||||||||||
| channelId: VisualStudio.17.Release | ||||||||||||||||||||||||||
| vsConfigFile: '${WinGetConfigRoot}\.vsconfig' | ||||||||||||||||||||||||||
| includeRecommended: true | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Set npm Visual Studio version configuration | ||||||||||||||||||||||||||
| - resource: PSDesiredStateConfiguration/Script | ||||||||||||||||||||||||||
| dependsOn: | ||||||||||||||||||||||||||
| - nodePackage | ||||||||||||||||||||||||||
| - vsBuildTools | ||||||||||||||||||||||||||
| directives: | ||||||||||||||||||||||||||
| description: Configure npm to use Visual Studio 2022 | ||||||||||||||||||||||||||
| allowPrerelease: true | ||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||
| GetScript: | | ||||||||||||||||||||||||||
| $config = npm config get msvs_version | ||||||||||||||||||||||||||
| return @{ Result = $config } | ||||||||||||||||||||||||||
| TestScript: | | ||||||||||||||||||||||||||
| $config = npm config get msvs_version | ||||||||||||||||||||||||||
| return $config -eq "2022" | ||||||||||||||||||||||||||
| SetScript: | | ||||||||||||||||||||||||||
| npm config set msvs_version 2022 | ||||||||||||||||||||||||||
| npm config set python python | ||||||||||||||||||||||||||
|
Comment on lines
+92
to
+93
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Install Visual Studio Code (optional but helpful) | ||||||||||||||||||||||||||
| - resource: Microsoft.WinGet.DSC/WinGetPackage | ||||||||||||||||||||||||||
| id: vscodePackage | ||||||||||||||||||||||||||
| directives: | ||||||||||||||||||||||||||
| description: Install Visual Studio Code editor | ||||||||||||||||||||||||||
| allowPrerelease: true | ||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||
| id: Microsoft.VisualStudioCode | ||||||||||||||||||||||||||
| source: winget | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Install Windows Terminal (modern terminal experience) | ||||||||||||||||||||||||||
| - resource: Microsoft.WinGet.DSC/WinGetPackage | ||||||||||||||||||||||||||
| id: terminalPackage | ||||||||||||||||||||||||||
| directives: | ||||||||||||||||||||||||||
| description: Install Windows Terminal for better command line experience | ||||||||||||||||||||||||||
| allowPrerelease: true | ||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||
| id: Microsoft.WindowsTerminal | ||||||||||||||||||||||||||
| source: winget | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Install PowerShell 7+ (modern PowerShell) | ||||||||||||||||||||||||||
| - resource: Microsoft.WinGet.DSC/WinGetPackage | ||||||||||||||||||||||||||
| id: powershellPackage | ||||||||||||||||||||||||||
| directives: | ||||||||||||||||||||||||||
| description: Install PowerShell 7+ for modern shell experience | ||||||||||||||||||||||||||
| allowPrerelease: true | ||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||
| id: Microsoft.PowerShell | ||||||||||||||||||||||||||
| source: winget | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Set up Python setuptools (recommended in the guide) | ||||||||||||||||||||||||||
| - resource: PSDesiredStateConfiguration/Script | ||||||||||||||||||||||||||
| dependsOn: | ||||||||||||||||||||||||||
| - pythonPackage | ||||||||||||||||||||||||||
| directives: | ||||||||||||||||||||||||||
| description: Install Python setuptools for better node-gyp compatibility | ||||||||||||||||||||||||||
| allowPrerelease: true | ||||||||||||||||||||||||||
| settings: | ||||||||||||||||||||||||||
| GetScript: | | ||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||
| $result = python -m pip show setuptools | ||||||||||||||||||||||||||
| return @{ Result = "installed" } | ||||||||||||||||||||||||||
| } catch { | ||||||||||||||||||||||||||
| return @{ Result = "not installed" } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| TestScript: | | ||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||
| $result = python -m pip show setuptools | ||||||||||||||||||||||||||
| return $true | ||||||||||||||||||||||||||
| } catch { | ||||||||||||||||||||||||||
| return $false | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
Comment on lines
+141
to
+146
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The try catch solution was throwing errors when installing |
||||||||||||||||||||||||||
| SetScript: | | ||||||||||||||||||||||||||
| python -m pip install setuptools | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| configurationVersion: 0.2.0 | ||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
Windows10SDKandWindows10SDK.20348can be removed. Other scan definitely be removed as well, but I"m not sure that we need 3 windows SDK's installed.For the record this is the winget command I used to install only the essentials:
winget install --id Microsoft.VisualStudio.2022.BuildTools -e --source winget --override "--add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre --add Microsoft.VisualStudio.Component.VC.ATL.Spectre --add Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TylerLeonhardt found that we needed Windows10 SDK for arm machines, i'm not sure if anyone knows why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I got the idea from @amunger , not sure if he knows why
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During the node-gyp run, there was a log saying I didn't have the win SDK, despite win11 SDK being installed, so I tried win10 and that worked. That's the best explanation I have.
but yes, seems to be particular to win on ARM