Add Font Package "New" Support and ManifestRootType #645
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 adds two main features to WinGet Create:
1) Support for font packages - packages which contain only fonts.
These are a bit different from normal archive packages, as a Font Package often contains dozens to potentially hundreds of font files within for install, which breaks the selection module. So to have this just work and not have users select a silly number of fonts to include in the package, we assume that if all the contents are fonts then we assume the entire package is desired.
If not all font contents are desired the manifest could be edited after creation to remove the fonts that should be ignored in the archive.
Font packages are also placed in the "fonts" manifest root instead of "manifests". See more on that below.
2) Support for the 'fonts' manifest root type.
Limited support for alternate root types is added. WinGet-Create has previously assumed all manifests go in the "manifests" root, which is no longer true with fonts, so support for manifest roots had to be added. However, it is so permeated in the WinGet-Create code that most of this root support is confined to the "new" command and creating fonts at this time. All other areas are assumed to be the "manifests" root. This means that commands like "update" will not work correctly for font packages. The main pain point in creating font packages is listing all the font files in the archive, which can be tedious when there are dozens/hundreds of them.
There are challenges with the root type addition due to uniqueness not including the root in the path, as it is assumed to be 'manifests'. To avoid breaking existing customers/manifests and enable easier font package creation, this support was not included with this update.
Tested
Not tested or expected to work is Update on a font package due to the manifest root path being assumed to be "manifests" instead of fonts.
Microsoft Reviewers: Open in CodeFlow