winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 92f9ac33423559ee94f9e96e41afb2b3859f02a9
parent 4d51b5fb9b1ea5fbc8da1a053423457535e5fec4
Author: yao-msft <50888816+yao-msft@users.noreply.github.com>
Date:   Fri,  9 Feb 2024 12:29:39 -0800

Add 1.7 manifest fields to WingetUtilsInterop (#4157)


Diffstat:
Msrc/WinGetUtilInterop.UnitTests/ManifestUnitTest/V1ManifestReadTest.cs | 169+++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------
Msrc/WinGetUtilInterop.UnitTests/TestCollateral/V1_6ManifestMerged.yaml | 13++++++++++++-
Asrc/WinGetUtilInterop.UnitTests/TestCollateral/V1_7ManifestMerged.yaml | 250+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/WinGetUtilInterop.UnitTests/WinGetUtilInterop.UnitTests.csproj | 3+++
Msrc/WinGetUtilInterop/Manifest/V1/InstallerSwitches.cs | 11+++++++++--
Msrc/WinGetUtilInterop/Manifest/V1/Manifest.cs | 9+++++----
Msrc/WinGetUtilInterop/Manifest/V1/ManifestInstaller.cs | 13+++++++++----
7 files changed, 398 insertions(+), 70 deletions(-)

diff --git a/src/WinGetUtilInterop.UnitTests/ManifestUnitTest/V1ManifestReadTest.cs b/src/WinGetUtilInterop.UnitTests/ManifestUnitTest/V1ManifestReadTest.cs @@ -34,6 +34,7 @@ namespace WinGetUtilInterop.UnitTests.ManifestUnitTest V100, V110, V160, + V170, } /// <summary> @@ -57,6 +58,11 @@ namespace WinGetUtilInterop.UnitTests.ManifestUnitTest Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestCollateral", ManifestStrings.V160ManifestMerged)); this.ValidateManifestFields(v160manifest, TestManifestVersion.V160); + + Manifest v170manifest = Manifest.CreateManifestFromPath( + Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestCollateral", ManifestStrings.V170ManifestMerged)); + + this.ValidateManifestFields(v170manifest, TestManifestVersion.V170); } /// <summary> @@ -126,6 +132,27 @@ namespace WinGetUtilInterop.UnitTests.ManifestUnitTest Assert.Equal("https://DefaultAgreementUrl.net", manifest.Agreements[0].AgreementUrl); } + if (manifestVersion >= TestManifestVersion.V160) + { + Assert.Equal("Default installation notes", manifest.InstallationNotes); + Assert.Equal("https://DefaultPurchaseUrl.com", manifest.PurchaseUrl); + + Assert.Single(manifest.Documentations); + ManifestDocumentation manifestDocumentation = manifest.Documentations[0]; + + Assert.Equal("Default document label", manifestDocumentation.DocumentLabel); + Assert.Equal("https://DefaultDocumentUrl.com", manifestDocumentation.DocumentUrl); + + Assert.Single(manifest.Icons); + ManifestIcon icon = manifest.Icons[0]; + + Assert.Equal("69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8123", icon.IconSha256); + Assert.Equal("default", icon.IconTheme); + Assert.Equal("https://testIcon", icon.IconUrl); + Assert.Equal("custom", icon.IconResolution); + Assert.Equal("ico", icon.IconFileType); + } + // Default installer Assert.Equal("en-US", manifest.InstallerLocale); Assert.Equal(2, manifest.Platform.Count); @@ -205,6 +232,41 @@ namespace WinGetUtilInterop.UnitTests.ManifestUnitTest Assert.Equal("contactSupport", manifest.ExpectedReturnCodes[0].ReturnResponse); } + if (manifestVersion >= TestManifestVersion.V160) + { + Assert.Equal("msi", manifest.NestedInstallerType); + Assert.Single(manifest.NestedInstallerFiles); + InstallerNestedInstallerFile installerNestedInstallerFile = manifest.NestedInstallerFiles[0]; + Assert.Equal("RelativeFilePath", installerNestedInstallerFile.RelativeFilePath); + Assert.Equal("PortableCommandAlias", installerNestedInstallerFile.PortableCommandAlias); + + InstallerInstallationMetadata installerInstallationMetadata = manifest.InstallationMetadata; + Assert.Equal("%ProgramFiles%\\TestApp", installerInstallationMetadata.DefaultInstallLocation); + Assert.Single(installerInstallationMetadata.Files); + + ManifestInstallerFile installerFile = installerInstallationMetadata.Files[0]; + Assert.Equal("main.exe", installerFile.RelativeFilePath); + Assert.Equal("DisplayName", installerFile.DisplayName); + Assert.Equal("/arg", installerFile.InvocationParameter); + Assert.Equal("69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82", installerFile.FileSha256); + + Assert.Single(manifest.UnsupportedArguments); + Assert.Equal("log", manifest.UnsupportedArguments[0]); + + Assert.Single(manifest.UnsupportedOSArchitectures); + Assert.Equal("arm", manifest.UnsupportedOSArchitectures[0]); + + Assert.True(manifest.DisplayInstallWarnings); + Assert.True(manifest.DownloadCommandProhibited); + } + + if (manifestVersion >= TestManifestVersion.V170) + { + Assert.Equal("/repair", defaultSwitches.Repair); + Assert.Equal("uninstaller", manifest.RepairBehavior); + } + + // Individual installers Assert.Equal(2, manifest.Installers.Count); ManifestInstaller installer1 = manifest.Installers[0]; Assert.Equal("x86", installer1.Arch); @@ -280,7 +342,35 @@ namespace WinGetUtilInterop.UnitTests.ManifestUnitTest Assert.Equal("69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82", installer2.Sha256); Assert.Equal("{Bar}", installer2.ProductCode); - // Localization + if (manifestVersion >= TestManifestVersion.V160) + { + Assert.Single(installer1.InstallationMetadata.Files); + ManifestInstallerFile installerFile2 = installer1.InstallationMetadata.Files[0]; + Assert.Equal("main2.exe", installerFile2.RelativeFilePath); + Assert.Equal("DisplayName2", installerFile2.DisplayName); + Assert.Equal("/arg2", installerFile2.InvocationParameter); + Assert.Equal("79D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82", installerFile2.FileSha256); + + Assert.Equal("msi", installer1.NestedInstallerType); + + InstallerNestedInstallerFile installerNestedInstallerFile2 = installer1.NestedInstallerFiles[0]; + Assert.Equal("RelativeFilePath2", installerNestedInstallerFile2.RelativeFilePath); + Assert.Equal("PortableCommandAlias2", installerNestedInstallerFile2.PortableCommandAlias); + + Assert.Single(installer1.UnsupportedArguments); + Assert.Equal("location", installer1.UnsupportedArguments[0]); + + Assert.True(installer1.DisplayInstallWarnings); + Assert.True(installer1.DownloadCommandProhibited); + } + + if (manifestVersion >= TestManifestVersion.V170) + { + Assert.Equal("/r", installer1Switches.Repair); + Assert.Equal("modify", installer1.RepairBehavior); + } + + // Additional Localizations Assert.Single(manifest.Localization); ManifestLocalization localization1 = manifest.Localization[0]; Assert.Equal("en-GB", localization1.PackageLocale); @@ -313,67 +403,23 @@ namespace WinGetUtilInterop.UnitTests.ManifestUnitTest if (manifestVersion >= TestManifestVersion.V160) { - Assert.Equal("msi", manifest.NestedInstallerType); - Assert.Equal("Default installation notes", manifest.InstallationNotes); - Assert.Equal("https://DefaultPurchaseUrl.com", manifest.PurchaseUrl); - - Assert.True(manifest.DisplayInstallWarnings); - Assert.True(manifest.DownloadCommandProhibited); - - Assert.Single(manifest.NestedInstallerFiles); - InstallerNestedInstallerFile installerNestedInstallerFile = manifest.NestedInstallerFiles[0]; - Assert.Equal("RelativeFilePath", installerNestedInstallerFile.RelativeFilePath); - Assert.Equal("PortableCommandAlias", installerNestedInstallerFile.PortableCommandAlias); - - InstallerInstallationMetadata installerInstallationMetadata = manifest.InstallationMetadata; - Assert.Equal("%ProgramFiles%\\TestApp", installerInstallationMetadata.DefaultInstallLocation); - Assert.Single(installerInstallationMetadata.Files); - - ManifestInstallerFile installerFile = installerInstallationMetadata.Files[0]; - Assert.Equal("main.exe", installerFile.RelativeFilePath); - Assert.Equal("DisplayName", installerFile.DisplayName); - Assert.Equal("/arg", installerFile.InvocationParameter); - Assert.Equal("69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82", installerFile.FileSha256); - - Assert.Single(manifest.Documentations); - ManifestDocumentation manifestDocumentation = manifest.Documentations[0]; - - Assert.Equal("Default document label", manifestDocumentation.DocumentLabel); - Assert.Equal("https://DefaultDocumentUrl.com", manifestDocumentation.DocumentUrl); + Assert.Equal("Installation notes", localization1.InstallationNotes); + Assert.Equal("https://PurchaseUrl.com", localization1.PurchaseUrl); - Assert.Single(manifest.Icons); - ManifestIcon icon = manifest.Icons[0]; - - Assert.Equal("69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8123", icon.IconSha256); - Assert.Equal("default", icon.IconTheme); - Assert.Equal("https://testIcon", icon.IconUrl); - Assert.Equal("custom", icon.IconResolution); - Assert.Equal("ico", icon.IconFileType); + Assert.Single(localization1.Documentations); + ManifestDocumentation manifestDocumentation = localization1.Documentations[0]; - Assert.Single(manifest.UnsupportedArguments); - Assert.Equal("log", manifest.UnsupportedArguments[0]); + Assert.Equal("Document label", manifestDocumentation.DocumentLabel); + Assert.Equal("https://DocumentUrl.com", manifestDocumentation.DocumentUrl); - Assert.Single(manifest.UnsupportedOSArchitectures); - Assert.Equal("arm", manifest.UnsupportedOSArchitectures[0]); + Assert.Single(localization1.Icons); + ManifestIcon icon = localization1.Icons[0]; - Assert.Single(installer1.InstallationMetadata.Files); - ManifestInstallerFile installerFile2 = installer1.InstallationMetadata.Files[0]; - Assert.Equal("main2.exe", installerFile2.RelativeFilePath); - Assert.Equal("DisplayName2", installerFile2.DisplayName); - Assert.Equal("/arg2", installerFile2.InvocationParameter); - Assert.Equal("79D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82", installerFile2.FileSha256); - - Assert.Equal("msi", installer1.NestedInstallerType); - - InstallerNestedInstallerFile installerNestedInstallerFile2 = installer1.NestedInstallerFiles[0]; - Assert.Equal("RelativeFilePath2", installerNestedInstallerFile2.RelativeFilePath); - Assert.Equal("PortableCommandAlias2", installerNestedInstallerFile2.PortableCommandAlias); - - Assert.Single(installer1.UnsupportedArguments); - Assert.Equal("location", installer1.UnsupportedArguments[0]); - - Assert.True(installer1.DisplayInstallWarnings); - Assert.True(installer1.DownloadCommandProhibited); + Assert.Equal("69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8321", icon.IconSha256); + Assert.Equal("dark", icon.IconTheme); + Assert.Equal("https://testIcon2", icon.IconUrl); + Assert.Equal("32x32", icon.IconResolution); + Assert.Equal("png", icon.IconFileType); } } @@ -393,11 +439,16 @@ namespace WinGetUtilInterop.UnitTests.ManifestUnitTest public const string V110ManifestMerged = "V1_1ManifestMerged.yaml"; /// <summary> - /// Merged v1.1 manifest. + /// Merged v1.6 manifest. /// </summary> public const string V160ManifestMerged = "V1_6ManifestMerged.yaml"; /// <summary> + /// Merged v1.7 manifest. + /// </summary> + public const string V170ManifestMerged = "V1_7ManifestMerged.yaml"; + + /// <summary> /// Merged v1 manifest without localization. /// </summary> public const string V1ManifestNoLocalization = "V1ManifestNoLocalization.yaml"; diff --git a/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_6ManifestMerged.yaml b/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_6ManifestMerged.yaml @@ -148,6 +148,17 @@ Localization: Tags: - appxsdkUK - msixsdkUK + PurchaseUrl: https://PurchaseUrl.com + InstallationNotes: Installation notes + Documentations: + - DocumentLabel: Document label + DocumentUrl: https://DocumentUrl.com + Icons: + - IconUrl: https://testIcon2 + IconFileType: png + IconResolution: 32x32 + IconTheme: dark + IconSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8321 Installers: - Architecture: x86 InstallerLocale: en-GB @@ -230,5 +241,5 @@ Installers: InstallerUrl: https://www.microsoft.com/msixsdk/msixsdkx64.exe InstallerType: exe ProductCode: '{Bar}' - ManifestType: singleton +ManifestType: merged ManifestVersion: 1.6.0 \ No newline at end of file diff --git a/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_7ManifestMerged.yaml b/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_7ManifestMerged.yaml @@ -0,0 +1,249 @@ +PackageIdentifier: microsoft.msixsdk +PackageVersion: 1.7.32 +PackageLocale: en-US +Publisher: Microsoft +PublisherUrl: https://www.microsoft.com +PublisherSupportUrl: https://www.microsoft.com/support +PrivacyUrl: https://www.microsoft.com/privacy +Author: Microsoft +PackageName: MSIX SDK +PackageUrl: https://www.microsoft.com/msixsdk/home +License: MIT License +LicenseUrl: https://www.microsoft.com/msixsdk/license +Copyright: Copyright Microsoft Corporation +CopyrightUrl: https://www.microsoft.com/msixsdk/copyright +ShortDescription: This is MSIX SDK +Description: The MSIX SDK project is an effort to enable developers +Moniker: msixsdk +Tags: + - "appxsdk" + - "msixsdk" +ReleaseNotes: Default release notes +ReleaseNotesUrl: https://DefaultReleaseNotes.net +PurchaseUrl: https://DefaultPurchaseUrl.com +InstallationNotes: Default installation notes +Documentations: + - DocumentLabel: Default document label + DocumentUrl: https://DefaultDocumentUrl.com +Icons: + - IconUrl: https://testIcon + IconFileType: ico + IconResolution: custom + IconTheme: default + IconSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8123 +Agreements: + - AgreementLabel: DefaultLabel + Agreement: DefaultText + AgreementUrl: https://DefaultAgreementUrl.net +InstallerLocale: en-US +Platform: + - Windows.Desktop + - Windows.Universal +MinimumOSVersion: 10.0.0.0 +InstallerType: zip +Scope: machine +InstallModes: + - interactive + - silent + - silentWithProgress +InstallerSwitches: + Custom: /custom + SilentWithProgress: /silentwithprogress + Silent: /silence + Interactive: /interactive + Log: /log=<LOGPATH> + InstallLocation: /dir=<INSTALLPATH> + Upgrade: /upgrade + Repair: /repair +InstallerSuccessCodes: + - 1 + - 0x80070005 +UpgradeBehavior: uninstallPrevious +Commands: + - makemsix + - makeappx +Protocols: + - protocol1 + - protocol2 +FileExtensions: + - appx + - msix + - appxbundle + - msixbundle +Dependencies: + WindowsFeatures: + - IIS + WindowsLibraries: + - VC Runtime + PackageDependencies: + - PackageIdentifier: Microsoft.MsixSdkDep + MinimumVersion: 1.0.0 + ExternalDependencies: + - Outside dependencies +Capabilities: + - internetClient +RestrictedCapabilities: + - runFullTrust +PackageFamilyName: Microsoft.DesktopAppInstaller_8wekyb3d8bbwe +ProductCode: "{Foo}" +ReleaseDate: 2021-01-01 +InstallerAbortsTerminal: true +InstallLocationRequired: true +RequireExplicitUpgrade: true +DisplayInstallWarnings: true +ElevationRequirement: elevatesSelf +UnsupportedOSArchitectures: + - arm +AppsAndFeaturesEntries: + - DisplayName: DisplayName + DisplayVersion: DisplayVersion + Publisher: Publisher + ProductCode: ProductCode + UpgradeCode: UpgradeCode + InstallerType: exe +Markets: + AllowedMarkets: + - US +ExpectedReturnCodes: + - InstallerReturnCode: 2 + ReturnResponse: contactSupport + - InstallerReturnCode: 3 + ReturnResponse: custom + ReturnResponseUrl: https://defaultReturnResponseUrl.com +UnsupportedArguments: + - log +NestedInstallerType: msi +NestedInstallerFiles: + - RelativeFilePath: RelativeFilePath + PortableCommandAlias: PortableCommandAlias +InstallationMetadata: + DefaultInstallLocation: "%ProgramFiles%\\TestApp" + Files: + - RelativeFilePath: "main.exe" + FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 + FileType: launch + InvocationParameter: "/arg" + DisplayName: "DisplayName" +DownloadCommandProhibited: true +RepairBehavior: uninstaller +Localization: +- Agreements: + - Agreement: Text + AgreementLabel: Label + AgreementUrl: https://AgreementUrl.net + Author: Microsoft UK + Copyright: Copyright Microsoft Corporation UK + CopyrightUrl: https://www.microsoft.com/msixsdk/copyright/UK + Description: The MSIX SDK project is an effort to enable developers UK + License: MIT License UK + LicenseUrl: https://www.microsoft.com/msixsdk/license/UK + PackageLocale: en-GB + PackageName: MSIX SDK UK + PackageUrl: https://www.microsoft.com/msixsdk/home/UK + PrivacyUrl: https://www.microsoft.com/privacy/UK + Publisher: Microsoft UK + PublisherSupportUrl: https://www.microsoft.com/support/UK + PublisherUrl: https://www.microsoft.com/UK + ReleaseNotes: Release notes + ReleaseNotesUrl: https://ReleaseNotes.net + ShortDescription: This is MSIX SDK UK + Tags: + - appxsdkUK + - msixsdkUK + PurchaseUrl: https://PurchaseUrl.com + InstallationNotes: Installation notes + Documentations: + - DocumentLabel: Document label + DocumentUrl: https://DocumentUrl.com + Icons: + - IconUrl: https://testIcon2 + IconFileType: png + IconResolution: 32x32 + IconTheme: dark + IconSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8321 +Installers: + - Architecture: x86 + InstallerLocale: en-GB + Platform: + - Windows.Desktop + MinimumOSVersion: 10.0.1.0 + InstallerType: msix + InstallerUrl: https://www.microsoft.com/msixsdk/msixsdkx86.msix + InstallerSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 + SignatureSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 + Scope: user + InstallModes: + - interactive + InstallerSwitches: + Custom: /c + SilentWithProgress: /sp + Silent: /s + Interactive: /i + Log: /l=<LOGPATH> + InstallLocation: /d=<INSTALLPATH> + Upgrade: /u + Repair: /r + UpgradeBehavior: install + Commands: + - makemsixPreview + - makeappxPreview + Protocols: + - protocol1preview + - protocol2preview + FileExtensions: + - appxbundle + - msixbundle + - appx + - msix + Dependencies: + WindowsFeatures: + - PreviewIIS + WindowsLibraries: + - Preview VC Runtime + PackageDependencies: + - PackageIdentifier: Microsoft.MsixSdkDepPreview + MinimumVersion: 1.0.0 + ExternalDependencies: + - Preview Outside dependencies + PackageFamilyName: Microsoft.DesktopAppInstallerPreview_8wekyb3d8bbwe + Capabilities: + - internetClientPreview + RestrictedCapabilities: + - runFullTrustPreview + ReleaseDate: 2021-02-02 + InstallerAbortsTerminal: false + InstallLocationRequired: false + NestedInstallerFiles: + - RelativeFilePath: RelativeFilePath2 + PortableCommandAlias: PortableCommandAlias2 + RequireExplicitUpgrade: false + DisplayInstallWarnings: true + ElevationRequirement: elevationRequired + NestedInstallerType: msi + UnsupportedArguments: + - location + UnsupportedOSArchitectures: + - arm64 + Markets: + ExcludedMarkets: + - "US" + ExpectedReturnCodes: + - InstallerReturnCode: 2 + ReturnResponse: contactSupport + DownloadCommandProhibited: true + RepairBehavior: modify + InstallationMetadata: + DefaultInstallLocation: "%ProgramFiles%\\TestApp" + Files: + - RelativeFilePath: "main2.exe" + FileSha256: 79D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 + FileType: launch2 + InvocationParameter: "/arg2" + DisplayName: "DisplayName2" + - Architecture: x64 + InstallerSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 + InstallerUrl: https://www.microsoft.com/msixsdk/msixsdkx64.exe + InstallerType: exe + ProductCode: '{Bar}' +ManifestType: merged +ManifestVersion: 1.7.0+ \ No newline at end of file diff --git a/src/WinGetUtilInterop.UnitTests/WinGetUtilInterop.UnitTests.csproj b/src/WinGetUtilInterop.UnitTests/WinGetUtilInterop.UnitTests.csproj @@ -91,6 +91,9 @@ <None Update="TestCollateral\V1_6ManifestMerged.yaml"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> + <None Update="TestCollateral\V1_7ManifestMerged.yaml"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> <None Update="xunit.runner.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> diff --git a/src/WinGetUtilInterop/Manifest/V1/InstallerSwitches.cs b/src/WinGetUtilInterop/Manifest/V1/InstallerSwitches.cs @@ -49,6 +49,11 @@ namespace Microsoft.WinGetUtil.Models.V1 public string InstallLocation { get; set; } /// <summary> + /// Gets or sets the repair switch. + /// </summary> + public string Repair { get; set; } + + /// <summary> /// Override op_Equality. /// </summary> /// <param name="lhs">left hand side.</param> @@ -111,7 +116,8 @@ namespace Microsoft.WinGetUtil.Models.V1 (this.Interactive == other.Interactive) && (this.Upgrade == other.Upgrade) && (this.Log == other.Log) && - (this.InstallLocation == other.InstallLocation); + (this.InstallLocation == other.InstallLocation) && + (this.Repair == other.Repair); } /// <summary> @@ -127,7 +133,8 @@ namespace Microsoft.WinGetUtil.Models.V1 this.Interactive, this.Upgrade, this.Log, - this.InstallLocation).GetHashCode(); + this.InstallLocation, + this.Repair).GetHashCode(); } } } diff --git a/src/WinGetUtilInterop/Manifest/V1/Manifest.cs b/src/WinGetUtilInterop/Manifest/V1/Manifest.cs @@ -336,6 +336,11 @@ namespace Microsoft.WinGetUtil.Models.V1 public bool DownloadCommandProhibited { get; set; } /// <summary> + /// Gets or sets the default repair behavior. + /// </summary> + public string RepairBehavior { get; set; } + + /// <summary> /// Deserialize a stream reader into a Manifest object. /// </summary> /// <param name="filePath">file path.</param> @@ -503,10 +508,6 @@ namespace Microsoft.WinGetUtil.Models.V1 // Equality of Manifest consist on only these properties. return (this.Id == other.Id) && (this.Version == other.Version) && - (this.InstallerLocale == other.InstallerLocale) && - (this.Scope == other.Scope) && - (this.InstallerType == other.InstallerType) && - (this.Switches == other.Switches) && this.CompareInstallers(other.Installers); } diff --git a/src/WinGetUtilInterop/Manifest/V1/ManifestInstaller.cs b/src/WinGetUtilInterop/Manifest/V1/ManifestInstaller.cs @@ -199,6 +199,11 @@ namespace Microsoft.WinGetUtil.Models.V1 public bool DownloadCommandProhibited { get; set; } /// <summary> + /// Gets or sets the repair behavior. + /// </summary> + public string RepairBehavior { get; set; } + + /// <summary> /// Returns a List of strings containing the URIs contained within this installer. /// </summary> /// <returns>List of strings.</returns> @@ -256,10 +261,8 @@ namespace Microsoft.WinGetUtil.Models.V1 (this.Scope == other.Scope) && (this.InstallerType == other.InstallerType) && (this.Switches == other.Switches) && - (this.InstallationMetadata == other.InstallationMetadata) && (this.NestedInstallerType == other.NestedInstallerType) && - (this.NestedInstallerFiles == other.NestedInstallerFiles) && - (this.DisplayInstallWarnings == other.DisplayInstallWarnings); + (this.NestedInstallerFiles == other.NestedInstallerFiles); } /// <summary> @@ -275,7 +278,9 @@ namespace Microsoft.WinGetUtil.Models.V1 this.InstallerLocale, this.Scope, this.InstallerType, - this.Switches).GetHashCode(); + this.Switches, + this.NestedInstallerType, + this.NestedInstallerFiles).GetHashCode(); } } }