Skip to content
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

build,win: add winget config to set up env #54729

Merged
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.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.12
module: Microsoft.WinGet.DSC
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module Microsoft.WinGet.DSC is still in prerelease status. The "directives" sections where this module is used should have "allowPrerelease: true". I believe since one of the resources has this, it will get downloaded and used, but if that resource is removed, then the module wouldn't get downloaded as a part of the configuration process.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review. I've fixed it.

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
54 changes: 54 additions & 0 deletions .configurations/configuration.vsEnterprise.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.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
54 changes: 54 additions & 0 deletions .configurations/configuration.vsProfessional.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.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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
!.mailmap
!.nycrc
!.yamllint.yaml
!.configurations/

# === Rules for root dir ===
/core
Expand Down
Loading