Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .configurations/configuration.vsBuildTools.dsc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
# Reference: https://github.com/nodejs/node/blob/main/BUILDING.md#windows
properties:
resources:
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: pythonPackage
directives:
description: Install Python 3.14
module: Microsoft.WinGet.DSC
allowPrerelease: true
settings:
id: Python.Python.3.14
source: winget
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: vsPackage
directives:
description: Install Visual Studio 2022 Build Tools
allowPrerelease: true
settings:
id: Microsoft.VisualStudio.2022.BuildTools
source: winget
useLatest: true
- resource: Microsoft.VisualStudio.DSC/VSComponents
id: vsComponents
dependsOn:
- vsPackage
directives:
description: Install required VS workloads and components
allowPrerelease: true
settings:
productId: Microsoft.VisualStudio.Product.BuildTools
channelId: VisualStudio.17.Release
includeRecommended: true
components:
- Microsoft.VisualStudio.Workload.VCTools
- Microsoft.VisualStudio.Component.VC.Llvm.Clang
- Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: gitPackage
directives:
description: Install Git
allowPrerelease: true
settings:
id: Git.Git
source: winget
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: nasmPackage
directives:
description: Install NetWide Assembler (NASM)
allowPrerelease: true
settings:
id: Nasm.Nasm
source: winget
configurationVersion: 0.1.1
22 changes: 18 additions & 4 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -774,23 +774,37 @@ first and then reinstalling them again.

##### Option 2: Automated install with WinGet

[WinGet configuration files](https://github.com/nodejs/node/tree/main/.configurations)
[WinGet configuration files](./.configurations)
can be used to install all the required prerequisites for Node.js development
easily. These files will install the following
[WinGet](https://learn.microsoft.com/en-us/windows/package-manager/winget/) packages:

* Git for Windows with the `git` and Unix tools added to the `PATH`
* `Python 3.14`
* `Visual Studio 2022` (Community, Enterprise or Professional)
* `Visual Studio 2022 Build Tools` with Visual C++ workload, Clang and ClangToolset
* `Visual Studio 2022` (Build Tools, Community, Professional or Enterprise Edition) and
"Desktop development with C++" workload, Clang and ClangToolset optional components
* `NetWide Assembler`

To install Node.js prerequisites from PowerShell Terminal:
The following Desired State Configuration (DSC) files are available:

| Edition | DSC Configuration |
| ------------ | ------------------------------------------------------------------------------------------------ |
| Build Tools | [configuration.vsBuildTools.dsc.yaml](./.configurations/configuration.vsBuildTools.dsc.yaml) |
| Community | [configuration.dsc.yaml](./.configurations/configuration.dsc.yaml) |
| Professional | [configuration.vsProfessional.dsc.yaml](./.configurations/configuration.vsProfessional.dsc.yaml) |
| Enterprise | [configuration.vsEnterprise.dsc.yaml](./.configurations/configuration.vsEnterprise.dsc.yaml) |

Use one of the above DSC files with
[winget configure](https://learn.microsoft.com/en-us/windows/package-manager/winget/configure#configure-subcommands)
in a PowerShell Terminal to install Node.js prerequisites.
For example, using the DSC file for Visual Studio Community Edition, execute the following command line:

```powershell
winget configure .\.configurations\configuration.dsc.yaml
```

To add optional components for MSI or ARM64 builds, refer to [Option 1: Manual install](#option-1-manual-install).

##### Option 3: Automated install with Boxstarter

A [Boxstarter](https://boxstarter.org/) script can be used for easy setup of
Expand Down
Loading