diff --git a/schemas/JSON/manifests/v1.3.0/manifest.installer.1.3.0.json b/schemas/JSON/manifests/v1.3.0/manifest.installer.1.3.0.json index a8ae91c8a6..963caddbd0 100644 --- a/schemas/JSON/manifests/v1.3.0/manifest.installer.1.3.0.json +++ b/schemas/JSON/manifests/v1.3.0/manifest.installer.1.3.0.json @@ -69,6 +69,45 @@ ], "description": "Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level" }, + "NestedInstallerType": { + "type": [ "string", "null" ], + "enum": [ + "msix", + "msi", + "appx", + "exe", + "inno", + "nullsoft", + "wix", + "burn", + "portable" + ], + "description": "Enumeration of supported nested installer types contained inside an archive file" + }, + "NestedInstallerFiles": { + "type": [ "array", "null" ], + "items": { + "type": "object", + "title": "NestedInstallerFile", + "properties": { + "RelativeFilePath": { + "type": "string", + "minLength": 1, + "maxLength": 512, + "description": "The relative path to the nested installer file" + }, + "PortableCommandAlias": { + "type": [ "string", "null" ], + "minLength": 1, + "maxLength": 40, + "description": "The command alias to be used for calling the package. Only applies to the nested portable package" + } + }, + "description": "A nested installer file contained inside an archive" + }, + "maxItems": 1024, + "description": "List of nested installer files contained inside an archive" + }, "Architecture": { "type": "string", "enum": [ @@ -492,6 +531,12 @@ "InstallerType": { "$ref": "#/definitions/InstallerType" }, + "NestedInstallerType": { + "$ref": "#/definitions/NestedInstallerType" + }, + "NestedInstallerFiles": { + "$ref": "#/definitions/NestedInstallerFiles" + }, "Scope": { "$ref": "#/definitions/Scope" }, @@ -611,6 +656,12 @@ "InstallerType": { "$ref": "#/definitions/InstallerType" }, + "NestedInstallerType": { + "$ref": "#/definitions/NestedInstallerType" + }, + "NestedInstallerFiles": { + "$ref": "#/definitions/NestedInstallerFiles" + }, "Scope": { "$ref": "#/definitions/Scope" }, diff --git a/schemas/JSON/manifests/v1.3.0/manifest.singleton.1.3.0.json b/schemas/JSON/manifests/v1.3.0/manifest.singleton.1.3.0.json index c631b7c44f..d1f7a65a65 100644 --- a/schemas/JSON/manifests/v1.3.0/manifest.singleton.1.3.0.json +++ b/schemas/JSON/manifests/v1.3.0/manifest.singleton.1.3.0.json @@ -111,6 +111,45 @@ ], "description": "Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level" }, + "NestedInstallerType": { + "type": [ "string", "null" ], + "enum": [ + "msix", + "msi", + "appx", + "exe", + "inno", + "nullsoft", + "wix", + "burn", + "portable" + ], + "description": "Enumeration of supported nested installer types contained inside an archive file" + }, + "NestedInstallerFiles": { + "type": [ "array", "null" ], + "items": { + "type": "object", + "title": "NestedInstallerFile", + "properties": { + "RelativeFilePath": { + "type": "string", + "minLength": 1, + "maxLength": 512, + "description": "The relative path to the nested installer file" + }, + "PortableCommandAlias": { + "type": [ "string", "null" ], + "minLength": 1, + "maxLength": 40, + "description": "The command alias to be used for calling the package. Only applies to the nested portable package" + } + }, + "description": "A nested installer file contained inside an archive" + }, + "maxItems": 1024, + "description": "List of nested installer files contained inside an archive" + }, "Architecture": { "type": "string", "enum": [ @@ -533,6 +572,12 @@ "InstallerType": { "$ref": "#/definitions/InstallerType" }, + "NestedInstallerType": { + "$ref": "#/definitions/NestedInstallerType" + }, + "NestedInstallerFiles": { + "$ref": "#/definitions/NestedInstallerFiles" + }, "Scope": { "$ref": "#/definitions/Scope" }, @@ -765,6 +810,12 @@ "InstallerType": { "$ref": "#/definitions/InstallerType" }, + "NestedInstallerType": { + "$ref": "#/definitions/NestedInstallerType" + }, + "NestedInstallerFiles": { + "$ref": "#/definitions/NestedInstallerFiles" + }, "Scope": { "$ref": "#/definitions/Scope" }, diff --git a/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj b/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj index 642d14030b..34f17bc187 100644 --- a/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj +++ b/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj @@ -409,6 +409,18 @@ true + + true + + + true + + + true + + + true + true diff --git a/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj.filters b/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj.filters index 2df7b1de94..cd0e6a0726 100644 --- a/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj.filters +++ b/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj.filters @@ -285,6 +285,18 @@ TestData + + TestData + + + TestData + + + TestData + + + TestData + TestData diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-AppsAndFeaturesEntriesOnMSIX.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-AppsAndFeaturesEntriesOnMSIX.yaml index 719f288050..d2c7e29b86 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-AppsAndFeaturesEntriesOnMSIX.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-AppsAndFeaturesEntriesOnMSIX.yaml @@ -9,7 +9,7 @@ PackageLocale: en-US Installers: - Architecture: x86 InstallerType: MSIX - InstallerUrl: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + InstallerUrl: https://ThisIsNotUsed InstallerSha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD AppsAndFeaturesEntries: - DisplayName: DisplayName diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-ArchInvalid.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-ArchInvalid.yaml index 338e447dbe..310b0d841b 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-ArchInvalid.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-ArchInvalid.yaml @@ -3,10 +3,10 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: NotAnArch - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-ArchMissing.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-ArchMissing.yaml index c514011567..d4ba2eb6a1 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-ArchMissing.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-ArchMissing.yaml @@ -3,9 +3,9 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + - Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-Channel-NotSupported.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-Channel-NotSupported.yaml index 3cdf47cda6..5d2748c5a1 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-Channel-NotSupported.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-Channel-NotSupported.yaml @@ -3,10 +3,10 @@ Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft Channel: release -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-DifferentCase-UPPER.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-DifferentCase-UPPER.yaml index d7d669de22..1db62610e3 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-DifferentCase-UPPER.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-DifferentCase-UPPER.yaml @@ -3,10 +3,10 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -INSTALLERTYPE: Zip +INSTALLERTYPE: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-DifferentCase-camelCase.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-DifferentCase-camelCase.yaml index 781db3c0af..0d68a95786 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-DifferentCase-camelCase.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-DifferentCase-camelCase.yaml @@ -3,10 +3,10 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -installerType: Zip +installerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-DifferentCase-lower.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-DifferentCase-lower.yaml index cd7a0d1926..d4a98be628 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-DifferentCase-lower.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-DifferentCase-lower.yaml @@ -3,10 +3,10 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -installertype: Zip +installertype: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-DuplicateKey-DifferentCase-lower.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-DuplicateKey-DifferentCase-lower.yaml index 22d28bef38..d686c4fdf7 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-DuplicateKey-DifferentCase-lower.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-DuplicateKey-DifferentCase-lower.yaml @@ -3,11 +3,11 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip -installertype: Zip +InstallerType: Msi +installertype: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-DuplicateKey-DifferentCase.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-DuplicateKey-DifferentCase.yaml index 7bd20feae5..f81ae3137b 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-DuplicateKey-DifferentCase.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-DuplicateKey-DifferentCase.yaml @@ -3,11 +3,11 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip -installerType: Zip +InstallerType: Msi +installerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-DuplicateKey.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-DuplicateKey.yaml index cd06d8884a..6767697cb5 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-DuplicateKey.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-DuplicateKey.yaml @@ -4,10 +4,10 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-IdInvalid.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-IdInvalid.yaml index f103b820de..bb3e4564f3 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-IdInvalid.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-IdInvalid.yaml @@ -2,11 +2,11 @@ Id: m i c rosoft.msixsdk Name: MSIX SDK Version: 1.7.32 -InstallerType: Zip +InstallerType: Msi Publisher: Microsoft License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-IdMissing.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-IdMissing.yaml index e6332b9215..5c10e375f8 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-IdMissing.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-IdMissing.yaml @@ -1,11 +1,11 @@ # Bad manifest. No Id Name: MSIX SDK Version: 1.7.32 -InstallerType: Zip +InstallerType: Msi Publisher: Microsoft License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExe-NoSilent.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExe-NoSilent.yaml index 2d92cf4459..c00b11c0ce 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExe-NoSilent.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExe-NoSilent.yaml @@ -6,7 +6,7 @@ Publisher: Microsoft License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD InstallerType: Exe Switches: diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExe-NoSilentRoot.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExe-NoSilentRoot.yaml index f1afa2f35c..19649eed42 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExe-NoSilentRoot.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExe-NoSilentRoot.yaml @@ -8,7 +8,7 @@ Switches: Interactive: /i Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD InstallerType: Exe ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExeRoot-NoSilent.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExeRoot-NoSilent.yaml index dfea9f69b1..e65c0cc252 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExeRoot-NoSilent.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExeRoot-NoSilent.yaml @@ -7,7 +7,7 @@ InstallerType: Exe License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Switches: Interactive: /i diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExeRoot-NoSilentRoot.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExeRoot-NoSilentRoot.yaml index 821b7a3cbb..2008b97788 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExeRoot-NoSilentRoot.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeExeRoot-NoSilentRoot.yaml @@ -9,6 +9,6 @@ Switches: Interactive: /i Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeInvalid.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeInvalid.yaml index 946b8b17d5..ebb91b2574 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeInvalid.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeInvalid.yaml @@ -7,6 +7,6 @@ InstallerType: NotAType License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeMissing.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeMissing.yaml index fa5b41b33b..74d406ba0f 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeMissing.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeMissing.yaml @@ -6,6 +6,6 @@ Publisher: Microsoft License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeZip-MissingRelativeFilePath.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeZip-MissingRelativeFilePath.yaml new file mode 100644 index 0000000000..09512a4d39 --- /dev/null +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeZip-MissingRelativeFilePath.yaml @@ -0,0 +1,20 @@ +# Bad manifest. A nested installer file must have a RelativeFilePath specified. +PackageIdentifier: microsoft.msixsdk +PackageVersion: 1.0.0.0 +PackageLocale: en-US +PackageName: AppInstaller Test Installer +Publisher: Microsoft Corporation +Moniker: AICLITestExe +License: Test +ShortDescription: Test installer for zip without RelativeFilePath specified +Scope: User +Installers: + - Architecture: x64 + InstallerUrl: https://ThisIsNotUsed + InstallerType: zip + InstallerSha256: 65DB2F2AC2686C7F2FD69D4A4C6683B888DC55BFA20A0E32CA9F838B51689A3B + NestedInstallerType: exe + NestedInstallerFiles: + - PortableCommandAlias: portableCommandAlias +ManifestType: singleton +ManifestVersion: 1.3.0 \ No newline at end of file diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeZip-MultipleNestedInstallers.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeZip-MultipleNestedInstallers.yaml new file mode 100644 index 0000000000..327aad97f4 --- /dev/null +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeZip-MultipleNestedInstallers.yaml @@ -0,0 +1,23 @@ +# Bad manifest. Installer type zip should have exactly one NestedInstaller specified. +PackageIdentifier: microsoft.msixsdk +PackageVersion: 1.0.0.0 +PackageLocale: en-US +PackageName: AppInstaller Test Installer +Publisher: Microsoft Corporation +Moniker: AICLITestExe +License: Test +ShortDescription: Test installer for zip with too many nestedInstallers specified. +Scope: User +Installers: + - Architecture: x64 + InstallerUrl: https://ThisIsNotUsed + InstallerType: zip + InstallerSha256: 65DB2F2AC2686C7F2FD69D4A4C6683B888DC55BFA20A0E32CA9F838B51689A3B + NestedInstallerType: msi + NestedInstallerFiles: + - RelativeFilePath: relativeFilePath1 + PortableCommandAlias: portableCommandAlias1 + - RelativeFilePath: relativeFilePath2 + PortableCommandAlias: portableCommandAlias2 +ManifestType: singleton +ManifestVersion: 1.3.0 \ No newline at end of file diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeZip-NoNestedInstallerFile.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeZip-NoNestedInstallerFile.yaml new file mode 100644 index 0000000000..186563fc60 --- /dev/null +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeZip-NoNestedInstallerFile.yaml @@ -0,0 +1,18 @@ +# Bad manifest. Installer type zip should have exactly one NestedInstaller specified. +PackageIdentifier: microsoft.msixsdk +PackageVersion: 1.0.0.0 +PackageLocale: en-US +PackageName: AppInstaller Test Installer +Publisher: Microsoft Corporation +Moniker: AICLITestExe +License: Test +ShortDescription: Test installer for zip without nestedInstallers specified +Scope: User +Installers: + - Architecture: x64 + InstallerUrl: https://ThisIsNotUsed + InstallerType: zip + InstallerSha256: 65DB2F2AC2686C7F2FD69D4A4C6683B888DC55BFA20A0E32CA9F838B51689A3B + NestedInstallerType: exe +ManifestType: singleton +ManifestVersion: 1.3.0 \ No newline at end of file diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeZip-NoNestedInstallerType.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeZip-NoNestedInstallerType.yaml new file mode 100644 index 0000000000..835a367822 --- /dev/null +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerTypeZip-NoNestedInstallerType.yaml @@ -0,0 +1,20 @@ +# Bad manifest. Installer type zip should have exactly one NestedInstaller specified. +PackageIdentifier: microsoft.msixsdk +PackageVersion: 1.0.0.0 +PackageLocale: en-US +PackageName: AppInstaller Test Installer +Publisher: Microsoft Corporation +Moniker: AICLITestExe +License: Test +ShortDescription: Test installer for zip without nestedInstallers specified +Scope: User +Installers: + - Architecture: x64 + InstallerUrl: https://ThisIsNotUsed + InstallerType: zip + InstallerSha256: 65DB2F2AC2686C7F2FD69D4A4C6683B888DC55BFA20A0E32CA9F838B51689A3B + NestedInstallerFiles: + - RelativeFilePath: relativeFilePath + PortableCommandAlias: portableCommandAlias +ManifestType: singleton +ManifestVersion: 1.3.0 \ No newline at end of file diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness-DefaultScope.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness-DefaultScope.yaml index 1b14ac8bb0..6d4d240601 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness-DefaultScope.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness-DefaultScope.yaml @@ -3,14 +3,14 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Scope: user ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness-DefaultValues.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness-DefaultValues.yaml index 02e2f3fda9..a90a700edb 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness-DefaultValues.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness-DefaultValues.yaml @@ -3,13 +3,13 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness-SameLang.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness-SameLang.yaml index f60d9c4826..4a151a3df4 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness-SameLang.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness-SameLang.yaml @@ -3,15 +3,15 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Language: en-US - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Language: en-US ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness.yaml index 273b0c148b..41a7e47040 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallerUniqueness.yaml @@ -3,16 +3,16 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Language: en-US Scope: user - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Language: en-US Scope: user diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallersMissing.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallersMissing.yaml index bdadd2330f..f1c14fa923 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallersMissing.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InstallersMissing.yaml @@ -2,7 +2,7 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 -InstallerType: Zip +InstallerType: Msi Publisher: Microsoft License: Test ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InvalidLocale.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InvalidLocale.yaml index 4b8363c7b0..b871d8bb53 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InvalidLocale.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InvalidLocale.yaml @@ -3,12 +3,12 @@ PackageIdentifier: microsoft.msixsdk PackageVersion: 1.0.0 PackageName: MSIX SDK Publisher: Microsoft -InstallerType: zip +InstallerType: msi License: Test ShortDescription: Test invalid locale Installers: - Architecture: x86 - InstallerUrl: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + InstallerUrl: https://ThisIsNotUsed InstallerSha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD PackageLocale: In-val-id-Lo-ca-le diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InvalidManifestVersionValue.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InvalidManifestVersionValue.yaml index 0578e1242c..442fca2dc0 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InvalidManifestVersionValue.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InvalidManifestVersionValue.yaml @@ -3,10 +3,10 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.0.0.0 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0-invalid diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-InvalidUpdateBehavior.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-InvalidUpdateBehavior.yaml index 6ecf5e5caf..971601639e 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-InvalidUpdateBehavior.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-InvalidUpdateBehavior.yaml @@ -3,7 +3,7 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-LicenseMissing.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-LicenseMissing.yaml index 9bbe42ba29..370d03c710 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-LicenseMissing.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-LicenseMissing.yaml @@ -2,9 +2,9 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.07.32-beta Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-NameMissing.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-NameMissing.yaml index f57bac3e37..1ffe93dccd 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-NameMissing.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-NameMissing.yaml @@ -2,10 +2,10 @@ Id: microsoft.msixsdk Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-PackageFamilyNameOnMSI.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-PackageFamilyNameOnMSI.yaml index b8de09b515..793f9d5b52 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-PackageFamilyNameOnMSI.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-PackageFamilyNameOnMSI.yaml @@ -8,5 +8,5 @@ Installers: - Arch: x86 InstallerType: MSI PackageFamilyName: Foo_123456789abcd - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-ProductCodeOnMSIX.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-ProductCodeOnMSIX.yaml index 02b008dd2b..5eca4e7beb 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-ProductCodeOnMSIX.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-ProductCodeOnMSIX.yaml @@ -8,5 +8,5 @@ Installers: - Arch: x86 InstallerType: MSIX ProductCode: "{FOO}" - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-PublisherMissing.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-PublisherMissing.yaml index 6baf3801cf..4b8fe3de26 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-PublisherMissing.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-PublisherMissing.yaml @@ -6,6 +6,6 @@ InstallerType: Zip License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-Sha256Invalid.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-Sha256Invalid.yaml index 88caeb0a48..6257794f00 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-Sha256Invalid.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-Sha256Invalid.yaml @@ -3,10 +3,10 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B6 ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-Sha256Missing.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-Sha256Missing.yaml index 524c08ef5e..8b1a4ec9af 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-Sha256Missing.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-Sha256Missing.yaml @@ -3,9 +3,9 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-SwitchInvalid.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-SwitchInvalid.yaml index c1e0408a99..ff9b8f3bff 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-SwitchInvalid.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-SwitchInvalid.yaml @@ -3,12 +3,12 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Exe License: Test Switches: NotASwitch: /fakeswitch Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-UnknownProperty.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-UnknownProperty.yaml index cfce89ea23..e93ca84426 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-UnknownProperty.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-UnknownProperty.yaml @@ -3,11 +3,11 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Exe License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Fake: this is Fake ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-UnsupportedVersion.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-UnsupportedVersion.yaml index 78441d58c5..1333205904 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-UnsupportedVersion.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-UnsupportedVersion.yaml @@ -3,10 +3,10 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.0.0.0 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 1000.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-UrlInvalid.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-UrlInvalid.yaml index 74fa43f46e..f017954688 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-UrlInvalid.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-UrlInvalid.yaml @@ -3,7 +3,7 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-UrlMissing.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-UrlMissing.yaml index 50f158753a..ab94ad361e 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-UrlMissing.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-UrlMissing.yaml @@ -3,7 +3,7 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-VersionInvalid.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-VersionInvalid.yaml index 076e01adf4..691de47460 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-VersionInvalid.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-VersionInvalid.yaml @@ -3,10 +3,10 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.0.9-/ Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Bad-VersionMissing.yaml b/src/AppInstallerCLITests/TestData/Manifest-Bad-VersionMissing.yaml index 7437dabb85..ebb97a976c 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Bad-VersionMissing.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Bad-VersionMissing.yaml @@ -2,10 +2,10 @@ Id: microsoft.msixsdk Name: MSIX SDK Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Encoding-ANSI.yaml b/src/AppInstallerCLITests/TestData/Manifest-Encoding-ANSI.yaml index 0f99271971..c455f5450b 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Encoding-ANSI.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Encoding-ANSI.yaml @@ -1,11 +1,11 @@ Id: microsoft.msixsdk Name: MSIX SDK� Version: 1.7.32 -InstallerType: Zip +InstallerType: Msi Publisher: Microsoft License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16BE-BOM.yaml b/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16BE-BOM.yaml index 86d564d2f7..9bf20e165f 100644 Binary files a/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16BE-BOM.yaml and b/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16BE-BOM.yaml differ diff --git a/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16BE.yaml b/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16BE.yaml index 833719b573..9bf20e165f 100644 Binary files a/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16BE.yaml and b/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16BE.yaml differ diff --git a/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16LE-BOM.yaml b/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16LE-BOM.yaml index 5f94b302a1..1c8da8dca8 100644 Binary files a/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16LE-BOM.yaml and b/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16LE-BOM.yaml differ diff --git a/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16LE.yaml b/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16LE.yaml index 8cccbdb0e3..1c8da8dca8 100644 Binary files a/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16LE.yaml and b/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF16LE.yaml differ diff --git a/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF8-BOM.yaml b/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF8-BOM.yaml index ecbe01da31..cffcc7be18 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF8-BOM.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF8-BOM.yaml @@ -1,11 +1,11 @@ Id: microsoft.msixsdk Name: MSIX SDK© Version: 1.7.32 -InstallerType: Zip +InstallerType: Msi Publisher: Microsoft License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF8.yaml b/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF8.yaml index c08aa949c5..ddf0f11a2d 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF8.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Encoding-UTF8.yaml @@ -1,11 +1,11 @@ Id: microsoft.msixsdk Name: MSIX SDK© Version: 1.7.32 -InstallerType: Zip +InstallerType: Msi Publisher: Microsoft License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Good-InstallerUniqueness-DiffScope.yaml b/src/AppInstallerCLITests/TestData/Manifest-Good-InstallerUniqueness-DiffScope.yaml index fdb0d28c02..ebc515f23e 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Good-InstallerUniqueness-DiffScope.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Good-InstallerUniqueness-DiffScope.yaml @@ -3,15 +3,15 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Scope: user - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed2 Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Scope: machine ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Good-Installeruniqueness-DefaultLang.yaml b/src/AppInstallerCLITests/TestData/Manifest-Good-Installeruniqueness-DefaultLang.yaml index 1b9b434c2c..0d5449230a 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Good-Installeruniqueness-DefaultLang.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Good-Installeruniqueness-DefaultLang.yaml @@ -3,14 +3,14 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed2 Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Language: en-MX ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Good-Installeruniqueness-DiffLangs.yaml b/src/AppInstallerCLITests/TestData/Manifest-Good-Installeruniqueness-DiffLangs.yaml index a92a6fa20f..d8c77b6131 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Good-Installeruniqueness-DiffLangs.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Good-Installeruniqueness-DiffLangs.yaml @@ -3,15 +3,15 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Language: en-US - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed2 Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Language: es-MX ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Good-Minimum-InstallerType.yaml b/src/AppInstallerCLITests/TestData/Manifest-Good-Minimum-InstallerType.yaml index 83438809b1..542694ff72 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Good-Minimum-InstallerType.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Good-Minimum-InstallerType.yaml @@ -6,7 +6,7 @@ Publisher: Microsoft License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD - InstallerType: Zip + InstallerType: Msi ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Good-Minimum.yaml b/src/AppInstallerCLITests/TestData/Manifest-Good-Minimum.yaml index 46285ed8c0..3af364a7d4 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Good-Minimum.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Good-Minimum.yaml @@ -3,10 +3,10 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.07.32-beta Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD ManifestVersion: 0.1.0 diff --git a/src/AppInstallerCLITests/TestData/Manifest-Good-Switches.yaml b/src/AppInstallerCLITests/TestData/Manifest-Good-Switches.yaml index e7a43524e9..3247c8b89b 100644 --- a/src/AppInstallerCLITests/TestData/Manifest-Good-Switches.yaml +++ b/src/AppInstallerCLITests/TestData/Manifest-Good-Switches.yaml @@ -3,13 +3,13 @@ Id: microsoft.msixsdk Name: MSIX SDK Version: 1.7.32 Publisher: Microsoft -InstallerType: Zip +InstallerType: Msi License: Test Switches: SilentWithProgress: /sp Installers: - Arch: x86 - Url: https://rubengustorage.blob.core.windows.net/publiccontainer/msixsdk-x86.zip + Url: https://ThisIsNotUsed Sha256: 98B67758CEAFFCBB3FE47838FD0A8D7BD581C2650842D6B2B0E0D49A23270CCD Switches: Silent: /s diff --git a/src/AppInstallerCLITests/TestData/ManifestV1_3-Singleton.yaml b/src/AppInstallerCLITests/TestData/ManifestV1_3-Singleton.yaml index 20f6cafc42..f28bfc404e 100644 --- a/src/AppInstallerCLITests/TestData/ManifestV1_3-Singleton.yaml +++ b/src/AppInstallerCLITests/TestData/ManifestV1_3-Singleton.yaml @@ -103,6 +103,10 @@ ExpectedReturnCodes: ReturnResponseUrl: https://DefaultReturnResponseUrl.com UnsupportedArguments: - log +NestedInstallerType: msi +NestedInstallerFiles: + - RelativeFilePath: RelativeFilePath + PortableCommandAlias: PortableCommandAlias Installers: - Architecture: x86 diff --git a/src/AppInstallerCLITests/TestData/MultiFileManifestV1_3/ManifestV1_3-MultiFile-Installer.yaml b/src/AppInstallerCLITests/TestData/MultiFileManifestV1_3/ManifestV1_3-MultiFile-Installer.yaml index e25c322cd0..87a63c5c64 100644 --- a/src/AppInstallerCLITests/TestData/MultiFileManifestV1_3/ManifestV1_3-MultiFile-Installer.yaml +++ b/src/AppInstallerCLITests/TestData/MultiFileManifestV1_3/ManifestV1_3-MultiFile-Installer.yaml @@ -74,6 +74,10 @@ ExpectedReturnCodes: ReturnResponseUrl: https://DefaultReturnResponseUrl.com UnsupportedArguments: - log +NestedInstallerType: msi +NestedInstallerFiles: + - RelativeFilePath: RelativeFilePath + PortableCommandAlias: PortableCommandAlias Installers: - Architecture: x86 @@ -154,8 +158,18 @@ Installers: Commands: - standalone ExpectedReturnCodes: - - InstallerReturnCode: 11 - ReturnResponse: custom - ReturnResponseUrl: https://defaultReturnResponseUrl.com + - InstallerReturnCode: 11 + ReturnResponse: custom + ReturnResponseUrl: https://defaultReturnResponseUrl.com + - Architecture: x64 + InstallerType: zip + InstallerUrl: https://www.microsoft.com/msixsdk/msixsdkx64.exe + InstallerSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 + NestedInstallerType: portable + NestedInstallerFiles: + - RelativeFilePath: relativeFilePath1 + PortableCommandAlias: portableAlias1 + - RelativeFilePath: relativeFilePath2 + PortableCommandAlias: portableAlias2 ManifestType: installer ManifestVersion: 1.3.0 \ No newline at end of file diff --git a/src/AppInstallerCLITests/YamlManifest.cpp b/src/AppInstallerCLITests/YamlManifest.cpp index 785882758d..0fc4ec2d79 100644 --- a/src/AppInstallerCLITests/YamlManifest.cpp +++ b/src/AppInstallerCLITests/YamlManifest.cpp @@ -257,6 +257,10 @@ TEST_CASE("ReadBadManifests", "[ManifestValidation]") { "Manifest-Bad-InstallerTypePortable-InvalidAppsAndFeatures.yaml", "Only zero or one entry for Apps and Features may be specified for InstallerType portable." }, { "Manifest-Bad-InstallerTypePortable-InvalidCommands.yaml", "Only zero or one value for Commands may be specified for InstallerType portable." }, { "Manifest-Bad-InstallerTypePortable-InvalidScope.yaml", "Scope is not supported for InstallerType portable." }, + { "Manifest-Bad-InstallerTypeZip-MissingRelativeFilePath.yaml", "Required field missing. Field: RelativeFilePath" }, + { "Manifest-Bad-InstallerTypeZip-MultipleNestedInstallers.yaml", "Only one entry for NestedInstallerFiles can be specified for non-portable InstallerTypes." }, + { "Manifest-Bad-InstallerTypeZip-NoNestedInstallerFile.yaml", "Required field missing. Field: NestedInstallerFiles" }, + { "Manifest-Bad-InstallerTypeZip-NoNestedInstallerType.yaml", "Required field missing. Field: NestedInstallerType" }, { "Manifest-Bad-InstallerUniqueness.yaml", "Duplicate installer entry found." }, { "Manifest-Bad-InstallerUniqueness-DefaultScope.yaml", "Duplicate installer entry found." }, { "Manifest-Bad-InstallerUniqueness-DefaultValues.yaml", "Duplicate installer entry found." }, @@ -472,13 +476,25 @@ void VerifyV1ManifestContent(const Manifest& manifest, bool isSingleton, Manifes REQUIRE(manifest.DefaultInstallerInfo.UnsupportedArguments.at(0) == UnsupportedArgumentEnum::Log); } + if (manifestVer >= ManifestVer{ s_ManifestVersionV1_3 }) + { + REQUIRE(manifest.DefaultInstallerInfo.NestedInstallerType == InstallerTypeEnum::Msi); + REQUIRE(manifest.DefaultInstallerInfo.NestedInstallerFiles.size() == 1); + REQUIRE(manifest.DefaultInstallerInfo.NestedInstallerFiles.at(0).RelativeFilePath == "RelativeFilePath"); + REQUIRE(manifest.DefaultInstallerInfo.NestedInstallerFiles.at(0).PortableCommandAlias == "PortableCommandAlias"); + } + if (isSingleton) { REQUIRE(manifest.Installers.size() == 1); } else { - if (manifestVer >= ManifestVer{ s_ManifestVersionV1_2 }) + if (manifestVer >= ManifestVer{ s_ManifestVersionV1_3 }) + { + REQUIRE(manifest.Installers.size() == 4); + } + else if (manifestVer == ManifestVer{ s_ManifestVersionV1_2 }) { REQUIRE(manifest.Installers.size() == 3); } @@ -550,6 +566,13 @@ void VerifyV1ManifestContent(const Manifest& manifest, bool isSingleton, Manifes REQUIRE(installer1.UnsupportedArguments.at(0) == UnsupportedArgumentEnum::Location); } + if (manifestVer >= ManifestVer{ s_ManifestVersionV1_3 }) + { + // NestedInstaller metadata should not be populated unless the InstallerType is zip. + REQUIRE(installer1.NestedInstallerType == InstallerTypeEnum::Unknown); + REQUIRE(installer1.NestedInstallerFiles.size() == 0); + } + if (!isSingleton) { ManifestInstaller installer2 = manifest.Installers.at(1); @@ -597,6 +620,21 @@ void VerifyV1ManifestContent(const Manifest& manifest, bool isSingleton, Manifes REQUIRE(installer3.UnsupportedArguments.at(0) == UnsupportedArgumentEnum::Log); } + if (manifestVer >= ManifestVer{ s_ManifestVersionV1_3 }) + { + ManifestInstaller installer4 = manifest.Installers.at(3); + REQUIRE(installer4.InstallerType == InstallerTypeEnum::Zip); + REQUIRE(installer4.Arch == Architecture::X64); + REQUIRE(installer4.Url == "https://www.microsoft.com/msixsdk/msixsdkx64.exe"); + REQUIRE(installer4.Sha256 == SHA256::ConvertToBytes("69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82")); + REQUIRE(installer4.NestedInstallerType == InstallerTypeEnum::Portable); + REQUIRE(installer4.NestedInstallerFiles.size() == 2); + REQUIRE(installer4.NestedInstallerFiles.at(0).RelativeFilePath == "relativeFilePath1"); + REQUIRE(installer4.NestedInstallerFiles.at(0).PortableCommandAlias == "portableAlias1"); + REQUIRE(installer4.NestedInstallerFiles.at(1).RelativeFilePath == "relativeFilePath2"); + REQUIRE(installer4.NestedInstallerFiles.at(1).PortableCommandAlias == "portableAlias2"); + } + // Localization REQUIRE(manifest.Localizations.size() == 1); ManifestLocalization localization1 = manifest.Localizations.at(0); diff --git a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp index 90c85a1bd2..10b59cdad1 100644 --- a/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp +++ b/src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp @@ -460,6 +460,11 @@ namespace AppInstaller::Manifest ); } + bool IsArchiveType(InstallerTypeEnum installerType) + { + return (installerType == InstallerTypeEnum::Zip); + } + bool IsInstallerTypeCompatible(InstallerTypeEnum type1, InstallerTypeEnum type2) { // Unknown type cannot be compatible with any other diff --git a/src/AppInstallerCommonCore/Manifest/ManifestValidation.cpp b/src/AppInstallerCommonCore/Manifest/ManifestValidation.cpp index 0b53161481..45dfce434f 100644 --- a/src/AppInstallerCommonCore/Manifest/ManifestValidation.cpp +++ b/src/AppInstallerCommonCore/Manifest/ManifestValidation.cpp @@ -175,6 +175,30 @@ namespace AppInstaller::Manifest } } + if (IsArchiveType(installer.InstallerType)) + { + if (installer.NestedInstallerType == InstallerTypeEnum::Unknown) + { + resultErrors.emplace_back(ManifestError::RequiredFieldMissing, "NestedInstallerType"); + } + if (installer.NestedInstallerFiles.size() == 0) + { + resultErrors.emplace_back(ManifestError::RequiredFieldMissing, "NestedInstallerFiles"); + } + if (installer.NestedInstallerType != InstallerTypeEnum::Portable && installer.NestedInstallerFiles.size() != 1) + { + resultErrors.emplace_back(ManifestError::ExceededNestedInstallerFilesLimit, "NestedInstallerFiles"); + } + + for (const auto& nestedInstallerFile : installer.NestedInstallerFiles) + { + if (nestedInstallerFile.RelativeFilePath.empty()) + { + resultErrors.emplace_back(ManifestError::RequiredFieldMissing, "RelativeFilePath"); + } + } + } + // Check empty string before calling IsValidUrl to avoid duplicate error reporting. if (!installer.Url.empty() && IsValidURL(NULL, Utility::ConvertToUTF16(installer.Url).c_str(), 0) == S_FALSE) { diff --git a/src/AppInstallerCommonCore/Manifest/ManifestYamlPopulator.cpp b/src/AppInstallerCommonCore/Manifest/ManifestYamlPopulator.cpp index 2cacce455c..1f7e1764b9 100644 --- a/src/AppInstallerCommonCore/Manifest/ManifestYamlPopulator.cpp +++ b/src/AppInstallerCommonCore/Manifest/ManifestYamlPopulator.cpp @@ -307,6 +307,17 @@ namespace AppInstaller::Manifest std::move(fields_v1_2.begin(), fields_v1_2.end(), std::inserter(result, result.end())); } + + if (manifestVersion >= ManifestVer{ s_ManifestVersionV1_3 }) + { + std::vector fields_v1_3 = + { + { "NestedInstallerType", [this](const YAML::Node& value)->ValidationErrors { m_p_installer->NestedInstallerType = ConvertToInstallerTypeEnum(value.as()); return {}; } }, + { "NestedInstallerFiles", [this](const YAML::Node& value)->ValidationErrors { return ProcessNestedInstallerFilesNode(value); } }, + }; + + std::move(fields_v1_3.begin(), fields_v1_3.end(), std::inserter(result, result.end())); + } } return result; @@ -559,6 +570,22 @@ namespace AppInstaller::Manifest return result; } + std::vector ManifestYamlPopulator::GetNestedInstallerFileFieldProcessInfo(const ManifestVer& manifestVersion) + { + std::vector result = {}; + + if (manifestVersion >= ManifestVer{ s_ManifestVersionV1_3 }) + { + result = + { + { "RelativeFilePath", [this](const YAML::Node& value)->ValidationErrors { m_p_nestedInstallerFile->RelativeFilePath = Utility::Trim(value.as()); return {}; } }, + { "PortableCommandAlias", [this](const YAML::Node& value)->ValidationErrors { m_p_nestedInstallerFile->PortableCommandAlias = Utility::Trim(value.as()); return {}; } }, + }; + } + + return result; + } + ValidationErrors ManifestYamlPopulator::ValidateAndProcessFields( const YAML::Node& rootNode, const std::vector& fieldInfos) @@ -753,6 +780,30 @@ namespace AppInstaller::Manifest return resultErrors; } + ValidationErrors ManifestYamlPopulator::ProcessNestedInstallerFilesNode(const YAML::Node& nestedInstallerFilesNode) + { + THROW_HR_IF(E_INVALIDARG, !nestedInstallerFilesNode.IsSequence()); + + ValidationErrors resultErrors; + std::vector nestedInstallerFiles; + + for (auto const& entry : nestedInstallerFilesNode.Sequence()) + { + NestedInstallerFile nestedInstallerFile; + m_p_nestedInstallerFile = &nestedInstallerFile; + auto errors = ValidateAndProcessFields(entry, NestedInstallerFileFieldInfos); + std::move(errors.begin(), errors.end(), std::inserter(resultErrors, resultErrors.end())); + nestedInstallerFiles.emplace_back(std::move(nestedInstallerFile)); + } + + if (!nestedInstallerFiles.empty()) + { + m_p_installer->NestedInstallerFiles = nestedInstallerFiles; + } + + return resultErrors; + } + ValidationErrors ManifestYamlPopulator::PopulateManifestInternal( const YAML::Node& rootNode, Manifest& manifest, @@ -777,6 +828,7 @@ namespace AppInstaller::Manifest MarketsFieldInfos = GetMarketsFieldProcessInfo(manifestVersion); AppsAndFeaturesEntryFieldInfos = GetAppsAndFeaturesEntryFieldProcessInfo(manifestVersion); DocumentationFieldInfos = GetDocumentationFieldProcessInfo(manifestVersion); + NestedInstallerFileFieldInfos = GetNestedInstallerFileFieldProcessInfo(manifestVersion); // Populate root m_p_manifest = &manifest; @@ -800,6 +852,9 @@ namespace AppInstaller::Manifest installer.AppsAndFeaturesEntries.clear(); // Clear dependencies as installer overrides root dependencies installer.Dependencies.Clear(); + // Clear nested installers as it should only be copied for zip installerType. + installer.NestedInstallerType = InstallerTypeEnum::Unknown; + installer.NestedInstallerFiles.clear(); m_p_installer = &installer; auto errors = ValidateAndProcessFields(entry, InstallerFieldInfos); @@ -821,6 +876,19 @@ namespace AppInstaller::Manifest installer.AppsAndFeaturesEntries = manifest.DefaultInstallerInfo.AppsAndFeaturesEntries; } + if (IsArchiveType(installer.InstallerType)) + { + if (installer.NestedInstallerFiles.empty()) + { + installer.NestedInstallerFiles = manifest.DefaultInstallerInfo.NestedInstallerFiles; + } + + if (installer.NestedInstallerType == InstallerTypeEnum::Unknown) + { + installer.NestedInstallerType = manifest.DefaultInstallerInfo.NestedInstallerType; + } + } + // If there are no dependencies on installer use default ones if (!installer.Dependencies.HasAny()) { diff --git a/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h b/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h index fe440f9142..6eb8d78af0 100644 --- a/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h +++ b/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h @@ -247,6 +247,12 @@ namespace AppInstaller::Manifest std::vector ExcludedMarkets; }; + struct NestedInstallerFile + { + string_t RelativeFilePath; + string_t PortableCommandAlias; + }; + InstallerTypeEnum ConvertToInstallerTypeEnum(const std::string& in); UpdateBehaviorEnum ConvertToUpdateBehaviorEnum(const std::string& in); @@ -281,6 +287,9 @@ namespace AppInstaller::Manifest // Gets a value indicating whether the given installer type supports ARP version range. bool DoesInstallerTypeSupportArpVersionRange(InstallerTypeEnum installerType); + // Gets a value indicating whether the given installer type is an archive. + bool IsArchiveType(InstallerTypeEnum installerType); + // Checks whether 2 installer types are compatible. E.g. inno and exe are update compatible bool IsInstallerTypeCompatible(InstallerTypeEnum type1, InstallerTypeEnum type2); diff --git a/src/AppInstallerCommonCore/Public/winget/ManifestInstaller.h b/src/AppInstallerCommonCore/Public/winget/ManifestInstaller.h index d02a3847c7..ed84cd3eb8 100644 --- a/src/AppInstallerCommonCore/Public/winget/ManifestInstaller.h +++ b/src/AppInstallerCommonCore/Public/winget/ManifestInstaller.h @@ -42,6 +42,10 @@ namespace AppInstaller::Manifest // If present, has more precedence than root InstallerTypeEnum InstallerType = InstallerTypeEnum::Unknown; + InstallerTypeEnum NestedInstallerType = InstallerTypeEnum::Unknown; + + std::vector NestedInstallerFiles; + ScopeEnum Scope = ScopeEnum::Unknown; std::vector InstallModes; diff --git a/src/AppInstallerCommonCore/Public/winget/ManifestValidation.h b/src/AppInstallerCommonCore/Public/winget/ManifestValidation.h index 86599c1b3e..47d8da5d5d 100644 --- a/src/AppInstallerCommonCore/Public/winget/ManifestValidation.h +++ b/src/AppInstallerCommonCore/Public/winget/ManifestValidation.h @@ -58,6 +58,7 @@ namespace AppInstaller::Manifest const char* const ApproximateVersionNotAllowed = "Approximate version not allowed."; const char* const ArpVersionOverlapWithIndex = "DisplayVersion declared in the manifest has overlap with existing DisplayVersion range in the index. Existing DisplayVersion range in index: "; const char* const ArpVersionValidationInternalError = "Internal error while validating DisplayVersion against index."; + const char* const ExceededNestedInstallerFilesLimit = "Only one entry for NestedInstallerFiles can be specified for non-portable InstallerTypes."; } struct ValidationError diff --git a/src/AppInstallerCommonCore/Public/winget/ManifestYamlPopulator.h b/src/AppInstallerCommonCore/Public/winget/ManifestYamlPopulator.h index 16323d7464..53606a7d5e 100644 --- a/src/AppInstallerCommonCore/Public/winget/ManifestYamlPopulator.h +++ b/src/AppInstallerCommonCore/Public/winget/ManifestYamlPopulator.h @@ -42,6 +42,7 @@ namespace AppInstaller::Manifest std::vector MarketsFieldInfos; std::vector AppsAndFeaturesEntryFieldInfos; std::vector DocumentationFieldInfos; + std::vector NestedInstallerFileFieldInfos; // These pointers are referenced in the processing functions in manifest field process info table. AppInstaller::Manifest::Manifest* m_p_manifest = nullptr; @@ -55,6 +56,7 @@ namespace AppInstaller::Manifest AppInstaller::Manifest::MarketsInfo* m_p_markets = nullptr; AppInstaller::Manifest::AppsAndFeaturesEntry* m_p_appsAndFeaturesEntry = nullptr; AppInstaller::Manifest::Documentation* m_p_documentation = nullptr; + AppInstaller::Manifest::NestedInstallerFile* m_p_nestedInstallerFile = nullptr; // Cache of Installers node and Localization node YAML::Node const* m_p_installersNode = nullptr; @@ -71,6 +73,7 @@ namespace AppInstaller::Manifest std::vector GetMarketsFieldProcessInfo(const ManifestVer& manifestVersion); std::vector GetAppsAndFeaturesEntryFieldProcessInfo(const ManifestVer& manifestVersion); std::vector GetDocumentationFieldProcessInfo(const ManifestVer& manifestVersion); + std::vector GetNestedInstallerFileFieldProcessInfo(const ManifestVer& manifestVersion); // This method takes YAML root node and list of manifest field info. // Yaml lib does not support case insensitive search and it allows duplicate keys. If duplicate keys exist, @@ -86,7 +89,8 @@ namespace AppInstaller::Manifest std::vector ProcessMarketsNode(const YAML::Node& marketsNode); std::vector ProcessAppsAndFeaturesEntriesNode(const YAML::Node& appsAndFeaturesEntriesNode); std::vector ProcessExpectedReturnCodesNode(const YAML::Node& returnCodesNode); - std::vector ProcessDocumentationsNode(const YAML::Node& documentations); + std::vector ProcessDocumentationsNode(const YAML::Node& documentationsNode); + std::vector ProcessNestedInstallerFilesNode(const YAML::Node& nestedInstallerFilesNode); std::vector PopulateManifestInternal( const YAML::Node& rootNode,