Add Chocolatey Guide for node-gyp on Windows (#3008)

* Add chocolatey install

* Revert unwanted diffs

* Add chocolatey guide

* Use bash for code block

* Update README.md

Co-authored-by: Christian Clauss <cclauss@me.com>

* Move chocolatey bash to top

* Fix section identation

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
Victor Ejike Nwosu 2024-04-07 22:04:04 +02:00 committed by GitHub
parent a6b48fca99
commit 77737e45db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,10 +48,16 @@ Depending on your operating system, you will need to install:
### On Windows ### On Windows
Install the current [version of Python](https://devguide.python.org/versions/) from the Install tools with [Chocolatey](https://chocolatey.org):
``` bash
choco install python visualstudio2022-workload-vctools -y
```
Or install and configure Python and Visual Studio tools manually:
* Install the current [version of Python](https://devguide.python.org/versions/) from the
[Microsoft Store](https://apps.microsoft.com/store/search?publisher=Python+Software+Foundation). [Microsoft Store](https://apps.microsoft.com/store/search?publisher=Python+Software+Foundation).
Install tools and configuration manually:
* Install Visual C++ Build Environment: For Visual Studio 2019 or later, use the `Desktop development with C++` workload from [Visual Studio Community](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community). For a version older than Visual Studio 2019, install [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools) with the `Visual C++ build tools` option. * Install Visual C++ Build Environment: For Visual Studio 2019 or later, use the `Desktop development with C++` workload from [Visual Studio Community](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community). For a version older than Visual Studio 2019, install [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools) with the `Visual C++ build tools` option.
If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips. If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.