Add new build scripts, minor cleanup #169
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces two new scripts for building the Windows Community Toolkit Gallery and Components, aimed at streamlining the build process and reducing the need to string together disparate commands to build a single component or gallery head, or create nuget packages/binlogs, in a desired configuration.
These scripts were adapted from helpers I had created locally over the last few weeks, themselves made and refined from long strings of various other scripts needed to create nuget packages and binlogs. This PR contributes these scripts and goes a step further to integrate with other existing scripts to enable per-head, per-multitarget, and per-component building.
Build-Toolkit-Components.ps1
This script streamlines building and packing components in the Windows Community Toolkit with the specified parameters. It allows you to specify the MultiTarget TFM(s) to include or exclude, the WinUI major version to use, the components to build, whether to build samples or source, optional packing when provided with a NupkgOutput, and more. The components can be built in Release configuration and individual (per-component) binlogs can be generated by passing -bl.
Usage Example
Build-Toolkit-Gallery.ps1
Used to build the Windows Community Toolkit Gallery app with customizable parameters. It allows you to specify the Head to build, the MultiTargets to include, pick the components to build, enable binlogs, and more.
Usage Examples
MultiTarget Support Scripts
The pull request also updates and adds scripts in the
MultiTarget
directory to support the new build scripts:GenerateAllProjectReferences.ps1
: Updated to support components selection for generating project references.GenerateMultiTargetAwareProjectReferenceProps.ps1
: Refactored for improved component directory handling, and to useGet-MultiTargets.ps1
.Get-MultiTargets.ps1
: New script to retrieve MultiTarget properties for a specific component, extracted fromGenerateMultiTargetAwareProjectReferenceProps.ps1
for use in multiple places.