diff options
Diffstat (limited to 'src/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs')
| -rw-r--r-- | src/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs b/src/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs index 7b5984c0..f020ed84 100644 --- a/src/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs +++ b/src/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | namespace WixToolset.Core.Burn.Bundles | 3 | namespace WixToolset.Core.Burn.Bundles |
| 4 | { | 4 | { |
| 5 | using System; | ||
| 5 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 6 | using System.Diagnostics; | 7 | using System.Diagnostics; |
| 7 | using System.IO; | 8 | using System.IO; |
| @@ -14,10 +15,10 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 14 | 15 | ||
| 15 | internal class CreateNonUXContainers | 16 | internal class CreateNonUXContainers |
| 16 | { | 17 | { |
| 17 | public CreateNonUXContainers(IBackendHelper backendHelper, IntermediateSection section, WixBootstrapperApplicationDllSymbol bootstrapperApplicationDllSymbol, IEnumerable<WixBundleContainerSymbol> containerSymbols, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols, string intermediateFolder, string layoutFolder, CompressionLevel? defaultCompressionLevel) | 18 | public CreateNonUXContainers(IBackendHelper backendHelper, IMessaging messaging, WixBootstrapperApplicationDllSymbol bootstrapperApplicationDllSymbol, IEnumerable<WixBundleContainerSymbol> containerSymbols, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols, string intermediateFolder, string layoutFolder, CompressionLevel? defaultCompressionLevel) |
| 18 | { | 19 | { |
| 19 | this.BackendHelper = backendHelper; | 20 | this.BackendHelper = backendHelper; |
| 20 | this.Section = section; | 21 | this.Messaging = messaging; |
| 21 | this.BootstrapperApplicationDllSymbol = bootstrapperApplicationDllSymbol; | 22 | this.BootstrapperApplicationDllSymbol = bootstrapperApplicationDllSymbol; |
| 22 | this.Containers = containerSymbols; | 23 | this.Containers = containerSymbols; |
| 23 | this.PayloadSymbols = payloadSymbols; | 24 | this.PayloadSymbols = payloadSymbols; |
| @@ -38,7 +39,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 38 | 39 | ||
| 39 | private IBackendHelper BackendHelper { get; } | 40 | private IBackendHelper BackendHelper { get; } |
| 40 | 41 | ||
| 41 | private IntermediateSection Section { get; } | 42 | private IMessaging Messaging { get; } |
| 42 | 43 | ||
| 43 | private WixBootstrapperApplicationDllSymbol BootstrapperApplicationDllSymbol { get; } | 44 | private WixBootstrapperApplicationDllSymbol BootstrapperApplicationDllSymbol { get; } |
| 44 | 45 | ||
| @@ -70,7 +71,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 70 | { | 71 | { |
| 71 | if (containerId != BurnConstants.BurnDefaultAttachedContainerName) | 72 | if (containerId != BurnConstants.BurnDefaultAttachedContainerName) |
| 72 | { | 73 | { |
| 73 | // TODO: display warning that we're ignoring container that ended up with no paylods in it. | 74 | this.Messaging.Write(BurnBackendWarnings.EmptyContainer(container.SourceLineNumbers, containerId)); |
| 74 | } | 75 | } |
| 75 | } | 76 | } |
| 76 | else if (BurnConstants.BurnUXContainerName == containerId) | 77 | else if (BurnConstants.BurnUXContainerName == containerId) |
| @@ -113,8 +114,22 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 113 | container.AttachedContainerIndex = attachedContainerIndex; | 114 | container.AttachedContainerIndex = attachedContainerIndex; |
| 114 | ++attachedContainerIndex; | 115 | ++attachedContainerIndex; |
| 115 | } | 116 | } |
| 117 | } | ||
| 118 | } | ||
| 116 | 119 | ||
| 117 | this.CreateContainer(container, containerPayloads); | 120 | foreach (var container in this.Containers.Where(c => !String.IsNullOrEmpty(c.WorkingPath) && c.Id.Id != BurnConstants.BurnUXContainerName)) |
| 121 | { | ||
| 122 | if (container.Type == ContainerType.Attached && attachedContainerIndex > 2 && container.Id.Id != BurnConstants.BurnDefaultAttachedContainerName) | ||
| 123 | { | ||
| 124 | this.Messaging.Write(BurnBackendErrors.MultipleAttachedContainersUnsupported(container.SourceLineNumbers, container.Id.Id)); | ||
| 125 | } | ||
| 126 | } | ||
| 127 | |||
| 128 | if (!this.Messaging.EncounteredError) | ||
| 129 | { | ||
| 130 | foreach (var container in this.Containers.Where(c => !String.IsNullOrEmpty(c.WorkingPath) && c.Id.Id != BurnConstants.BurnUXContainerName)) | ||
| 131 | { | ||
| 132 | this.CreateContainer(container, payloadsByContainer[container.Id.Id]); | ||
| 118 | trackedFiles.Add(this.BackendHelper.TrackFile(container.WorkingPath, TrackedFileType.Temporary, container.SourceLineNumbers)); | 133 | trackedFiles.Add(this.BackendHelper.TrackFile(container.WorkingPath, TrackedFileType.Temporary, container.SourceLineNumbers)); |
| 119 | } | 134 | } |
| 120 | } | 135 | } |
