From bbf08c6a1bef277e59f1a03ea557f05a0a949d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=BCseyin=20A=C3=A7acak?= <110401522+huseyinacacak-janea@users.noreply.github.com> Date: Mon, 30 Sep 2024 18:17:20 +0300 Subject: [PATCH] build,win: add winget config to set up env MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/54729 Reviewed-By: Stefan Stojanovic Reviewed-By: Vinícius Lourenço Claro Cardoso --- .configurations/configuration.dsc.yaml | 54 +++++++++++++++++++ .../configuration.vsEnterprise.dsc.yaml | 54 +++++++++++++++++++ .../configuration.vsProfessional.dsc.yaml | 54 +++++++++++++++++++ .gitignore | 1 + 4 files changed, 163 insertions(+) create mode 100644 .configurations/configuration.dsc.yaml create mode 100644 .configurations/configuration.vsEnterprise.dsc.yaml create mode 100644 .configurations/configuration.vsProfessional.dsc.yaml diff --git a/.configurations/configuration.dsc.yaml b/.configurations/configuration.dsc.yaml new file mode 100644 index 00000000000..f428817fea4 --- /dev/null +++ b/.configurations/configuration.dsc.yaml @@ -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.12 + module: Microsoft.WinGet.DSC + allowPrerelease: true + settings: + id: Python.Python.3.12 + source: winget + - resource: Microsoft.WinGet.DSC/WinGetPackage + id: vsPackage + directives: + description: Install Visual Studio 2022 Community + allowPrerelease: true + settings: + id: Microsoft.VisualStudio.2022.Community + 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.Community + channelId: VisualStudio.17.Release + includeRecommended: true + components: + - Microsoft.VisualStudio.Workload.NativeDesktop + - 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.0 diff --git a/.configurations/configuration.vsEnterprise.dsc.yaml b/.configurations/configuration.vsEnterprise.dsc.yaml new file mode 100644 index 00000000000..48ba6bb0354 --- /dev/null +++ b/.configurations/configuration.vsEnterprise.dsc.yaml @@ -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.12 + module: Microsoft.WinGet.DSC + allowPrerelease: true + settings: + id: Python.Python.3.12 + source: winget + - resource: Microsoft.WinGet.DSC/WinGetPackage + id: vsPackage + directives: + description: Install Visual Studio 2022 Enterprise + allowPrerelease: true + settings: + id: Microsoft.VisualStudio.2022.Enterprise + 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.Enterprise + channelId: VisualStudio.17.Release + includeRecommended: true + components: + - Microsoft.VisualStudio.Workload.NativeDesktop + - 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.0 diff --git a/.configurations/configuration.vsProfessional.dsc.yaml b/.configurations/configuration.vsProfessional.dsc.yaml new file mode 100644 index 00000000000..7c2c58bc015 --- /dev/null +++ b/.configurations/configuration.vsProfessional.dsc.yaml @@ -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.12 + module: Microsoft.WinGet.DSC + allowPrerelease: true + settings: + id: Python.Python.3.12 + source: winget + - resource: Microsoft.WinGet.DSC/WinGetPackage + id: vsPackage + directives: + description: Install Visual Studio 2022 Professional + allowPrerelease: true + settings: + id: Microsoft.VisualStudio.2022.Professional + 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.Professional + channelId: VisualStudio.17.Release + includeRecommended: true + components: + - Microsoft.VisualStudio.Workload.NativeDesktop + - 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.0 diff --git a/.gitignore b/.gitignore index 08a9e6e24e7..748e1904bc6 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ !.mailmap !.nycrc !.yamllint.yaml +!.configurations/ # === Rules for root dir === /core