jedieaston / Add-ARPEntries

A script to generate AppsAndFeaturesEntries for winget!
MIT License
3 stars 2 forks source link

InstallerType is always re-added under each installer #4

Closed russellbanks closed 2 years ago

russellbanks commented 2 years ago

It is common that there will be two installers in a manifest, for example, an x64 and x86 version. These would likely have the same installer type, so this would be at the top of the file to prevent redundancy:

# yaml-language-server: $schema
PackageIdentifier:
PackageVersion:
MinimumOSVersion: 10.0.0.0
InstallerType: inno
...

When running this script, it will unnecessarily add the InstallerType again for each installer, resulting in potentially three repeated references to the same InstallerType, that then have to be removed:

...
- Architecture: x64
  InstallerUrl:
  InstallerSha256:
  InstallerType: inno
...
- Architecture: x86
  InstallerUrl:
  InstallerSha256:
  InstallerType: inno
...
jedieaston commented 2 years ago

The reason the script does this is to simplify maintenance if we add a new InstallerType, so that we don't have to go modify every other installer entry at the same time. Since both are valid, I figure the extra few bytes are worthwhile but I know other people feel differently. I'll add a flag to control this.

jedieaston commented 2 years ago

This should be resolved via -NoDenormalizeInstallerTypes in https://github.com/jedieaston/Add-ARPEntries/commit/ca6739e03f8cbf530a2e659d71bd640e9bfb4821, can you try it and see if it solves your ask?

russellbanks commented 2 years ago

Working great :D