diff options
7 files changed, 38 insertions, 37 deletions
diff --git a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs index cd0590d0..d001bf50 100644 --- a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs | |||
@@ -290,20 +290,6 @@ namespace WixToolset.Core.Burn | |||
290 | { | 290 | { |
291 | foreach (var payload in payloadSymbols.Values.Where(p => BurnConstants.BurnUXContainerName == p.ContainerRef)) | 291 | foreach (var payload in payloadSymbols.Values.Where(p => BurnConstants.BurnUXContainerName == p.ContainerRef)) |
292 | { | 292 | { |
293 | // In theory, UX payloads could be embedded in the UX CAB, external to the bundle EXE, or even | ||
294 | // downloaded. The current engine requires the UX to be fully present before any downloading starts, | ||
295 | // so that rules out downloading. Also, the burn engine does not currently copy external UX payloads | ||
296 | // into the temporary UX directory correctly, so we don't allow external either. | ||
297 | if (payload.SourceFile is null) | ||
298 | { | ||
299 | this.Messaging.Write(BurnBackendErrors.BAContainerCannotContainRemotePayload(payload.SourceLineNumbers, payload.Name)); | ||
300 | } | ||
301 | else if (PackagingType.Embedded != payload.Packaging) | ||
302 | { | ||
303 | this.Messaging.Write(WarningMessages.UxPayloadsOnlySupportEmbedding(payload.SourceLineNumbers, payload.SourceFile.Path)); | ||
304 | payload.Packaging = PackagingType.Embedded; | ||
305 | } | ||
306 | |||
307 | payload.EmbeddedId = String.Format(CultureInfo.InvariantCulture, BurnCommon.BurnUXContainerEmbeddedIdFormat, uxPayloadIndex); | 293 | payload.EmbeddedId = String.Format(CultureInfo.InvariantCulture, BurnCommon.BurnUXContainerEmbeddedIdFormat, uxPayloadIndex); |
308 | ++uxPayloadIndex; | 294 | ++uxPayloadIndex; |
309 | } | 295 | } |
diff --git a/src/wix/WixToolset.Core.Burn/BurnBackendErrors.cs b/src/wix/WixToolset.Core.Burn/BurnBackendErrors.cs index cc3a998f..04290667 100644 --- a/src/wix/WixToolset.Core.Burn/BurnBackendErrors.cs +++ b/src/wix/WixToolset.Core.Burn/BurnBackendErrors.cs | |||
@@ -95,11 +95,6 @@ namespace WixToolset.Core.Burn | |||
95 | return Message(sourceLineNumbers, Ids.InvalidBundleManifest, "Unable to read bundle executable '{0}'. Its manifest is invalid. {1}", bundleExecutable, reason); | 95 | return Message(sourceLineNumbers, Ids.InvalidBundleManifest, "Unable to read bundle executable '{0}'. Its manifest is invalid. {1}", bundleExecutable, reason); |
96 | } | 96 | } |
97 | 97 | ||
98 | public static Message BAContainerCannotContainRemotePayload(SourceLineNumber sourceLineNumbers, string payloadName) | ||
99 | { | ||
100 | return Message(sourceLineNumbers, Ids.BAContainerCannotContainRemotePayload, "Bootstrapper application and bundle extension payloads must be embedded in the bundle. The payload '{0}' is remote thus cannot be found for embedding. Provide a full path to the payload via the Payload/@SourceFile attribute.", payloadName); | ||
101 | } | ||
102 | |||
103 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | 98 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) |
104 | { | 99 | { |
105 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); | 100 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); |
@@ -121,7 +116,6 @@ namespace WixToolset.Core.Burn | |||
121 | FailedToAddIconOrSplashScreenToBundle = 8011, | 116 | FailedToAddIconOrSplashScreenToBundle = 8011, |
122 | InvalidBundleManifest = 8012, | 117 | InvalidBundleManifest = 8012, |
123 | BundleMultipleProviders = 8013, | 118 | BundleMultipleProviders = 8013, |
124 | BAContainerCannotContainRemotePayload = 8014, | ||
125 | } // last available is 8499. 8500 is BurnBackendWarnings. | 119 | } // last available is 8499. 8500 is BurnBackendWarnings. |
126 | } | 120 | } |
127 | } | 121 | } |
diff --git a/src/wix/WixToolset.Core/Link/FlattenAndProcessBundleTablesCommand.cs b/src/wix/WixToolset.Core/Link/FlattenAndProcessBundleTablesCommand.cs index 6c1c0cf3..48b2286d 100644 --- a/src/wix/WixToolset.Core/Link/FlattenAndProcessBundleTablesCommand.cs +++ b/src/wix/WixToolset.Core/Link/FlattenAndProcessBundleTablesCommand.cs | |||
@@ -171,11 +171,32 @@ namespace WixToolset.Core.Link | |||
171 | { | 171 | { |
172 | if (payloadSymbol.Compressed == false) | 172 | if (payloadSymbol.Compressed == false) |
173 | { | 173 | { |
174 | this.Messaging.Write(LinkerWarnings.UncompressedPayloadInContainer(payloadSymbol.SourceLineNumbers, groupSymbol.ChildId, containerId)); | 174 | if (containerId == BurnConstants.BurnUXContainerName) |
175 | { | ||
176 | // In theory, UX payloads could be embedded in the UX CAB, external to the bundle EXE, or even | ||
177 | // downloaded. The current engine requires the UX to be fully present before any downloading starts, | ||
178 | // so that rules out downloading. Also, the burn engine does not currently copy external UX payloads | ||
179 | // into the temporary UX directory correctly, so we don't allow external either. | ||
180 | if (payloadSymbol.SourceFile is null) | ||
181 | { | ||
182 | this.Messaging.Write(LinkerErrors.BAContainerCannotContainRemotePayload(payloadSymbol.SourceLineNumbers, payloadSymbol.Name)); | ||
183 | } | ||
184 | else if (PackagingType.Embedded != payloadSymbol.Packaging) | ||
185 | { | ||
186 | this.Messaging.Write(WarningMessages.UxPayloadsOnlySupportEmbedding(payloadSymbol.SourceLineNumbers, payloadSymbol.SourceFile.Path)); | ||
187 | payloadSymbol.Packaging = PackagingType.Embedded; | ||
188 | } | ||
189 | } | ||
190 | else | ||
191 | { | ||
192 | this.Messaging.Write(LinkerErrors.UncompressedPayloadInContainer(payloadSymbol.SourceLineNumbers, groupSymbol.ChildId, containerId)); | ||
193 | } | ||
194 | } | ||
195 | else | ||
196 | { | ||
197 | payloadSymbol.Compressed = true; | ||
198 | payloadSymbol.ContainerRef = containerId; | ||
175 | } | 199 | } |
176 | |||
177 | payloadSymbol.Compressed = true; | ||
178 | payloadSymbol.ContainerRef = containerId; | ||
179 | } | 200 | } |
180 | else | 201 | else |
181 | { | 202 | { |
diff --git a/src/wix/WixToolset.Core/LinkerErrors.cs b/src/wix/WixToolset.Core/LinkerErrors.cs index 7ce8c00e..1d9a5a07 100644 --- a/src/wix/WixToolset.Core/LinkerErrors.cs +++ b/src/wix/WixToolset.Core/LinkerErrors.cs | |||
@@ -31,6 +31,16 @@ namespace WixToolset.Core | |||
31 | return Message(sourceLineNumbers, Ids.UnscheduledRollbackBoundary, "Found orphaned RollbackBoundary '{0}'. Make sure to reference it from the Chain or move it into its own Fragment so it only gets linked in when actually used.", rollbackBoundaryId); | 31 | return Message(sourceLineNumbers, Ids.UnscheduledRollbackBoundary, "Found orphaned RollbackBoundary '{0}'. Make sure to reference it from the Chain or move it into its own Fragment so it only gets linked in when actually used.", rollbackBoundaryId); |
32 | } | 32 | } |
33 | 33 | ||
34 | public static Message BAContainerCannotContainRemotePayload(SourceLineNumber sourceLineNumbers, string payloadName) | ||
35 | { | ||
36 | return Message(sourceLineNumbers, Ids.BAContainerCannotContainRemotePayload, "Bootstrapper application and bundle extension payloads must be embedded in the bundle. The payload '{0}' is remote thus cannot be found for embedding. Provide a full path to the payload via the Payload/@SourceFile attribute.", payloadName); | ||
37 | } | ||
38 | |||
39 | public static Message UncompressedPayloadInContainer(SourceLineNumber sourceLineNumbers, string payloadId, string containerId) | ||
40 | { | ||
41 | return Message(sourceLineNumbers, Ids.UncompressedPayloadInContainer, "The payload '{0}' is uncompressed and cannot be added to container '{1}'. Remove its Compressed attribute and provide a @SourceFile value to allow it to be added to a container.", payloadId, containerId); | ||
42 | } | ||
43 | |||
34 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | 44 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) |
35 | { | 45 | { |
36 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); | 46 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); |
@@ -43,6 +53,8 @@ namespace WixToolset.Core | |||
43 | PayloadSharedWithBA = 7002, | 53 | PayloadSharedWithBA = 7002, |
44 | UnscheduledChainPackage = 7003, | 54 | UnscheduledChainPackage = 7003, |
45 | UnscheduledRollbackBoundary = 7004, | 55 | UnscheduledRollbackBoundary = 7004, |
56 | UncompressedPayloadInContainer = 7005, | ||
57 | BAContainerCannotContainRemotePayload = 7006, | ||
46 | } // last available is 7099. 7100 is WindowsInstallerBackendWarnings. | 58 | } // last available is 7099. 7100 is WindowsInstallerBackendWarnings. |
47 | } | 59 | } |
48 | } | 60 | } |
diff --git a/src/wix/WixToolset.Core/LinkerWarnings.cs b/src/wix/WixToolset.Core/LinkerWarnings.cs index 968fa4ea..0eca090e 100644 --- a/src/wix/WixToolset.Core/LinkerWarnings.cs +++ b/src/wix/WixToolset.Core/LinkerWarnings.cs | |||
@@ -16,11 +16,6 @@ namespace WixToolset.Core | |||
16 | return Message(sourceLineNumbers, Ids.PayloadInMultipleContainers, "The Payload '{0}' can't be added to Container '{1}' because it was already added to Container '{2}'.", payloadId, containerId1, containerId2); | 16 | return Message(sourceLineNumbers, Ids.PayloadInMultipleContainers, "The Payload '{0}' can't be added to Container '{1}' because it was already added to Container '{2}'.", payloadId, containerId1, containerId2); |
17 | } | 17 | } |
18 | 18 | ||
19 | public static Message UncompressedPayloadInContainer(SourceLineNumber sourceLineNumbers, string payloadId, string containerId) | ||
20 | { | ||
21 | return Message(sourceLineNumbers, Ids.UncompressedPayloadInContainer, "The Payload '{0}' is being added to Container '{1}', overriding its Compressed value of 'no'.", payloadId, containerId); | ||
22 | } | ||
23 | |||
24 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | 19 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) |
25 | { | 20 | { |
26 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); | 21 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); |
@@ -30,7 +25,6 @@ namespace WixToolset.Core | |||
30 | { | 25 | { |
31 | LayoutPayloadInContainer = 6900, | 26 | LayoutPayloadInContainer = 6900, |
32 | PayloadInMultipleContainers = 6901, | 27 | PayloadInMultipleContainers = 6901, |
33 | UncompressedPayloadInContainer = 6902, | ||
34 | } // last available is 6999. 7000 is LinkerErrors. | 28 | } // last available is 6999. 7000 is LinkerErrors. |
35 | } | 29 | } |
36 | } | 30 | } |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs index 58357ca9..cd27ff14 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs | |||
@@ -169,11 +169,6 @@ namespace WixToolsetTest.CoreIntegration | |||
169 | 169 | ||
170 | result.AssertSuccess(); | 170 | result.AssertSuccess(); |
171 | 171 | ||
172 | WixAssert.CompareLineByLine(new[] | ||
173 | { | ||
174 | "The Payload 'burn.exe' is being added to Container 'PackagesContainer', overriding its Compressed value of 'no'.", | ||
175 | }, result.Messages.Select(m => m.ToString()).ToArray()); | ||
176 | |||
177 | Assert.True(File.Exists(bundlePath)); | 172 | Assert.True(File.Exists(bundlePath)); |
178 | 173 | ||
179 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); | 174 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); |
@@ -277,7 +272,6 @@ namespace WixToolsetTest.CoreIntegration | |||
277 | 272 | ||
278 | WixAssert.CompareLineByLine(new[] | 273 | WixAssert.CompareLineByLine(new[] |
279 | { | 274 | { |
280 | "The Payload 'RemotePayload' is being added to Container 'WixUXContainer', overriding its Compressed value of 'no'.", | ||
281 | "Bootstrapper application and bundle extension payloads must be embedded in the bundle. The payload 'someremotefile.txt' is remote thus cannot be found for embedding. Provide a full path to the payload via the Payload/@SourceFile attribute." | 275 | "Bootstrapper application and bundle extension payloads must be embedded in the bundle. The payload 'someremotefile.txt' is remote thus cannot be found for embedding. Provide a full path to the payload via the Payload/@SourceFile attribute." |
282 | }, result.Messages.Select(m => m.ToString()).ToArray()); | 276 | }, result.Messages.Select(m => m.ToString()).ToArray()); |
283 | } | 277 | } |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/Payload/DownloadUrlPlaceholdersBundle.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/Payload/DownloadUrlPlaceholdersBundle.wxs index f077c418..f964f526 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/Payload/DownloadUrlPlaceholdersBundle.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/Payload/DownloadUrlPlaceholdersBundle.wxs | |||
@@ -14,7 +14,7 @@ | |||
14 | </Bundle> | 14 | </Bundle> |
15 | <Fragment> | 15 | <Fragment> |
16 | <PackageGroup Id="ContainerPackages"> | 16 | <PackageGroup Id="ContainerPackages"> |
17 | <ExePackage SourceFile="burn.exe" DetectCondition="none" UninstallArguments="-u" Compressed="no" /> | 17 | <ExePackage SourceFile="burn.exe" DetectCondition="none" UninstallArguments="-u" /> |
18 | </PackageGroup> | 18 | </PackageGroup> |
19 | </Fragment> | 19 | </Fragment> |
20 | <Fragment> | 20 | <Fragment> |