From 5d8b88e2ece982a54a81b9b5a1000db57d6e1ac5 Mon Sep 17 00:00:00 2001 From: Akinwale Alagbe Date: Wed, 11 Oct 2023 13:01:59 -0700 Subject: [PATCH] Add missing manifest fields --- .../V1/InstallerInstallationMetadata.cs | 25 +++++++++++ .../V1/InstallerNestedInstallerFile.cs | 19 ++++++++ src/WinGetUtilInterop/Manifest/V1/Manifest.cs | 31 +++++++++++++ .../Manifest/V1/ManifestInstaller.cs | 30 +++++++++++++ .../Manifest/V1/ManifestInstallerFile.cs | 43 +++++++++++++++++++ 5 files changed, 148 insertions(+) create mode 100644 src/WinGetUtilInterop/Manifest/V1/InstallerInstallationMetadata.cs create mode 100644 src/WinGetUtilInterop/Manifest/V1/InstallerNestedInstallerFile.cs create mode 100644 src/WinGetUtilInterop/Manifest/V1/ManifestInstallerFile.cs diff --git a/src/WinGetUtilInterop/Manifest/V1/InstallerInstallationMetadata.cs b/src/WinGetUtilInterop/Manifest/V1/InstallerInstallationMetadata.cs new file mode 100644 index 0000000000..68b017e845 --- /dev/null +++ b/src/WinGetUtilInterop/Manifest/V1/InstallerInstallationMetadata.cs @@ -0,0 +1,25 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// ----------------------------------------------------------------------- + +namespace Microsoft.WinGetUtil.Models.V1 +{ + using System; + using System.Collections.Generic; + using System.Text; + + public class InstallerInstallationMetadata + { + /// + /// Gets or sets the default install location. + /// + public string DefaultInstallLocation { get; set; } + + /// + /// Gets or sets the manifest installer files. + /// + public List Files { get; set; } + } +} diff --git a/src/WinGetUtilInterop/Manifest/V1/InstallerNestedInstallerFile.cs b/src/WinGetUtilInterop/Manifest/V1/InstallerNestedInstallerFile.cs new file mode 100644 index 0000000000..89842ac75f --- /dev/null +++ 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 + { + /// + /// Gets or sets relative file part. + /// + public string RelativeFilePath { get; set; } + + /// + /// Gets or set portable command alias. + /// + public string PortableCommandAlias { get; set; } + } +} diff --git a/src/WinGetUtilInterop/Manifest/V1/Manifest.cs b/src/WinGetUtilInterop/Manifest/V1/Manifest.cs index e319438420..dd7e7066a7 100644 --- a/src/WinGetUtilInterop/Manifest/V1/Manifest.cs +++ b/src/WinGetUtilInterop/Manifest/V1/Manifest.cs @@ -210,6 +210,7 @@ public class Manifest /// public string ProductCode { get; set; } + /// /// /// Gets or sets the default list of capabilities. For msix only. /// @@ -236,6 +237,31 @@ public class Manifest /// public InstallerMarkets Markets { get; set; } + /// + /// Gets or sets the installation metadata. + /// + public InstallerInstallationMetadata InstallationMetadata { get; set; } + + /// + /// Gets or sets the nested installer type. + /// + public string NestedInstallerType { get; set; } + + /// + /// Gets or sets the nested installer files. + /// + public List NestedInstallerFiles { get; set; } + + /// + /// Gets or sets the excluded markets. + /// + public string ExcludedMarkets { get; set; } + + /// + /// Gets or sets the unsupported arguments. + /// + public List UnsupportedArguments { get; set; } + /// /// Gets or sets a value indicating whether the default installer behavior aborts terminal. /// @@ -261,6 +287,11 @@ public class Manifest /// public List UnsupportedOSArchitectures { get; set; } + /// + /// Gets or sets a value indicating whether to display install warnings. + /// + public bool DisplayInstallWarnings { get; set; } + /// /// Gets or sets the default list of apps and features entries. /// diff --git a/src/WinGetUtilInterop/Manifest/V1/ManifestInstaller.cs b/src/WinGetUtilInterop/Manifest/V1/ManifestInstaller.cs index cbfefee9aa..d8ce4d1aa5 100644 --- a/src/WinGetUtilInterop/Manifest/V1/ManifestInstaller.cs +++ b/src/WinGetUtilInterop/Manifest/V1/ManifestInstaller.cs @@ -169,6 +169,36 @@ public class ManifestInstaller /// public List ExpectedReturnCodes { get; set; } + /// + /// Gets or sets the installation metadata. + /// + public InstallerInstallationMetadata InstallationMetadata { get; set; } + + /// + /// Gets or sets the nested installer type. + /// + public string NestedInstallerType { get; set; } + + /// + /// Gets or sets the nested installer files. + /// + public List NestedInstallerFiles { get; set; } + + /// + /// Gets or sets the excluded markets. + /// + public string ExcludedMarkets { get; set; } + + /// + /// Gets or sets the unsupported arguments. + /// + public List UnsupportedArguments { get; set; } + + /// + /// Gets or sets a value indicating whether to display install warnings. + /// + public bool DisplayInstallWarnings { get; set; } + /// /// Returns a List of strings containing the URIs contained within this installer. /// diff --git a/src/WinGetUtilInterop/Manifest/V1/ManifestInstallerFile.cs b/src/WinGetUtilInterop/Manifest/V1/ManifestInstallerFile.cs new file mode 100644 index 0000000000..03f736f935 --- /dev/null +++ b/src/WinGetUtilInterop/Manifest/V1/ManifestInstallerFile.cs @@ -0,0 +1,43 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// ----------------------------------------------------------------------- + +namespace Microsoft.WinGetUtil.Models.V1 +{ + using System; + using System.Collections.Generic; + using System.Text; + + /// + /// Represents an installer file. + /// + public class ManifestInstallerFile + { + /// + /// Gets or sets relative file path. + /// + public string RelativeFilePath { get; set; } + + /// + /// Gets or sets file sha256. + /// + public string FileSha256 { get; set; } + + /// + /// Gets or sets file type. + /// + public string FileType { get; set; } + + /// + /// Gets or sets invocation parameter. + /// + public string InvocationParameter { get; set; } + + /// + /// Gets or sets display name. + /// + public string DisplayName { get; set; } + } +}