|
1 | | -PackageIdentifier: TestPublisher.OverrideInstallerFields |
| 1 | +PackageIdentifier: TestPublisher.RetainInstallerFields |
2 | 2 | PackageVersion: 0.1.2 |
3 | | -PackageName: Override installer level fields by root fields |
| 3 | +PackageName: Retain installer level fields when copying over root values |
4 | 4 | Publisher: Test publisher |
5 | 5 | License: MIT |
6 | | -ShortDescription: A manifest that verifies that installer level fields are overridden by root fields. |
| 6 | +ShortDescription: A manifest that verifies that non-null installer level fields are not overwritten by root fields. |
7 | 7 | Description: |- |
8 | 8 | Expected flow: |
9 | 9 |
|
10 | | - 1) Installer level fields are overridden by root fields at the start of the update. |
11 | | - 2) The update flow modifies the installer level fields if needed. (e.g. ProductCode in case of MSI upgrade) |
12 | | - 3) At the end of the update, the common installer fields are moved to the root level. |
| 10 | + 1) For the first installer, all root level fields are copied over and root fields are set to null. |
| 11 | + 2) For the second installer, installer level fields are preserved since they are not null. |
| 12 | + 3) InstallerType and NestedInstallerType are common across both installers, so they are moved to the root level at the end of the update. |
| 13 | +
|
| 14 | + TODO: Use different NestedInstallerType and RelativeFilePath for each installer once logic for handling multiple nested installers is improved. |
| 15 | + Reference: https://github.com/microsoft/winget-create/issues/392 |
13 | 16 | InstallerLocale: en-US |
14 | 17 | InstallerType: zip |
15 | 18 | NestedInstallerType: exe |
16 | 19 | NestedInstallerFiles: |
17 | 20 | - RelativeFilePath: WingetCreateTestExeInstaller.exe |
18 | | - PortableCommandAlias: PortableCommandAlias1 |
| 21 | + PortableCommandAlias: TestAlias |
19 | 22 | AppsAndFeaturesEntries: |
20 | 23 | - DisplayName: TestDisplayName1 |
21 | 24 | Publisher: TestPublisher1 |
@@ -78,80 +81,16 @@ InstallationMetadata: |
78 | 81 | InvocationParameter: "/arg1" |
79 | 82 | Installers: |
80 | 83 | - Architecture: x64 |
81 | | - InstallerType: zip |
82 | 84 | InstallerUrl: https://fakedomain.com/WingetCreateTestZipInstaller.zip |
83 | 85 | InstallerSha256: 8A052767127A6E2058BAAE03B551A807777BB1B726650E2C7E92C3E92C8DF80D |
84 | | - NestedInstallerType: msi |
85 | | - NestedInstallerFiles: |
86 | | - - RelativeFilePath: WingetCreateTestExeInstaller.exe |
87 | | - PortableCommandAlias: PortableCommandAlias2 |
88 | | - AppsAndFeaturesEntries: |
89 | | - - DisplayName: TestDisplayName2 |
90 | | - Publisher: TestPublisher2 |
91 | | - DisplayVersion: 1.0.2 |
92 | | - ProductCode: TestProductCode2 |
93 | | - UpgradeCode: TestUpgradeCode2 |
94 | | - InstallerType: exe |
95 | | - InstallerSwitches: |
96 | | - Silent: /silent2 |
97 | | - SilentWithProgress: /silentwithprogress2 |
98 | | - Dependencies: |
99 | | - PackageDependencies: |
100 | | - - PackageIdentifier: TestPackageDependency2 |
101 | | - MinimumVersion: 1.0.2 |
102 | | - WindowsFeatures: |
103 | | - - TestWindowsFeature2 |
104 | | - ExternalDependencies: |
105 | | - - TestExternalDependency2 |
106 | | - WindowsLibraries: |
107 | | - - TestWindowsLibrary2 |
108 | | - ExpectedReturnCodes: |
109 | | - - InstallerReturnCode: 1002 |
110 | | - ReturnResponse: installInProgress |
111 | | - MinimumOSVersion: 10.0.17763.0 |
112 | | - PackageFamilyName: TestPackageFamilyName2 |
113 | | - Platform: |
114 | | - - Windows.Universal |
115 | | - Scope: user |
116 | | - UpgradeBehavior: uninstallPrevious |
117 | | - ElevationRequirement: elevatesSelf |
118 | | - Commands: |
119 | | - - fakeCommand2 |
120 | | - Protocols: |
121 | | - - fakeProtocol2 |
122 | | - FileExtensions: |
123 | | - - .msi |
124 | | - # Uncomment when installer model gets updated to support these fields |
125 | | - #Markets: |
126 | | - # AllowedMarkets: |
127 | | - # - fakeAllowedMarket |
128 | | - # ExcludedMarkets: |
129 | | - # - fakeExcludedMarket |
130 | | - InstallerAbortsTerminal: false |
131 | | - InstallLocationRequired: false |
132 | | - RequireExplicitUpgrade: false |
133 | | - UnsupportedOSArchitectures: |
134 | | - - arm |
135 | | - DisplayInstallWarnings: false |
136 | | - InstallerSuccessCodes: |
137 | | - - 2 |
138 | | - UnsupportedArguments: |
139 | | - - log |
140 | | - InstallationMetadata: |
141 | | - DefaultInstallLocation: "%ProgramFiles%\\TestApp2" |
142 | | - Files: |
143 | | - - RelativeFilePath: "main2.exe" |
144 | | - FileSha256: 69D84CA8899800A5575CE31798293CD4FEBAB1D734A07C2E51E56A28E0DF8C82 |
145 | | - FileType: launch |
146 | | - InvocationParameter: "/arg2" |
147 | 86 | - Architecture: x86 |
148 | 87 | InstallerType: zip |
149 | 88 | InstallerUrl: https://fakedomain.com/WingetCreateTestZipInstaller.zip |
150 | 89 | InstallerSha256: 8A052767127A6E2058BAAE03B551A807777BB1B726650E2C7E92C3E92C8DF80D |
151 | | - NestedInstallerType: msi |
| 90 | + NestedInstallerType: exe |
152 | 91 | NestedInstallerFiles: |
153 | 92 | - RelativeFilePath: WingetCreateTestExeInstaller.exe |
154 | | - PortableCommandAlias: PortableCommandAlias2 |
| 93 | + PortableCommandAlias: TestAlias |
155 | 94 | AppsAndFeaturesEntries: |
156 | 95 | - DisplayName: TestDisplayName2 |
157 | 96 | Publisher: TestPublisher2 |
@@ -188,7 +127,7 @@ Installers: |
188 | 127 | - fakeProtocol2 |
189 | 128 | FileExtensions: |
190 | 129 | - .msi |
191 | | - # Uncomment when installer model gets updated to support these fields |
| 130 | + # TODO: Uncomment when installer model gets updated to support these fields |
192 | 131 | #Markets: |
193 | 132 | # AllowedMarkets: |
194 | 133 | # - fakeAllowedMarket |
|
0 commit comments