-
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?
Conversation
benvillalobos
left a comment
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.
On a fresh dev box I was able to run this (with my edits), npm install and run the vs code launch config and it worked.
The only funky thing is getting that last SetScript to work without error. python -m pip install setuptools writes some output like [config]: Something something pip can be updated one minor version. I tried passing --quiet in the command but that didn't prevent the line from showing up.
So the config thinks it failed but it actually successfully installed.
| npm config set msvs_version 2022 | ||
| npm config set python python |
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.
| npm config set msvs_version 2022 | |
| npm config set python python | |
| $npmrc = "$env:USERPROFILE\.npmrc" | |
| if (Test-Path $npmrc) { | |
| (Get-Content $npmrc) -replace '^msvs_version=.*$', 'msvs_version=2022' | Set-Content $npmrc | |
| if (-not (Select-String -Path $npmrc -Pattern '^msvs_version=')) { | |
| Add-Content $npmrc "`nmsvs_version=2022" | |
| } | |
| } else { | |
| Set-Content $npmrc "msvs_version=2022" | |
| } |
npm config set msvs_version throws an error every time (I saw this while coming up with the AI script as well). I suggested the solution I came up with. Also I noticed you don't need to set python to get the build & run to work. Is that needed for something else?
| try { | ||
| $result = python -m pip show setuptools | ||
| return $true | ||
| } catch { | ||
| return $false | ||
| } |
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.
| try { | |
| $result = python -m pip show setuptools | |
| return $true | |
| } catch { | |
| return $false | |
| } | |
| $result = python -m pip show setuptools 2>&1 | |
| if ($result -notmatch "not found") { | |
| return $true | |
| } else { | |
| return $false | |
| } |
The try catch solution was throwing errors when installing
| "Microsoft.Component.MSBuild", | ||
| "Microsoft.VisualStudio.Component.CoreBuildTools", | ||
| "Microsoft.VisualStudio.Workload.MSBuildTools", | ||
| "Microsoft.VisualStudio.Component.Windows10SDK", |
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 Windows10SDK and Windows10SDK.20348 can 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
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
|
On installing on a second dev box: All installations pass except for the final python On second run of When in fact, it does work. Not sure what to do about that. |
Tyriar
left a comment
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.
Did we need these files to live in the wiki? Seems more appropriate to live in the main repo
|
+1 to "this should live in the main repo". In fact, there's already a configuration.winget file there that should just be updated. Also, we should update https://github.com/microsoft/vscode/wiki/How-to-Contribute with a line about "If on a fresh windows setup, try |
No description provided.