winget-cli

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

commit 0d824f4d7e370d78250f0050b89cee998c1d9c66
parent e99152389bed782b8f86188ec48b39382dc3c4a5
Author: Akinwale Alagbe <24412729+hackean-msft@users.noreply.github.com>
Date:   Tue, 24 Oct 2023 01:04:08 -0700

Add missing manifest fields (#3757)

* Add missing manifest fields

* Added all missing fields

* Added more test asserts

* Add all properties to tests

---------

Co-authored-by: Akinwale Alagbe <akalagbe@microsoft.com>
Diffstat:
Msrc/WinGetUtilInterop.UnitTests/ManifestUnitTest/V1ManifestReadTest.cs | 83++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
Msrc/WinGetUtilInterop.UnitTests/TestCollateral/V1_1ManifestMerged.yaml | 7+++++--
Asrc/WinGetUtilInterop.UnitTests/TestCollateral/V1_6ManifestMerged.yaml | 235+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/WinGetUtilInterop.UnitTests/WinGetUtilInterop.UnitTests.csproj | 3+++
Asrc/WinGetUtilInterop/Manifest/V1/InstallerInstallationMetadata.cs | 25+++++++++++++++++++++++++
Asrc/WinGetUtilInterop/Manifest/V1/InstallerNestedInstallerFile.cs | 19+++++++++++++++++++
Msrc/WinGetUtilInterop/Manifest/V1/Manifest.cs | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/WinGetUtilInterop/Manifest/V1/ManifestDocumentation.cs | 26++++++++++++++++++++++++++
Asrc/WinGetUtilInterop/Manifest/V1/ManifestIcon.cs | 40++++++++++++++++++++++++++++++++++++++++
Msrc/WinGetUtilInterop/Manifest/V1/ManifestInstaller.cs | 36+++++++++++++++++++++++++++++++++++-
Asrc/WinGetUtilInterop/Manifest/V1/ManifestInstallerFile.cs | 43+++++++++++++++++++++++++++++++++++++++++++
11 files changed, 562 insertions(+), 6 deletions(-)

diff --git a/src/WinGetUtilInterop.UnitTests/ManifestUnitTest/V1ManifestReadTest.cs b/src/WinGetUtilInterop.UnitTests/ManifestUnitTest/V1ManifestReadTest.cs @@ -33,6 +33,7 @@ namespace Microsoft.WinGetUtil.UnitTests.ManifestUnitTest { V100, V110, + V160, } /// <summary> @@ -51,6 +52,11 @@ namespace Microsoft.WinGetUtil.UnitTests.ManifestUnitTest Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestCollateral", ManifestStrings.V110ManifestMerged)); this.ValidateManifestFields(v110manifest, TestManifestVersion.V110); + + Manifest v160manifest = Manifest.CreateManifestFromPath( + Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestCollateral", ManifestStrings.V160ManifestMerged)); + + this.ValidateManifestFields(v160manifest, TestManifestVersion.V160); } /// <summary> @@ -126,6 +132,7 @@ namespace Microsoft.WinGetUtil.UnitTests.ManifestUnitTest Assert.Equal("Windows.Desktop", manifest.Platform[0]); Assert.Equal("Windows.Universal", manifest.Platform[1]); Assert.Equal("10.0.0.0", manifest.MinimumOSVersion); + Assert.Equal("zip", manifest.InstallerType); Assert.Equal("machine", manifest.Scope); Assert.Equal(3, manifest.InstallModes.Count); @@ -193,9 +200,9 @@ namespace Microsoft.WinGetUtil.UnitTests.ManifestUnitTest Assert.Equal("exe", manifest.AppsAndFeaturesEntries[0].InstallerType); Assert.Single(manifest.Markets.AllowedMarkets); Assert.Equal("US", manifest.Markets.AllowedMarkets[0]); - Assert.Single(manifest.ExpectedReturnCodes); - Assert.Equal(10, manifest.ExpectedReturnCodes[0].InstallerReturnCode); - Assert.Equal("packageInUse", manifest.ExpectedReturnCodes[0].ReturnResponse); + Assert.Equal(2, manifest.ExpectedReturnCodes.Count); + Assert.Equal(2, manifest.ExpectedReturnCodes[0].InstallerReturnCode); + Assert.Equal("contactSupport", manifest.ExpectedReturnCodes[0].ReturnResponse); } Assert.Equal(2, manifest.Installers.Count); @@ -303,6 +310,71 @@ namespace Microsoft.WinGetUtil.UnitTests.ManifestUnitTest Assert.Equal("Text", localization1.Agreements[0].Agreement); Assert.Equal("https://AgreementUrl.net", localization1.Agreements[0].AgreementUrl); } + + 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.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(manifest.UnsupportedArguments); + Assert.Equal("log", manifest.UnsupportedArguments[0]); + + Assert.Single(manifest.UnsupportedOSArchitectures); + Assert.Equal("arm", manifest.UnsupportedOSArchitectures[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); + } } /// <summary> @@ -321,6 +393,11 @@ namespace Microsoft.WinGetUtil.UnitTests.ManifestUnitTest public const string V110ManifestMerged = "V1_1ManifestMerged.yaml"; /// <summary> + /// Merged v1.1 manifest. + /// </summary> + public const string V160ManifestMerged = "V1_6ManifestMerged.yaml"; + + /// <summary> /// Merged v1 manifest without localization. /// </summary> public const string V1ManifestNoLocalization = "V1ManifestNoLocalization.yaml"; diff --git a/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_1ManifestMerged.yaml b/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_1ManifestMerged.yaml @@ -30,8 +30,11 @@ Dependencies: Description: The MSIX SDK project is an effort to enable developers ElevationRequirement: elevatesSelf ExpectedReturnCodes: -- InstallerReturnCode: 10 - ReturnResponse: packageInUse +- InstallerReturnCode: 2 + ReturnResponse: contactSupport +- InstallerReturnCode: 3 + ReturnResponse: custom + ReturnResponseUrl: https://defaultReturnResponseUrl.com FileExtensions: - appx - msix diff --git a/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_6ManifestMerged.yaml b/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_6ManifestMerged.yaml @@ -0,0 +1,234 @@ +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 +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 +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 +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 + 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 + 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: singleton +ManifestVersion: 1.6.0+ \ No newline at end of file diff --git a/src/WinGetUtilInterop.UnitTests/WinGetUtilInterop.UnitTests.csproj b/src/WinGetUtilInterop.UnitTests/WinGetUtilInterop.UnitTests.csproj @@ -63,6 +63,9 @@ <None Update="TestCollateral\Test_yaml_without_bom.yaml"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> + <None Update="TestCollateral\V1_6ManifestMerged.yaml"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> <None Update="xunit.runner.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> diff --git a/src/WinGetUtilInterop/Manifest/V1/InstallerInstallationMetadata.cs b/src/WinGetUtilInterop/Manifest/V1/InstallerInstallationMetadata.cs @@ -0,0 +1,25 @@ +// ----------------------------------------------------------------------- +// <copyright file="InstallerInstallationMetadata.cs" company="Microsoft Corporation"> +// Copyright (c) Microsoft Corporation. All rights reserved. +// </copyright> +// ----------------------------------------------------------------------- + +namespace Microsoft.WinGetUtil.Models.V1 +{ + using System; + using System.Collections.Generic; + using System.Text; + + public class InstallerInstallationMetadata + { + /// <summary> + /// Gets or sets the default install location. + /// </summary> + public string DefaultInstallLocation { get; set; } + + /// <summary> + /// Gets or sets the manifest installer files. + /// </summary> + public List<ManifestInstallerFile> Files { get; set; } + } +} diff --git a/src/WinGetUtilInterop/Manifest/V1/InstallerNestedInstallerFile.cs b/src/WinGetUtilInterop/Manifest/V1/InstallerNestedInstallerFile.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.WinGetUtil.Models.V1 +{ + public class InstallerNestedInstallerFile + { + /// <summary> + /// Gets or sets relative file part. + /// </summary> + public string RelativeFilePath { get; set; } + + /// <summary> + /// Gets or set portable command alias. + /// </summary> + public string PortableCommandAlias { get; set; } + } +} diff --git a/src/WinGetUtilInterop/Manifest/V1/Manifest.cs b/src/WinGetUtilInterop/Manifest/V1/Manifest.cs @@ -137,12 +137,32 @@ namespace Microsoft.WinGetUtil.Models.V1 /// Gets or sets the release notes in default locale. /// </summary> public string ReleaseNotes { get; set; } + + /// <summary> + /// Gets or sets the manifest documentation. + /// </summary> + public List<ManifestDocumentation> Documentations { get; set; } + + /// <summary> + /// Gets or sets the manifest icons information. + /// </summary> + public List<ManifestIcon> Icons { get; set; } /// <summary> /// Gets or sets the release notes url in default locale. /// </summary> public string ReleaseNotesUrl { get; set; } + /// <summary> + /// Gets or sets the purchase url of the package. + /// </summary> + public string PurchaseUrl { get; set; } + + /// <summary> + /// Gets or sets the installation notes. + /// </summary> + public string InstallationNotes { get; set; } + // Installer fields /// <summary> @@ -211,6 +231,7 @@ namespace Microsoft.WinGetUtil.Models.V1 public string ProductCode { get; set; } /// <summary> + /// <summary> /// Gets or sets the default list of capabilities. For msix only. /// </summary> public List<string> Capabilities { get; set; } @@ -237,6 +258,26 @@ namespace Microsoft.WinGetUtil.Models.V1 public InstallerMarkets Markets { get; set; } /// <summary> + /// Gets or sets the installation metadata. + /// </summary> + public InstallerInstallationMetadata InstallationMetadata { get; set; } + + /// <summary> + /// Gets or sets the nested installer type. + /// </summary> + public string NestedInstallerType { get; set; } + + /// <summary> + /// Gets or sets the nested installer files. + /// </summary> + public List<InstallerNestedInstallerFile> NestedInstallerFiles { get; set; } + + /// <summary> + /// Gets or sets the unsupported arguments. + /// </summary> + public List<string> UnsupportedArguments { get; set; } + + /// <summary> /// Gets or sets a value indicating whether the default installer behavior aborts terminal. /// </summary> public bool InstallerAbortsTerminal { get; set; } @@ -262,6 +303,11 @@ namespace Microsoft.WinGetUtil.Models.V1 public List<string> UnsupportedOSArchitectures { get; set; } /// <summary> + /// Gets or sets a value indicating whether to display install warnings. + /// </summary> + public bool DisplayInstallWarnings { get; set; } + + /// <summary> /// Gets or sets the default list of apps and features entries. /// </summary> public List<InstallerArpEntry> AppsAndFeaturesEntries { get; set; } @@ -287,6 +333,11 @@ namespace Microsoft.WinGetUtil.Models.V1 public List<ManifestLocalization> Localization { get; set; } /// <summary> + /// Gets or sets a value indicating whether the installer is prohibited from being downloaded for offline installation. + /// </summary> + public bool DownloadCommandProhibited { get; set; } + + /// <summary> /// Deserialize a stream reader into a Manifest object. /// </summary> /// <param name="filePath">file path.</param> diff --git a/src/WinGetUtilInterop/Manifest/V1/ManifestDocumentation.cs b/src/WinGetUtilInterop/Manifest/V1/ManifestDocumentation.cs @@ -0,0 +1,26 @@ +// ----------------------------------------------------------------------- +// <copyright file="ManifestDocumentation.cs" company="Microsoft Corporation"> +// Copyright (c) Microsoft Corporation. All rights reserved. +// </copyright> +// ----------------------------------------------------------------------- + +namespace Microsoft.WinGetUtil.Models.V1 +{ + using System; + using System.Collections.Generic; + using System.Text; + + public class ManifestDocumentation + { + /// <summary> + /// Gets or sets the document label. + /// </summary> + public string DocumentLabel { get; set; } + + /// <summary> + /// Gets or sets the document url. + /// </summary> + public string DocumentUrl { get; set; } + + } +} diff --git a/src/WinGetUtilInterop/Manifest/V1/ManifestIcon.cs b/src/WinGetUtilInterop/Manifest/V1/ManifestIcon.cs @@ -0,0 +1,40 @@ +// ----------------------------------------------------------------------- +// <copyright file="ManifestDocumentation.cs" company="Microsoft Corporation"> +// Copyright (c) Microsoft Corporation. All rights reserved. +// </copyright> +// ----------------------------------------------------------------------- + +namespace Microsoft.WinGetUtil.Models.V1 +{ + using System; + using System.Collections.Generic; + using System.Text; + + public class ManifestIcon + { + /// <summary> + /// Gets or sets the icon url. + /// </summary> + public string IconUrl { get; set; } + + /// <summary> + /// Gets or sets the icon file type. + /// </summary> + public string IconFileType { get; set; } + + /// <summary> + /// Gets or sets the icon resolution. + /// </summary> + public string IconResolution { get; set; } + + /// <summary> + /// Gets or sets the icon theme. + /// </summary> + public string IconTheme { get; set; } + + /// <summary> + /// Gets or sets the icon sha256. + /// </summary> + public string IconSha256 { get; set; } + } +} diff --git a/src/WinGetUtilInterop/Manifest/V1/ManifestInstaller.cs b/src/WinGetUtilInterop/Manifest/V1/ManifestInstaller.cs @@ -170,6 +170,36 @@ namespace Microsoft.WinGetUtil.Models.V1 public List<InstallerExpectedReturnCode> ExpectedReturnCodes { get; set; } /// <summary> + /// Gets or sets the installation metadata. + /// </summary> + public InstallerInstallationMetadata InstallationMetadata { get; set; } + + /// <summary> + /// Gets or sets the nested installer type. + /// </summary> + public string NestedInstallerType { get; set; } + + /// <summary> + /// Gets or sets the nested installer files. + /// </summary> + public List<InstallerNestedInstallerFile> NestedInstallerFiles { get; set; } + + /// <summary> + /// Gets or sets the unsupported arguments. + /// </summary> + public List<string> UnsupportedArguments { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether to display install warnings. + /// </summary> + public bool DisplayInstallWarnings { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether the installer is prohibited from being downloaded for offline installation. + /// </summary> + public bool DownloadCommandProhibited { get; set; } + + /// <summary> /// Returns a List of strings containing the URIs contained within this installer. /// </summary> /// <returns>List of strings.</returns> @@ -226,7 +256,11 @@ namespace Microsoft.WinGetUtil.Models.V1 (this.InstallerLocale == other.InstallerLocale) && (this.Scope == other.Scope) && (this.InstallerType == other.InstallerType) && - (this.Switches == other.Switches); + (this.Switches == other.Switches) && + (this.InstallationMetadata == other.InstallationMetadata) && + (this.NestedInstallerType == other.NestedInstallerType) && + (this.NestedInstallerFiles == other.NestedInstallerFiles) && + (this.DisplayInstallWarnings == other.DisplayInstallWarnings); } /// <summary> diff --git a/src/WinGetUtilInterop/Manifest/V1/ManifestInstallerFile.cs b/src/WinGetUtilInterop/Manifest/V1/ManifestInstallerFile.cs @@ -0,0 +1,43 @@ +// ----------------------------------------------------------------------- +// <copyright file="ManifestInstallationMetadata.cs" company="Microsoft Corporation"> +// Copyright (c) Microsoft Corporation. All rights reserved. +// </copyright> +// ----------------------------------------------------------------------- + +namespace Microsoft.WinGetUtil.Models.V1 +{ + using System; + using System.Collections.Generic; + using System.Text; + + /// <summary> + /// Represents an installer file. + /// </summary> + public class ManifestInstallerFile + { + /// <summary> + /// Gets or sets relative file path. + /// </summary> + public string RelativeFilePath { get; set; } + + /// <summary> + /// Gets or sets file sha256. + /// </summary> + public string FileSha256 { get; set; } + + /// <summary> + /// Gets or sets file type. + /// </summary> + public string FileType { get; set; } + + /// <summary> + /// Gets or sets invocation parameter. + /// </summary> + public string InvocationParameter { get; set; } + + /// <summary> + /// Gets or sets display name. + /// </summary> + public string DisplayName { get; set; } + } +}