diff options
Diffstat (limited to 'src/WixToolset.Core.Burn')
25 files changed, 671 insertions, 671 deletions
diff --git a/src/WixToolset.Core.Burn/Bind/BaseSearchFacade.cs b/src/WixToolset.Core.Burn/Bind/BaseSearchFacade.cs index d00c5778..0da78797 100644 --- a/src/WixToolset.Core.Burn/Bind/BaseSearchFacade.cs +++ b/src/WixToolset.Core.Burn/Bind/BaseSearchFacade.cs | |||
| @@ -4,23 +4,23 @@ namespace WixToolset.Core.Burn | |||
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using System.Xml; | 6 | using System.Xml; |
| 7 | using WixToolset.Data.Tuples; | 7 | using WixToolset.Data.Symbols; |
| 8 | 8 | ||
| 9 | internal abstract class BaseSearchFacade : ISearchFacade | 9 | internal abstract class BaseSearchFacade : ISearchFacade |
| 10 | { | 10 | { |
| 11 | protected WixSearchTuple SearchTuple { get; set; } | 11 | protected WixSearchSymbol SearchSymbol { get; set; } |
| 12 | 12 | ||
| 13 | public virtual void WriteXml(XmlTextWriter writer) | 13 | public virtual void WriteXml(XmlTextWriter writer) |
| 14 | { | 14 | { |
| 15 | writer.WriteAttributeString("Id", this.SearchTuple.Id.Id); | 15 | writer.WriteAttributeString("Id", this.SearchSymbol.Id.Id); |
| 16 | writer.WriteAttributeString("Variable", this.SearchTuple.Variable); | 16 | writer.WriteAttributeString("Variable", this.SearchSymbol.Variable); |
| 17 | if (!String.IsNullOrEmpty(this.SearchTuple.Condition)) | 17 | if (!String.IsNullOrEmpty(this.SearchSymbol.Condition)) |
| 18 | { | 18 | { |
| 19 | writer.WriteAttributeString("Condition", this.SearchTuple.Condition); | 19 | writer.WriteAttributeString("Condition", this.SearchSymbol.Condition); |
| 20 | } | 20 | } |
| 21 | if (!String.IsNullOrEmpty(this.SearchTuple.BundleExtensionRef)) | 21 | if (!String.IsNullOrEmpty(this.SearchSymbol.BundleExtensionRef)) |
| 22 | { | 22 | { |
| 23 | writer.WriteAttributeString("ExtensionId", this.SearchTuple.BundleExtensionRef); | 23 | writer.WriteAttributeString("ExtensionId", this.SearchSymbol.BundleExtensionRef); |
| 24 | } | 24 | } |
| 25 | } | 25 | } |
| 26 | } | 26 | } |
diff --git a/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs b/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs index 943625ec..a64bdcc1 100644 --- a/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs +++ b/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs | |||
| @@ -13,7 +13,7 @@ namespace WixToolset.Core.Burn | |||
| 13 | using WixToolset.Core.Burn.Bundles; | 13 | using WixToolset.Core.Burn.Bundles; |
| 14 | using WixToolset.Data; | 14 | using WixToolset.Data; |
| 15 | using WixToolset.Data.Burn; | 15 | using WixToolset.Data.Burn; |
| 16 | using WixToolset.Data.Tuples; | 16 | using WixToolset.Data.Symbols; |
| 17 | using WixToolset.Extensibility; | 17 | using WixToolset.Extensibility; |
| 18 | using WixToolset.Extensibility.Data; | 18 | using WixToolset.Extensibility.Data; |
| 19 | using WixToolset.Extensibility.Services; | 19 | using WixToolset.Extensibility.Services; |
| @@ -88,28 +88,28 @@ namespace WixToolset.Core.Burn | |||
| 88 | // We shouldn't really get past the linker phase if there are | 88 | // We shouldn't really get past the linker phase if there are |
| 89 | // no group items... that means that there's no UX, no Chain, | 89 | // no group items... that means that there's no UX, no Chain, |
| 90 | // *and* no Containers! | 90 | // *and* no Containers! |
| 91 | var chainPackageTuples = this.GetRequiredTuples<WixBundlePackageTuple>(); | 91 | var chainPackageSymbols = this.GetRequiredSymbols<WixBundlePackageSymbol>(); |
| 92 | 92 | ||
| 93 | var wixGroupTuples = this.GetRequiredTuples<WixGroupTuple>(); | 93 | var wixGroupSymbols = this.GetRequiredSymbols<WixGroupSymbol>(); |
| 94 | 94 | ||
| 95 | // Ensure there is one and only one row in the WixBundle table. | 95 | // Ensure there is one and only one row in the WixBundle table. |
| 96 | // The compiler and linker behavior should have colluded to get | 96 | // The compiler and linker behavior should have colluded to get |
| 97 | // this behavior. | 97 | // this behavior. |
| 98 | var bundleTuple = this.GetSingleTuple<WixBundleTuple>(); | 98 | var bundleSymbol = this.GetSingleSymbol<WixBundleSymbol>(); |
| 99 | 99 | ||
| 100 | bundleTuple.ProviderKey = bundleTuple.BundleId = Guid.NewGuid().ToString("B").ToUpperInvariant(); | 100 | bundleSymbol.ProviderKey = bundleSymbol.BundleId = Guid.NewGuid().ToString("B").ToUpperInvariant(); |
| 101 | 101 | ||
| 102 | bundleTuple.Attributes |= WixBundleAttributes.PerMachine; // default to per-machine but the first-per user package wil flip the bundle per-user. | 102 | bundleSymbol.Attributes |= WixBundleAttributes.PerMachine; // default to per-machine but the first-per user package wil flip the bundle per-user. |
| 103 | 103 | ||
| 104 | // Ensure there is one and only one row in the WixBootstrapperApplication table. | 104 | // Ensure there is one and only one row in the WixBootstrapperApplication table. |
| 105 | // The compiler and linker behavior should have colluded to get | 105 | // The compiler and linker behavior should have colluded to get |
| 106 | // this behavior. | 106 | // this behavior. |
| 107 | var bundleApplicationTuple = this.GetSingleTuple<WixBootstrapperApplicationTuple>(); | 107 | var bundleApplicationSymbol = this.GetSingleSymbol<WixBootstrapperApplicationSymbol>(); |
| 108 | 108 | ||
| 109 | // Ensure there is one and only one row in the WixChain table. | 109 | // Ensure there is one and only one row in the WixChain table. |
| 110 | // The compiler and linker behavior should have colluded to get | 110 | // The compiler and linker behavior should have colluded to get |
| 111 | // this behavior. | 111 | // this behavior. |
| 112 | var chainTuple = this.GetSingleTuple<WixChainTuple>(); | 112 | var chainSymbol = this.GetSingleSymbol<WixChainSymbol>(); |
| 113 | 113 | ||
| 114 | if (this.Messaging.EncounteredError) | 114 | if (this.Messaging.EncounteredError) |
| 115 | { | 115 | { |
| @@ -122,7 +122,7 @@ namespace WixToolset.Core.Burn | |||
| 122 | var orderSearchesCommand = new OrderSearchesCommand(this.Messaging, section); | 122 | var orderSearchesCommand = new OrderSearchesCommand(this.Messaging, section); |
| 123 | orderSearchesCommand.Execute(); | 123 | orderSearchesCommand.Execute(); |
| 124 | var orderedSearches = orderSearchesCommand.OrderedSearchFacades; | 124 | var orderedSearches = orderSearchesCommand.OrderedSearchFacades; |
| 125 | var extensionSearchTuplesById = orderSearchesCommand.ExtensionSearchTuplesByExtensionId; | 125 | var extensionSearchSymbolsById = orderSearchesCommand.ExtensionSearchSymbolsByExtensionId; |
| 126 | 126 | ||
| 127 | // Extract files that come from binary .wixlibs and WixExtensions (this does not extract files from merge modules). | 127 | // Extract files that come from binary .wixlibs and WixExtensions (this does not extract files from merge modules). |
| 128 | { | 128 | { |
| @@ -133,29 +133,29 @@ namespace WixToolset.Core.Burn | |||
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | // Get the explicit payloads. | 135 | // Get the explicit payloads. |
| 136 | var payloadTuples = section.Tuples.OfType<WixBundlePayloadTuple>().ToDictionary(t => t.Id.Id); | 136 | var payloadSymbols = section.Symbols.OfType<WixBundlePayloadSymbol>().ToDictionary(t => t.Id.Id); |
| 137 | 137 | ||
| 138 | // Update explicitly authored payloads with their parent package and container (as appropriate) | 138 | // Update explicitly authored payloads with their parent package and container (as appropriate) |
| 139 | // to make it easier to gather the payloads later. | 139 | // to make it easier to gather the payloads later. |
| 140 | foreach (var groupTuple in wixGroupTuples) | 140 | foreach (var groupSymbol in wixGroupSymbols) |
| 141 | { | 141 | { |
| 142 | if (ComplexReferenceChildType.Payload == groupTuple.ChildType) | 142 | if (ComplexReferenceChildType.Payload == groupSymbol.ChildType) |
| 143 | { | 143 | { |
| 144 | var payloadTuple = payloadTuples[groupTuple.ChildId]; | 144 | var payloadSymbol = payloadSymbols[groupSymbol.ChildId]; |
| 145 | 145 | ||
| 146 | if (ComplexReferenceParentType.Package == groupTuple.ParentType) | 146 | if (ComplexReferenceParentType.Package == groupSymbol.ParentType) |
| 147 | { | 147 | { |
| 148 | Debug.Assert(String.IsNullOrEmpty(payloadTuple.PackageRef)); | 148 | Debug.Assert(String.IsNullOrEmpty(payloadSymbol.PackageRef)); |
| 149 | payloadTuple.PackageRef = groupTuple.ParentId; | 149 | payloadSymbol.PackageRef = groupSymbol.ParentId; |
| 150 | } | 150 | } |
| 151 | else if (ComplexReferenceParentType.Container == groupTuple.ParentType) | 151 | else if (ComplexReferenceParentType.Container == groupSymbol.ParentType) |
| 152 | { | 152 | { |
| 153 | Debug.Assert(String.IsNullOrEmpty(payloadTuple.ContainerRef)); | 153 | Debug.Assert(String.IsNullOrEmpty(payloadSymbol.ContainerRef)); |
| 154 | payloadTuple.ContainerRef = groupTuple.ParentId; | 154 | payloadSymbol.ContainerRef = groupSymbol.ParentId; |
| 155 | } | 155 | } |
| 156 | else if (ComplexReferenceParentType.Layout == groupTuple.ParentType) | 156 | else if (ComplexReferenceParentType.Layout == groupSymbol.ParentType) |
| 157 | { | 157 | { |
| 158 | payloadTuple.LayoutOnly = true; | 158 | payloadSymbol.LayoutOnly = true; |
| 159 | } | 159 | } |
| 160 | } | 160 | } |
| 161 | } | 161 | } |
| @@ -165,44 +165,44 @@ namespace WixToolset.Core.Burn | |||
| 165 | // Process the explicitly authored payloads. | 165 | // Process the explicitly authored payloads. |
| 166 | ISet<string> processedPayloads; | 166 | ISet<string> processedPayloads; |
| 167 | { | 167 | { |
| 168 | var command = new ProcessPayloadsCommand(this.ServiceProvider, this.BackendHelper, payloadTuples.Values, bundleTuple.DefaultPackagingType, layoutDirectory); | 168 | var command = new ProcessPayloadsCommand(this.ServiceProvider, this.BackendHelper, payloadSymbols.Values, bundleSymbol.DefaultPackagingType, layoutDirectory); |
| 169 | command.Execute(); | 169 | command.Execute(); |
| 170 | 170 | ||
| 171 | fileTransfers.AddRange(command.FileTransfers); | 171 | fileTransfers.AddRange(command.FileTransfers); |
| 172 | trackedFiles.AddRange(command.TrackedFiles); | 172 | trackedFiles.AddRange(command.TrackedFiles); |
| 173 | 173 | ||
| 174 | processedPayloads = new HashSet<string>(payloadTuples.Keys); | 174 | processedPayloads = new HashSet<string>(payloadSymbols.Keys); |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | IDictionary<string, PackageFacade> facades; | 177 | IDictionary<string, PackageFacade> facades; |
| 178 | { | 178 | { |
| 179 | var command = new GetPackageFacadesCommand(chainPackageTuples, section); | 179 | var command = new GetPackageFacadesCommand(chainPackageSymbols, section); |
| 180 | command.Execute(); | 180 | command.Execute(); |
| 181 | 181 | ||
| 182 | facades = command.PackageFacades; | 182 | facades = command.PackageFacades; |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | // Process each package facade. Note this is likely to add payloads and other tuples so | 185 | // Process each package facade. Note this is likely to add payloads and other symbols so |
| 186 | // note that any indexes created above may be out of date now. | 186 | // note that any indexes created above may be out of date now. |
| 187 | foreach (var facade in facades.Values) | 187 | foreach (var facade in facades.Values) |
| 188 | { | 188 | { |
| 189 | switch (facade.PackageTuple.Type) | 189 | switch (facade.PackageSymbol.Type) |
| 190 | { | 190 | { |
| 191 | case WixBundlePackageType.Exe: | 191 | case WixBundlePackageType.Exe: |
| 192 | { | 192 | { |
| 193 | var command = new ProcessExePackageCommand(facade, payloadTuples); | 193 | var command = new ProcessExePackageCommand(facade, payloadSymbols); |
| 194 | command.Execute(); | 194 | command.Execute(); |
| 195 | } | 195 | } |
| 196 | break; | 196 | break; |
| 197 | 197 | ||
| 198 | case WixBundlePackageType.Msi: | 198 | case WixBundlePackageType.Msi: |
| 199 | { | 199 | { |
| 200 | var command = new ProcessMsiPackageCommand(this.ServiceProvider, this.BackendExtensions, section, facade, payloadTuples); | 200 | var command = new ProcessMsiPackageCommand(this.ServiceProvider, this.BackendExtensions, section, facade, payloadSymbols); |
| 201 | command.Execute(); | 201 | command.Execute(); |
| 202 | 202 | ||
| 203 | if (null != variableCache) | 203 | if (null != variableCache) |
| 204 | { | 204 | { |
| 205 | var msiPackage = (WixBundleMsiPackageTuple)facade.SpecificPackageTuple; | 205 | var msiPackage = (WixBundleMsiPackageSymbol)facade.SpecificPackageSymbol; |
| 206 | variableCache.Add(String.Concat("packageLanguage.", facade.PackageId), msiPackage.ProductLanguage.ToString()); | 206 | variableCache.Add(String.Concat("packageLanguage.", facade.PackageId), msiPackage.ProductLanguage.ToString()); |
| 207 | 207 | ||
| 208 | if (null != msiPackage.Manufacturer) | 208 | if (null != msiPackage.Manufacturer) |
| @@ -215,14 +215,14 @@ namespace WixToolset.Core.Burn | |||
| 215 | 215 | ||
| 216 | case WixBundlePackageType.Msp: | 216 | case WixBundlePackageType.Msp: |
| 217 | { | 217 | { |
| 218 | var command = new ProcessMspPackageCommand(this.Messaging, section, facade, payloadTuples); | 218 | var command = new ProcessMspPackageCommand(this.Messaging, section, facade, payloadSymbols); |
| 219 | command.Execute(); | 219 | command.Execute(); |
| 220 | } | 220 | } |
| 221 | break; | 221 | break; |
| 222 | 222 | ||
| 223 | case WixBundlePackageType.Msu: | 223 | case WixBundlePackageType.Msu: |
| 224 | { | 224 | { |
| 225 | var command = new ProcessMsuPackageCommand(facade, payloadTuples); | 225 | var command = new ProcessMsuPackageCommand(facade, payloadSymbols); |
| 226 | command.Execute(); | 226 | command.Execute(); |
| 227 | } | 227 | } |
| 228 | break; | 228 | break; |
| @@ -230,7 +230,7 @@ namespace WixToolset.Core.Burn | |||
| 230 | 230 | ||
| 231 | if (null != variableCache) | 231 | if (null != variableCache) |
| 232 | { | 232 | { |
| 233 | BindBundleCommand.PopulatePackageVariableCache(facade.PackageTuple, variableCache); | 233 | BindBundleCommand.PopulatePackageVariableCache(facade.PackageSymbol, variableCache); |
| 234 | } | 234 | } |
| 235 | } | 235 | } |
| 236 | 236 | ||
| @@ -241,13 +241,13 @@ namespace WixToolset.Core.Burn | |||
| 241 | 241 | ||
| 242 | // Reindex the payloads now that all the payloads (minus the manifest payloads that will be created later) | 242 | // Reindex the payloads now that all the payloads (minus the manifest payloads that will be created later) |
| 243 | // are present. | 243 | // are present. |
| 244 | payloadTuples = section.Tuples.OfType<WixBundlePayloadTuple>().ToDictionary(t => t.Id.Id); | 244 | payloadSymbols = section.Symbols.OfType<WixBundlePayloadSymbol>().ToDictionary(t => t.Id.Id); |
| 245 | 245 | ||
| 246 | // Process the payloads that were added by processing the packages. | 246 | // Process the payloads that were added by processing the packages. |
| 247 | { | 247 | { |
| 248 | var toProcess = payloadTuples.Values.Where(r => !processedPayloads.Contains(r.Id.Id)).ToList(); | 248 | var toProcess = payloadSymbols.Values.Where(r => !processedPayloads.Contains(r.Id.Id)).ToList(); |
| 249 | 249 | ||
| 250 | var command = new ProcessPayloadsCommand(this.ServiceProvider, this.BackendHelper, toProcess, bundleTuple.DefaultPackagingType, layoutDirectory); | 250 | var command = new ProcessPayloadsCommand(this.ServiceProvider, this.BackendHelper, toProcess, bundleSymbol.DefaultPackagingType, layoutDirectory); |
| 251 | command.Execute(); | 251 | command.Execute(); |
| 252 | 252 | ||
| 253 | fileTransfers.AddRange(command.FileTransfers); | 253 | fileTransfers.AddRange(command.FileTransfers); |
| @@ -258,34 +258,34 @@ namespace WixToolset.Core.Burn | |||
| 258 | 258 | ||
| 259 | // Set the package metadata from the payloads now that we have the complete payload information. | 259 | // Set the package metadata from the payloads now that we have the complete payload information. |
| 260 | { | 260 | { |
| 261 | var payloadsByPackageId = payloadTuples.Values.ToLookup(p => p.PackageRef); | 261 | var payloadsByPackageId = payloadSymbols.Values.ToLookup(p => p.PackageRef); |
| 262 | 262 | ||
| 263 | foreach (var facade in facades.Values) | 263 | foreach (var facade in facades.Values) |
| 264 | { | 264 | { |
| 265 | facade.PackageTuple.Size = 0; | 265 | facade.PackageSymbol.Size = 0; |
| 266 | 266 | ||
| 267 | var packagePayloads = payloadsByPackageId[facade.PackageId]; | 267 | var packagePayloads = payloadsByPackageId[facade.PackageId]; |
| 268 | 268 | ||
| 269 | foreach (var payload in packagePayloads) | 269 | foreach (var payload in packagePayloads) |
| 270 | { | 270 | { |
| 271 | facade.PackageTuple.Size += payload.FileSize.Value; | 271 | facade.PackageSymbol.Size += payload.FileSize.Value; |
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | if (!facade.PackageTuple.InstallSize.HasValue) | 274 | if (!facade.PackageSymbol.InstallSize.HasValue) |
| 275 | { | 275 | { |
| 276 | facade.PackageTuple.InstallSize = facade.PackageTuple.Size; | 276 | facade.PackageSymbol.InstallSize = facade.PackageSymbol.Size; |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | var packagePayload = payloadTuples[facade.PackageTuple.PayloadRef]; | 279 | var packagePayload = payloadSymbols[facade.PackageSymbol.PayloadRef]; |
| 280 | 280 | ||
| 281 | if (String.IsNullOrEmpty(facade.PackageTuple.Description)) | 281 | if (String.IsNullOrEmpty(facade.PackageSymbol.Description)) |
| 282 | { | 282 | { |
| 283 | facade.PackageTuple.Description = packagePayload.Description; | 283 | facade.PackageSymbol.Description = packagePayload.Description; |
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | if (String.IsNullOrEmpty(facade.PackageTuple.DisplayName)) | 286 | if (String.IsNullOrEmpty(facade.PackageSymbol.DisplayName)) |
| 287 | { | 287 | { |
| 288 | facade.PackageTuple.DisplayName = packagePayload.DisplayName; | 288 | facade.PackageSymbol.DisplayName = packagePayload.DisplayName; |
| 289 | } | 289 | } |
| 290 | } | 290 | } |
| 291 | } | 291 | } |
| @@ -293,7 +293,7 @@ namespace WixToolset.Core.Burn | |||
| 293 | // Give the UX payloads their embedded IDs... | 293 | // Give the UX payloads their embedded IDs... |
| 294 | var uxPayloadIndex = 0; | 294 | var uxPayloadIndex = 0; |
| 295 | { | 295 | { |
| 296 | foreach (var payload in payloadTuples.Values.Where(p => BurnConstants.BurnUXContainerName == p.ContainerRef)) | 296 | foreach (var payload in payloadSymbols.Values.Where(p => BurnConstants.BurnUXContainerName == p.ContainerRef)) |
| 297 | { | 297 | { |
| 298 | // In theory, UX payloads could be embedded in the UX CAB, external to the bundle EXE, or even | 298 | // In theory, UX payloads could be embedded in the UX CAB, external to the bundle EXE, or even |
| 299 | // downloaded. The current engine requires the UX to be fully present before any downloading starts, | 299 | // downloaded. The current engine requires the UX to be fully present before any downloading starts, |
| @@ -317,7 +317,7 @@ namespace WixToolset.Core.Burn | |||
| 317 | 317 | ||
| 318 | // Give the embedded payloads without an embedded id yet an embedded id. | 318 | // Give the embedded payloads without an embedded id yet an embedded id. |
| 319 | var payloadIndex = 0; | 319 | var payloadIndex = 0; |
| 320 | foreach (var payload in payloadTuples.Values) | 320 | foreach (var payload in payloadSymbols.Values) |
| 321 | { | 321 | { |
| 322 | Debug.Assert(PackagingType.Unknown != payload.Packaging); | 322 | Debug.Assert(PackagingType.Unknown != payload.Packaging); |
| 323 | 323 | ||
| @@ -341,11 +341,11 @@ namespace WixToolset.Core.Burn | |||
| 341 | } | 341 | } |
| 342 | 342 | ||
| 343 | // If catalog files exist, non-embedded payloads should validate with the catalogs. | 343 | // If catalog files exist, non-embedded payloads should validate with the catalogs. |
| 344 | var catalogs = section.Tuples.OfType<WixBundleCatalogTuple>().ToList(); | 344 | var catalogs = section.Symbols.OfType<WixBundleCatalogSymbol>().ToList(); |
| 345 | 345 | ||
| 346 | if (catalogs.Count > 0) | 346 | if (catalogs.Count > 0) |
| 347 | { | 347 | { |
| 348 | var command = new VerifyPayloadsWithCatalogCommand(this.Messaging, catalogs, payloadTuples.Values); | 348 | var command = new VerifyPayloadsWithCatalogCommand(this.Messaging, catalogs, payloadSymbols.Values); |
| 349 | command.Execute(); | 349 | command.Execute(); |
| 350 | } | 350 | } |
| 351 | 351 | ||
| @@ -355,12 +355,12 @@ namespace WixToolset.Core.Burn | |||
| 355 | } | 355 | } |
| 356 | 356 | ||
| 357 | IEnumerable<PackageFacade> orderedFacades; | 357 | IEnumerable<PackageFacade> orderedFacades; |
| 358 | IEnumerable<WixBundleRollbackBoundaryTuple> boundaries; | 358 | IEnumerable<WixBundleRollbackBoundarySymbol> boundaries; |
| 359 | { | 359 | { |
| 360 | var groupTuples = section.Tuples.OfType<WixGroupTuple>(); | 360 | var groupSymbols = section.Symbols.OfType<WixGroupSymbol>(); |
| 361 | var boundaryTuplesById = section.Tuples.OfType<WixBundleRollbackBoundaryTuple>().ToDictionary(b => b.Id.Id); | 361 | var boundarySymbolsById = section.Symbols.OfType<WixBundleRollbackBoundarySymbol>().ToDictionary(b => b.Id.Id); |
| 362 | 362 | ||
| 363 | var command = new OrderPackagesAndRollbackBoundariesCommand(this.Messaging, groupTuples, boundaryTuplesById, facades); | 363 | var command = new OrderPackagesAndRollbackBoundariesCommand(this.Messaging, groupSymbols, boundarySymbolsById, facades); |
| 364 | command.Execute(); | 364 | command.Execute(); |
| 365 | 365 | ||
| 366 | orderedFacades = command.OrderedPackageFacades; | 366 | orderedFacades = command.OrderedPackageFacades; |
| @@ -374,24 +374,24 @@ namespace WixToolset.Core.Burn | |||
| 374 | resolveDelayedFieldsCommand.Execute(); | 374 | resolveDelayedFieldsCommand.Execute(); |
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | Dictionary<string, ProvidesDependencyTuple> dependencyTuplesByKey; | 377 | Dictionary<string, ProvidesDependencySymbol> dependencySymbolsByKey; |
| 378 | { | 378 | { |
| 379 | var command = new ProcessDependencyProvidersCommand(this.Messaging, section, facades); | 379 | var command = new ProcessDependencyProvidersCommand(this.Messaging, section, facades); |
| 380 | command.Execute(); | 380 | command.Execute(); |
| 381 | 381 | ||
| 382 | if (!String.IsNullOrEmpty(command.BundleProviderKey)) | 382 | if (!String.IsNullOrEmpty(command.BundleProviderKey)) |
| 383 | { | 383 | { |
| 384 | bundleTuple.ProviderKey = command.BundleProviderKey; // set the overridable bundle provider key. | 384 | bundleSymbol.ProviderKey = command.BundleProviderKey; // set the overridable bundle provider key. |
| 385 | } | 385 | } |
| 386 | dependencyTuplesByKey = command.DependencyTuplesByKey; | 386 | dependencySymbolsByKey = command.DependencySymbolsByKey; |
| 387 | } | 387 | } |
| 388 | 388 | ||
| 389 | // Update the bundle per-machine/per-user scope based on the chained packages. | 389 | // Update the bundle per-machine/per-user scope based on the chained packages. |
| 390 | this.ResolveBundleInstallScope(section, bundleTuple, orderedFacades); | 390 | this.ResolveBundleInstallScope(section, bundleSymbol, orderedFacades); |
| 391 | 391 | ||
| 392 | // Generate data for all manifests. | 392 | // Generate data for all manifests. |
| 393 | { | 393 | { |
| 394 | var command = new GenerateManifestDataFromIRCommand(this.Messaging, section, this.BackendExtensions, this.InternalBurnBackendHelper, extensionSearchTuplesById); | 394 | var command = new GenerateManifestDataFromIRCommand(this.Messaging, section, this.BackendExtensions, this.InternalBurnBackendHelper, extensionSearchSymbolsById); |
| 395 | command.Execute(); | 395 | command.Execute(); |
| 396 | } | 396 | } |
| 397 | 397 | ||
| @@ -409,12 +409,12 @@ namespace WixToolset.Core.Burn | |||
| 409 | // Generate the core-defined BA manifest tables... | 409 | // Generate the core-defined BA manifest tables... |
| 410 | string baManifestPath; | 410 | string baManifestPath; |
| 411 | { | 411 | { |
| 412 | var command = new CreateBootstrapperApplicationManifestCommand(section, bundleTuple, orderedFacades, uxPayloadIndex, payloadTuples, this.IntermediateFolder, this.InternalBurnBackendHelper); | 412 | var command = new CreateBootstrapperApplicationManifestCommand(section, bundleSymbol, orderedFacades, uxPayloadIndex, payloadSymbols, this.IntermediateFolder, this.InternalBurnBackendHelper); |
| 413 | command.Execute(); | 413 | command.Execute(); |
| 414 | 414 | ||
| 415 | var baManifestPayload = command.BootstrapperApplicationManifestPayloadRow; | 415 | var baManifestPayload = command.BootstrapperApplicationManifestPayloadRow; |
| 416 | baManifestPath = command.OutputPath; | 416 | baManifestPath = command.OutputPath; |
| 417 | payloadTuples.Add(baManifestPayload.Id.Id, baManifestPayload); | 417 | payloadSymbols.Add(baManifestPayload.Id.Id, baManifestPayload); |
| 418 | ++uxPayloadIndex; | 418 | ++uxPayloadIndex; |
| 419 | 419 | ||
| 420 | trackedFiles.Add(this.BackendHelper.TrackFile(baManifestPath, TrackedFileType.Temporary)); | 420 | trackedFiles.Add(this.BackendHelper.TrackFile(baManifestPath, TrackedFileType.Temporary)); |
| @@ -423,12 +423,12 @@ namespace WixToolset.Core.Burn | |||
| 423 | // Generate the bundle extension manifest... | 423 | // Generate the bundle extension manifest... |
| 424 | string bextManifestPath; | 424 | string bextManifestPath; |
| 425 | { | 425 | { |
| 426 | var command = new CreateBundleExtensionManifestCommand(section, bundleTuple, uxPayloadIndex, this.IntermediateFolder, this.InternalBurnBackendHelper); | 426 | var command = new CreateBundleExtensionManifestCommand(section, bundleSymbol, uxPayloadIndex, this.IntermediateFolder, this.InternalBurnBackendHelper); |
| 427 | command.Execute(); | 427 | command.Execute(); |
| 428 | 428 | ||
| 429 | var bextManifestPayload = command.BundleExtensionManifestPayloadRow; | 429 | var bextManifestPayload = command.BundleExtensionManifestPayloadRow; |
| 430 | bextManifestPath = command.OutputPath; | 430 | bextManifestPath = command.OutputPath; |
| 431 | payloadTuples.Add(bextManifestPayload.Id.Id, bextManifestPayload); | 431 | payloadSymbols.Add(bextManifestPayload.Id.Id, bextManifestPayload); |
| 432 | ++uxPayloadIndex; | 432 | ++uxPayloadIndex; |
| 433 | 433 | ||
| 434 | trackedFiles.Add(this.BackendHelper.TrackFile(bextManifestPath, TrackedFileType.Temporary)); | 434 | trackedFiles.Add(this.BackendHelper.TrackFile(bextManifestPath, TrackedFileType.Temporary)); |
| @@ -436,11 +436,11 @@ namespace WixToolset.Core.Burn | |||
| 436 | 436 | ||
| 437 | // Create all the containers except the UX container first so the manifest (that goes in the UX container) | 437 | // Create all the containers except the UX container first so the manifest (that goes in the UX container) |
| 438 | // can contain all size and hash information about the non-UX containers. | 438 | // can contain all size and hash information about the non-UX containers. |
| 439 | WixBundleContainerTuple uxContainer; | 439 | WixBundleContainerSymbol uxContainer; |
| 440 | IEnumerable<WixBundlePayloadTuple> uxPayloads; | 440 | IEnumerable<WixBundlePayloadSymbol> uxPayloads; |
| 441 | IEnumerable<WixBundleContainerTuple> containers; | 441 | IEnumerable<WixBundleContainerSymbol> containers; |
| 442 | { | 442 | { |
| 443 | var command = new CreateNonUXContainers(this.BackendHelper, section, bundleApplicationTuple, payloadTuples, this.IntermediateFolder, layoutDirectory, this.DefaultCompressionLevel); | 443 | var command = new CreateNonUXContainers(this.BackendHelper, section, bundleApplicationSymbol, payloadSymbols, this.IntermediateFolder, layoutDirectory, this.DefaultCompressionLevel); |
| 444 | command.Execute(); | 444 | command.Execute(); |
| 445 | 445 | ||
| 446 | fileTransfers.AddRange(command.FileTransfers); | 446 | fileTransfers.AddRange(command.FileTransfers); |
| @@ -450,13 +450,13 @@ namespace WixToolset.Core.Burn | |||
| 450 | uxPayloads = command.UXContainerPayloads; | 450 | uxPayloads = command.UXContainerPayloads; |
| 451 | containers = command.Containers; | 451 | containers = command.Containers; |
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | // Create the bundle manifest. | 454 | // Create the bundle manifest. |
| 455 | string manifestPath; | 455 | string manifestPath; |
| 456 | { | 456 | { |
| 457 | var executableName = Path.GetFileName(this.OutputPath); | 457 | var executableName = Path.GetFileName(this.OutputPath); |
| 458 | 458 | ||
| 459 | var command = new CreateBurnManifestCommand(this.Messaging, this.BackendExtensions, executableName, section, bundleTuple, containers, chainTuple, orderedFacades, boundaries, uxPayloads, payloadTuples, orderedSearches, catalogs, this.IntermediateFolder); | 459 | var command = new CreateBurnManifestCommand(this.Messaging, this.BackendExtensions, executableName, section, bundleSymbol, containers, chainSymbol, orderedFacades, boundaries, uxPayloads, payloadSymbols, orderedSearches, catalogs, this.IntermediateFolder); |
| 460 | command.Execute(); | 460 | command.Execute(); |
| 461 | 461 | ||
| 462 | manifestPath = command.OutputPath; | 462 | manifestPath = command.OutputPath; |
| @@ -475,7 +475,7 @@ namespace WixToolset.Core.Burn | |||
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | { | 477 | { |
| 478 | var command = new CreateBundleExeCommand(this.Messaging, this.BackendHelper, this.IntermediateFolder, this.OutputPath, bundleTuple, uxContainer, containers); | 478 | var command = new CreateBundleExeCommand(this.Messaging, this.BackendHelper, this.IntermediateFolder, this.OutputPath, bundleSymbol, uxContainer, containers); |
| 479 | command.Execute(); | 479 | command.Execute(); |
| 480 | 480 | ||
| 481 | fileTransfers.Add(command.Transfer); | 481 | fileTransfers.Add(command.Transfer); |
| @@ -483,7 +483,7 @@ namespace WixToolset.Core.Burn | |||
| 483 | } | 483 | } |
| 484 | 484 | ||
| 485 | #if TODO // does this need to come back, or do they only need to be in TrackedFiles? | 485 | #if TODO // does this need to come back, or do they only need to be in TrackedFiles? |
| 486 | this.ContentFilePaths = payloadTuples.Values.Where(p => p.ContentFile).Select(p => p.FullFileName).ToList(); | 486 | this.ContentFilePaths = payloadSymbols.Values.Where(p => p.ContentFile).Select(p => p.FullFileName).ToList(); |
| 487 | #endif | 487 | #endif |
| 488 | this.FileTransfers = fileTransfers; | 488 | this.FileTransfers = fileTransfers; |
| 489 | this.TrackedFiles = trackedFiles; | 489 | this.TrackedFiles = trackedFiles; |
| @@ -522,7 +522,7 @@ namespace WixToolset.Core.Burn | |||
| 522 | /// </summary> | 522 | /// </summary> |
| 523 | /// <param name="package">The package with properties to cache.</param> | 523 | /// <param name="package">The package with properties to cache.</param> |
| 524 | /// <param name="variableCache">The property cache.</param> | 524 | /// <param name="variableCache">The property cache.</param> |
| 525 | private static void PopulatePackageVariableCache(WixBundlePackageTuple package, IDictionary<string, string> variableCache) | 525 | private static void PopulatePackageVariableCache(WixBundlePackageSymbol package, IDictionary<string, string> variableCache) |
| 526 | { | 526 | { |
| 527 | var id = package.Id.Id; | 527 | var id = package.Id.Id; |
| 528 | 528 | ||
| @@ -533,17 +533,17 @@ namespace WixToolset.Core.Burn | |||
| 533 | variableCache.Add(String.Concat("packageVersion.", id), package.Version); | 533 | variableCache.Add(String.Concat("packageVersion.", id), package.Version); |
| 534 | } | 534 | } |
| 535 | 535 | ||
| 536 | private void ResolveBundleInstallScope(IntermediateSection section, WixBundleTuple bundleTuple, IEnumerable<PackageFacade> facades) | 536 | private void ResolveBundleInstallScope(IntermediateSection section, WixBundleSymbol bundleSymbol, IEnumerable<PackageFacade> facades) |
| 537 | { | 537 | { |
| 538 | var dependencyTuplesById = section.Tuples.OfType<ProvidesDependencyTuple>().ToDictionary(t => t.Id.Id); | 538 | var dependencySymbolsById = section.Symbols.OfType<ProvidesDependencySymbol>().ToDictionary(t => t.Id.Id); |
| 539 | 539 | ||
| 540 | foreach (var facade in facades) | 540 | foreach (var facade in facades) |
| 541 | { | 541 | { |
| 542 | if (bundleTuple.PerMachine && YesNoDefaultType.No == facade.PackageTuple.PerMachine) | 542 | if (bundleSymbol.PerMachine && YesNoDefaultType.No == facade.PackageSymbol.PerMachine) |
| 543 | { | 543 | { |
| 544 | this.Messaging.Write(VerboseMessages.SwitchingToPerUserPackage(facade.PackageTuple.SourceLineNumbers, facade.PackageId)); | 544 | this.Messaging.Write(VerboseMessages.SwitchingToPerUserPackage(facade.PackageSymbol.SourceLineNumbers, facade.PackageId)); |
| 545 | 545 | ||
| 546 | bundleTuple.Attributes &= ~WixBundleAttributes.PerMachine; | 546 | bundleSymbol.Attributes &= ~WixBundleAttributes.PerMachine; |
| 547 | break; | 547 | break; |
| 548 | } | 548 | } |
| 549 | } | 549 | } |
| @@ -551,45 +551,45 @@ namespace WixToolset.Core.Burn | |||
| 551 | foreach (var facade in facades) | 551 | foreach (var facade in facades) |
| 552 | { | 552 | { |
| 553 | // Update package scope from bundle scope if default. | 553 | // Update package scope from bundle scope if default. |
| 554 | if (YesNoDefaultType.Default == facade.PackageTuple.PerMachine) | 554 | if (YesNoDefaultType.Default == facade.PackageSymbol.PerMachine) |
| 555 | { | 555 | { |
| 556 | facade.PackageTuple.PerMachine = bundleTuple.PerMachine ? YesNoDefaultType.Yes : YesNoDefaultType.No; | 556 | facade.PackageSymbol.PerMachine = bundleSymbol.PerMachine ? YesNoDefaultType.Yes : YesNoDefaultType.No; |
| 557 | } | 557 | } |
| 558 | 558 | ||
| 559 | // We will only register packages in the same scope as the bundle. Warn if any packages with providers | 559 | // We will only register packages in the same scope as the bundle. Warn if any packages with providers |
| 560 | // are in a different scope and not permanent (permanents typically don't need a ref-count). | 560 | // are in a different scope and not permanent (permanents typically don't need a ref-count). |
| 561 | if (!bundleTuple.PerMachine && | 561 | if (!bundleSymbol.PerMachine && |
| 562 | YesNoDefaultType.Yes == facade.PackageTuple.PerMachine && | 562 | YesNoDefaultType.Yes == facade.PackageSymbol.PerMachine && |
| 563 | !facade.PackageTuple.Permanent && | 563 | !facade.PackageSymbol.Permanent && |
| 564 | dependencyTuplesById.ContainsKey(facade.PackageId)) | 564 | dependencySymbolsById.ContainsKey(facade.PackageId)) |
| 565 | { | 565 | { |
| 566 | this.Messaging.Write(WarningMessages.NoPerMachineDependencies(facade.PackageTuple.SourceLineNumbers, facade.PackageId)); | 566 | this.Messaging.Write(WarningMessages.NoPerMachineDependencies(facade.PackageSymbol.SourceLineNumbers, facade.PackageId)); |
| 567 | } | 567 | } |
| 568 | } | 568 | } |
| 569 | } | 569 | } |
| 570 | 570 | ||
| 571 | private IEnumerable<T> GetRequiredTuples<T>() where T : IntermediateTuple | 571 | private IEnumerable<T> GetRequiredSymbols<T>() where T : IntermediateSymbol |
| 572 | { | 572 | { |
| 573 | var tuples = this.Output.Sections.Single().Tuples.OfType<T>().ToList(); | 573 | var symbols = this.Output.Sections.Single().Symbols.OfType<T>().ToList(); |
| 574 | 574 | ||
| 575 | if (0 == tuples.Count) | 575 | if (0 == symbols.Count) |
| 576 | { | 576 | { |
| 577 | throw new WixException(ErrorMessages.MissingBundleInformation(nameof(T))); | 577 | throw new WixException(ErrorMessages.MissingBundleInformation(nameof(T))); |
| 578 | } | 578 | } |
| 579 | 579 | ||
| 580 | return tuples; | 580 | return symbols; |
| 581 | } | 581 | } |
| 582 | 582 | ||
| 583 | private T GetSingleTuple<T>() where T : IntermediateTuple | 583 | private T GetSingleSymbol<T>() where T : IntermediateSymbol |
| 584 | { | 584 | { |
| 585 | var tuples = this.Output.Sections.Single().Tuples.OfType<T>().ToList(); | 585 | var symbols = this.Output.Sections.Single().Symbols.OfType<T>().ToList(); |
| 586 | 586 | ||
| 587 | if (1 != tuples.Count) | 587 | if (1 != symbols.Count) |
| 588 | { | 588 | { |
| 589 | throw new WixException(ErrorMessages.MissingBundleInformation(nameof(T))); | 589 | throw new WixException(ErrorMessages.MissingBundleInformation(nameof(T))); |
| 590 | } | 590 | } |
| 591 | 591 | ||
| 592 | return tuples[0]; | 592 | return symbols[0]; |
| 593 | } | 593 | } |
| 594 | } | 594 | } |
| 595 | } | 595 | } |
diff --git a/src/WixToolset.Core.Burn/Bind/ExtensionSearchFacade.cs b/src/WixToolset.Core.Burn/Bind/ExtensionSearchFacade.cs index 6a830a28..773250d7 100644 --- a/src/WixToolset.Core.Burn/Bind/ExtensionSearchFacade.cs +++ b/src/WixToolset.Core.Burn/Bind/ExtensionSearchFacade.cs | |||
| @@ -3,13 +3,13 @@ | |||
| 3 | namespace WixToolset.Core.Burn | 3 | namespace WixToolset.Core.Burn |
| 4 | { | 4 | { |
| 5 | using System.Xml; | 5 | using System.Xml; |
| 6 | using WixToolset.Data.Tuples; | 6 | using WixToolset.Data.Symbols; |
| 7 | 7 | ||
| 8 | internal class ExtensionSearchFacade : BaseSearchFacade | 8 | internal class ExtensionSearchFacade : BaseSearchFacade |
| 9 | { | 9 | { |
| 10 | public ExtensionSearchFacade(WixSearchTuple searchTuple) | 10 | public ExtensionSearchFacade(WixSearchSymbol searchSymbol) |
| 11 | { | 11 | { |
| 12 | this.SearchTuple = searchTuple; | 12 | this.SearchSymbol = searchSymbol; |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | public override void WriteXml(XmlTextWriter writer) | 15 | public override void WriteXml(XmlTextWriter writer) |
diff --git a/src/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs b/src/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs index c20abadb..29768dff 100644 --- a/src/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs +++ b/src/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs | |||
| @@ -10,26 +10,26 @@ namespace WixToolset.Core.Burn.Bind | |||
| 10 | using WixToolset.Core.Burn.Bundles; | 10 | using WixToolset.Core.Burn.Bundles; |
| 11 | using WixToolset.Core.Burn.ExtensibilityServices; | 11 | using WixToolset.Core.Burn.ExtensibilityServices; |
| 12 | using WixToolset.Data; | 12 | using WixToolset.Data; |
| 13 | using WixToolset.Data.Tuples; | 13 | using WixToolset.Data.Symbols; |
| 14 | using WixToolset.Extensibility; | 14 | using WixToolset.Extensibility; |
| 15 | using WixToolset.Extensibility.Services; | 15 | using WixToolset.Extensibility.Services; |
| 16 | 16 | ||
| 17 | internal class GenerateManifestDataFromIRCommand | 17 | internal class GenerateManifestDataFromIRCommand |
| 18 | { | 18 | { |
| 19 | public GenerateManifestDataFromIRCommand(IMessaging messaging, IntermediateSection section, IEnumerable<IBurnBackendExtension> backendExtensions, IBurnBackendHelper backendHelper, IDictionary<string, IList<IntermediateTuple>> extensionSearchTuplesById) | 19 | public GenerateManifestDataFromIRCommand(IMessaging messaging, IntermediateSection section, IEnumerable<IBurnBackendExtension> backendExtensions, IBurnBackendHelper backendHelper, IDictionary<string, IList<IntermediateSymbol>> extensionSearchSymbolsById) |
| 20 | { | 20 | { |
| 21 | this.Messaging = messaging; | 21 | this.Messaging = messaging; |
| 22 | this.Section = section; | 22 | this.Section = section; |
| 23 | this.BackendExtensions = backendExtensions; | 23 | this.BackendExtensions = backendExtensions; |
| 24 | this.BackendHelper = backendHelper; | 24 | this.BackendHelper = backendHelper; |
| 25 | this.ExtensionSearchTuplesById = extensionSearchTuplesById; | 25 | this.ExtensionSearchSymbolsById = extensionSearchSymbolsById; |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | private IEnumerable<IBurnBackendExtension> BackendExtensions { get; } | 28 | private IEnumerable<IBurnBackendExtension> BackendExtensions { get; } |
| 29 | 29 | ||
| 30 | private IBurnBackendHelper BackendHelper { get; } | 30 | private IBurnBackendHelper BackendHelper { get; } |
| 31 | 31 | ||
| 32 | private IDictionary<string, IList<IntermediateTuple>> ExtensionSearchTuplesById { get; } | 32 | private IDictionary<string, IList<IntermediateSymbol>> ExtensionSearchSymbolsById { get; } |
| 33 | 33 | ||
| 34 | private IMessaging Messaging { get; } | 34 | private IMessaging Messaging { get; } |
| 35 | 35 | ||
| @@ -37,108 +37,108 @@ namespace WixToolset.Core.Burn.Bind | |||
| 37 | 37 | ||
| 38 | public void Execute() | 38 | public void Execute() |
| 39 | { | 39 | { |
| 40 | var tuples = this.Section.Tuples.ToList(); | 40 | var symbols = this.Section.Symbols.ToList(); |
| 41 | var cellsByCustomDataAndElementId = new Dictionary<string, List<WixBundleCustomDataCellTuple>>(); | 41 | var cellsByCustomDataAndElementId = new Dictionary<string, List<WixBundleCustomDataCellSymbol>>(); |
| 42 | var customDataById = new Dictionary<string, WixBundleCustomDataTuple>(); | 42 | var customDataById = new Dictionary<string, WixBundleCustomDataSymbol>(); |
| 43 | 43 | ||
| 44 | foreach (var kvp in this.ExtensionSearchTuplesById) | 44 | foreach (var kvp in this.ExtensionSearchSymbolsById) |
| 45 | { | 45 | { |
| 46 | var extensionId = kvp.Key; | 46 | var extensionId = kvp.Key; |
| 47 | var extensionSearchTuples = kvp.Value; | 47 | var extensionSearchSymbols = kvp.Value; |
| 48 | foreach (var extensionSearchTuple in extensionSearchTuples) | 48 | foreach (var extensionSearchSymbol in extensionSearchSymbols) |
| 49 | { | 49 | { |
| 50 | this.BackendHelper.AddBundleExtensionData(extensionId, extensionSearchTuple, tupleIdIsIdAttribute: true); | 50 | this.BackendHelper.AddBundleExtensionData(extensionId, extensionSearchSymbol, symbolIdIsIdAttribute: true); |
| 51 | tuples.Remove(extensionSearchTuple); | 51 | symbols.Remove(extensionSearchSymbol); |
| 52 | } | 52 | } |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | foreach (var tuple in tuples) | 55 | foreach (var symbol in symbols) |
| 56 | { | 56 | { |
| 57 | var unknownTuple = false; | 57 | var unknownSymbol = false; |
| 58 | switch (tuple.Definition.Type) | 58 | switch (symbol.Definition.Type) |
| 59 | { | 59 | { |
| 60 | // Tuples used internally and are not added to a data manifest. | 60 | // Symbols used internally and are not added to a data manifest. |
| 61 | case TupleDefinitionType.ProvidesDependency: | 61 | case SymbolDefinitionType.ProvidesDependency: |
| 62 | case TupleDefinitionType.WixApprovedExeForElevation: | 62 | case SymbolDefinitionType.WixApprovedExeForElevation: |
| 63 | case TupleDefinitionType.WixBootstrapperApplication: | 63 | case SymbolDefinitionType.WixBootstrapperApplication: |
| 64 | case TupleDefinitionType.WixBundle: | 64 | case SymbolDefinitionType.WixBundle: |
| 65 | case TupleDefinitionType.WixBundleCatalog: | 65 | case SymbolDefinitionType.WixBundleCatalog: |
| 66 | case TupleDefinitionType.WixBundleContainer: | 66 | case SymbolDefinitionType.WixBundleContainer: |
| 67 | case TupleDefinitionType.WixBundleCustomDataAttribute: | 67 | case SymbolDefinitionType.WixBundleCustomDataAttribute: |
| 68 | case TupleDefinitionType.WixBundleExePackage: | 68 | case SymbolDefinitionType.WixBundleExePackage: |
| 69 | case TupleDefinitionType.WixBundleExtension: | 69 | case SymbolDefinitionType.WixBundleExtension: |
| 70 | case TupleDefinitionType.WixBundleMsiFeature: | 70 | case SymbolDefinitionType.WixBundleMsiFeature: |
| 71 | case TupleDefinitionType.WixBundleMsiPackage: | 71 | case SymbolDefinitionType.WixBundleMsiPackage: |
| 72 | case TupleDefinitionType.WixBundleMsiProperty: | 72 | case SymbolDefinitionType.WixBundleMsiProperty: |
| 73 | case TupleDefinitionType.WixBundleMspPackage: | 73 | case SymbolDefinitionType.WixBundleMspPackage: |
| 74 | case TupleDefinitionType.WixBundleMsuPackage: | 74 | case SymbolDefinitionType.WixBundleMsuPackage: |
| 75 | case TupleDefinitionType.WixBundlePackage: | 75 | case SymbolDefinitionType.WixBundlePackage: |
| 76 | case TupleDefinitionType.WixBundlePackageCommandLine: | 76 | case SymbolDefinitionType.WixBundlePackageCommandLine: |
| 77 | case TupleDefinitionType.WixBundlePackageExitCode: | 77 | case SymbolDefinitionType.WixBundlePackageExitCode: |
| 78 | case TupleDefinitionType.WixBundlePackageGroup: | 78 | case SymbolDefinitionType.WixBundlePackageGroup: |
| 79 | case TupleDefinitionType.WixBundlePatchTargetCode: | 79 | case SymbolDefinitionType.WixBundlePatchTargetCode: |
| 80 | case TupleDefinitionType.WixBundlePayload: | 80 | case SymbolDefinitionType.WixBundlePayload: |
| 81 | case TupleDefinitionType.WixBundlePayloadGroup: | 81 | case SymbolDefinitionType.WixBundlePayloadGroup: |
| 82 | case TupleDefinitionType.WixBundleRelatedPackage: | 82 | case SymbolDefinitionType.WixBundleRelatedPackage: |
| 83 | case TupleDefinitionType.WixBundleRollbackBoundary: | 83 | case SymbolDefinitionType.WixBundleRollbackBoundary: |
| 84 | case TupleDefinitionType.WixBundleSlipstreamMsp: | 84 | case SymbolDefinitionType.WixBundleSlipstreamMsp: |
| 85 | case TupleDefinitionType.WixBundleUpdate: | 85 | case SymbolDefinitionType.WixBundleUpdate: |
| 86 | case TupleDefinitionType.WixBundleVariable: | 86 | case SymbolDefinitionType.WixBundleVariable: |
| 87 | case TupleDefinitionType.WixBuildInfo: | 87 | case SymbolDefinitionType.WixBuildInfo: |
| 88 | case TupleDefinitionType.WixChain: | 88 | case SymbolDefinitionType.WixChain: |
| 89 | case TupleDefinitionType.WixComponentSearch: | 89 | case SymbolDefinitionType.WixComponentSearch: |
| 90 | case TupleDefinitionType.WixDependencyProvider: | 90 | case SymbolDefinitionType.WixDependencyProvider: |
| 91 | case TupleDefinitionType.WixFileSearch: | 91 | case SymbolDefinitionType.WixFileSearch: |
| 92 | case TupleDefinitionType.WixGroup: | 92 | case SymbolDefinitionType.WixGroup: |
| 93 | case TupleDefinitionType.WixProductSearch: | 93 | case SymbolDefinitionType.WixProductSearch: |
| 94 | case TupleDefinitionType.WixRegistrySearch: | 94 | case SymbolDefinitionType.WixRegistrySearch: |
| 95 | case TupleDefinitionType.WixRelatedBundle: | 95 | case SymbolDefinitionType.WixRelatedBundle: |
| 96 | case TupleDefinitionType.WixSearch: | 96 | case SymbolDefinitionType.WixSearch: |
| 97 | case TupleDefinitionType.WixSearchRelation: | 97 | case SymbolDefinitionType.WixSearchRelation: |
| 98 | case TupleDefinitionType.WixSetVariable: | 98 | case SymbolDefinitionType.WixSetVariable: |
| 99 | case TupleDefinitionType.WixUpdateRegistration: | 99 | case SymbolDefinitionType.WixUpdateRegistration: |
| 100 | break; | 100 | break; |
| 101 | 101 | ||
| 102 | // Tuples used before binding. | 102 | // Symbols used before binding. |
| 103 | case TupleDefinitionType.WixComplexReference: | 103 | case SymbolDefinitionType.WixComplexReference: |
| 104 | case TupleDefinitionType.WixOrdering: | 104 | case SymbolDefinitionType.WixOrdering: |
| 105 | case TupleDefinitionType.WixSimpleReference: | 105 | case SymbolDefinitionType.WixSimpleReference: |
| 106 | case TupleDefinitionType.WixVariable: | 106 | case SymbolDefinitionType.WixVariable: |
| 107 | break; | 107 | break; |
| 108 | 108 | ||
| 109 | // Tuples to investigate: | 109 | // Symbols to investigate: |
| 110 | case TupleDefinitionType.WixChainItem: | 110 | case SymbolDefinitionType.WixChainItem: |
| 111 | break; | 111 | break; |
| 112 | 112 | ||
| 113 | case TupleDefinitionType.WixBundleCustomData: | 113 | case SymbolDefinitionType.WixBundleCustomData: |
| 114 | unknownTuple = !this.IndexBundleCustomDataTuple((WixBundleCustomDataTuple)tuple, customDataById); | 114 | unknownSymbol = !this.IndexBundleCustomDataSymbol((WixBundleCustomDataSymbol)symbol, customDataById); |
| 115 | break; | 115 | break; |
| 116 | 116 | ||
| 117 | case TupleDefinitionType.WixBundleCustomDataCell: | 117 | case SymbolDefinitionType.WixBundleCustomDataCell: |
| 118 | this.IndexBundleCustomDataCellTuple((WixBundleCustomDataCellTuple)tuple, cellsByCustomDataAndElementId); | 118 | this.IndexBundleCustomDataCellSymbol((WixBundleCustomDataCellSymbol)symbol, cellsByCustomDataAndElementId); |
| 119 | break; | 119 | break; |
| 120 | 120 | ||
| 121 | case TupleDefinitionType.MustBeFromAnExtension: | 121 | case SymbolDefinitionType.MustBeFromAnExtension: |
| 122 | unknownTuple = !this.AddTupleFromExtension(tuple); | 122 | unknownSymbol = !this.AddSymbolFromExtension(symbol); |
| 123 | break; | 123 | break; |
| 124 | 124 | ||
| 125 | default: | 125 | default: |
| 126 | unknownTuple = true; | 126 | unknownSymbol = true; |
| 127 | break; | 127 | break; |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | if (unknownTuple) | 130 | if (unknownSymbol) |
| 131 | { | 131 | { |
| 132 | this.Messaging.Write(WarningMessages.TupleNotTranslatedToOutput(tuple)); | 132 | this.Messaging.Write(WarningMessages.SymbolNotTranslatedToOutput(symbol)); |
| 133 | } | 133 | } |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | this.AddIndexedCellTuples(customDataById, cellsByCustomDataAndElementId); | 136 | this.AddIndexedCellSymbols(customDataById, cellsByCustomDataAndElementId); |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | private bool IndexBundleCustomDataTuple(WixBundleCustomDataTuple wixBundleCustomDataTuple, Dictionary<string, WixBundleCustomDataTuple> customDataById) | 139 | private bool IndexBundleCustomDataSymbol(WixBundleCustomDataSymbol wixBundleCustomDataSymbol, Dictionary<string, WixBundleCustomDataSymbol> customDataById) |
| 140 | { | 140 | { |
| 141 | switch (wixBundleCustomDataTuple.Type) | 141 | switch (wixBundleCustomDataSymbol.Type) |
| 142 | { | 142 | { |
| 143 | case WixBundleCustomDataType.BootstrapperApplication: | 143 | case WixBundleCustomDataType.BootstrapperApplication: |
| 144 | case WixBundleCustomDataType.BundleExtension: | 144 | case WixBundleCustomDataType.BundleExtension: |
| @@ -147,38 +147,38 @@ namespace WixToolset.Core.Burn.Bind | |||
| 147 | return false; | 147 | return false; |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | var customDataId = wixBundleCustomDataTuple.Id.Id; | 150 | var customDataId = wixBundleCustomDataSymbol.Id.Id; |
| 151 | customDataById.Add(customDataId, wixBundleCustomDataTuple); | 151 | customDataById.Add(customDataId, wixBundleCustomDataSymbol); |
| 152 | return true; | 152 | return true; |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | private void IndexBundleCustomDataCellTuple(WixBundleCustomDataCellTuple wixBundleCustomDataCellTuple, Dictionary<string, List<WixBundleCustomDataCellTuple>> cellsByCustomDataAndElementId) | 155 | private void IndexBundleCustomDataCellSymbol(WixBundleCustomDataCellSymbol wixBundleCustomDataCellSymbol, Dictionary<string, List<WixBundleCustomDataCellSymbol>> cellsByCustomDataAndElementId) |
| 156 | { | 156 | { |
| 157 | var tableAndRowId = wixBundleCustomDataCellTuple.CustomDataRef + "/" + wixBundleCustomDataCellTuple.ElementId; | 157 | var tableAndRowId = wixBundleCustomDataCellSymbol.CustomDataRef + "/" + wixBundleCustomDataCellSymbol.ElementId; |
| 158 | if (!cellsByCustomDataAndElementId.TryGetValue(tableAndRowId, out var cells)) | 158 | if (!cellsByCustomDataAndElementId.TryGetValue(tableAndRowId, out var cells)) |
| 159 | { | 159 | { |
| 160 | cells = new List<WixBundleCustomDataCellTuple>(); | 160 | cells = new List<WixBundleCustomDataCellSymbol>(); |
| 161 | cellsByCustomDataAndElementId.Add(tableAndRowId, cells); | 161 | cellsByCustomDataAndElementId.Add(tableAndRowId, cells); |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | cells.Add(wixBundleCustomDataCellTuple); | 164 | cells.Add(wixBundleCustomDataCellSymbol); |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | private void AddIndexedCellTuples(Dictionary<string, WixBundleCustomDataTuple> customDataById, Dictionary<string, List<WixBundleCustomDataCellTuple>> cellsByCustomDataAndElementId) | 167 | private void AddIndexedCellSymbols(Dictionary<string, WixBundleCustomDataSymbol> customDataById, Dictionary<string, List<WixBundleCustomDataCellSymbol>> cellsByCustomDataAndElementId) |
| 168 | { | 168 | { |
| 169 | foreach (var elementValues in cellsByCustomDataAndElementId.Values) | 169 | foreach (var elementValues in cellsByCustomDataAndElementId.Values) |
| 170 | { | 170 | { |
| 171 | var elementName = elementValues[0].CustomDataRef; | 171 | var elementName = elementValues[0].CustomDataRef; |
| 172 | var customDataTuple = customDataById[elementName]; | 172 | var customDataSymbol = customDataById[elementName]; |
| 173 | 173 | ||
| 174 | var attributeNames = customDataTuple.AttributeNamesSeparated; | 174 | var attributeNames = customDataSymbol.AttributeNamesSeparated; |
| 175 | 175 | ||
| 176 | var elementValuesByAttribute = elementValues.ToDictionary(t => t.AttributeRef, t => t.Value); | 176 | var elementValuesByAttribute = elementValues.ToDictionary(t => t.AttributeRef, t => t.Value); |
| 177 | 177 | ||
| 178 | var sb = new StringBuilder(); | 178 | var sb = new StringBuilder(); |
| 179 | using (var writer = XmlWriter.Create(sb, BurnBackendHelper.WriterSettings)) | 179 | using (var writer = XmlWriter.Create(sb, BurnBackendHelper.WriterSettings)) |
| 180 | { | 180 | { |
| 181 | switch (customDataTuple.Type) | 181 | switch (customDataSymbol.Type) |
| 182 | { | 182 | { |
| 183 | case WixBundleCustomDataType.BootstrapperApplication: | 183 | case WixBundleCustomDataType.BootstrapperApplication: |
| 184 | writer.WriteStartElement(elementName, BurnCommon.BADataNamespace); | 184 | writer.WriteStartElement(elementName, BurnCommon.BADataNamespace); |
| @@ -202,13 +202,13 @@ namespace WixToolset.Core.Burn.Bind | |||
| 202 | writer.WriteEndElement(); | 202 | writer.WriteEndElement(); |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | switch (customDataTuple.Type) | 205 | switch (customDataSymbol.Type) |
| 206 | { | 206 | { |
| 207 | case WixBundleCustomDataType.BootstrapperApplication: | 207 | case WixBundleCustomDataType.BootstrapperApplication: |
| 208 | this.BackendHelper.AddBootstrapperApplicationData(sb.ToString()); | 208 | this.BackendHelper.AddBootstrapperApplicationData(sb.ToString()); |
| 209 | break; | 209 | break; |
| 210 | case WixBundleCustomDataType.BundleExtension: | 210 | case WixBundleCustomDataType.BundleExtension: |
| 211 | this.BackendHelper.AddBundleExtensionData(customDataTuple.BundleExtensionRef, sb.ToString()); | 211 | this.BackendHelper.AddBundleExtensionData(customDataSymbol.BundleExtensionRef, sb.ToString()); |
| 212 | break; | 212 | break; |
| 213 | default: | 213 | default: |
| 214 | throw new NotImplementedException(); | 214 | throw new NotImplementedException(); |
| @@ -216,11 +216,11 @@ namespace WixToolset.Core.Burn.Bind | |||
| 216 | } | 216 | } |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | private bool AddTupleFromExtension(IntermediateTuple tuple) | 219 | private bool AddSymbolFromExtension(IntermediateSymbol symbol) |
| 220 | { | 220 | { |
| 221 | foreach (var extension in this.BackendExtensions) | 221 | foreach (var extension in this.BackendExtensions) |
| 222 | { | 222 | { |
| 223 | if (extension.TryAddTupleToDataManifest(this.Section, tuple)) | 223 | if (extension.TryAddSymbolToDataManifest(this.Section, symbol)) |
| 224 | { | 224 | { |
| 225 | return true; | 225 | return true; |
| 226 | } | 226 | } |
diff --git a/src/WixToolset.Core.Burn/Bind/LegacySearchFacade.cs b/src/WixToolset.Core.Burn/Bind/LegacySearchFacade.cs index 0a80760d..24d6f542 100644 --- a/src/WixToolset.Core.Burn/Bind/LegacySearchFacade.cs +++ b/src/WixToolset.Core.Burn/Bind/LegacySearchFacade.cs | |||
| @@ -5,17 +5,17 @@ namespace WixToolset.Core.Burn | |||
| 5 | using System; | 5 | using System; |
| 6 | using System.Xml; | 6 | using System.Xml; |
| 7 | using WixToolset.Data; | 7 | using WixToolset.Data; |
| 8 | using WixToolset.Data.Tuples; | 8 | using WixToolset.Data.Symbols; |
| 9 | 9 | ||
| 10 | internal class LegacySearchFacade : BaseSearchFacade | 10 | internal class LegacySearchFacade : BaseSearchFacade |
| 11 | { | 11 | { |
| 12 | public LegacySearchFacade(WixSearchTuple searchTuple, IntermediateTuple searchSpecificTuple) | 12 | public LegacySearchFacade(WixSearchSymbol searchSymbol, IntermediateSymbol searchSpecificSymbol) |
| 13 | { | 13 | { |
| 14 | this.SearchTuple = searchTuple; | 14 | this.SearchSymbol = searchSymbol; |
| 15 | this.SearchSpecificTuple = searchSpecificTuple; | 15 | this.SearchSpecificSymbol = searchSpecificSymbol; |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | public IntermediateTuple SearchSpecificTuple { get; } | 18 | public IntermediateSymbol SearchSpecificSymbol { get; } |
| 19 | 19 | ||
| 20 | /// <summary> | 20 | /// <summary> |
| 21 | /// Generates Burn manifest and ParameterInfo-style markup a search. | 21 | /// Generates Burn manifest and ParameterInfo-style markup a search. |
| @@ -23,45 +23,45 @@ namespace WixToolset.Core.Burn | |||
| 23 | /// <param name="writer"></param> | 23 | /// <param name="writer"></param> |
| 24 | public override void WriteXml(XmlTextWriter writer) | 24 | public override void WriteXml(XmlTextWriter writer) |
| 25 | { | 25 | { |
| 26 | switch (this.SearchSpecificTuple) | 26 | switch (this.SearchSpecificSymbol) |
| 27 | { | 27 | { |
| 28 | case WixComponentSearchTuple tuple: | 28 | case WixComponentSearchSymbol symbol: |
| 29 | this.WriteComponentSearchXml(writer, tuple); | 29 | this.WriteComponentSearchXml(writer, symbol); |
| 30 | break; | 30 | break; |
| 31 | case WixFileSearchTuple tuple: | 31 | case WixFileSearchSymbol symbol: |
| 32 | this.WriteFileSearchXml(writer, tuple); | 32 | this.WriteFileSearchXml(writer, symbol); |
| 33 | break; | 33 | break; |
| 34 | case WixProductSearchTuple tuple: | 34 | case WixProductSearchSymbol symbol: |
| 35 | this.WriteProductSearchXml(writer, tuple); | 35 | this.WriteProductSearchXml(writer, symbol); |
| 36 | break; | 36 | break; |
| 37 | case WixRegistrySearchTuple tuple: | 37 | case WixRegistrySearchSymbol symbol: |
| 38 | this.WriteRegistrySearchXml(writer, tuple); | 38 | this.WriteRegistrySearchXml(writer, symbol); |
| 39 | break; | 39 | break; |
| 40 | } | 40 | } |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | private void WriteComponentSearchXml(XmlTextWriter writer, WixComponentSearchTuple searchTuple) | 43 | private void WriteComponentSearchXml(XmlTextWriter writer, WixComponentSearchSymbol searchSymbol) |
| 44 | { | 44 | { |
| 45 | writer.WriteStartElement("MsiComponentSearch"); | 45 | writer.WriteStartElement("MsiComponentSearch"); |
| 46 | 46 | ||
| 47 | base.WriteXml(writer); | 47 | base.WriteXml(writer); |
| 48 | 48 | ||
| 49 | writer.WriteAttributeString("ComponentId", searchTuple.Guid); | 49 | writer.WriteAttributeString("ComponentId", searchSymbol.Guid); |
| 50 | 50 | ||
| 51 | if (!String.IsNullOrEmpty(searchTuple.ProductCode)) | 51 | if (!String.IsNullOrEmpty(searchSymbol.ProductCode)) |
| 52 | { | 52 | { |
| 53 | writer.WriteAttributeString("ProductCode", searchTuple.ProductCode); | 53 | writer.WriteAttributeString("ProductCode", searchSymbol.ProductCode); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | if (0 != (searchTuple.Attributes & WixComponentSearchAttributes.KeyPath)) | 56 | if (0 != (searchSymbol.Attributes & WixComponentSearchAttributes.KeyPath)) |
| 57 | { | 57 | { |
| 58 | writer.WriteAttributeString("Type", "keyPath"); | 58 | writer.WriteAttributeString("Type", "keyPath"); |
| 59 | } | 59 | } |
| 60 | else if (0 != (searchTuple.Attributes & WixComponentSearchAttributes.State)) | 60 | else if (0 != (searchSymbol.Attributes & WixComponentSearchAttributes.State)) |
| 61 | { | 61 | { |
| 62 | writer.WriteAttributeString("Type", "state"); | 62 | writer.WriteAttributeString("Type", "state"); |
| 63 | } | 63 | } |
| 64 | else if (0 != (searchTuple.Attributes & WixComponentSearchAttributes.WantDirectory)) | 64 | else if (0 != (searchSymbol.Attributes & WixComponentSearchAttributes.WantDirectory)) |
| 65 | { | 65 | { |
| 66 | writer.WriteAttributeString("Type", "directory"); | 66 | writer.WriteAttributeString("Type", "directory"); |
| 67 | } | 67 | } |
| @@ -69,18 +69,18 @@ namespace WixToolset.Core.Burn | |||
| 69 | writer.WriteEndElement(); | 69 | writer.WriteEndElement(); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | private void WriteFileSearchXml(XmlTextWriter writer, WixFileSearchTuple searchTuple) | 72 | private void WriteFileSearchXml(XmlTextWriter writer, WixFileSearchSymbol searchSymbol) |
| 73 | { | 73 | { |
| 74 | writer.WriteStartElement((0 == (searchTuple.Attributes & WixFileSearchAttributes.IsDirectory)) ? "FileSearch" : "DirectorySearch"); | 74 | writer.WriteStartElement((0 == (searchSymbol.Attributes & WixFileSearchAttributes.IsDirectory)) ? "FileSearch" : "DirectorySearch"); |
| 75 | 75 | ||
| 76 | base.WriteXml(writer); | 76 | base.WriteXml(writer); |
| 77 | 77 | ||
| 78 | writer.WriteAttributeString("Path", searchTuple.Path); | 78 | writer.WriteAttributeString("Path", searchSymbol.Path); |
| 79 | if (WixFileSearchAttributes.WantExists == (searchTuple.Attributes & WixFileSearchAttributes.WantExists)) | 79 | if (WixFileSearchAttributes.WantExists == (searchSymbol.Attributes & WixFileSearchAttributes.WantExists)) |
| 80 | { | 80 | { |
| 81 | writer.WriteAttributeString("Type", "exists"); | 81 | writer.WriteAttributeString("Type", "exists"); |
| 82 | } | 82 | } |
| 83 | else if (WixFileSearchAttributes.WantVersion == (searchTuple.Attributes & WixFileSearchAttributes.WantVersion)) | 83 | else if (WixFileSearchAttributes.WantVersion == (searchSymbol.Attributes & WixFileSearchAttributes.WantVersion)) |
| 84 | { | 84 | { |
| 85 | // Can never get here for DirectorySearch. | 85 | // Can never get here for DirectorySearch. |
| 86 | writer.WriteAttributeString("Type", "version"); | 86 | writer.WriteAttributeString("Type", "version"); |
| @@ -92,34 +92,34 @@ namespace WixToolset.Core.Burn | |||
| 92 | writer.WriteEndElement(); | 92 | writer.WriteEndElement(); |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | private void WriteProductSearchXml(XmlTextWriter writer, WixProductSearchTuple tuple) | 95 | private void WriteProductSearchXml(XmlTextWriter writer, WixProductSearchSymbol symbol) |
| 96 | { | 96 | { |
| 97 | writer.WriteStartElement("MsiProductSearch"); | 97 | writer.WriteStartElement("MsiProductSearch"); |
| 98 | 98 | ||
| 99 | base.WriteXml(writer); | 99 | base.WriteXml(writer); |
| 100 | 100 | ||
| 101 | if (0 != (tuple.Attributes & WixProductSearchAttributes.UpgradeCode)) | 101 | if (0 != (symbol.Attributes & WixProductSearchAttributes.UpgradeCode)) |
| 102 | { | 102 | { |
| 103 | writer.WriteAttributeString("UpgradeCode", tuple.Guid); | 103 | writer.WriteAttributeString("UpgradeCode", symbol.Guid); |
| 104 | } | 104 | } |
| 105 | else | 105 | else |
| 106 | { | 106 | { |
| 107 | writer.WriteAttributeString("ProductCode", tuple.Guid); | 107 | writer.WriteAttributeString("ProductCode", symbol.Guid); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | if (0 != (tuple.Attributes & WixProductSearchAttributes.Version)) | 110 | if (0 != (symbol.Attributes & WixProductSearchAttributes.Version)) |
| 111 | { | 111 | { |
| 112 | writer.WriteAttributeString("Type", "version"); | 112 | writer.WriteAttributeString("Type", "version"); |
| 113 | } | 113 | } |
| 114 | else if (0 != (tuple.Attributes & WixProductSearchAttributes.Language)) | 114 | else if (0 != (symbol.Attributes & WixProductSearchAttributes.Language)) |
| 115 | { | 115 | { |
| 116 | writer.WriteAttributeString("Type", "language"); | 116 | writer.WriteAttributeString("Type", "language"); |
| 117 | } | 117 | } |
| 118 | else if (0 != (tuple.Attributes & WixProductSearchAttributes.State)) | 118 | else if (0 != (symbol.Attributes & WixProductSearchAttributes.State)) |
| 119 | { | 119 | { |
| 120 | writer.WriteAttributeString("Type", "state"); | 120 | writer.WriteAttributeString("Type", "state"); |
| 121 | } | 121 | } |
| 122 | else if (0 != (tuple.Attributes & WixProductSearchAttributes.Assignment)) | 122 | else if (0 != (symbol.Attributes & WixProductSearchAttributes.Assignment)) |
| 123 | { | 123 | { |
| 124 | writer.WriteAttributeString("Type", "assignment"); | 124 | writer.WriteAttributeString("Type", "assignment"); |
| 125 | } | 125 | } |
| @@ -127,13 +127,13 @@ namespace WixToolset.Core.Burn | |||
| 127 | writer.WriteEndElement(); | 127 | writer.WriteEndElement(); |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | private void WriteRegistrySearchXml(XmlTextWriter writer, WixRegistrySearchTuple tuple) | 130 | private void WriteRegistrySearchXml(XmlTextWriter writer, WixRegistrySearchSymbol symbol) |
| 131 | { | 131 | { |
| 132 | writer.WriteStartElement("RegistrySearch"); | 132 | writer.WriteStartElement("RegistrySearch"); |
| 133 | 133 | ||
| 134 | base.WriteXml(writer); | 134 | base.WriteXml(writer); |
| 135 | 135 | ||
| 136 | switch (tuple.Root) | 136 | switch (symbol.Root) |
| 137 | { | 137 | { |
| 138 | case RegistryRootType.ClassesRoot: | 138 | case RegistryRootType.ClassesRoot: |
| 139 | writer.WriteAttributeString("Root", "HKCR"); | 139 | writer.WriteAttributeString("Root", "HKCR"); |
| @@ -149,25 +149,25 @@ namespace WixToolset.Core.Burn | |||
| 149 | break; | 149 | break; |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | writer.WriteAttributeString("Key", tuple.Key); | 152 | writer.WriteAttributeString("Key", symbol.Key); |
| 153 | 153 | ||
| 154 | if (!String.IsNullOrEmpty(tuple.Value)) | 154 | if (!String.IsNullOrEmpty(symbol.Value)) |
| 155 | { | 155 | { |
| 156 | writer.WriteAttributeString("Value", tuple.Value); | 156 | writer.WriteAttributeString("Value", symbol.Value); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | var existenceOnly = 0 != (tuple.Attributes & WixRegistrySearchAttributes.WantExists); | 159 | var existenceOnly = 0 != (symbol.Attributes & WixRegistrySearchAttributes.WantExists); |
| 160 | 160 | ||
| 161 | writer.WriteAttributeString("Type", existenceOnly ? "exists" : "value"); | 161 | writer.WriteAttributeString("Type", existenceOnly ? "exists" : "value"); |
| 162 | 162 | ||
| 163 | if (0 != (tuple.Attributes & WixRegistrySearchAttributes.Win64)) | 163 | if (0 != (symbol.Attributes & WixRegistrySearchAttributes.Win64)) |
| 164 | { | 164 | { |
| 165 | writer.WriteAttributeString("Win64", "yes"); | 165 | writer.WriteAttributeString("Win64", "yes"); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | if (!existenceOnly) | 168 | if (!existenceOnly) |
| 169 | { | 169 | { |
| 170 | if (0 != (tuple.Attributes & WixRegistrySearchAttributes.ExpandEnvironmentVariables)) | 170 | if (0 != (symbol.Attributes & WixRegistrySearchAttributes.ExpandEnvironmentVariables)) |
| 171 | { | 171 | { |
| 172 | writer.WriteAttributeString("ExpandEnvironment", "yes"); | 172 | writer.WriteAttributeString("ExpandEnvironment", "yes"); |
| 173 | } | 173 | } |
diff --git a/src/WixToolset.Core.Burn/Bind/ProcessDependencyProvidersCommand.cs b/src/WixToolset.Core.Burn/Bind/ProcessDependencyProvidersCommand.cs index e228b296..29815203 100644 --- a/src/WixToolset.Core.Burn/Bind/ProcessDependencyProvidersCommand.cs +++ b/src/WixToolset.Core.Burn/Bind/ProcessDependencyProvidersCommand.cs | |||
| @@ -8,7 +8,7 @@ namespace WixToolset.Core.Burn.Bind | |||
| 8 | using WixToolset.Data; | 8 | using WixToolset.Data; |
| 9 | using WixToolset.Core.Burn.Bundles; | 9 | using WixToolset.Core.Burn.Bundles; |
| 10 | using WixToolset.Extensibility.Services; | 10 | using WixToolset.Extensibility.Services; |
| 11 | using WixToolset.Data.Tuples; | 11 | using WixToolset.Data.Symbols; |
| 12 | 12 | ||
| 13 | internal class ProcessDependencyProvidersCommand | 13 | internal class ProcessDependencyProvidersCommand |
| 14 | { | 14 | { |
| @@ -22,7 +22,7 @@ namespace WixToolset.Core.Burn.Bind | |||
| 22 | 22 | ||
| 23 | public string BundleProviderKey { get; private set; } | 23 | public string BundleProviderKey { get; private set; } |
| 24 | 24 | ||
| 25 | public Dictionary<string, ProvidesDependencyTuple> DependencyTuplesByKey { get; private set; } | 25 | public Dictionary<string, ProvidesDependencySymbol> DependencySymbolsByKey { get; private set; } |
| 26 | 26 | ||
| 27 | private IMessaging Messaging { get; } | 27 | private IMessaging Messaging { get; } |
| 28 | 28 | ||
| @@ -38,42 +38,42 @@ namespace WixToolset.Core.Burn.Bind | |||
| 38 | /// </summary> | 38 | /// </summary> |
| 39 | public void Execute() | 39 | public void Execute() |
| 40 | { | 40 | { |
| 41 | var wixDependencyProviderTuples = this.Section.Tuples.OfType<WixDependencyProviderTuple>(); | 41 | var wixDependencyProviderSymbols = this.Section.Symbols.OfType<WixDependencyProviderSymbol>(); |
| 42 | 42 | ||
| 43 | foreach (var wixDependencyProviderTuple in wixDependencyProviderTuples) | 43 | foreach (var wixDependencyProviderSymbol in wixDependencyProviderSymbols) |
| 44 | { | 44 | { |
| 45 | // Sets the provider key for the bundle, if it is not set already. | 45 | // Sets the provider key for the bundle, if it is not set already. |
| 46 | if (String.IsNullOrEmpty(this.BundleProviderKey)) | 46 | if (String.IsNullOrEmpty(this.BundleProviderKey)) |
| 47 | { | 47 | { |
| 48 | if (wixDependencyProviderTuple.Bundle) | 48 | if (wixDependencyProviderSymbol.Bundle) |
| 49 | { | 49 | { |
| 50 | this.BundleProviderKey = wixDependencyProviderTuple.ProviderKey; | 50 | this.BundleProviderKey = wixDependencyProviderSymbol.ProviderKey; |
| 51 | } | 51 | } |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | // Import any authored dependencies. These may merge with imported provides from MSI packages. | 54 | // Import any authored dependencies. These may merge with imported provides from MSI packages. |
| 55 | var packageId = wixDependencyProviderTuple.Id.Id; | 55 | var packageId = wixDependencyProviderSymbol.Id.Id; |
| 56 | 56 | ||
| 57 | if (this.Facades.TryGetValue(packageId, out var facade)) | 57 | if (this.Facades.TryGetValue(packageId, out var facade)) |
| 58 | { | 58 | { |
| 59 | var dependency = this.Section.AddTuple(new ProvidesDependencyTuple(wixDependencyProviderTuple.SourceLineNumbers, wixDependencyProviderTuple.Id) | 59 | var dependency = this.Section.AddSymbol(new ProvidesDependencySymbol(wixDependencyProviderSymbol.SourceLineNumbers, wixDependencyProviderSymbol.Id) |
| 60 | { | 60 | { |
| 61 | PackageRef = packageId, | 61 | PackageRef = packageId, |
| 62 | Key = wixDependencyProviderTuple.ProviderKey, | 62 | Key = wixDependencyProviderSymbol.ProviderKey, |
| 63 | Version = wixDependencyProviderTuple.Version, | 63 | Version = wixDependencyProviderSymbol.Version, |
| 64 | DisplayName = wixDependencyProviderTuple.DisplayName, | 64 | DisplayName = wixDependencyProviderSymbol.DisplayName, |
| 65 | Attributes = (int)wixDependencyProviderTuple.Attributes | 65 | Attributes = (int)wixDependencyProviderSymbol.Attributes |
| 66 | }); | 66 | }); |
| 67 | 67 | ||
| 68 | if (String.IsNullOrEmpty(dependency.Key)) | 68 | if (String.IsNullOrEmpty(dependency.Key)) |
| 69 | { | 69 | { |
| 70 | switch (facade.SpecificPackageTuple) | 70 | switch (facade.SpecificPackageSymbol) |
| 71 | { | 71 | { |
| 72 | // The WixDependencyExtension allows an empty Key for MSIs and MSPs. | 72 | // The WixDependencyExtension allows an empty Key for MSIs and MSPs. |
| 73 | case WixBundleMsiPackageTuple msiPackage: | 73 | case WixBundleMsiPackageSymbol msiPackage: |
| 74 | dependency.Key = msiPackage.ProductCode; | 74 | dependency.Key = msiPackage.ProductCode; |
| 75 | break; | 75 | break; |
| 76 | case WixBundleMspPackageTuple mspPackage: | 76 | case WixBundleMspPackageSymbol mspPackage: |
| 77 | dependency.Key = mspPackage.PatchCode; | 77 | dependency.Key = mspPackage.PatchCode; |
| 78 | break; | 78 | break; |
| 79 | } | 79 | } |
| @@ -81,7 +81,7 @@ namespace WixToolset.Core.Burn.Bind | |||
| 81 | 81 | ||
| 82 | if (String.IsNullOrEmpty(dependency.Version)) | 82 | if (String.IsNullOrEmpty(dependency.Version)) |
| 83 | { | 83 | { |
| 84 | dependency.Version = facade.PackageTuple.Version; | 84 | dependency.Version = facade.PackageSymbol.Version; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | // If the version is still missing, a version could not be harvested from the package and was not authored. | 87 | // If the version is still missing, a version could not be harvested from the package and was not authored. |
| @@ -92,55 +92,55 @@ namespace WixToolset.Core.Burn.Bind | |||
| 92 | 92 | ||
| 93 | if (String.IsNullOrEmpty(dependency.DisplayName)) | 93 | if (String.IsNullOrEmpty(dependency.DisplayName)) |
| 94 | { | 94 | { |
| 95 | dependency.DisplayName = facade.PackageTuple.DisplayName; | 95 | dependency.DisplayName = facade.PackageSymbol.DisplayName; |
| 96 | } | 96 | } |
| 97 | } | 97 | } |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | this.DependencyTuplesByKey = this.GetDependencyTuplesByKey(); | 100 | this.DependencySymbolsByKey = this.GetDependencySymbolsByKey(); |
| 101 | 101 | ||
| 102 | // Generate providers for MSI and MSP packages that still do not have providers. | 102 | // Generate providers for MSI and MSP packages that still do not have providers. |
| 103 | foreach (var facade in this.Facades.Values) | 103 | foreach (var facade in this.Facades.Values) |
| 104 | { | 104 | { |
| 105 | string key = null; | 105 | string key = null; |
| 106 | 106 | ||
| 107 | //if (WixBundlePackageType.Msi == facade.PackageTuple.Type) | 107 | //if (WixBundlePackageType.Msi == facade.PackageSymbol.Type) |
| 108 | if (facade.SpecificPackageTuple is WixBundleMsiPackageTuple msiPackage) | 108 | if (facade.SpecificPackageSymbol is WixBundleMsiPackageSymbol msiPackage) |
| 109 | { | 109 | { |
| 110 | //var msiPackage = (WixBundleMsiPackageTuple)facade.SpecificPackageTuple; | 110 | //var msiPackage = (WixBundleMsiPackageSymbol)facade.SpecificPackageSymbol; |
| 111 | key = msiPackage.ProductCode; | 111 | key = msiPackage.ProductCode; |
| 112 | } | 112 | } |
| 113 | //else if (WixBundlePackageType.Msp == facade.PackageTuple.Type) | 113 | //else if (WixBundlePackageType.Msp == facade.PackageSymbol.Type) |
| 114 | else if (facade.SpecificPackageTuple is WixBundleMspPackageTuple mspPackage) | 114 | else if (facade.SpecificPackageSymbol is WixBundleMspPackageSymbol mspPackage) |
| 115 | { | 115 | { |
| 116 | //var mspPackage = (WixBundleMspPackageTuple)facade.SpecificPackageTuple; | 116 | //var mspPackage = (WixBundleMspPackageSymbol)facade.SpecificPackageSymbol; |
| 117 | key = mspPackage.PatchCode; | 117 | key = mspPackage.PatchCode; |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | if (!String.IsNullOrEmpty(key) && !this.DependencyTuplesByKey.ContainsKey(key)) | 120 | if (!String.IsNullOrEmpty(key) && !this.DependencySymbolsByKey.ContainsKey(key)) |
| 121 | { | 121 | { |
| 122 | var dependency = this.Section.AddTuple(new ProvidesDependencyTuple(facade.PackageTuple.SourceLineNumbers, facade.PackageTuple.Id) | 122 | var dependency = this.Section.AddSymbol(new ProvidesDependencySymbol(facade.PackageSymbol.SourceLineNumbers, facade.PackageSymbol.Id) |
| 123 | { | 123 | { |
| 124 | PackageRef = facade.PackageId, | 124 | PackageRef = facade.PackageId, |
| 125 | Key = key, | 125 | Key = key, |
| 126 | Version = facade.PackageTuple.Version, | 126 | Version = facade.PackageSymbol.Version, |
| 127 | DisplayName = facade.PackageTuple.DisplayName | 127 | DisplayName = facade.PackageSymbol.DisplayName |
| 128 | }); | 128 | }); |
| 129 | 129 | ||
| 130 | this.DependencyTuplesByKey.Add(dependency.Key, dependency); | 130 | this.DependencySymbolsByKey.Add(dependency.Key, dependency); |
| 131 | } | 131 | } |
| 132 | } | 132 | } |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | private Dictionary<string, ProvidesDependencyTuple> GetDependencyTuplesByKey() | 135 | private Dictionary<string, ProvidesDependencySymbol> GetDependencySymbolsByKey() |
| 136 | { | 136 | { |
| 137 | var dependencyTuplesByKey = new Dictionary<string, ProvidesDependencyTuple>(); | 137 | var dependencySymbolsByKey = new Dictionary<string, ProvidesDependencySymbol>(); |
| 138 | 138 | ||
| 139 | var dependencyTuples = this.Section.Tuples.OfType<ProvidesDependencyTuple>(); | 139 | var dependencySymbols = this.Section.Symbols.OfType<ProvidesDependencySymbol>(); |
| 140 | 140 | ||
| 141 | foreach (var dependency in dependencyTuples) | 141 | foreach (var dependency in dependencySymbols) |
| 142 | { | 142 | { |
| 143 | if (dependencyTuplesByKey.TryGetValue(dependency.Key, out var collision)) | 143 | if (dependencySymbolsByKey.TryGetValue(dependency.Key, out var collision)) |
| 144 | { | 144 | { |
| 145 | // If not a perfect dependency collision, display an error. | 145 | // If not a perfect dependency collision, display an error. |
| 146 | if (dependency.Key != collision.Key || | 146 | if (dependency.Key != collision.Key || |
| @@ -152,11 +152,11 @@ namespace WixToolset.Core.Burn.Bind | |||
| 152 | } | 152 | } |
| 153 | else | 153 | else |
| 154 | { | 154 | { |
| 155 | dependencyTuplesByKey.Add(dependency.Key, dependency); | 155 | dependencySymbolsByKey.Add(dependency.Key, dependency); |
| 156 | } | 156 | } |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | return dependencyTuplesByKey; | 159 | return dependencySymbolsByKey; |
| 160 | } | 160 | } |
| 161 | } | 161 | } |
| 162 | } | 162 | } |
diff --git a/src/WixToolset.Core.Burn/Bind/SetVariableSearchFacade.cs b/src/WixToolset.Core.Burn/Bind/SetVariableSearchFacade.cs index 0fe60422..fb6f72dd 100644 --- a/src/WixToolset.Core.Burn/Bind/SetVariableSearchFacade.cs +++ b/src/WixToolset.Core.Burn/Bind/SetVariableSearchFacade.cs | |||
| @@ -3,17 +3,17 @@ | |||
| 3 | namespace WixToolset.Core.Burn | 3 | namespace WixToolset.Core.Burn |
| 4 | { | 4 | { |
| 5 | using System.Xml; | 5 | using System.Xml; |
| 6 | using WixToolset.Data.Tuples; | 6 | using WixToolset.Data.Symbols; |
| 7 | 7 | ||
| 8 | internal class SetVariableSearchFacade : BaseSearchFacade | 8 | internal class SetVariableSearchFacade : BaseSearchFacade |
| 9 | { | 9 | { |
| 10 | public SetVariableSearchFacade(WixSearchTuple searchTuple, WixSetVariableTuple setVariableTuple) | 10 | public SetVariableSearchFacade(WixSearchSymbol searchSymbol, WixSetVariableSymbol setVariableSymbol) |
| 11 | { | 11 | { |
| 12 | this.SearchTuple = searchTuple; | 12 | this.SearchSymbol = searchSymbol; |
| 13 | this.SetVariableTuple = setVariableTuple; | 13 | this.SetVariableSymbol = setVariableSymbol; |
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | private WixSetVariableTuple SetVariableTuple { get; } | 16 | private WixSetVariableSymbol SetVariableSymbol { get; } |
| 17 | 17 | ||
| 18 | public override void WriteXml(XmlTextWriter writer) | 18 | public override void WriteXml(XmlTextWriter writer) |
| 19 | { | 19 | { |
| @@ -21,10 +21,10 @@ namespace WixToolset.Core.Burn | |||
| 21 | 21 | ||
| 22 | base.WriteXml(writer); | 22 | base.WriteXml(writer); |
| 23 | 23 | ||
| 24 | if (this.SetVariableTuple.Type != null) | 24 | if (this.SetVariableSymbol.Type != null) |
| 25 | { | 25 | { |
| 26 | writer.WriteAttributeString("Value", this.SetVariableTuple.Value); | 26 | writer.WriteAttributeString("Value", this.SetVariableSymbol.Value); |
| 27 | writer.WriteAttributeString("Type", this.SetVariableTuple.Type); | 27 | writer.WriteAttributeString("Type", this.SetVariableSymbol.Type); |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | writer.WriteEndElement(); | 30 | writer.WriteEndElement(); |
diff --git a/src/WixToolset.Core.Burn/Bundles/AutomaticallySlipstreamPatchesCommand.cs b/src/WixToolset.Core.Burn/Bundles/AutomaticallySlipstreamPatchesCommand.cs index 6e08c68e..30edf7de 100644 --- a/src/WixToolset.Core.Burn/Bundles/AutomaticallySlipstreamPatchesCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/AutomaticallySlipstreamPatchesCommand.cs | |||
| @@ -7,7 +7,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 7 | using System.Diagnostics; | 7 | using System.Diagnostics; |
| 8 | using System.Linq; | 8 | using System.Linq; |
| 9 | using WixToolset.Data; | 9 | using WixToolset.Data; |
| 10 | using WixToolset.Data.Tuples; | 10 | using WixToolset.Data.Symbols; |
| 11 | 11 | ||
| 12 | internal class AutomaticallySlipstreamPatchesCommand | 12 | internal class AutomaticallySlipstreamPatchesCommand |
| 13 | { | 13 | { |
| @@ -23,42 +23,42 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 23 | 23 | ||
| 24 | public void Execute() | 24 | public void Execute() |
| 25 | { | 25 | { |
| 26 | var msiPackages = new List<WixBundleMsiPackageTuple>(); | 26 | var msiPackages = new List<WixBundleMsiPackageSymbol>(); |
| 27 | var targetsProductCode = new Dictionary<string, List<WixBundlePatchTargetCodeTuple>>(); | 27 | var targetsProductCode = new Dictionary<string, List<WixBundlePatchTargetCodeSymbol>>(); |
| 28 | var targetsUpgradeCode = new Dictionary<string, List<WixBundlePatchTargetCodeTuple>>(); | 28 | var targetsUpgradeCode = new Dictionary<string, List<WixBundlePatchTargetCodeSymbol>>(); |
| 29 | 29 | ||
| 30 | foreach (var facade in this.PackageFacades) | 30 | foreach (var facade in this.PackageFacades) |
| 31 | { | 31 | { |
| 32 | // Keep track of all MSI packages. | 32 | // Keep track of all MSI packages. |
| 33 | if (facade.SpecificPackageTuple is WixBundleMsiPackageTuple msiPackage) | 33 | if (facade.SpecificPackageSymbol is WixBundleMsiPackageSymbol msiPackage) |
| 34 | { | 34 | { |
| 35 | msiPackages.Add(msiPackage); | 35 | msiPackages.Add(msiPackage); |
| 36 | } | 36 | } |
| 37 | else if (facade.SpecificPackageTuple is WixBundleMspPackageTuple mspPackage && mspPackage.Slipstream) | 37 | else if (facade.SpecificPackageSymbol is WixBundleMspPackageSymbol mspPackage && mspPackage.Slipstream) |
| 38 | { | 38 | { |
| 39 | var patchTargetCodeTuples = this.Section.Tuples | 39 | var patchTargetCodeSymbols = this.Section.Symbols |
| 40 | .OfType<WixBundlePatchTargetCodeTuple>() | 40 | .OfType<WixBundlePatchTargetCodeSymbol>() |
| 41 | .Where(r => r.PackageRef == facade.PackageId); | 41 | .Where(r => r.PackageRef == facade.PackageId); |
| 42 | 42 | ||
| 43 | // Index target ProductCodes and UpgradeCodes for slipstreamed MSPs. | 43 | // Index target ProductCodes and UpgradeCodes for slipstreamed MSPs. |
| 44 | foreach (var tuple in patchTargetCodeTuples) | 44 | foreach (var symbol in patchTargetCodeSymbols) |
| 45 | { | 45 | { |
| 46 | if (tuple.TargetsProductCode) | 46 | if (symbol.TargetsProductCode) |
| 47 | { | 47 | { |
| 48 | if (!targetsProductCode.TryGetValue(tuple.TargetCode, out var tuples)) | 48 | if (!targetsProductCode.TryGetValue(symbol.TargetCode, out var symbols)) |
| 49 | { | 49 | { |
| 50 | tuples = new List<WixBundlePatchTargetCodeTuple>(); | 50 | symbols = new List<WixBundlePatchTargetCodeSymbol>(); |
| 51 | targetsProductCode.Add(tuple.TargetCode, tuples); | 51 | targetsProductCode.Add(symbol.TargetCode, symbols); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | tuples.Add(tuple); | 54 | symbols.Add(symbol); |
| 55 | } | 55 | } |
| 56 | else if (tuple.TargetsUpgradeCode) | 56 | else if (symbol.TargetsUpgradeCode) |
| 57 | { | 57 | { |
| 58 | if (!targetsUpgradeCode.TryGetValue(tuple.TargetCode, out var tuples)) | 58 | if (!targetsUpgradeCode.TryGetValue(symbol.TargetCode, out var symbols)) |
| 59 | { | 59 | { |
| 60 | tuples = new List<WixBundlePatchTargetCodeTuple>(); | 60 | symbols = new List<WixBundlePatchTargetCodeSymbol>(); |
| 61 | targetsUpgradeCode.Add(tuple.TargetCode, tuples); | 61 | targetsUpgradeCode.Add(symbol.TargetCode, symbols); |
| 62 | } | 62 | } |
| 63 | } | 63 | } |
| 64 | } | 64 | } |
| @@ -70,39 +70,39 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 70 | // Loop through the MSI and slipstream patches targeting it. | 70 | // Loop through the MSI and slipstream patches targeting it. |
| 71 | foreach (var msi in msiPackages) | 71 | foreach (var msi in msiPackages) |
| 72 | { | 72 | { |
| 73 | if (targetsProductCode.TryGetValue(msi.ProductCode, out var tuples)) | 73 | if (targetsProductCode.TryGetValue(msi.ProductCode, out var symbols)) |
| 74 | { | 74 | { |
| 75 | foreach (var tuple in tuples) | 75 | foreach (var symbol in symbols) |
| 76 | { | 76 | { |
| 77 | Debug.Assert(tuple.TargetsProductCode); | 77 | Debug.Assert(symbol.TargetsProductCode); |
| 78 | Debug.Assert(!tuple.TargetsUpgradeCode); | 78 | Debug.Assert(!symbol.TargetsUpgradeCode); |
| 79 | 79 | ||
| 80 | this.TryAddSlipstreamTuple(slipstreamMspIds, msi, tuple); | 80 | this.TryAddSlipstreamSymbol(slipstreamMspIds, msi, symbol); |
| 81 | } | 81 | } |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | if (!String.IsNullOrEmpty(msi.UpgradeCode) && targetsUpgradeCode.TryGetValue(msi.UpgradeCode, out tuples)) | 84 | if (!String.IsNullOrEmpty(msi.UpgradeCode) && targetsUpgradeCode.TryGetValue(msi.UpgradeCode, out symbols)) |
| 85 | { | 85 | { |
| 86 | foreach (var tuple in tuples) | 86 | foreach (var symbol in symbols) |
| 87 | { | 87 | { |
| 88 | Debug.Assert(!tuple.TargetsProductCode); | 88 | Debug.Assert(!symbol.TargetsProductCode); |
| 89 | Debug.Assert(tuple.TargetsUpgradeCode); | 89 | Debug.Assert(symbol.TargetsUpgradeCode); |
| 90 | 90 | ||
| 91 | this.TryAddSlipstreamTuple(slipstreamMspIds, msi, tuple); | 91 | this.TryAddSlipstreamSymbol(slipstreamMspIds, msi, symbol); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | tuples = null; | 94 | symbols = null; |
| 95 | } | 95 | } |
| 96 | } | 96 | } |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | private bool TryAddSlipstreamTuple(HashSet<string> slipstreamMspIds, WixBundleMsiPackageTuple msiPackage, WixBundlePatchTargetCodeTuple patchTargetCode) | 99 | private bool TryAddSlipstreamSymbol(HashSet<string> slipstreamMspIds, WixBundleMsiPackageSymbol msiPackage, WixBundlePatchTargetCodeSymbol patchTargetCode) |
| 100 | { | 100 | { |
| 101 | var id = new Identifier(AccessModifier.Private, msiPackage.Id.Id, patchTargetCode.PackageRef); | 101 | var id = new Identifier(AccessModifier.Private, msiPackage.Id.Id, patchTargetCode.PackageRef); |
| 102 | 102 | ||
| 103 | if (slipstreamMspIds.Add(id.Id)) | 103 | if (slipstreamMspIds.Add(id.Id)) |
| 104 | { | 104 | { |
| 105 | this.Section.AddTuple(new WixBundleSlipstreamMspTuple(patchTargetCode.SourceLineNumbers) | 105 | this.Section.AddSymbol(new WixBundleSlipstreamMspSymbol(patchTargetCode.SourceLineNumbers) |
| 106 | { | 106 | { |
| 107 | TargetPackageRef = msiPackage.Id.Id, | 107 | TargetPackageRef = msiPackage.Id.Id, |
| 108 | MspPackageRef = patchTargetCode.PackageRef, | 108 | MspPackageRef = patchTargetCode.PackageRef, |
diff --git a/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs b/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs index 4468fee5..b4648d18 100644 --- a/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs | |||
| @@ -11,24 +11,24 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 11 | using System.Xml; | 11 | using System.Xml; |
| 12 | using WixToolset.Data; | 12 | using WixToolset.Data; |
| 13 | using WixToolset.Data.Burn; | 13 | using WixToolset.Data.Burn; |
| 14 | using WixToolset.Data.Tuples; | 14 | using WixToolset.Data.Symbols; |
| 15 | 15 | ||
| 16 | internal class CreateBootstrapperApplicationManifestCommand | 16 | internal class CreateBootstrapperApplicationManifestCommand |
| 17 | { | 17 | { |
| 18 | public CreateBootstrapperApplicationManifestCommand(IntermediateSection section, WixBundleTuple bundleTuple, IEnumerable<PackageFacade> chainPackages, int lastUXPayloadIndex, Dictionary<string, WixBundlePayloadTuple> payloadTuples, string intermediateFolder, IInternalBurnBackendHelper internalBurnBackendHelper) | 18 | public CreateBootstrapperApplicationManifestCommand(IntermediateSection section, WixBundleSymbol bundleSymbol, IEnumerable<PackageFacade> chainPackages, int lastUXPayloadIndex, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols, string intermediateFolder, IInternalBurnBackendHelper internalBurnBackendHelper) |
| 19 | { | 19 | { |
| 20 | this.Section = section; | 20 | this.Section = section; |
| 21 | this.BundleTuple = bundleTuple; | 21 | this.BundleSymbol = bundleSymbol; |
| 22 | this.ChainPackages = chainPackages; | 22 | this.ChainPackages = chainPackages; |
| 23 | this.LastUXPayloadIndex = lastUXPayloadIndex; | 23 | this.LastUXPayloadIndex = lastUXPayloadIndex; |
| 24 | this.Payloads = payloadTuples; | 24 | this.Payloads = payloadSymbols; |
| 25 | this.IntermediateFolder = intermediateFolder; | 25 | this.IntermediateFolder = intermediateFolder; |
| 26 | this.InternalBurnBackendHelper = internalBurnBackendHelper; | 26 | this.InternalBurnBackendHelper = internalBurnBackendHelper; |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | private IntermediateSection Section { get; } | 29 | private IntermediateSection Section { get; } |
| 30 | 30 | ||
| 31 | private WixBundleTuple BundleTuple { get; } | 31 | private WixBundleSymbol BundleSymbol { get; } |
| 32 | 32 | ||
| 33 | private IEnumerable<PackageFacade> ChainPackages { get; } | 33 | private IEnumerable<PackageFacade> ChainPackages { get; } |
| 34 | 34 | ||
| @@ -36,11 +36,11 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 36 | 36 | ||
| 37 | private int LastUXPayloadIndex { get; } | 37 | private int LastUXPayloadIndex { get; } |
| 38 | 38 | ||
| 39 | private Dictionary<string, WixBundlePayloadTuple> Payloads { get; } | 39 | private Dictionary<string, WixBundlePayloadSymbol> Payloads { get; } |
| 40 | 40 | ||
| 41 | private string IntermediateFolder { get; } | 41 | private string IntermediateFolder { get; } |
| 42 | 42 | ||
| 43 | public WixBundlePayloadTuple BootstrapperApplicationManifestPayloadRow { get; private set; } | 43 | public WixBundlePayloadSymbol BootstrapperApplicationManifestPayloadRow { get; private set; } |
| 44 | 44 | ||
| 45 | public string OutputPath { get; private set; } | 45 | public string OutputPath { get; private set; } |
| 46 | 46 | ||
| @@ -84,12 +84,12 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 84 | { | 84 | { |
| 85 | writer.WriteStartElement("WixBundleProperties"); | 85 | writer.WriteStartElement("WixBundleProperties"); |
| 86 | 86 | ||
| 87 | writer.WriteAttributeString("DisplayName", this.BundleTuple.Name); | 87 | writer.WriteAttributeString("DisplayName", this.BundleSymbol.Name); |
| 88 | writer.WriteAttributeString("LogPathVariable", this.BundleTuple.LogPathVariable); | 88 | writer.WriteAttributeString("LogPathVariable", this.BundleSymbol.LogPathVariable); |
| 89 | writer.WriteAttributeString("Compressed", this.BundleTuple.Compressed == true ? "yes" : "no"); | 89 | writer.WriteAttributeString("Compressed", this.BundleSymbol.Compressed == true ? "yes" : "no"); |
| 90 | writer.WriteAttributeString("Id", this.BundleTuple.BundleId.ToUpperInvariant()); | 90 | writer.WriteAttributeString("Id", this.BundleSymbol.BundleId.ToUpperInvariant()); |
| 91 | writer.WriteAttributeString("UpgradeCode", this.BundleTuple.UpgradeCode); | 91 | writer.WriteAttributeString("UpgradeCode", this.BundleSymbol.UpgradeCode); |
| 92 | writer.WriteAttributeString("PerMachine", this.BundleTuple.PerMachine ? "yes" : "no"); | 92 | writer.WriteAttributeString("PerMachine", this.BundleSymbol.PerMachine ? "yes" : "no"); |
| 93 | 93 | ||
| 94 | writer.WriteEndElement(); | 94 | writer.WriteEndElement(); |
| 95 | } | 95 | } |
| @@ -98,35 +98,35 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 98 | { | 98 | { |
| 99 | foreach (var package in this.ChainPackages) | 99 | foreach (var package in this.ChainPackages) |
| 100 | { | 100 | { |
| 101 | var packagePayload = this.Payloads[package.PackageTuple.PayloadRef]; | 101 | var packagePayload = this.Payloads[package.PackageSymbol.PayloadRef]; |
| 102 | 102 | ||
| 103 | var size = package.PackageTuple.Size.ToString(CultureInfo.InvariantCulture); | 103 | var size = package.PackageSymbol.Size.ToString(CultureInfo.InvariantCulture); |
| 104 | 104 | ||
| 105 | writer.WriteStartElement("WixPackageProperties"); | 105 | writer.WriteStartElement("WixPackageProperties"); |
| 106 | 106 | ||
| 107 | writer.WriteAttributeString("Package", package.PackageId); | 107 | writer.WriteAttributeString("Package", package.PackageId); |
| 108 | writer.WriteAttributeString("Vital", package.PackageTuple.Vital == true ? "yes" : "no"); | 108 | writer.WriteAttributeString("Vital", package.PackageSymbol.Vital == true ? "yes" : "no"); |
| 109 | 109 | ||
| 110 | if (!String.IsNullOrEmpty(package.PackageTuple.DisplayName)) | 110 | if (!String.IsNullOrEmpty(package.PackageSymbol.DisplayName)) |
| 111 | { | 111 | { |
| 112 | writer.WriteAttributeString("DisplayName", package.PackageTuple.DisplayName); | 112 | writer.WriteAttributeString("DisplayName", package.PackageSymbol.DisplayName); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | if (!String.IsNullOrEmpty(package.PackageTuple.Description)) | 115 | if (!String.IsNullOrEmpty(package.PackageSymbol.Description)) |
| 116 | { | 116 | { |
| 117 | writer.WriteAttributeString("Description", package.PackageTuple.Description); | 117 | writer.WriteAttributeString("Description", package.PackageSymbol.Description); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | writer.WriteAttributeString("DownloadSize", size); | 120 | writer.WriteAttributeString("DownloadSize", size); |
| 121 | writer.WriteAttributeString("PackageSize", size); | 121 | writer.WriteAttributeString("PackageSize", size); |
| 122 | writer.WriteAttributeString("InstalledSize", package.PackageTuple.InstallSize?.ToString(CultureInfo.InvariantCulture) ?? size); | 122 | writer.WriteAttributeString("InstalledSize", package.PackageSymbol.InstallSize?.ToString(CultureInfo.InvariantCulture) ?? size); |
| 123 | writer.WriteAttributeString("PackageType", package.PackageTuple.Type.ToString()); | 123 | writer.WriteAttributeString("PackageType", package.PackageSymbol.Type.ToString()); |
| 124 | writer.WriteAttributeString("Permanent", package.PackageTuple.Permanent ? "yes" : "no"); | 124 | writer.WriteAttributeString("Permanent", package.PackageSymbol.Permanent ? "yes" : "no"); |
| 125 | writer.WriteAttributeString("LogPathVariable", package.PackageTuple.LogPathVariable); | 125 | writer.WriteAttributeString("LogPathVariable", package.PackageSymbol.LogPathVariable); |
| 126 | writer.WriteAttributeString("RollbackLogPathVariable", package.PackageTuple.RollbackLogPathVariable); | 126 | writer.WriteAttributeString("RollbackLogPathVariable", package.PackageSymbol.RollbackLogPathVariable); |
| 127 | writer.WriteAttributeString("Compressed", packagePayload.Compressed == true ? "yes" : "no"); | 127 | writer.WriteAttributeString("Compressed", packagePayload.Compressed == true ? "yes" : "no"); |
| 128 | 128 | ||
| 129 | if (package.SpecificPackageTuple is WixBundleMsiPackageTuple msiPackage) | 129 | if (package.SpecificPackageSymbol is WixBundleMsiPackageSymbol msiPackage) |
| 130 | { | 130 | { |
| 131 | if (!String.IsNullOrEmpty(msiPackage.ProductCode)) | 131 | if (!String.IsNullOrEmpty(msiPackage.ProductCode)) |
| 132 | { | 132 | { |
| @@ -138,7 +138,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 138 | writer.WriteAttributeString("UpgradeCode", msiPackage.UpgradeCode); | 138 | writer.WriteAttributeString("UpgradeCode", msiPackage.UpgradeCode); |
| 139 | } | 139 | } |
| 140 | } | 140 | } |
| 141 | else if (package.SpecificPackageTuple is WixBundleMspPackageTuple mspPackage) | 141 | else if (package.SpecificPackageSymbol is WixBundleMspPackageSymbol mspPackage) |
| 142 | { | 142 | { |
| 143 | if (!String.IsNullOrEmpty(mspPackage.PatchCode)) | 143 | if (!String.IsNullOrEmpty(mspPackage.PatchCode)) |
| 144 | { | 144 | { |
| @@ -146,17 +146,17 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 146 | } | 146 | } |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | if (!String.IsNullOrEmpty(package.PackageTuple.Version)) | 149 | if (!String.IsNullOrEmpty(package.PackageSymbol.Version)) |
| 150 | { | 150 | { |
| 151 | writer.WriteAttributeString("Version", package.PackageTuple.Version); | 151 | writer.WriteAttributeString("Version", package.PackageSymbol.Version); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | if (!String.IsNullOrEmpty(package.PackageTuple.InstallCondition)) | 154 | if (!String.IsNullOrEmpty(package.PackageSymbol.InstallCondition)) |
| 155 | { | 155 | { |
| 156 | writer.WriteAttributeString("InstallCondition", package.PackageTuple.InstallCondition); | 156 | writer.WriteAttributeString("InstallCondition", package.PackageSymbol.InstallCondition); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | switch (package.PackageTuple.Cache) | 159 | switch (package.PackageSymbol.Cache) |
| 160 | { | 160 | { |
| 161 | case YesNoAlwaysType.No: | 161 | case YesNoAlwaysType.No: |
| 162 | writer.WriteAttributeString("Cache", "no"); | 162 | writer.WriteAttributeString("Cache", "no"); |
| @@ -175,35 +175,35 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 175 | 175 | ||
| 176 | private void WriteFeatureInfo(XmlTextWriter writer) | 176 | private void WriteFeatureInfo(XmlTextWriter writer) |
| 177 | { | 177 | { |
| 178 | var featureTuples = this.Section.Tuples.OfType<WixBundleMsiFeatureTuple>(); | 178 | var featureSymbols = this.Section.Symbols.OfType<WixBundleMsiFeatureSymbol>(); |
| 179 | 179 | ||
| 180 | foreach (var featureTuple in featureTuples) | 180 | foreach (var featureSymbol in featureSymbols) |
| 181 | { | 181 | { |
| 182 | writer.WriteStartElement("WixPackageFeatureInfo"); | 182 | writer.WriteStartElement("WixPackageFeatureInfo"); |
| 183 | 183 | ||
| 184 | writer.WriteAttributeString("Package", featureTuple.PackageRef); | 184 | writer.WriteAttributeString("Package", featureSymbol.PackageRef); |
| 185 | writer.WriteAttributeString("Feature", featureTuple.Name); | 185 | writer.WriteAttributeString("Feature", featureSymbol.Name); |
| 186 | writer.WriteAttributeString("Size", featureTuple.Size.ToString(CultureInfo.InvariantCulture)); | 186 | writer.WriteAttributeString("Size", featureSymbol.Size.ToString(CultureInfo.InvariantCulture)); |
| 187 | 187 | ||
| 188 | if (!String.IsNullOrEmpty(featureTuple.Parent)) | 188 | if (!String.IsNullOrEmpty(featureSymbol.Parent)) |
| 189 | { | 189 | { |
| 190 | writer.WriteAttributeString("Parent", featureTuple.Parent); | 190 | writer.WriteAttributeString("Parent", featureSymbol.Parent); |
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | if (!String.IsNullOrEmpty(featureTuple.Title)) | 193 | if (!String.IsNullOrEmpty(featureSymbol.Title)) |
| 194 | { | 194 | { |
| 195 | writer.WriteAttributeString("Title", featureTuple.Title); | 195 | writer.WriteAttributeString("Title", featureSymbol.Title); |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | if (!String.IsNullOrEmpty(featureTuple.Description)) | 198 | if (!String.IsNullOrEmpty(featureSymbol.Description)) |
| 199 | { | 199 | { |
| 200 | writer.WriteAttributeString("Description", featureTuple.Description); | 200 | writer.WriteAttributeString("Description", featureSymbol.Description); |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | writer.WriteAttributeString("Display", featureTuple.Display.ToString(CultureInfo.InvariantCulture)); | 203 | writer.WriteAttributeString("Display", featureSymbol.Display.ToString(CultureInfo.InvariantCulture)); |
| 204 | writer.WriteAttributeString("Level", featureTuple.Level.ToString(CultureInfo.InvariantCulture)); | 204 | writer.WriteAttributeString("Level", featureSymbol.Level.ToString(CultureInfo.InvariantCulture)); |
| 205 | writer.WriteAttributeString("Directory", featureTuple.Directory); | 205 | writer.WriteAttributeString("Directory", featureSymbol.Directory); |
| 206 | writer.WriteAttributeString("Attributes", featureTuple.Attributes.ToString(CultureInfo.InvariantCulture)); | 206 | writer.WriteAttributeString("Attributes", featureSymbol.Attributes.ToString(CultureInfo.InvariantCulture)); |
| 207 | 207 | ||
| 208 | writer.WriteEndElement(); | 208 | writer.WriteEndElement(); |
| 209 | } | 209 | } |
| @@ -211,43 +211,43 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 211 | 211 | ||
| 212 | private void WritePayloadInfo(XmlTextWriter writer) | 212 | private void WritePayloadInfo(XmlTextWriter writer) |
| 213 | { | 213 | { |
| 214 | var payloadTuples = this.Section.Tuples.OfType<WixBundlePayloadTuple>(); | 214 | var payloadSymbols = this.Section.Symbols.OfType<WixBundlePayloadSymbol>(); |
| 215 | 215 | ||
| 216 | foreach (var payloadTuple in payloadTuples) | 216 | foreach (var payloadSymbol in payloadSymbols) |
| 217 | { | 217 | { |
| 218 | writer.WriteStartElement("WixPayloadProperties"); | 218 | writer.WriteStartElement("WixPayloadProperties"); |
| 219 | 219 | ||
| 220 | writer.WriteAttributeString("Payload", payloadTuple.Id.Id); | 220 | writer.WriteAttributeString("Payload", payloadSymbol.Id.Id); |
| 221 | 221 | ||
| 222 | if (!String.IsNullOrEmpty(payloadTuple.PackageRef)) | 222 | if (!String.IsNullOrEmpty(payloadSymbol.PackageRef)) |
| 223 | { | 223 | { |
| 224 | writer.WriteAttributeString("Package", payloadTuple.PackageRef); | 224 | writer.WriteAttributeString("Package", payloadSymbol.PackageRef); |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | if (!String.IsNullOrEmpty(payloadTuple.ContainerRef)) | 227 | if (!String.IsNullOrEmpty(payloadSymbol.ContainerRef)) |
| 228 | { | 228 | { |
| 229 | writer.WriteAttributeString("Container", payloadTuple.ContainerRef); | 229 | writer.WriteAttributeString("Container", payloadSymbol.ContainerRef); |
| 230 | } | 230 | } |
| 231 | 231 | ||
| 232 | writer.WriteAttributeString("Name", payloadTuple.Name); | 232 | writer.WriteAttributeString("Name", payloadSymbol.Name); |
| 233 | writer.WriteAttributeString("Size", payloadTuple.FileSize.Value.ToString(CultureInfo.InvariantCulture)); | 233 | writer.WriteAttributeString("Size", payloadSymbol.FileSize.Value.ToString(CultureInfo.InvariantCulture)); |
| 234 | 234 | ||
| 235 | if (!String.IsNullOrEmpty(payloadTuple.DownloadUrl)) | 235 | if (!String.IsNullOrEmpty(payloadSymbol.DownloadUrl)) |
| 236 | { | 236 | { |
| 237 | writer.WriteAttributeString("DownloadUrl", payloadTuple.DownloadUrl); | 237 | writer.WriteAttributeString("DownloadUrl", payloadSymbol.DownloadUrl); |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | writer.WriteAttributeString("LayoutOnly", payloadTuple.LayoutOnly ? "yes" : "no"); | 240 | writer.WriteAttributeString("LayoutOnly", payloadSymbol.LayoutOnly ? "yes" : "no"); |
| 241 | 241 | ||
| 242 | writer.WriteEndElement(); | 242 | writer.WriteEndElement(); |
| 243 | } | 243 | } |
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | private WixBundlePayloadTuple CreateBootstrapperApplicationManifestPayloadRow(string baManifestPath) | 246 | private WixBundlePayloadSymbol CreateBootstrapperApplicationManifestPayloadRow(string baManifestPath) |
| 247 | { | 247 | { |
| 248 | var generatedId = Common.GenerateIdentifier("ux", BurnCommon.BADataFileName); | 248 | var generatedId = Common.GenerateIdentifier("ux", BurnCommon.BADataFileName); |
| 249 | 249 | ||
| 250 | var tuple = this.Section.AddTuple(new WixBundlePayloadTuple(this.BundleTuple.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId)) | 250 | var symbol = this.Section.AddSymbol(new WixBundlePayloadSymbol(this.BundleSymbol.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId)) |
| 251 | { | 251 | { |
| 252 | Name = BurnCommon.BADataFileName, | 252 | Name = BurnCommon.BADataFileName, |
| 253 | SourceFile = new IntermediateFieldPathValue { Path = baManifestPath }, | 253 | SourceFile = new IntermediateFieldPathValue { Path = baManifestPath }, |
| @@ -260,11 +260,11 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 260 | 260 | ||
| 261 | var fileInfo = new FileInfo(baManifestPath); | 261 | var fileInfo = new FileInfo(baManifestPath); |
| 262 | 262 | ||
| 263 | tuple.FileSize = (int)fileInfo.Length; | 263 | symbol.FileSize = (int)fileInfo.Length; |
| 264 | 264 | ||
| 265 | tuple.Hash = BundleHashAlgorithm.Hash(fileInfo); | 265 | symbol.Hash = BundleHashAlgorithm.Hash(fileInfo); |
| 266 | 266 | ||
| 267 | return tuple; | 267 | return symbol; |
| 268 | } | 268 | } |
| 269 | } | 269 | } |
| 270 | } | 270 | } |
diff --git a/src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs b/src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs index 03102d5e..3cf6e0aa 100644 --- a/src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs | |||
| @@ -8,19 +8,19 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 8 | using System.Reflection; | 8 | using System.Reflection; |
| 9 | using WixToolset.Data; | 9 | using WixToolset.Data; |
| 10 | using WixToolset.Data.Burn; | 10 | using WixToolset.Data.Burn; |
| 11 | using WixToolset.Data.Tuples; | 11 | using WixToolset.Data.Symbols; |
| 12 | using WixToolset.Extensibility.Data; | 12 | using WixToolset.Extensibility.Data; |
| 13 | using WixToolset.Extensibility.Services; | 13 | using WixToolset.Extensibility.Services; |
| 14 | 14 | ||
| 15 | internal class CreateBundleExeCommand | 15 | internal class CreateBundleExeCommand |
| 16 | { | 16 | { |
| 17 | public CreateBundleExeCommand(IMessaging messaging, IBackendHelper backendHelper, string intermediateFolder, string outputPath, WixBundleTuple bundleTuple, WixBundleContainerTuple uxContainer, IEnumerable<WixBundleContainerTuple> containers) | 17 | public CreateBundleExeCommand(IMessaging messaging, IBackendHelper backendHelper, string intermediateFolder, string outputPath, WixBundleSymbol bundleSymbol, WixBundleContainerSymbol uxContainer, IEnumerable<WixBundleContainerSymbol> containers) |
| 18 | { | 18 | { |
| 19 | this.Messaging = messaging; | 19 | this.Messaging = messaging; |
| 20 | this.BackendHelper = backendHelper; | 20 | this.BackendHelper = backendHelper; |
| 21 | this.IntermediateFolder = intermediateFolder; | 21 | this.IntermediateFolder = intermediateFolder; |
| 22 | this.OutputPath = outputPath; | 22 | this.OutputPath = outputPath; |
| 23 | this.BundleTuple = bundleTuple; | 23 | this.BundleSymbol = bundleSymbol; |
| 24 | this.UXContainer = uxContainer; | 24 | this.UXContainer = uxContainer; |
| 25 | this.Containers = containers; | 25 | this.Containers = containers; |
| 26 | } | 26 | } |
| @@ -35,11 +35,11 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 35 | 35 | ||
| 36 | private string OutputPath { get; } | 36 | private string OutputPath { get; } |
| 37 | 37 | ||
| 38 | private WixBundleTuple BundleTuple { get; } | 38 | private WixBundleSymbol BundleSymbol { get; } |
| 39 | 39 | ||
| 40 | private WixBundleContainerTuple UXContainer { get; } | 40 | private WixBundleContainerSymbol UXContainer { get; } |
| 41 | 41 | ||
| 42 | private IEnumerable<WixBundleContainerTuple> Containers { get; } | 42 | private IEnumerable<WixBundleContainerSymbol> Containers { get; } |
| 43 | 43 | ||
| 44 | public void Execute() | 44 | public void Execute() |
| 45 | { | 45 | { |
| @@ -47,7 +47,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 47 | 47 | ||
| 48 | // Copy the burn.exe to a writable location then mark it to be moved to its final build location. | 48 | // Copy the burn.exe to a writable location then mark it to be moved to its final build location. |
| 49 | 49 | ||
| 50 | var stubPlatform = this.BundleTuple.Platform.ToString(); | 50 | var stubPlatform = this.BundleSymbol.Platform.ToString(); |
| 51 | var stubFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), stubPlatform, "burn.exe"); | 51 | var stubFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), stubPlatform, "burn.exe"); |
| 52 | 52 | ||
| 53 | var bundleTempPath = Path.Combine(this.IntermediateFolder, bundleFilename); | 53 | var bundleTempPath = Path.Combine(this.IntermediateFolder, bundleFilename); |
| @@ -59,19 +59,19 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 59 | this.Messaging.Write(ErrorMessages.InsecureBundleFilename(bundleFilename)); | 59 | this.Messaging.Write(ErrorMessages.InsecureBundleFilename(bundleFilename)); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | this.Transfer = this.BackendHelper.CreateFileTransfer(bundleTempPath, this.OutputPath, true, this.BundleTuple.SourceLineNumbers); | 62 | this.Transfer = this.BackendHelper.CreateFileTransfer(bundleTempPath, this.OutputPath, true, this.BundleSymbol.SourceLineNumbers); |
| 63 | 63 | ||
| 64 | File.Copy(stubFile, bundleTempPath, true); | 64 | File.Copy(stubFile, bundleTempPath, true); |
| 65 | File.SetAttributes(bundleTempPath, FileAttributes.Normal); | 65 | File.SetAttributes(bundleTempPath, FileAttributes.Normal); |
| 66 | 66 | ||
| 67 | this.UpdateBurnResources(bundleTempPath, this.OutputPath, this.BundleTuple); | 67 | this.UpdateBurnResources(bundleTempPath, this.OutputPath, this.BundleSymbol); |
| 68 | 68 | ||
| 69 | // Update the .wixburn section to point to at the UX and attached container(s) then attach the containers | 69 | // Update the .wixburn section to point to at the UX and attached container(s) then attach the containers |
| 70 | // if they should be attached. | 70 | // if they should be attached. |
| 71 | using (var writer = BurnWriter.Open(this.Messaging, bundleTempPath)) | 71 | using (var writer = BurnWriter.Open(this.Messaging, bundleTempPath)) |
| 72 | { | 72 | { |
| 73 | var burnStubFile = new FileInfo(bundleTempPath); | 73 | var burnStubFile = new FileInfo(bundleTempPath); |
| 74 | writer.InitializeBundleSectionData(burnStubFile.Length, this.BundleTuple.BundleId); | 74 | writer.InitializeBundleSectionData(burnStubFile.Length, this.BundleSymbol.BundleId); |
| 75 | 75 | ||
| 76 | // Always attach the UX container first | 76 | // Always attach the UX container first |
| 77 | writer.AppendContainer(this.UXContainer.WorkingPath, BurnWriter.Container.UX); | 77 | writer.AppendContainer(this.UXContainer.WorkingPath, BurnWriter.Container.UX); |
| @@ -91,7 +91,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 91 | } | 91 | } |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | private void UpdateBurnResources(string bundleTempPath, string outputPath, WixBundleTuple bundleInfo) | 94 | private void UpdateBurnResources(string bundleTempPath, string outputPath, WixBundleSymbol bundleInfo) |
| 95 | { | 95 | { |
| 96 | var resources = new Dtf.Resources.ResourceCollection(); | 96 | var resources = new Dtf.Resources.ResourceCollection(); |
| 97 | var version = new Dtf.Resources.VersionResource("#1", 1033); | 97 | var version = new Dtf.Resources.VersionResource("#1", 1033); |
diff --git a/src/WixToolset.Core.Burn/Bundles/CreateBundleExtensionManifestCommand.cs b/src/WixToolset.Core.Burn/Bundles/CreateBundleExtensionManifestCommand.cs index f7acd54c..74ccd895 100644 --- a/src/WixToolset.Core.Burn/Bundles/CreateBundleExtensionManifestCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/CreateBundleExtensionManifestCommand.cs | |||
| @@ -9,14 +9,14 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 9 | using System.Xml; | 9 | using System.Xml; |
| 10 | using WixToolset.Data; | 10 | using WixToolset.Data; |
| 11 | using WixToolset.Data.Burn; | 11 | using WixToolset.Data.Burn; |
| 12 | using WixToolset.Data.Tuples; | 12 | using WixToolset.Data.Symbols; |
| 13 | 13 | ||
| 14 | internal class CreateBundleExtensionManifestCommand | 14 | internal class CreateBundleExtensionManifestCommand |
| 15 | { | 15 | { |
| 16 | public CreateBundleExtensionManifestCommand(IntermediateSection section, WixBundleTuple bundleTuple, int lastUXPayloadIndex, string intermediateFolder, IInternalBurnBackendHelper internalBurnBackendHelper) | 16 | public CreateBundleExtensionManifestCommand(IntermediateSection section, WixBundleSymbol bundleSymbol, int lastUXPayloadIndex, string intermediateFolder, IInternalBurnBackendHelper internalBurnBackendHelper) |
| 17 | { | 17 | { |
| 18 | this.Section = section; | 18 | this.Section = section; |
| 19 | this.BundleTuple = bundleTuple; | 19 | this.BundleSymbol = bundleSymbol; |
| 20 | this.LastUXPayloadIndex = lastUXPayloadIndex; | 20 | this.LastUXPayloadIndex = lastUXPayloadIndex; |
| 21 | this.IntermediateFolder = intermediateFolder; | 21 | this.IntermediateFolder = intermediateFolder; |
| 22 | this.InternalBurnBackendHelper = internalBurnBackendHelper; | 22 | this.InternalBurnBackendHelper = internalBurnBackendHelper; |
| @@ -24,7 +24,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 24 | 24 | ||
| 25 | private IntermediateSection Section { get; } | 25 | private IntermediateSection Section { get; } |
| 26 | 26 | ||
| 27 | private WixBundleTuple BundleTuple { get; } | 27 | private WixBundleSymbol BundleSymbol { get; } |
| 28 | 28 | ||
| 29 | private IInternalBurnBackendHelper InternalBurnBackendHelper { get; } | 29 | private IInternalBurnBackendHelper InternalBurnBackendHelper { get; } |
| 30 | 30 | ||
| @@ -32,7 +32,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 32 | 32 | ||
| 33 | private string IntermediateFolder { get; } | 33 | private string IntermediateFolder { get; } |
| 34 | 34 | ||
| 35 | public WixBundlePayloadTuple BundleExtensionManifestPayloadRow { get; private set; } | 35 | public WixBundlePayloadSymbol BundleExtensionManifestPayloadRow { get; private set; } |
| 36 | 36 | ||
| 37 | public string OutputPath { get; private set; } | 37 | public string OutputPath { get; private set; } |
| 38 | 38 | ||
| @@ -64,11 +64,11 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 64 | return path; | 64 | return path; |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | private WixBundlePayloadTuple CreateBundleExtensionManifestPayloadRow(string bextManifestPath) | 67 | private WixBundlePayloadSymbol CreateBundleExtensionManifestPayloadRow(string bextManifestPath) |
| 68 | { | 68 | { |
| 69 | var generatedId = Common.GenerateIdentifier("ux", BurnCommon.BundleExtensionDataFileName); | 69 | var generatedId = Common.GenerateIdentifier("ux", BurnCommon.BundleExtensionDataFileName); |
| 70 | 70 | ||
| 71 | var tuple = this.Section.AddTuple(new WixBundlePayloadTuple(this.BundleTuple.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId)) | 71 | var symbol = this.Section.AddSymbol(new WixBundlePayloadSymbol(this.BundleSymbol.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId)) |
| 72 | { | 72 | { |
| 73 | Name = BurnCommon.BundleExtensionDataFileName, | 73 | Name = BurnCommon.BundleExtensionDataFileName, |
| 74 | SourceFile = new IntermediateFieldPathValue { Path = bextManifestPath }, | 74 | SourceFile = new IntermediateFieldPathValue { Path = bextManifestPath }, |
| @@ -81,11 +81,11 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 81 | 81 | ||
| 82 | var fileInfo = new FileInfo(bextManifestPath); | 82 | var fileInfo = new FileInfo(bextManifestPath); |
| 83 | 83 | ||
| 84 | tuple.FileSize = (int)fileInfo.Length; | 84 | symbol.FileSize = (int)fileInfo.Length; |
| 85 | 85 | ||
| 86 | tuple.Hash = BundleHashAlgorithm.Hash(fileInfo); | 86 | symbol.Hash = BundleHashAlgorithm.Hash(fileInfo); |
| 87 | 87 | ||
| 88 | return tuple; | 88 | return symbol; |
| 89 | } | 89 | } |
| 90 | } | 90 | } |
| 91 | } | 91 | } |
diff --git a/src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs b/src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs index 9453c7e3..05b15ab6 100644 --- a/src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs | |||
| @@ -12,20 +12,20 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 12 | using System.Xml; | 12 | using System.Xml; |
| 13 | using WixToolset.Data; | 13 | using WixToolset.Data; |
| 14 | using WixToolset.Data.Burn; | 14 | using WixToolset.Data.Burn; |
| 15 | using WixToolset.Data.Tuples; | 15 | using WixToolset.Data.Symbols; |
| 16 | using WixToolset.Extensibility; | 16 | using WixToolset.Extensibility; |
| 17 | using WixToolset.Extensibility.Services; | 17 | using WixToolset.Extensibility.Services; |
| 18 | 18 | ||
| 19 | internal class CreateBurnManifestCommand | 19 | internal class CreateBurnManifestCommand |
| 20 | { | 20 | { |
| 21 | public CreateBurnManifestCommand(IMessaging messaging, IEnumerable<IBurnBackendExtension> backendExtensions, string executableName, IntermediateSection section, WixBundleTuple bundleTuple, IEnumerable<WixBundleContainerTuple> containers, WixChainTuple chainTuple, IEnumerable<PackageFacade> orderedPackages, IEnumerable<WixBundleRollbackBoundaryTuple> boundaries, IEnumerable<WixBundlePayloadTuple> uxPayloads, Dictionary<string, WixBundlePayloadTuple> allPayloadsById, IEnumerable<ISearchFacade> orderedSearches, IEnumerable<WixBundleCatalogTuple> catalogs, string intermediateFolder) | 21 | public CreateBurnManifestCommand(IMessaging messaging, IEnumerable<IBurnBackendExtension> backendExtensions, string executableName, IntermediateSection section, WixBundleSymbol bundleSymbol, IEnumerable<WixBundleContainerSymbol> containers, WixChainSymbol chainSymbol, IEnumerable<PackageFacade> orderedPackages, IEnumerable<WixBundleRollbackBoundarySymbol> boundaries, IEnumerable<WixBundlePayloadSymbol> uxPayloads, Dictionary<string, WixBundlePayloadSymbol> allPayloadsById, IEnumerable<ISearchFacade> orderedSearches, IEnumerable<WixBundleCatalogSymbol> catalogs, string intermediateFolder) |
| 22 | { | 22 | { |
| 23 | this.Messaging = messaging; | 23 | this.Messaging = messaging; |
| 24 | this.BackendExtensions = backendExtensions; | 24 | this.BackendExtensions = backendExtensions; |
| 25 | this.ExecutableName = executableName; | 25 | this.ExecutableName = executableName; |
| 26 | this.Section = section; | 26 | this.Section = section; |
| 27 | this.BundleTuple = bundleTuple; | 27 | this.BundleSymbol = bundleSymbol; |
| 28 | this.Chain = chainTuple; | 28 | this.Chain = chainSymbol; |
| 29 | this.Containers = containers; | 29 | this.Containers = containers; |
| 30 | this.OrderedPackages = orderedPackages; | 30 | this.OrderedPackages = orderedPackages; |
| 31 | this.RollbackBoundaries = boundaries; | 31 | this.RollbackBoundaries = boundaries; |
| @@ -46,23 +46,23 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 46 | 46 | ||
| 47 | private IntermediateSection Section { get; } | 47 | private IntermediateSection Section { get; } |
| 48 | 48 | ||
| 49 | private WixBundleTuple BundleTuple { get; } | 49 | private WixBundleSymbol BundleSymbol { get; } |
| 50 | 50 | ||
| 51 | private WixChainTuple Chain { get; } | 51 | private WixChainSymbol Chain { get; } |
| 52 | 52 | ||
| 53 | private IEnumerable<WixBundleRollbackBoundaryTuple> RollbackBoundaries { get; } | 53 | private IEnumerable<WixBundleRollbackBoundarySymbol> RollbackBoundaries { get; } |
| 54 | 54 | ||
| 55 | private IEnumerable<PackageFacade> OrderedPackages { get; } | 55 | private IEnumerable<PackageFacade> OrderedPackages { get; } |
| 56 | 56 | ||
| 57 | private IEnumerable<ISearchFacade> OrderedSearches { get; } | 57 | private IEnumerable<ISearchFacade> OrderedSearches { get; } |
| 58 | 58 | ||
| 59 | private Dictionary<string, WixBundlePayloadTuple> Payloads { get; } | 59 | private Dictionary<string, WixBundlePayloadSymbol> Payloads { get; } |
| 60 | 60 | ||
| 61 | private IEnumerable<WixBundleContainerTuple> Containers { get; } | 61 | private IEnumerable<WixBundleContainerSymbol> Containers { get; } |
| 62 | 62 | ||
| 63 | private IEnumerable<WixBundlePayloadTuple> UXContainerPayloads { get; } | 63 | private IEnumerable<WixBundlePayloadSymbol> UXContainerPayloads { get; } |
| 64 | 64 | ||
| 65 | private IEnumerable<WixBundleCatalogTuple> Catalogs { get; } | 65 | private IEnumerable<WixBundleCatalogSymbol> Catalogs { get; } |
| 66 | 66 | ||
| 67 | private string IntermediateFolder { get; } | 67 | private string IntermediateFolder { get; } |
| 68 | 68 | ||
| @@ -77,32 +77,32 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 77 | writer.WriteStartElement("BurnManifest", BurnCommon.BurnNamespace); | 77 | writer.WriteStartElement("BurnManifest", BurnCommon.BurnNamespace); |
| 78 | 78 | ||
| 79 | // Write the condition, if there is one | 79 | // Write the condition, if there is one |
| 80 | if (null != this.BundleTuple.Condition) | 80 | if (null != this.BundleSymbol.Condition) |
| 81 | { | 81 | { |
| 82 | writer.WriteElementString("Condition", this.BundleTuple.Condition); | 82 | writer.WriteElementString("Condition", this.BundleSymbol.Condition); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | // Write the log element if default logging wasn't disabled. | 85 | // Write the log element if default logging wasn't disabled. |
| 86 | if (!String.IsNullOrEmpty(this.BundleTuple.LogPrefix)) | 86 | if (!String.IsNullOrEmpty(this.BundleSymbol.LogPrefix)) |
| 87 | { | 87 | { |
| 88 | writer.WriteStartElement("Log"); | 88 | writer.WriteStartElement("Log"); |
| 89 | if (!String.IsNullOrEmpty(this.BundleTuple.LogPathVariable)) | 89 | if (!String.IsNullOrEmpty(this.BundleSymbol.LogPathVariable)) |
| 90 | { | 90 | { |
| 91 | writer.WriteAttributeString("PathVariable", this.BundleTuple.LogPathVariable); | 91 | writer.WriteAttributeString("PathVariable", this.BundleSymbol.LogPathVariable); |
| 92 | } | 92 | } |
| 93 | writer.WriteAttributeString("Prefix", this.BundleTuple.LogPrefix); | 93 | writer.WriteAttributeString("Prefix", this.BundleSymbol.LogPrefix); |
| 94 | writer.WriteAttributeString("Extension", this.BundleTuple.LogExtension); | 94 | writer.WriteAttributeString("Extension", this.BundleSymbol.LogExtension); |
| 95 | writer.WriteEndElement(); | 95 | writer.WriteEndElement(); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | 98 | ||
| 99 | // Get update if specified. | 99 | // Get update if specified. |
| 100 | var updateTuple = this.Section.Tuples.OfType<WixBundleUpdateTuple>().FirstOrDefault(); | 100 | var updateSymbol = this.Section.Symbols.OfType<WixBundleUpdateSymbol>().FirstOrDefault(); |
| 101 | 101 | ||
| 102 | if (null != updateTuple) | 102 | if (null != updateSymbol) |
| 103 | { | 103 | { |
| 104 | writer.WriteStartElement("Update"); | 104 | writer.WriteStartElement("Update"); |
| 105 | writer.WriteAttributeString("Location", updateTuple.Location); | 105 | writer.WriteAttributeString("Location", updateSymbol.Location); |
| 106 | writer.WriteEndElement(); // </Update> | 106 | writer.WriteEndElement(); // </Update> |
| 107 | } | 107 | } |
| 108 | 108 | ||
| @@ -110,7 +110,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 110 | 110 | ||
| 111 | // For the related bundles with duplicated identifiers the second instance is ignored (i.e. the Duplicates | 111 | // For the related bundles with duplicated identifiers the second instance is ignored (i.e. the Duplicates |
| 112 | // enumeration in the index row list is not used). | 112 | // enumeration in the index row list is not used). |
| 113 | var relatedBundles = this.Section.Tuples.OfType<WixRelatedBundleTuple>(); | 113 | var relatedBundles = this.Section.Symbols.OfType<WixRelatedBundleSymbol>(); |
| 114 | var distinctRelatedBundles = new HashSet<string>(); | 114 | var distinctRelatedBundles = new HashSet<string>(); |
| 115 | 115 | ||
| 116 | foreach (var relatedBundle in relatedBundles) | 116 | foreach (var relatedBundle in relatedBundles) |
| @@ -125,7 +125,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | // Write the variables | 127 | // Write the variables |
| 128 | var variables = this.Section.Tuples.OfType<WixBundleVariableTuple>(); | 128 | var variables = this.Section.Symbols.OfType<WixBundleVariableSymbol>(); |
| 129 | 129 | ||
| 130 | foreach (var variable in variables) | 130 | foreach (var variable in variables) |
| 131 | { | 131 | { |
| @@ -149,7 +149,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 149 | 149 | ||
| 150 | // write the UX element | 150 | // write the UX element |
| 151 | writer.WriteStartElement("UX"); | 151 | writer.WriteStartElement("UX"); |
| 152 | if (!String.IsNullOrEmpty(this.BundleTuple.SplashScreenSourceFile)) | 152 | if (!String.IsNullOrEmpty(this.BundleSymbol.SplashScreenSourceFile)) |
| 153 | { | 153 | { |
| 154 | writer.WriteAttributeString("SplashScreen", "yes"); | 154 | writer.WriteAttributeString("SplashScreen", "yes"); |
| 155 | } | 155 | } |
| @@ -214,66 +214,66 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 214 | // Write the registration information... | 214 | // Write the registration information... |
| 215 | writer.WriteStartElement("Registration"); | 215 | writer.WriteStartElement("Registration"); |
| 216 | 216 | ||
| 217 | writer.WriteAttributeString("Id", this.BundleTuple.BundleId); | 217 | writer.WriteAttributeString("Id", this.BundleSymbol.BundleId); |
| 218 | writer.WriteAttributeString("ExecutableName", this.ExecutableName); | 218 | writer.WriteAttributeString("ExecutableName", this.ExecutableName); |
| 219 | writer.WriteAttributeString("PerMachine", this.BundleTuple.PerMachine ? "yes" : "no"); | 219 | writer.WriteAttributeString("PerMachine", this.BundleSymbol.PerMachine ? "yes" : "no"); |
| 220 | writer.WriteAttributeString("Tag", this.BundleTuple.Tag); | 220 | writer.WriteAttributeString("Tag", this.BundleSymbol.Tag); |
| 221 | writer.WriteAttributeString("Version", this.BundleTuple.Version); | 221 | writer.WriteAttributeString("Version", this.BundleSymbol.Version); |
| 222 | writer.WriteAttributeString("ProviderKey", this.BundleTuple.ProviderKey); | 222 | writer.WriteAttributeString("ProviderKey", this.BundleSymbol.ProviderKey); |
| 223 | 223 | ||
| 224 | writer.WriteStartElement("Arp"); | 224 | writer.WriteStartElement("Arp"); |
| 225 | writer.WriteAttributeString("Register", (this.BundleTuple.DisableModify || this.BundleTuple.SingleChangeUninstallButton) && this.BundleTuple.DisableRemove ? "no" : "yes"); // do not register if disabled modify and remove. | 225 | writer.WriteAttributeString("Register", (this.BundleSymbol.DisableModify || this.BundleSymbol.SingleChangeUninstallButton) && this.BundleSymbol.DisableRemove ? "no" : "yes"); // do not register if disabled modify and remove. |
| 226 | writer.WriteAttributeString("DisplayName", this.BundleTuple.Name); | 226 | writer.WriteAttributeString("DisplayName", this.BundleSymbol.Name); |
| 227 | writer.WriteAttributeString("DisplayVersion", this.BundleTuple.Version); | 227 | writer.WriteAttributeString("DisplayVersion", this.BundleSymbol.Version); |
| 228 | 228 | ||
| 229 | if (!String.IsNullOrEmpty(this.BundleTuple.Manufacturer)) | 229 | if (!String.IsNullOrEmpty(this.BundleSymbol.Manufacturer)) |
| 230 | { | 230 | { |
| 231 | writer.WriteAttributeString("Publisher", this.BundleTuple.Manufacturer); | 231 | writer.WriteAttributeString("Publisher", this.BundleSymbol.Manufacturer); |
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | if (!String.IsNullOrEmpty(this.BundleTuple.HelpUrl)) | 234 | if (!String.IsNullOrEmpty(this.BundleSymbol.HelpUrl)) |
| 235 | { | 235 | { |
| 236 | writer.WriteAttributeString("HelpLink", this.BundleTuple.HelpUrl); | 236 | writer.WriteAttributeString("HelpLink", this.BundleSymbol.HelpUrl); |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | if (!String.IsNullOrEmpty(this.BundleTuple.HelpTelephone)) | 239 | if (!String.IsNullOrEmpty(this.BundleSymbol.HelpTelephone)) |
| 240 | { | 240 | { |
| 241 | writer.WriteAttributeString("HelpTelephone", this.BundleTuple.HelpTelephone); | 241 | writer.WriteAttributeString("HelpTelephone", this.BundleSymbol.HelpTelephone); |
| 242 | } | 242 | } |
| 243 | 243 | ||
| 244 | if (!String.IsNullOrEmpty(this.BundleTuple.AboutUrl)) | 244 | if (!String.IsNullOrEmpty(this.BundleSymbol.AboutUrl)) |
| 245 | { | 245 | { |
| 246 | writer.WriteAttributeString("AboutUrl", this.BundleTuple.AboutUrl); | 246 | writer.WriteAttributeString("AboutUrl", this.BundleSymbol.AboutUrl); |
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | if (!String.IsNullOrEmpty(this.BundleTuple.UpdateUrl)) | 249 | if (!String.IsNullOrEmpty(this.BundleSymbol.UpdateUrl)) |
| 250 | { | 250 | { |
| 251 | writer.WriteAttributeString("UpdateUrl", this.BundleTuple.UpdateUrl); | 251 | writer.WriteAttributeString("UpdateUrl", this.BundleSymbol.UpdateUrl); |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | if (!String.IsNullOrEmpty(this.BundleTuple.ParentName)) | 254 | if (!String.IsNullOrEmpty(this.BundleSymbol.ParentName)) |
| 255 | { | 255 | { |
| 256 | writer.WriteAttributeString("ParentDisplayName", this.BundleTuple.ParentName); | 256 | writer.WriteAttributeString("ParentDisplayName", this.BundleSymbol.ParentName); |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | if (this.BundleTuple.DisableModify) | 259 | if (this.BundleSymbol.DisableModify) |
| 260 | { | 260 | { |
| 261 | writer.WriteAttributeString("DisableModify", "yes"); | 261 | writer.WriteAttributeString("DisableModify", "yes"); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | if (this.BundleTuple.DisableRemove) | 264 | if (this.BundleSymbol.DisableRemove) |
| 265 | { | 265 | { |
| 266 | writer.WriteAttributeString("DisableRemove", "yes"); | 266 | writer.WriteAttributeString("DisableRemove", "yes"); |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | if (this.BundleTuple.SingleChangeUninstallButton) | 269 | if (this.BundleSymbol.SingleChangeUninstallButton) |
| 270 | { | 270 | { |
| 271 | writer.WriteAttributeString("DisableModify", "button"); | 271 | writer.WriteAttributeString("DisableModify", "button"); |
| 272 | } | 272 | } |
| 273 | writer.WriteEndElement(); // </Arp> | 273 | writer.WriteEndElement(); // </Arp> |
| 274 | 274 | ||
| 275 | // Get update registration if specified. | 275 | // Get update registration if specified. |
| 276 | var updateRegistrationInfo = this.Section.Tuples.OfType<WixUpdateRegistrationTuple>().FirstOrDefault(); | 276 | var updateRegistrationInfo = this.Section.Symbols.OfType<WixUpdateRegistrationSymbol>().FirstOrDefault(); |
| 277 | 277 | ||
| 278 | if (null != updateRegistrationInfo) | 278 | if (null != updateRegistrationInfo) |
| 279 | { | 279 | { |
| @@ -327,28 +327,28 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 327 | } | 327 | } |
| 328 | 328 | ||
| 329 | // Index a few tables by package. | 329 | // Index a few tables by package. |
| 330 | var targetCodesByPatch = this.Section.Tuples.OfType<WixBundlePatchTargetCodeTuple>().ToLookup(r => r.PackageRef); | 330 | var targetCodesByPatch = this.Section.Symbols.OfType<WixBundlePatchTargetCodeSymbol>().ToLookup(r => r.PackageRef); |
| 331 | var msiFeaturesByPackage = this.Section.Tuples.OfType<WixBundleMsiFeatureTuple>().ToLookup(r => r.PackageRef); | 331 | var msiFeaturesByPackage = this.Section.Symbols.OfType<WixBundleMsiFeatureSymbol>().ToLookup(r => r.PackageRef); |
| 332 | var msiPropertiesByPackage = this.Section.Tuples.OfType<WixBundleMsiPropertyTuple>().ToLookup(r => r.PackageRef); | 332 | var msiPropertiesByPackage = this.Section.Symbols.OfType<WixBundleMsiPropertySymbol>().ToLookup(r => r.PackageRef); |
| 333 | var payloadsByPackage = this.Payloads.Values.ToLookup(p => p.PackageRef); | 333 | var payloadsByPackage = this.Payloads.Values.ToLookup(p => p.PackageRef); |
| 334 | var relatedPackagesByPackage = this.Section.Tuples.OfType<WixBundleRelatedPackageTuple>().ToLookup(r => r.PackageRef); | 334 | var relatedPackagesByPackage = this.Section.Symbols.OfType<WixBundleRelatedPackageSymbol>().ToLookup(r => r.PackageRef); |
| 335 | var slipstreamMspsByPackage = this.Section.Tuples.OfType<WixBundleSlipstreamMspTuple>().ToLookup(r => r.MspPackageRef); | 335 | var slipstreamMspsByPackage = this.Section.Symbols.OfType<WixBundleSlipstreamMspSymbol>().ToLookup(r => r.MspPackageRef); |
| 336 | var exitCodesByPackage = this.Section.Tuples.OfType<WixBundlePackageExitCodeTuple>().ToLookup(r => r.ChainPackageId); | 336 | var exitCodesByPackage = this.Section.Symbols.OfType<WixBundlePackageExitCodeSymbol>().ToLookup(r => r.ChainPackageId); |
| 337 | var commandLinesByPackage = this.Section.Tuples.OfType<WixBundlePackageCommandLineTuple>().ToLookup(r => r.WixBundlePackageRef); | 337 | var commandLinesByPackage = this.Section.Symbols.OfType<WixBundlePackageCommandLineSymbol>().ToLookup(r => r.WixBundlePackageRef); |
| 338 | 338 | ||
| 339 | var dependenciesByPackage = this.Section.Tuples.OfType<ProvidesDependencyTuple>().ToLookup(p => p.PackageRef); | 339 | var dependenciesByPackage = this.Section.Symbols.OfType<ProvidesDependencySymbol>().ToLookup(p => p.PackageRef); |
| 340 | 340 | ||
| 341 | 341 | ||
| 342 | // Build up the list of target codes from all the MSPs in the chain. | 342 | // Build up the list of target codes from all the MSPs in the chain. |
| 343 | var targetCodes = new List<WixBundlePatchTargetCodeTuple>(); | 343 | var targetCodes = new List<WixBundlePatchTargetCodeSymbol>(); |
| 344 | 344 | ||
| 345 | foreach (var package in this.OrderedPackages) | 345 | foreach (var package in this.OrderedPackages) |
| 346 | { | 346 | { |
| 347 | writer.WriteStartElement(String.Format(CultureInfo.InvariantCulture, "{0}Package", package.PackageTuple.Type)); | 347 | writer.WriteStartElement(String.Format(CultureInfo.InvariantCulture, "{0}Package", package.PackageSymbol.Type)); |
| 348 | 348 | ||
| 349 | writer.WriteAttributeString("Id", package.PackageId); | 349 | writer.WriteAttributeString("Id", package.PackageId); |
| 350 | 350 | ||
| 351 | switch (package.PackageTuple.Cache) | 351 | switch (package.PackageSymbol.Cache) |
| 352 | { | 352 | { |
| 353 | case YesNoAlwaysType.No: | 353 | case YesNoAlwaysType.No: |
| 354 | writer.WriteAttributeString("Cache", "no"); | 354 | writer.WriteAttributeString("Cache", "no"); |
| @@ -361,39 +361,39 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 361 | break; | 361 | break; |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | writer.WriteAttributeString("CacheId", package.PackageTuple.CacheId); | 364 | writer.WriteAttributeString("CacheId", package.PackageSymbol.CacheId); |
| 365 | writer.WriteAttributeString("InstallSize", Convert.ToString(package.PackageTuple.InstallSize)); | 365 | writer.WriteAttributeString("InstallSize", Convert.ToString(package.PackageSymbol.InstallSize)); |
| 366 | writer.WriteAttributeString("Size", Convert.ToString(package.PackageTuple.Size)); | 366 | writer.WriteAttributeString("Size", Convert.ToString(package.PackageSymbol.Size)); |
| 367 | writer.WriteAttributeString("PerMachine", YesNoDefaultType.Yes == package.PackageTuple.PerMachine ? "yes" : "no"); | 367 | writer.WriteAttributeString("PerMachine", YesNoDefaultType.Yes == package.PackageSymbol.PerMachine ? "yes" : "no"); |
| 368 | writer.WriteAttributeString("Permanent", package.PackageTuple.Permanent ? "yes" : "no"); | 368 | writer.WriteAttributeString("Permanent", package.PackageSymbol.Permanent ? "yes" : "no"); |
| 369 | writer.WriteAttributeString("Vital", package.PackageTuple.Vital == false ? "no" : "yes"); | 369 | writer.WriteAttributeString("Vital", package.PackageSymbol.Vital == false ? "no" : "yes"); |
| 370 | 370 | ||
| 371 | if (null != package.PackageTuple.RollbackBoundaryRef) | 371 | if (null != package.PackageSymbol.RollbackBoundaryRef) |
| 372 | { | 372 | { |
| 373 | writer.WriteAttributeString("RollbackBoundaryForward", package.PackageTuple.RollbackBoundaryRef); | 373 | writer.WriteAttributeString("RollbackBoundaryForward", package.PackageSymbol.RollbackBoundaryRef); |
| 374 | } | 374 | } |
| 375 | 375 | ||
| 376 | if (!String.IsNullOrEmpty(package.PackageTuple.RollbackBoundaryBackwardRef)) | 376 | if (!String.IsNullOrEmpty(package.PackageSymbol.RollbackBoundaryBackwardRef)) |
| 377 | { | 377 | { |
| 378 | writer.WriteAttributeString("RollbackBoundaryBackward", package.PackageTuple.RollbackBoundaryBackwardRef); | 378 | writer.WriteAttributeString("RollbackBoundaryBackward", package.PackageSymbol.RollbackBoundaryBackwardRef); |
| 379 | } | 379 | } |
| 380 | 380 | ||
| 381 | if (!String.IsNullOrEmpty(package.PackageTuple.LogPathVariable)) | 381 | if (!String.IsNullOrEmpty(package.PackageSymbol.LogPathVariable)) |
| 382 | { | 382 | { |
| 383 | writer.WriteAttributeString("LogPathVariable", package.PackageTuple.LogPathVariable); | 383 | writer.WriteAttributeString("LogPathVariable", package.PackageSymbol.LogPathVariable); |
| 384 | } | 384 | } |
| 385 | 385 | ||
| 386 | if (!String.IsNullOrEmpty(package.PackageTuple.RollbackLogPathVariable)) | 386 | if (!String.IsNullOrEmpty(package.PackageSymbol.RollbackLogPathVariable)) |
| 387 | { | 387 | { |
| 388 | writer.WriteAttributeString("RollbackLogPathVariable", package.PackageTuple.RollbackLogPathVariable); | 388 | writer.WriteAttributeString("RollbackLogPathVariable", package.PackageSymbol.RollbackLogPathVariable); |
| 389 | } | 389 | } |
| 390 | 390 | ||
| 391 | if (!String.IsNullOrEmpty(package.PackageTuple.InstallCondition)) | 391 | if (!String.IsNullOrEmpty(package.PackageSymbol.InstallCondition)) |
| 392 | { | 392 | { |
| 393 | writer.WriteAttributeString("InstallCondition", package.PackageTuple.InstallCondition); | 393 | writer.WriteAttributeString("InstallCondition", package.PackageSymbol.InstallCondition); |
| 394 | } | 394 | } |
| 395 | 395 | ||
| 396 | if (package.SpecificPackageTuple is WixBundleExePackageTuple exePackage) // EXE | 396 | if (package.SpecificPackageSymbol is WixBundleExePackageSymbol exePackage) // EXE |
| 397 | { | 397 | { |
| 398 | writer.WriteAttributeString("DetectCondition", exePackage.DetectCondition); | 398 | writer.WriteAttributeString("DetectCondition", exePackage.DetectCondition); |
| 399 | writer.WriteAttributeString("InstallArguments", exePackage.InstallCommand); | 399 | writer.WriteAttributeString("InstallArguments", exePackage.InstallCommand); |
| @@ -405,7 +405,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 405 | writer.WriteAttributeString("Protocol", exePackage.ExeProtocol); | 405 | writer.WriteAttributeString("Protocol", exePackage.ExeProtocol); |
| 406 | } | 406 | } |
| 407 | } | 407 | } |
| 408 | else if (package.SpecificPackageTuple is WixBundleMsiPackageTuple msiPackage) // MSI | 408 | else if (package.SpecificPackageSymbol is WixBundleMsiPackageSymbol msiPackage) // MSI |
| 409 | { | 409 | { |
| 410 | writer.WriteAttributeString("ProductCode", msiPackage.ProductCode); | 410 | writer.WriteAttributeString("ProductCode", msiPackage.ProductCode); |
| 411 | writer.WriteAttributeString("Language", msiPackage.ProductLanguage.ToString(CultureInfo.InvariantCulture)); | 411 | writer.WriteAttributeString("Language", msiPackage.ProductLanguage.ToString(CultureInfo.InvariantCulture)); |
| @@ -415,7 +415,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 415 | writer.WriteAttributeString("UpgradeCode", msiPackage.UpgradeCode); | 415 | writer.WriteAttributeString("UpgradeCode", msiPackage.UpgradeCode); |
| 416 | } | 416 | } |
| 417 | } | 417 | } |
| 418 | else if (package.SpecificPackageTuple is WixBundleMspPackageTuple mspPackage) // MSP | 418 | else if (package.SpecificPackageSymbol is WixBundleMspPackageSymbol mspPackage) // MSP |
| 419 | { | 419 | { |
| 420 | writer.WriteAttributeString("PatchCode", mspPackage.PatchCode); | 420 | writer.WriteAttributeString("PatchCode", mspPackage.PatchCode); |
| 421 | writer.WriteAttributeString("PatchXml", mspPackage.PatchXml); | 421 | writer.WriteAttributeString("PatchXml", mspPackage.PatchXml); |
| @@ -436,7 +436,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 436 | } | 436 | } |
| 437 | } | 437 | } |
| 438 | } | 438 | } |
| 439 | else if (package.SpecificPackageTuple is WixBundleMsuPackageTuple msuPackage) // MSU | 439 | else if (package.SpecificPackageSymbol is WixBundleMsuPackageSymbol msuPackage) // MSU |
| 440 | { | 440 | { |
| 441 | writer.WriteAttributeString("DetectCondition", msuPackage.DetectCondition); | 441 | writer.WriteAttributeString("DetectCondition", msuPackage.DetectCondition); |
| 442 | writer.WriteAttributeString("KB", msuPackage.MsuKB); | 442 | writer.WriteAttributeString("KB", msuPackage.MsuKB); |
| @@ -567,14 +567,14 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 567 | 567 | ||
| 568 | // Write any contained Payloads with the PackagePayload being first | 568 | // Write any contained Payloads with the PackagePayload being first |
| 569 | writer.WriteStartElement("PayloadRef"); | 569 | writer.WriteStartElement("PayloadRef"); |
| 570 | writer.WriteAttributeString("Id", package.PackageTuple.PayloadRef); | 570 | writer.WriteAttributeString("Id", package.PackageSymbol.PayloadRef); |
| 571 | writer.WriteEndElement(); | 571 | writer.WriteEndElement(); |
| 572 | 572 | ||
| 573 | var packagePayloads = payloadsByPackage[package.PackageId]; | 573 | var packagePayloads = payloadsByPackage[package.PackageId]; |
| 574 | 574 | ||
| 575 | foreach (var payload in packagePayloads) | 575 | foreach (var payload in packagePayloads) |
| 576 | { | 576 | { |
| 577 | if (payload.Id.Id != package.PackageTuple.PayloadRef) | 577 | if (payload.Id.Id != package.PackageSymbol.PayloadRef) |
| 578 | { | 578 | { |
| 579 | writer.WriteStartElement("PayloadRef"); | 579 | writer.WriteStartElement("PayloadRef"); |
| 580 | writer.WriteAttributeString("Id", payload.Id.Id); | 580 | writer.WriteAttributeString("Id", payload.Id.Id); |
| @@ -598,7 +598,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 598 | } | 598 | } |
| 599 | 599 | ||
| 600 | // Write the ApprovedExeForElevation elements. | 600 | // Write the ApprovedExeForElevation elements. |
| 601 | var approvedExesForElevation = this.Section.Tuples.OfType<WixApprovedExeForElevationTuple>(); | 601 | var approvedExesForElevation = this.Section.Symbols.OfType<WixApprovedExeForElevationSymbol>(); |
| 602 | 602 | ||
| 603 | foreach (var approvedExeForElevation in approvedExesForElevation) | 603 | foreach (var approvedExeForElevation in approvedExesForElevation) |
| 604 | { | 604 | { |
| @@ -620,7 +620,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 620 | } | 620 | } |
| 621 | 621 | ||
| 622 | // Write the BundleExtension elements. | 622 | // Write the BundleExtension elements. |
| 623 | var bundleExtensions = this.Section.Tuples.OfType<WixBundleExtensionTuple>(); | 623 | var bundleExtensions = this.Section.Symbols.OfType<WixBundleExtensionSymbol>(); |
| 624 | 624 | ||
| 625 | foreach (var bundleExtension in bundleExtensions) | 625 | foreach (var bundleExtension in bundleExtensions) |
| 626 | { | 626 | { |
| @@ -635,7 +635,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 635 | } | 635 | } |
| 636 | } | 636 | } |
| 637 | 637 | ||
| 638 | private void WriteBurnManifestContainerAttributes(XmlTextWriter writer, string executableName, WixBundleContainerTuple container) | 638 | private void WriteBurnManifestContainerAttributes(XmlTextWriter writer, string executableName, WixBundleContainerSymbol container) |
| 639 | { | 639 | { |
| 640 | writer.WriteAttributeString("Id", container.Id.Id); | 640 | writer.WriteAttributeString("Id", container.Id.Id); |
| 641 | writer.WriteAttributeString("FileSize", container.Size.Value.ToString(CultureInfo.InvariantCulture)); | 641 | writer.WriteAttributeString("FileSize", container.Size.Value.ToString(CultureInfo.InvariantCulture)); |
| @@ -669,7 +669,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 669 | } | 669 | } |
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | private void WriteBurnManifestPayloadAttributes(XmlTextWriter writer, WixBundlePayloadTuple payload, bool embeddedOnly, Dictionary<string, WixBundlePayloadTuple> allPayloads) | 672 | private void WriteBurnManifestPayloadAttributes(XmlTextWriter writer, WixBundlePayloadSymbol payload, bool embeddedOnly, Dictionary<string, WixBundlePayloadSymbol> allPayloads) |
| 673 | { | 673 | { |
| 674 | Debug.Assert(!embeddedOnly || PackagingType.Embedded == payload.Packaging); | 674 | Debug.Assert(!embeddedOnly || PackagingType.Embedded == payload.Packaging); |
| 675 | 675 | ||
diff --git a/src/WixToolset.Core.Burn/Bundles/CreateContainerCommand.cs b/src/WixToolset.Core.Burn/Bundles/CreateContainerCommand.cs index 937721a6..a23a116b 100644 --- a/src/WixToolset.Core.Burn/Bundles/CreateContainerCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/CreateContainerCommand.cs | |||
| @@ -8,21 +8,21 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 8 | using System.Linq; | 8 | using System.Linq; |
| 9 | using WixToolset.Core.Native; | 9 | using WixToolset.Core.Native; |
| 10 | using WixToolset.Data; | 10 | using WixToolset.Data; |
| 11 | using WixToolset.Data.Tuples; | 11 | using WixToolset.Data.Symbols; |
| 12 | 12 | ||
| 13 | /// <summary> | 13 | /// <summary> |
| 14 | /// Creates cabinet files. | 14 | /// Creates cabinet files. |
| 15 | /// </summary> | 15 | /// </summary> |
| 16 | internal class CreateContainerCommand | 16 | internal class CreateContainerCommand |
| 17 | { | 17 | { |
| 18 | public CreateContainerCommand(IEnumerable<WixBundlePayloadTuple> payloads, string outputPath, CompressionLevel? compressionLevel) | 18 | public CreateContainerCommand(IEnumerable<WixBundlePayloadSymbol> payloads, string outputPath, CompressionLevel? compressionLevel) |
| 19 | { | 19 | { |
| 20 | this.Payloads = payloads; | 20 | this.Payloads = payloads; |
| 21 | this.OutputPath = outputPath; | 21 | this.OutputPath = outputPath; |
| 22 | this.CompressionLevel = compressionLevel; | 22 | this.CompressionLevel = compressionLevel; |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | public CreateContainerCommand(string manifestPath, IEnumerable<WixBundlePayloadTuple> payloads, string outputPath, CompressionLevel? compressionLevel) | 25 | public CreateContainerCommand(string manifestPath, IEnumerable<WixBundlePayloadSymbol> payloads, string outputPath, CompressionLevel? compressionLevel) |
| 26 | { | 26 | { |
| 27 | this.ManifestFile = manifestPath; | 27 | this.ManifestFile = manifestPath; |
| 28 | this.Payloads = payloads; | 28 | this.Payloads = payloads; |
| @@ -36,7 +36,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 36 | 36 | ||
| 37 | private string OutputPath { get; } | 37 | private string OutputPath { get; } |
| 38 | 38 | ||
| 39 | private IEnumerable<WixBundlePayloadTuple> Payloads { get; } | 39 | private IEnumerable<WixBundlePayloadSymbol> Payloads { get; } |
| 40 | 40 | ||
| 41 | public string Hash { get; private set; } | 41 | public string Hash { get; private set; } |
| 42 | 42 | ||
diff --git a/src/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs b/src/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs index babac5e2..3e54013a 100644 --- a/src/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs +++ b/src/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs | |||
| @@ -8,18 +8,18 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 8 | using System.Linq; | 8 | using System.Linq; |
| 9 | using WixToolset.Data; | 9 | using WixToolset.Data; |
| 10 | using WixToolset.Data.Burn; | 10 | using WixToolset.Data.Burn; |
| 11 | using WixToolset.Data.Tuples; | 11 | using WixToolset.Data.Symbols; |
| 12 | using WixToolset.Extensibility.Data; | 12 | using WixToolset.Extensibility.Data; |
| 13 | using WixToolset.Extensibility.Services; | 13 | using WixToolset.Extensibility.Services; |
| 14 | 14 | ||
| 15 | internal class CreateNonUXContainers | 15 | internal class CreateNonUXContainers |
| 16 | { | 16 | { |
| 17 | public CreateNonUXContainers(IBackendHelper backendHelper, IntermediateSection section, WixBootstrapperApplicationTuple bootstrapperApplicationTuple, Dictionary<string, WixBundlePayloadTuple> payloadTuples, string intermediateFolder, string layoutFolder, CompressionLevel? defaultCompressionLevel) | 17 | public CreateNonUXContainers(IBackendHelper backendHelper, IntermediateSection section, WixBootstrapperApplicationSymbol bootstrapperApplicationSymbol, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols, string intermediateFolder, string layoutFolder, CompressionLevel? defaultCompressionLevel) |
| 18 | { | 18 | { |
| 19 | this.BackendHelper = backendHelper; | 19 | this.BackendHelper = backendHelper; |
| 20 | this.Section = section; | 20 | this.Section = section; |
| 21 | this.BootstrapperApplicationTuple = bootstrapperApplicationTuple; | 21 | this.BootstrapperApplicationSymbol = bootstrapperApplicationSymbol; |
| 22 | this.PayloadTuples = payloadTuples; | 22 | this.PayloadSymbols = payloadSymbols; |
| 23 | this.IntermediateFolder = intermediateFolder; | 23 | this.IntermediateFolder = intermediateFolder; |
| 24 | this.LayoutFolder = layoutFolder; | 24 | this.LayoutFolder = layoutFolder; |
| 25 | this.DefaultCompressionLevel = defaultCompressionLevel; | 25 | this.DefaultCompressionLevel = defaultCompressionLevel; |
| @@ -29,19 +29,19 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 29 | 29 | ||
| 30 | public IEnumerable<ITrackedFile> TrackedFiles { get; private set; } | 30 | public IEnumerable<ITrackedFile> TrackedFiles { get; private set; } |
| 31 | 31 | ||
| 32 | public WixBundleContainerTuple UXContainer { get; set; } | 32 | public WixBundleContainerSymbol UXContainer { get; set; } |
| 33 | 33 | ||
| 34 | public IEnumerable<WixBundlePayloadTuple> UXContainerPayloads { get; private set; } | 34 | public IEnumerable<WixBundlePayloadSymbol> UXContainerPayloads { get; private set; } |
| 35 | 35 | ||
| 36 | public IEnumerable<WixBundleContainerTuple> Containers { get; private set; } | 36 | public IEnumerable<WixBundleContainerSymbol> Containers { get; private set; } |
| 37 | 37 | ||
| 38 | private IBackendHelper BackendHelper { get; } | 38 | private IBackendHelper BackendHelper { get; } |
| 39 | 39 | ||
| 40 | private IntermediateSection Section { get; } | 40 | private IntermediateSection Section { get; } |
| 41 | 41 | ||
| 42 | private WixBootstrapperApplicationTuple BootstrapperApplicationTuple { get; } | 42 | private WixBootstrapperApplicationSymbol BootstrapperApplicationSymbol { get; } |
| 43 | 43 | ||
| 44 | private Dictionary<string, WixBundlePayloadTuple> PayloadTuples { get; } | 44 | private Dictionary<string, WixBundlePayloadSymbol> PayloadSymbols { get; } |
| 45 | 45 | ||
| 46 | private string IntermediateFolder { get; } | 46 | private string IntermediateFolder { get; } |
| 47 | 47 | ||
| @@ -53,15 +53,15 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 53 | { | 53 | { |
| 54 | var fileTransfers = new List<IFileTransfer>(); | 54 | var fileTransfers = new List<IFileTransfer>(); |
| 55 | var trackedFiles = new List<ITrackedFile>(); | 55 | var trackedFiles = new List<ITrackedFile>(); |
| 56 | var uxPayloadTuples = new List<WixBundlePayloadTuple>(); | 56 | var uxPayloadSymbols = new List<WixBundlePayloadSymbol>(); |
| 57 | 57 | ||
| 58 | var attachedContainerIndex = 1; // count starts at one because UX container is "0". | 58 | var attachedContainerIndex = 1; // count starts at one because UX container is "0". |
| 59 | 59 | ||
| 60 | var containerTuples = this.Section.Tuples.OfType<WixBundleContainerTuple>().ToList(); | 60 | var containerSymbols = this.Section.Symbols.OfType<WixBundleContainerSymbol>().ToList(); |
| 61 | 61 | ||
| 62 | var payloadsByContainer = this.PayloadTuples.Values.ToLookup(p => p.ContainerRef); | 62 | var payloadsByContainer = this.PayloadSymbols.Values.ToLookup(p => p.ContainerRef); |
| 63 | 63 | ||
| 64 | foreach (var container in containerTuples) | 64 | foreach (var container in containerSymbols) |
| 65 | { | 65 | { |
| 66 | var containerId = container.Id.Id; | 66 | var containerId = container.Id.Id; |
| 67 | 67 | ||
| @@ -83,17 +83,17 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 83 | 83 | ||
| 84 | // Gather the list of UX payloads but ensure the BootstrapperApplication Payload is the first | 84 | // Gather the list of UX payloads but ensure the BootstrapperApplication Payload is the first |
| 85 | // in the list since that is the Payload that Burn attempts to load. | 85 | // in the list since that is the Payload that Burn attempts to load. |
| 86 | var baPayloadId = this.BootstrapperApplicationTuple.Id.Id; | 86 | var baPayloadId = this.BootstrapperApplicationSymbol.Id.Id; |
| 87 | 87 | ||
| 88 | foreach (var uxPayload in containerPayloads) | 88 | foreach (var uxPayload in containerPayloads) |
| 89 | { | 89 | { |
| 90 | if (uxPayload.Id.Id == baPayloadId) | 90 | if (uxPayload.Id.Id == baPayloadId) |
| 91 | { | 91 | { |
| 92 | uxPayloadTuples.Insert(0, uxPayload); | 92 | uxPayloadSymbols.Insert(0, uxPayload); |
| 93 | } | 93 | } |
| 94 | else | 94 | else |
| 95 | { | 95 | { |
| 96 | uxPayloadTuples.Add(uxPayload); | 96 | uxPayloadSymbols.Add(uxPayload); |
| 97 | } | 97 | } |
| 98 | } | 98 | } |
| 99 | } | 99 | } |
| @@ -120,13 +120,13 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 120 | } | 120 | } |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | this.Containers = containerTuples; | 123 | this.Containers = containerSymbols; |
| 124 | this.UXContainerPayloads = uxPayloadTuples; | 124 | this.UXContainerPayloads = uxPayloadSymbols; |
| 125 | this.FileTransfers = fileTransfers; | 125 | this.FileTransfers = fileTransfers; |
| 126 | this.TrackedFiles = trackedFiles; | 126 | this.TrackedFiles = trackedFiles; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | private void CreateContainer(WixBundleContainerTuple container, IEnumerable<WixBundlePayloadTuple> containerPayloads) | 129 | private void CreateContainer(WixBundleContainerSymbol container, IEnumerable<WixBundlePayloadSymbol> containerPayloads) |
| 130 | { | 130 | { |
| 131 | var command = new CreateContainerCommand(containerPayloads, container.WorkingPath, this.DefaultCompressionLevel); | 131 | var command = new CreateContainerCommand(containerPayloads, container.WorkingPath, this.DefaultCompressionLevel); |
| 132 | command.Execute(); | 132 | command.Execute(); |
diff --git a/src/WixToolset.Core.Burn/Bundles/GetPackageFacadesCommand.cs b/src/WixToolset.Core.Burn/Bundles/GetPackageFacadesCommand.cs index 71e4cfea..24d1e8d8 100644 --- a/src/WixToolset.Core.Burn/Bundles/GetPackageFacadesCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/GetPackageFacadesCommand.cs | |||
| @@ -5,17 +5,17 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 5 | using System.Collections.Generic; | 5 | using System.Collections.Generic; |
| 6 | using System.Linq; | 6 | using System.Linq; |
| 7 | using WixToolset.Data; | 7 | using WixToolset.Data; |
| 8 | using WixToolset.Data.Tuples; | 8 | using WixToolset.Data.Symbols; |
| 9 | 9 | ||
| 10 | internal class GetPackageFacadesCommand | 10 | internal class GetPackageFacadesCommand |
| 11 | { | 11 | { |
| 12 | public GetPackageFacadesCommand(IEnumerable<WixBundlePackageTuple> chainPackageTuples, IntermediateSection section) | 12 | public GetPackageFacadesCommand(IEnumerable<WixBundlePackageSymbol> chainPackageSymbols, IntermediateSection section) |
| 13 | { | 13 | { |
| 14 | this.ChainPackageTuples = chainPackageTuples; | 14 | this.ChainPackageSymbols = chainPackageSymbols; |
| 15 | this.Section = section; | 15 | this.Section = section; |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | private IEnumerable<WixBundlePackageTuple> ChainPackageTuples { get; } | 18 | private IEnumerable<WixBundlePackageSymbol> ChainPackageSymbols { get; } |
| 19 | 19 | ||
| 20 | private IntermediateSection Section { get; } | 20 | private IntermediateSection Section { get; } |
| 21 | 21 | ||
| @@ -23,14 +23,14 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 23 | 23 | ||
| 24 | public void Execute() | 24 | public void Execute() |
| 25 | { | 25 | { |
| 26 | var exePackages = this.Section.Tuples.OfType<WixBundleExePackageTuple>().ToDictionary(t => t.Id.Id); | 26 | var exePackages = this.Section.Symbols.OfType<WixBundleExePackageSymbol>().ToDictionary(t => t.Id.Id); |
| 27 | var msiPackages = this.Section.Tuples.OfType<WixBundleMsiPackageTuple>().ToDictionary(t => t.Id.Id); | 27 | var msiPackages = this.Section.Symbols.OfType<WixBundleMsiPackageSymbol>().ToDictionary(t => t.Id.Id); |
| 28 | var mspPackages = this.Section.Tuples.OfType<WixBundleMspPackageTuple>().ToDictionary(t => t.Id.Id); | 28 | var mspPackages = this.Section.Symbols.OfType<WixBundleMspPackageSymbol>().ToDictionary(t => t.Id.Id); |
| 29 | var msuPackages = this.Section.Tuples.OfType<WixBundleMsuPackageTuple>().ToDictionary(t => t.Id.Id); | 29 | var msuPackages = this.Section.Symbols.OfType<WixBundleMsuPackageSymbol>().ToDictionary(t => t.Id.Id); |
| 30 | 30 | ||
| 31 | var facades = new Dictionary<string, PackageFacade>(); | 31 | var facades = new Dictionary<string, PackageFacade>(); |
| 32 | 32 | ||
| 33 | foreach (var package in this.ChainPackageTuples) | 33 | foreach (var package in this.ChainPackageSymbols) |
| 34 | { | 34 | { |
| 35 | var id = package.Id.Id; | 35 | var id = package.Id.Id; |
| 36 | switch (package.Type) | 36 | switch (package.Type) |
diff --git a/src/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs b/src/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs index 8ead0952..9e27d5a3 100644 --- a/src/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs | |||
| @@ -5,35 +5,35 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using WixToolset.Data; | 7 | using WixToolset.Data; |
| 8 | using WixToolset.Data.Tuples; | 8 | using WixToolset.Data.Symbols; |
| 9 | using WixToolset.Extensibility.Services; | 9 | using WixToolset.Extensibility.Services; |
| 10 | 10 | ||
| 11 | internal class OrderPackagesAndRollbackBoundariesCommand | 11 | internal class OrderPackagesAndRollbackBoundariesCommand |
| 12 | { | 12 | { |
| 13 | public OrderPackagesAndRollbackBoundariesCommand(IMessaging messaging, IEnumerable<WixGroupTuple> groupTuples, Dictionary<string, WixBundleRollbackBoundaryTuple> boundaryTuples, IDictionary<string, PackageFacade> packageFacades) | 13 | public OrderPackagesAndRollbackBoundariesCommand(IMessaging messaging, IEnumerable<WixGroupSymbol> groupSymbols, Dictionary<string, WixBundleRollbackBoundarySymbol> boundarySymbols, IDictionary<string, PackageFacade> packageFacades) |
| 14 | { | 14 | { |
| 15 | this.Messaging = messaging; | 15 | this.Messaging = messaging; |
| 16 | this.GroupTuples = groupTuples; | 16 | this.GroupSymbols = groupSymbols; |
| 17 | this.Boundaries = boundaryTuples; | 17 | this.Boundaries = boundarySymbols; |
| 18 | this.PackageFacades = packageFacades; | 18 | this.PackageFacades = packageFacades; |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | private IMessaging Messaging { get; } | 21 | private IMessaging Messaging { get; } |
| 22 | 22 | ||
| 23 | public IEnumerable<WixGroupTuple> GroupTuples { get; } | 23 | public IEnumerable<WixGroupSymbol> GroupSymbols { get; } |
| 24 | 24 | ||
| 25 | public Dictionary<string, WixBundleRollbackBoundaryTuple> Boundaries { get; } | 25 | public Dictionary<string, WixBundleRollbackBoundarySymbol> Boundaries { get; } |
| 26 | 26 | ||
| 27 | public IDictionary<string, PackageFacade> PackageFacades { get; } | 27 | public IDictionary<string, PackageFacade> PackageFacades { get; } |
| 28 | 28 | ||
| 29 | public IEnumerable<PackageFacade> OrderedPackageFacades { get; private set; } | 29 | public IEnumerable<PackageFacade> OrderedPackageFacades { get; private set; } |
| 30 | 30 | ||
| 31 | public IEnumerable<WixBundleRollbackBoundaryTuple> UsedRollbackBoundaries { get; private set; } | 31 | public IEnumerable<WixBundleRollbackBoundarySymbol> UsedRollbackBoundaries { get; private set; } |
| 32 | 32 | ||
| 33 | public void Execute() | 33 | public void Execute() |
| 34 | { | 34 | { |
| 35 | var orderedFacades = new List<PackageFacade>(); | 35 | var orderedFacades = new List<PackageFacade>(); |
| 36 | var usedBoundaries = new List<WixBundleRollbackBoundaryTuple>(); | 36 | var usedBoundaries = new List<WixBundleRollbackBoundarySymbol>(); |
| 37 | 37 | ||
| 38 | // Process the chain of packages to add them in the correct order | 38 | // Process the chain of packages to add them in the correct order |
| 39 | // and assign the forward rollback boundaries as appropriate. Remember | 39 | // and assign the forward rollback boundaries as appropriate. Remember |
| @@ -44,41 +44,41 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 44 | // We handle uninstall (aka: backwards) rollback boundaries after | 44 | // We handle uninstall (aka: backwards) rollback boundaries after |
| 45 | // we get these install/repair (aka: forward) rollback boundaries | 45 | // we get these install/repair (aka: forward) rollback boundaries |
| 46 | // defined. | 46 | // defined. |
| 47 | WixBundleRollbackBoundaryTuple previousRollbackBoundary = null; | 47 | WixBundleRollbackBoundarySymbol previousRollbackBoundary = null; |
| 48 | WixBundleRollbackBoundaryTuple lastRollbackBoundary = null; | 48 | WixBundleRollbackBoundarySymbol lastRollbackBoundary = null; |
| 49 | var boundaryHadX86Package = false; | 49 | var boundaryHadX86Package = false; |
| 50 | 50 | ||
| 51 | foreach (var groupTuple in this.GroupTuples) | 51 | foreach (var groupSymbol in this.GroupSymbols) |
| 52 | { | 52 | { |
| 53 | if (ComplexReferenceChildType.Package == groupTuple.ChildType && ComplexReferenceParentType.PackageGroup == groupTuple.ParentType && "WixChain" == groupTuple.ParentId) | 53 | if (ComplexReferenceChildType.Package == groupSymbol.ChildType && ComplexReferenceParentType.PackageGroup == groupSymbol.ParentType && "WixChain" == groupSymbol.ParentId) |
| 54 | { | 54 | { |
| 55 | if (this.PackageFacades.TryGetValue(groupTuple.ChildId, out var facade)) | 55 | if (this.PackageFacades.TryGetValue(groupSymbol.ChildId, out var facade)) |
| 56 | { | 56 | { |
| 57 | if (null != previousRollbackBoundary) | 57 | if (null != previousRollbackBoundary) |
| 58 | { | 58 | { |
| 59 | usedBoundaries.Add(previousRollbackBoundary); | 59 | usedBoundaries.Add(previousRollbackBoundary); |
| 60 | facade.PackageTuple.RollbackBoundaryRef = previousRollbackBoundary.Id.Id; | 60 | facade.PackageSymbol.RollbackBoundaryRef = previousRollbackBoundary.Id.Id; |
| 61 | previousRollbackBoundary = null; | 61 | previousRollbackBoundary = null; |
| 62 | 62 | ||
| 63 | boundaryHadX86Package = facade.PackageTuple.Win64; | 63 | boundaryHadX86Package = facade.PackageSymbol.Win64; |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | // Error if MSI transaction has x86 package preceding x64 packages | 66 | // Error if MSI transaction has x86 package preceding x64 packages |
| 67 | if ((lastRollbackBoundary != null) | 67 | if ((lastRollbackBoundary != null) |
| 68 | && lastRollbackBoundary.Transaction == true | 68 | && lastRollbackBoundary.Transaction == true |
| 69 | && boundaryHadX86Package | 69 | && boundaryHadX86Package |
| 70 | && facade.PackageTuple.Win64) | 70 | && facade.PackageSymbol.Win64) |
| 71 | { | 71 | { |
| 72 | this.Messaging.Write(ErrorMessages.MsiTransactionX86BeforeX64(lastRollbackBoundary.SourceLineNumbers)); | 72 | this.Messaging.Write(ErrorMessages.MsiTransactionX86BeforeX64(lastRollbackBoundary.SourceLineNumbers)); |
| 73 | } | 73 | } |
| 74 | boundaryHadX86Package |= facade.PackageTuple.Win64; | 74 | boundaryHadX86Package |= facade.PackageSymbol.Win64; |
| 75 | 75 | ||
| 76 | orderedFacades.Add(facade); | 76 | orderedFacades.Add(facade); |
| 77 | } | 77 | } |
| 78 | else // must be a rollback boundary. | 78 | else // must be a rollback boundary. |
| 79 | { | 79 | { |
| 80 | // Discard the next rollback boundary if we have a previously defined boundary. | 80 | // Discard the next rollback boundary if we have a previously defined boundary. |
| 81 | var nextRollbackBoundary = this.Boundaries[groupTuple.ChildId]; | 81 | var nextRollbackBoundary = this.Boundaries[groupSymbol.ChildId]; |
| 82 | if (null != previousRollbackBoundary) | 82 | if (null != previousRollbackBoundary) |
| 83 | { | 83 | { |
| 84 | this.Messaging.Write(WarningMessages.DiscardedRollbackBoundary(nextRollbackBoundary.SourceLineNumbers, nextRollbackBoundary.Id.Id)); | 84 | this.Messaging.Write(WarningMessages.DiscardedRollbackBoundary(nextRollbackBoundary.SourceLineNumbers, nextRollbackBoundary.Id.Id)); |
| @@ -131,14 +131,14 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 131 | 131 | ||
| 132 | foreach (PackageFacade package in orderedFacades) | 132 | foreach (PackageFacade package in orderedFacades) |
| 133 | { | 133 | { |
| 134 | if (null != package.PackageTuple.RollbackBoundaryRef) | 134 | if (null != package.PackageSymbol.RollbackBoundaryRef) |
| 135 | { | 135 | { |
| 136 | if (null != previousFacade) | 136 | if (null != previousFacade) |
| 137 | { | 137 | { |
| 138 | previousFacade.PackageTuple.RollbackBoundaryBackwardRef = previousRollbackBoundaryId; | 138 | previousFacade.PackageSymbol.RollbackBoundaryBackwardRef = previousRollbackBoundaryId; |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | previousRollbackBoundaryId = package.PackageTuple.RollbackBoundaryRef; | 141 | previousRollbackBoundaryId = package.PackageSymbol.RollbackBoundaryRef; |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | previousFacade = package; | 144 | previousFacade = package; |
| @@ -146,7 +146,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 146 | 146 | ||
| 147 | if (!String.IsNullOrEmpty(previousRollbackBoundaryId) && null != previousFacade) | 147 | if (!String.IsNullOrEmpty(previousRollbackBoundaryId) && null != previousFacade) |
| 148 | { | 148 | { |
| 149 | previousFacade.PackageTuple.RollbackBoundaryBackwardRef = previousRollbackBoundaryId; | 149 | previousFacade.PackageSymbol.RollbackBoundaryBackwardRef = previousRollbackBoundaryId; |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | this.OrderedPackageFacades = orderedFacades; | 152 | this.OrderedPackageFacades = orderedFacades; |
diff --git a/src/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs b/src/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs index 874258bf..dcb4733e 100644 --- a/src/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs | |||
| @@ -8,7 +8,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 8 | using System.Linq; | 8 | using System.Linq; |
| 9 | using WixToolset.Data; | 9 | using WixToolset.Data; |
| 10 | using WixToolset.Data.Burn; | 10 | using WixToolset.Data.Burn; |
| 11 | using WixToolset.Data.Tuples; | 11 | using WixToolset.Data.Symbols; |
| 12 | using WixToolset.Extensibility.Services; | 12 | using WixToolset.Extensibility.Services; |
| 13 | 13 | ||
| 14 | internal class OrderSearchesCommand | 14 | internal class OrderSearchesCommand |
| @@ -23,32 +23,32 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 23 | 23 | ||
| 24 | private IntermediateSection Section { get; } | 24 | private IntermediateSection Section { get; } |
| 25 | 25 | ||
| 26 | public IDictionary<string, IList<IntermediateTuple>> ExtensionSearchTuplesByExtensionId { get; private set; } | 26 | public IDictionary<string, IList<IntermediateSymbol>> ExtensionSearchSymbolsByExtensionId { get; private set; } |
| 27 | 27 | ||
| 28 | public IList<ISearchFacade> OrderedSearchFacades { get; private set; } | 28 | public IList<ISearchFacade> OrderedSearchFacades { get; private set; } |
| 29 | 29 | ||
| 30 | public void Execute() | 30 | public void Execute() |
| 31 | { | 31 | { |
| 32 | this.ExtensionSearchTuplesByExtensionId = new Dictionary<string, IList<IntermediateTuple>>(); | 32 | this.ExtensionSearchSymbolsByExtensionId = new Dictionary<string, IList<IntermediateSymbol>>(); |
| 33 | this.OrderedSearchFacades = new List<ISearchFacade>(); | 33 | this.OrderedSearchFacades = new List<ISearchFacade>(); |
| 34 | 34 | ||
| 35 | var searchRelationTuples = this.Section.Tuples.OfType<WixSearchRelationTuple>().ToList(); | 35 | var searchRelationSymbols = this.Section.Symbols.OfType<WixSearchRelationSymbol>().ToList(); |
| 36 | var searchTuples = this.Section.Tuples.OfType<WixSearchTuple>().ToList(); | 36 | var searchSymbols = this.Section.Symbols.OfType<WixSearchSymbol>().ToList(); |
| 37 | if (searchTuples.Count == 0) | 37 | if (searchSymbols.Count == 0) |
| 38 | { | 38 | { |
| 39 | // nothing to do! | 39 | // nothing to do! |
| 40 | return; | 40 | return; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | var tupleDictionary = searchTuples.ToDictionary(t => t.Id.Id); | 43 | var symbolDictionary = searchSymbols.ToDictionary(t => t.Id.Id); |
| 44 | 44 | ||
| 45 | var constraints = new Constraints(); | 45 | var constraints = new Constraints(); |
| 46 | if (searchRelationTuples.Count > 0) | 46 | if (searchRelationSymbols.Count > 0) |
| 47 | { | 47 | { |
| 48 | // add relational info to our data... | 48 | // add relational info to our data... |
| 49 | foreach (var searchRelationTuple in searchRelationTuples) | 49 | foreach (var searchRelationSymbol in searchRelationSymbols) |
| 50 | { | 50 | { |
| 51 | constraints.AddConstraint(searchRelationTuple.Id.Id, searchRelationTuple.ParentSearchRef); | 51 | constraints.AddConstraint(searchRelationSymbol.Id.Id, searchRelationSymbol.ParentSearchRef); |
| 52 | } | 52 | } |
| 53 | } | 53 | } |
| 54 | 54 | ||
| @@ -67,10 +67,10 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 67 | // lexicographically at each step to ensure a deterministic ordering | 67 | // lexicographically at each step to ensure a deterministic ordering |
| 68 | // based on 'after' dependencies and ID. | 68 | // based on 'after' dependencies and ID. |
| 69 | var sorter = new TopologicalSort(); | 69 | var sorter = new TopologicalSort(); |
| 70 | var sortedIds = sorter.Sort(tupleDictionary.Keys, constraints); | 70 | var sortedIds = sorter.Sort(symbolDictionary.Keys, constraints); |
| 71 | 71 | ||
| 72 | // Now, create the search facades with the searches in order... | 72 | // Now, create the search facades with the searches in order... |
| 73 | this.OrderSearches(sortedIds, tupleDictionary); | 73 | this.OrderSearches(sortedIds, symbolDictionary); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | /// <summary> | 76 | /// <summary> |
| @@ -313,49 +313,49 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 313 | } | 313 | } |
| 314 | } | 314 | } |
| 315 | 315 | ||
| 316 | private void OrderSearches(List<string> sortedIds, Dictionary<string, WixSearchTuple> searchTupleDictionary) | 316 | private void OrderSearches(List<string> sortedIds, Dictionary<string, WixSearchSymbol> searchSymbolDictionary) |
| 317 | { | 317 | { |
| 318 | // TODO: Although the WixSearch tables are defined in the Util extension, | 318 | // TODO: Although the WixSearch tables are defined in the Util extension, |
| 319 | // the Bundle Binder has to know all about them. We hope to revisit all | 319 | // the Bundle Binder has to know all about them. We hope to revisit all |
| 320 | // of this in the 4.0 timeframe. | 320 | // of this in the 4.0 timeframe. |
| 321 | var legacySearchesById = this.Section.Tuples | 321 | var legacySearchesById = this.Section.Symbols |
| 322 | .Where(t => t.Definition.Type == TupleDefinitionType.WixComponentSearch || | 322 | .Where(t => t.Definition.Type == SymbolDefinitionType.WixComponentSearch || |
| 323 | t.Definition.Type == TupleDefinitionType.WixFileSearch || | 323 | t.Definition.Type == SymbolDefinitionType.WixFileSearch || |
| 324 | t.Definition.Type == TupleDefinitionType.WixProductSearch || | 324 | t.Definition.Type == SymbolDefinitionType.WixProductSearch || |
| 325 | t.Definition.Type == TupleDefinitionType.WixRegistrySearch) | 325 | t.Definition.Type == SymbolDefinitionType.WixRegistrySearch) |
| 326 | .ToDictionary(t => t.Id.Id); | 326 | .ToDictionary(t => t.Id.Id); |
| 327 | var setVariablesById = this.Section.Tuples | 327 | var setVariablesById = this.Section.Symbols |
| 328 | .OfType<WixSetVariableTuple>() | 328 | .OfType<WixSetVariableSymbol>() |
| 329 | .ToDictionary(t => t.Id.Id); | 329 | .ToDictionary(t => t.Id.Id); |
| 330 | var extensionSearchesById = this.Section.Tuples | 330 | var extensionSearchesById = this.Section.Symbols |
| 331 | .Where(t => t.Definition.HasTag(BurnConstants.BundleExtensionSearchTupleDefinitionTag)) | 331 | .Where(t => t.Definition.HasTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag)) |
| 332 | .ToDictionary(t => t.Id.Id); | 332 | .ToDictionary(t => t.Id.Id); |
| 333 | 333 | ||
| 334 | foreach (var searchId in sortedIds) | 334 | foreach (var searchId in sortedIds) |
| 335 | { | 335 | { |
| 336 | var searchTuple = searchTupleDictionary[searchId]; | 336 | var searchSymbol = searchSymbolDictionary[searchId]; |
| 337 | if (legacySearchesById.TryGetValue(searchId, out var specificSearchTuple)) | 337 | if (legacySearchesById.TryGetValue(searchId, out var specificSearchSymbol)) |
| 338 | { | 338 | { |
| 339 | this.OrderedSearchFacades.Add(new LegacySearchFacade(searchTuple, specificSearchTuple)); | 339 | this.OrderedSearchFacades.Add(new LegacySearchFacade(searchSymbol, specificSearchSymbol)); |
| 340 | } | 340 | } |
| 341 | else if (setVariablesById.TryGetValue(searchId, out var setVariableTuple)) | 341 | else if (setVariablesById.TryGetValue(searchId, out var setVariableSymbol)) |
| 342 | { | 342 | { |
| 343 | this.OrderedSearchFacades.Add(new SetVariableSearchFacade(searchTuple, setVariableTuple)); | 343 | this.OrderedSearchFacades.Add(new SetVariableSearchFacade(searchSymbol, setVariableSymbol)); |
| 344 | } | 344 | } |
| 345 | else if (extensionSearchesById.TryGetValue(searchId, out var extensionSearchTuple)) | 345 | else if (extensionSearchesById.TryGetValue(searchId, out var extensionSearchSymbol)) |
| 346 | { | 346 | { |
| 347 | this.OrderedSearchFacades.Add(new ExtensionSearchFacade(searchTuple)); | 347 | this.OrderedSearchFacades.Add(new ExtensionSearchFacade(searchSymbol)); |
| 348 | 348 | ||
| 349 | if (!this.ExtensionSearchTuplesByExtensionId.TryGetValue(searchTuple.BundleExtensionRef, out var extensionSearchTuples)) | 349 | if (!this.ExtensionSearchSymbolsByExtensionId.TryGetValue(searchSymbol.BundleExtensionRef, out var extensionSearchSymbols)) |
| 350 | { | 350 | { |
| 351 | extensionSearchTuples = new List<IntermediateTuple>(); | 351 | extensionSearchSymbols = new List<IntermediateSymbol>(); |
| 352 | this.ExtensionSearchTuplesByExtensionId[searchTuple.BundleExtensionRef] = extensionSearchTuples; | 352 | this.ExtensionSearchSymbolsByExtensionId[searchSymbol.BundleExtensionRef] = extensionSearchSymbols; |
| 353 | } | 353 | } |
| 354 | extensionSearchTuples.Add(extensionSearchTuple); | 354 | extensionSearchSymbols.Add(extensionSearchSymbol); |
| 355 | } | 355 | } |
| 356 | else | 356 | else |
| 357 | { | 357 | { |
| 358 | this.Messaging.Write(ErrorMessages.MissingBundleSearch(searchTuple.SourceLineNumbers, searchId)); | 358 | this.Messaging.Write(ErrorMessages.MissingBundleSearch(searchSymbol.SourceLineNumbers, searchId)); |
| 359 | } | 359 | } |
| 360 | } | 360 | } |
| 361 | } | 361 | } |
diff --git a/src/WixToolset.Core.Burn/Bundles/PackageFacade.cs b/src/WixToolset.Core.Burn/Bundles/PackageFacade.cs index 8b1711a1..471262de 100644 --- a/src/WixToolset.Core.Burn/Bundles/PackageFacade.cs +++ b/src/WixToolset.Core.Burn/Bundles/PackageFacade.cs | |||
| @@ -4,22 +4,22 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 4 | { | 4 | { |
| 5 | using System.Diagnostics; | 5 | using System.Diagnostics; |
| 6 | using WixToolset.Data; | 6 | using WixToolset.Data; |
| 7 | using WixToolset.Data.Tuples; | 7 | using WixToolset.Data.Symbols; |
| 8 | 8 | ||
| 9 | internal class PackageFacade | 9 | internal class PackageFacade |
| 10 | { | 10 | { |
| 11 | public PackageFacade(WixBundlePackageTuple packageTuple, IntermediateTuple specificPackageTuple) | 11 | public PackageFacade(WixBundlePackageSymbol packageSymbol, IntermediateSymbol specificPackageSymbol) |
| 12 | { | 12 | { |
| 13 | Debug.Assert(packageTuple.Id.Id == specificPackageTuple.Id.Id); | 13 | Debug.Assert(packageSymbol.Id.Id == specificPackageSymbol.Id.Id); |
| 14 | 14 | ||
| 15 | this.PackageTuple = packageTuple; | 15 | this.PackageSymbol = packageSymbol; |
| 16 | this.SpecificPackageTuple = specificPackageTuple; | 16 | this.SpecificPackageSymbol = specificPackageSymbol; |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | public string PackageId => this.PackageTuple.Id.Id; | 19 | public string PackageId => this.PackageSymbol.Id.Id; |
| 20 | 20 | ||
| 21 | public WixBundlePackageTuple PackageTuple { get; } | 21 | public WixBundlePackageSymbol PackageSymbol { get; } |
| 22 | 22 | ||
| 23 | public IntermediateTuple SpecificPackageTuple { get; } | 23 | public IntermediateSymbol SpecificPackageSymbol { get; } |
| 24 | } | 24 | } |
| 25 | } | 25 | } |
diff --git a/src/WixToolset.Core.Burn/Bundles/ProcessExePackageCommand.cs b/src/WixToolset.Core.Burn/Bundles/ProcessExePackageCommand.cs index 56254a06..8d8ea986 100644 --- a/src/WixToolset.Core.Burn/Bundles/ProcessExePackageCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/ProcessExePackageCommand.cs | |||
| @@ -4,20 +4,20 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using WixToolset.Data.Tuples; | 7 | using WixToolset.Data.Symbols; |
| 8 | 8 | ||
| 9 | /// <summary> | 9 | /// <summary> |
| 10 | /// Initializes package state from the Exe contents. | 10 | /// Initializes package state from the Exe contents. |
| 11 | /// </summary> | 11 | /// </summary> |
| 12 | internal class ProcessExePackageCommand | 12 | internal class ProcessExePackageCommand |
| 13 | { | 13 | { |
| 14 | public ProcessExePackageCommand(PackageFacade facade, Dictionary<string, WixBundlePayloadTuple> payloadTuples) | 14 | public ProcessExePackageCommand(PackageFacade facade, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols) |
| 15 | { | 15 | { |
| 16 | this.AuthoredPayloads = payloadTuples; | 16 | this.AuthoredPayloads = payloadSymbols; |
| 17 | this.Facade = facade; | 17 | this.Facade = facade; |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | public Dictionary<string, WixBundlePayloadTuple> AuthoredPayloads { get; } | 20 | public Dictionary<string, WixBundlePayloadSymbol> AuthoredPayloads { get; } |
| 21 | 21 | ||
| 22 | public PackageFacade Facade { get; } | 22 | public PackageFacade Facade { get; } |
| 23 | 23 | ||
| @@ -26,14 +26,14 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 26 | /// </summary> | 26 | /// </summary> |
| 27 | public void Execute() | 27 | public void Execute() |
| 28 | { | 28 | { |
| 29 | var packagePayload = this.AuthoredPayloads[this.Facade.PackageTuple.PayloadRef]; | 29 | var packagePayload = this.AuthoredPayloads[this.Facade.PackageSymbol.PayloadRef]; |
| 30 | 30 | ||
| 31 | if (String.IsNullOrEmpty(this.Facade.PackageTuple.CacheId)) | 31 | if (String.IsNullOrEmpty(this.Facade.PackageSymbol.CacheId)) |
| 32 | { | 32 | { |
| 33 | this.Facade.PackageTuple.CacheId = packagePayload.Hash; | 33 | this.Facade.PackageSymbol.CacheId = packagePayload.Hash; |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | this.Facade.PackageTuple.Version = packagePayload.Version; | 36 | this.Facade.PackageSymbol.Version = packagePayload.Version; |
| 37 | } | 37 | } |
| 38 | } | 38 | } |
| 39 | } | 39 | } |
diff --git a/src/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs b/src/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs index 0754fbc6..3eb97ee6 100644 --- a/src/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs | |||
| @@ -12,7 +12,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 12 | using WixToolset.Extensibility; | 12 | using WixToolset.Extensibility; |
| 13 | using Dtf = WixToolset.Dtf.WindowsInstaller; | 13 | using Dtf = WixToolset.Dtf.WindowsInstaller; |
| 14 | using WixToolset.Extensibility.Services; | 14 | using WixToolset.Extensibility.Services; |
| 15 | using WixToolset.Data.Tuples; | 15 | using WixToolset.Data.Symbols; |
| 16 | using WixToolset.Data.WindowsInstaller; | 16 | using WixToolset.Data.WindowsInstaller; |
| 17 | using WixToolset.Extensibility.Data; | 17 | using WixToolset.Extensibility.Data; |
| 18 | 18 | ||
| @@ -23,7 +23,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 23 | { | 23 | { |
| 24 | private const string PropertySqlFormat = "SELECT `Value` FROM `Property` WHERE `Property` = '{0}'"; | 24 | private const string PropertySqlFormat = "SELECT `Value` FROM `Property` WHERE `Property` = '{0}'"; |
| 25 | 25 | ||
| 26 | public ProcessMsiPackageCommand(IWixToolsetServiceProvider serviceProvider, IEnumerable<IBurnBackendExtension> backendExtensions, IntermediateSection section, PackageFacade facade, Dictionary<string, WixBundlePayloadTuple> payloadTuples) | 26 | public ProcessMsiPackageCommand(IWixToolsetServiceProvider serviceProvider, IEnumerable<IBurnBackendExtension> backendExtensions, IntermediateSection section, PackageFacade facade, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols) |
| 27 | { | 27 | { |
| 28 | this.Messaging = serviceProvider.GetService<IMessaging>(); | 28 | this.Messaging = serviceProvider.GetService<IMessaging>(); |
| 29 | this.BackendHelper = serviceProvider.GetService<IBackendHelper>(); | 29 | this.BackendHelper = serviceProvider.GetService<IBackendHelper>(); |
| @@ -31,7 +31,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 31 | 31 | ||
| 32 | this.BackendExtensions = backendExtensions; | 32 | this.BackendExtensions = backendExtensions; |
| 33 | 33 | ||
| 34 | this.AuthoredPayloads = payloadTuples; | 34 | this.AuthoredPayloads = payloadSymbols; |
| 35 | this.Section = section; | 35 | this.Section = section; |
| 36 | this.Facade = facade; | 36 | this.Facade = facade; |
| 37 | } | 37 | } |
| @@ -44,7 +44,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 44 | 44 | ||
| 45 | private IEnumerable<IBurnBackendExtension> BackendExtensions { get; } | 45 | private IEnumerable<IBurnBackendExtension> BackendExtensions { get; } |
| 46 | 46 | ||
| 47 | private Dictionary<string, WixBundlePayloadTuple> AuthoredPayloads { get; } | 47 | private Dictionary<string, WixBundlePayloadSymbol> AuthoredPayloads { get; } |
| 48 | 48 | ||
| 49 | private PackageFacade Facade { get; } | 49 | private PackageFacade Facade { get; } |
| 50 | 50 | ||
| @@ -55,9 +55,9 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 55 | /// </summary> | 55 | /// </summary> |
| 56 | public void Execute() | 56 | public void Execute() |
| 57 | { | 57 | { |
| 58 | var packagePayload = this.AuthoredPayloads[this.Facade.PackageTuple.PayloadRef]; | 58 | var packagePayload = this.AuthoredPayloads[this.Facade.PackageSymbol.PayloadRef]; |
| 59 | 59 | ||
| 60 | var msiPackage = (WixBundleMsiPackageTuple)this.Facade.SpecificPackageTuple; | 60 | var msiPackage = (WixBundleMsiPackageSymbol)this.Facade.SpecificPackageSymbol; |
| 61 | 61 | ||
| 62 | var sourcePath = packagePayload.SourceFile.Path; | 62 | var sourcePath = packagePayload.SourceFile.Path; |
| 63 | var longNamesInImage = false; | 63 | var longNamesInImage = false; |
| @@ -82,8 +82,8 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 82 | var perMachine = (0 == (sumInfo.WordCount & 8)); | 82 | var perMachine = (0 == (sumInfo.WordCount & 8)); |
| 83 | var x64 = (sumInfo.Template.Contains("x64") || sumInfo.Template.Contains("Intel64")); | 83 | var x64 = (sumInfo.Template.Contains("x64") || sumInfo.Template.Contains("Intel64")); |
| 84 | 84 | ||
| 85 | this.Facade.PackageTuple.PerMachine = perMachine ? YesNoDefaultType.Yes : YesNoDefaultType.No; | 85 | this.Facade.PackageSymbol.PerMachine = perMachine ? YesNoDefaultType.Yes : YesNoDefaultType.No; |
| 86 | this.Facade.PackageTuple.Win64 = x64; | 86 | this.Facade.PackageSymbol.Win64 = x64; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | using (var db = new Dtf.Database(sourcePath)) | 89 | using (var db = new Dtf.Database(sourcePath)) |
| @@ -111,33 +111,33 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 111 | 111 | ||
| 112 | if (!String.IsNullOrEmpty(version) && Common.IsValidModuleOrBundleVersion(version)) | 112 | if (!String.IsNullOrEmpty(version) && Common.IsValidModuleOrBundleVersion(version)) |
| 113 | { | 113 | { |
| 114 | this.Messaging.Write(WarningMessages.VersionTruncated(this.Facade.PackageTuple.SourceLineNumbers, msiPackage.ProductVersion, sourcePath, version)); | 114 | this.Messaging.Write(WarningMessages.VersionTruncated(this.Facade.PackageSymbol.SourceLineNumbers, msiPackage.ProductVersion, sourcePath, version)); |
| 115 | msiPackage.ProductVersion = version; | 115 | msiPackage.ProductVersion = version; |
| 116 | } | 116 | } |
| 117 | else | 117 | else |
| 118 | { | 118 | { |
| 119 | this.Messaging.Write(ErrorMessages.InvalidProductVersion(this.Facade.PackageTuple.SourceLineNumbers, msiPackage.ProductVersion, sourcePath)); | 119 | this.Messaging.Write(ErrorMessages.InvalidProductVersion(this.Facade.PackageSymbol.SourceLineNumbers, msiPackage.ProductVersion, sourcePath)); |
| 120 | } | 120 | } |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | if (String.IsNullOrEmpty(this.Facade.PackageTuple.CacheId)) | 123 | if (String.IsNullOrEmpty(this.Facade.PackageSymbol.CacheId)) |
| 124 | { | 124 | { |
| 125 | this.Facade.PackageTuple.CacheId = String.Format("{0}v{1}", msiPackage.ProductCode, msiPackage.ProductVersion); | 125 | this.Facade.PackageSymbol.CacheId = String.Format("{0}v{1}", msiPackage.ProductCode, msiPackage.ProductVersion); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | if (String.IsNullOrEmpty(this.Facade.PackageTuple.DisplayName)) | 128 | if (String.IsNullOrEmpty(this.Facade.PackageSymbol.DisplayName)) |
| 129 | { | 129 | { |
| 130 | this.Facade.PackageTuple.DisplayName = ProcessMsiPackageCommand.GetProperty(db, "ProductName"); | 130 | this.Facade.PackageSymbol.DisplayName = ProcessMsiPackageCommand.GetProperty(db, "ProductName"); |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | if (String.IsNullOrEmpty(this.Facade.PackageTuple.Description)) | 133 | if (String.IsNullOrEmpty(this.Facade.PackageSymbol.Description)) |
| 134 | { | 134 | { |
| 135 | this.Facade.PackageTuple.Description = ProcessMsiPackageCommand.GetProperty(db, "ARPCOMMENTS"); | 135 | this.Facade.PackageSymbol.Description = ProcessMsiPackageCommand.GetProperty(db, "ARPCOMMENTS"); |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | if (String.IsNullOrEmpty(this.Facade.PackageTuple.Version)) | 138 | if (String.IsNullOrEmpty(this.Facade.PackageSymbol.Version)) |
| 139 | { | 139 | { |
| 140 | this.Facade.PackageTuple.Version = msiPackage.ProductVersion; | 140 | this.Facade.PackageSymbol.Version = msiPackage.ProductVersion; |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | var payloadNames = this.GetPayloadTargetNames(packagePayload.Id.Id); | 143 | var payloadNames = this.GetPayloadTargetNames(packagePayload.Id.Id); |
| @@ -168,7 +168,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 168 | 168 | ||
| 169 | // Add all external files as package payloads and calculate the total install size as the rollup of | 169 | // Add all external files as package payloads and calculate the total install size as the rollup of |
| 170 | // File table's sizes. | 170 | // File table's sizes. |
| 171 | this.Facade.PackageTuple.InstallSize = this.ImportExternalFileAsPayloadsAndReturnInstallSize(db, packagePayload, longNamesInImage, compressed, payloadNames); | 171 | this.Facade.PackageSymbol.InstallSize = this.ImportExternalFileAsPayloadsAndReturnInstallSize(db, packagePayload, longNamesInImage, compressed, payloadNames); |
| 172 | 172 | ||
| 173 | // Add all dependency providers from the MSI. | 173 | // Add all dependency providers from the MSI. |
| 174 | this.ImportDependencyProviders(msiPackage, db); | 174 | this.ImportDependencyProviders(msiPackage, db); |
| @@ -176,13 +176,13 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 176 | } | 176 | } |
| 177 | catch (Dtf.InstallerException e) | 177 | catch (Dtf.InstallerException e) |
| 178 | { | 178 | { |
| 179 | this.Messaging.Write(ErrorMessages.UnableToReadPackageInformation(this.Facade.PackageTuple.SourceLineNumbers, sourcePath, e.Message)); | 179 | this.Messaging.Write(ErrorMessages.UnableToReadPackageInformation(this.Facade.PackageSymbol.SourceLineNumbers, sourcePath, e.Message)); |
| 180 | } | 180 | } |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | private ISet<string> GetPayloadTargetNames(string packageId) | 183 | private ISet<string> GetPayloadTargetNames(string packageId) |
| 184 | { | 184 | { |
| 185 | var payloadNames = this.Section.Tuples.OfType<WixBundlePayloadTuple>() | 185 | var payloadNames = this.Section.Symbols.OfType<WixBundlePayloadSymbol>() |
| 186 | .Where(p => p.PackageRef == packageId) | 186 | .Where(p => p.PackageRef == packageId) |
| 187 | .Select(p => p.Name); | 187 | .Select(p => p.Name); |
| 188 | 188 | ||
| @@ -191,21 +191,21 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 191 | 191 | ||
| 192 | private ISet<string> GetMsiPropertyNames(string packageId) | 192 | private ISet<string> GetMsiPropertyNames(string packageId) |
| 193 | { | 193 | { |
| 194 | var properties = this.Section.Tuples.OfType<WixBundleMsiPropertyTuple>() | 194 | var properties = this.Section.Symbols.OfType<WixBundleMsiPropertySymbol>() |
| 195 | .Where(p => p.Id.Id == packageId) | 195 | .Where(p => p.Id.Id == packageId) |
| 196 | .Select(p => p.Name); | 196 | .Select(p => p.Name); |
| 197 | 197 | ||
| 198 | return new HashSet<string>(properties, StringComparer.Ordinal); | 198 | return new HashSet<string>(properties, StringComparer.Ordinal); |
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | private void SetPerMachineAppropriately(Dtf.Database db, WixBundleMsiPackageTuple msiPackage, string sourcePath) | 201 | private void SetPerMachineAppropriately(Dtf.Database db, WixBundleMsiPackageSymbol msiPackage, string sourcePath) |
| 202 | { | 202 | { |
| 203 | if (msiPackage.ForcePerMachine) | 203 | if (msiPackage.ForcePerMachine) |
| 204 | { | 204 | { |
| 205 | if (YesNoDefaultType.No == this.Facade.PackageTuple.PerMachine) | 205 | if (YesNoDefaultType.No == this.Facade.PackageSymbol.PerMachine) |
| 206 | { | 206 | { |
| 207 | this.Messaging.Write(WarningMessages.PerUserButForcingPerMachine(this.Facade.PackageTuple.SourceLineNumbers, sourcePath)); | 207 | this.Messaging.Write(WarningMessages.PerUserButForcingPerMachine(this.Facade.PackageSymbol.SourceLineNumbers, sourcePath)); |
| 208 | this.Facade.PackageTuple.PerMachine = YesNoDefaultType.Yes; // ensure that we think the package is per-machine. | 208 | this.Facade.PackageSymbol.PerMachine = YesNoDefaultType.Yes; // ensure that we think the package is per-machine. |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | // Force ALLUSERS=1 via the MSI command-line. | 211 | // Force ALLUSERS=1 via the MSI command-line. |
| @@ -218,34 +218,34 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 218 | if (String.IsNullOrEmpty(allusers)) | 218 | if (String.IsNullOrEmpty(allusers)) |
| 219 | { | 219 | { |
| 220 | // Not forced per-machine and no ALLUSERS property, flip back to per-user. | 220 | // Not forced per-machine and no ALLUSERS property, flip back to per-user. |
| 221 | if (YesNoDefaultType.Yes == this.Facade.PackageTuple.PerMachine) | 221 | if (YesNoDefaultType.Yes == this.Facade.PackageSymbol.PerMachine) |
| 222 | { | 222 | { |
| 223 | this.Messaging.Write(WarningMessages.ImplicitlyPerUser(this.Facade.PackageTuple.SourceLineNumbers, sourcePath)); | 223 | this.Messaging.Write(WarningMessages.ImplicitlyPerUser(this.Facade.PackageSymbol.SourceLineNumbers, sourcePath)); |
| 224 | this.Facade.PackageTuple.PerMachine = YesNoDefaultType.No; | 224 | this.Facade.PackageSymbol.PerMachine = YesNoDefaultType.No; |
| 225 | } | 225 | } |
| 226 | } | 226 | } |
| 227 | else if (allusers.Equals("1", StringComparison.Ordinal)) | 227 | else if (allusers.Equals("1", StringComparison.Ordinal)) |
| 228 | { | 228 | { |
| 229 | if (YesNoDefaultType.No == this.Facade.PackageTuple.PerMachine) | 229 | if (YesNoDefaultType.No == this.Facade.PackageSymbol.PerMachine) |
| 230 | { | 230 | { |
| 231 | this.Messaging.Write(ErrorMessages.PerUserButAllUsersEquals1(this.Facade.PackageTuple.SourceLineNumbers, sourcePath)); | 231 | this.Messaging.Write(ErrorMessages.PerUserButAllUsersEquals1(this.Facade.PackageSymbol.SourceLineNumbers, sourcePath)); |
| 232 | } | 232 | } |
| 233 | } | 233 | } |
| 234 | else if (allusers.Equals("2", StringComparison.Ordinal)) | 234 | else if (allusers.Equals("2", StringComparison.Ordinal)) |
| 235 | { | 235 | { |
| 236 | this.Messaging.Write(WarningMessages.DiscouragedAllUsersValue(this.Facade.PackageTuple.SourceLineNumbers, sourcePath, (YesNoDefaultType.Yes == this.Facade.PackageTuple.PerMachine) ? "machine" : "user")); | 236 | this.Messaging.Write(WarningMessages.DiscouragedAllUsersValue(this.Facade.PackageSymbol.SourceLineNumbers, sourcePath, (YesNoDefaultType.Yes == this.Facade.PackageSymbol.PerMachine) ? "machine" : "user")); |
| 237 | } | 237 | } |
| 238 | else | 238 | else |
| 239 | { | 239 | { |
| 240 | this.Messaging.Write(ErrorMessages.UnsupportedAllUsersValue(this.Facade.PackageTuple.SourceLineNumbers, sourcePath, allusers)); | 240 | this.Messaging.Write(ErrorMessages.UnsupportedAllUsersValue(this.Facade.PackageSymbol.SourceLineNumbers, sourcePath, allusers)); |
| 241 | } | 241 | } |
| 242 | } | 242 | } |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | private void SetPackageVisibility(Dtf.Database db, WixBundleMsiPackageTuple msiPackage, ISet<string> msiPropertyNames) | 245 | private void SetPackageVisibility(Dtf.Database db, WixBundleMsiPackageSymbol msiPackage, ISet<string> msiPropertyNames) |
| 246 | { | 246 | { |
| 247 | var alreadyVisible = !ProcessMsiPackageCommand.HasProperty(db, "ARPSYSTEMCOMPONENT"); | 247 | var alreadyVisible = !ProcessMsiPackageCommand.HasProperty(db, "ARPSYSTEMCOMPONENT"); |
| 248 | var visible = (this.Facade.PackageTuple.Attributes & WixBundlePackageAttributes.Visible) == WixBundlePackageAttributes.Visible; | 248 | var visible = (this.Facade.PackageSymbol.Attributes & WixBundlePackageAttributes.Visible) == WixBundlePackageAttributes.Visible; |
| 249 | 249 | ||
| 250 | // If not already set to the correct visibility. | 250 | // If not already set to the correct visibility. |
| 251 | if (alreadyVisible != visible) | 251 | if (alreadyVisible != visible) |
| @@ -283,7 +283,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 283 | attributes |= (recordAttributes & WindowsInstallerConstants.MsidbUpgradeAttributesVersionMaxInclusive) == WindowsInstallerConstants.MsidbUpgradeAttributesVersionMaxInclusive ? WixBundleRelatedPackageAttributes.MaxInclusive : 0; | 283 | attributes |= (recordAttributes & WindowsInstallerConstants.MsidbUpgradeAttributesVersionMaxInclusive) == WindowsInstallerConstants.MsidbUpgradeAttributesVersionMaxInclusive ? WixBundleRelatedPackageAttributes.MaxInclusive : 0; |
| 284 | attributes |= (recordAttributes & WindowsInstallerConstants.MsidbUpgradeAttributesLanguagesExclusive) == WindowsInstallerConstants.MsidbUpgradeAttributesLanguagesExclusive ? WixBundleRelatedPackageAttributes.LangInclusive : 0; | 284 | attributes |= (recordAttributes & WindowsInstallerConstants.MsidbUpgradeAttributesLanguagesExclusive) == WindowsInstallerConstants.MsidbUpgradeAttributesLanguagesExclusive ? WixBundleRelatedPackageAttributes.LangInclusive : 0; |
| 285 | 285 | ||
| 286 | this.Section.AddTuple(new WixBundleRelatedPackageTuple(this.Facade.PackageTuple.SourceLineNumbers) | 286 | this.Section.AddSymbol(new WixBundleRelatedPackageSymbol(this.Facade.PackageSymbol.SourceLineNumbers) |
| 287 | { | 287 | { |
| 288 | PackageRef = this.Facade.PackageId, | 288 | PackageRef = this.Facade.PackageId, |
| 289 | RelatedId = record.GetString(1), | 289 | RelatedId = record.GetString(1), |
| @@ -358,7 +358,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 358 | } | 358 | } |
| 359 | } | 359 | } |
| 360 | 360 | ||
| 361 | this.Section.AddTuple(new WixBundleMsiFeatureTuple(this.Facade.PackageTuple.SourceLineNumbers, new Identifier(AccessModifier.Private, this.Facade.PackageId, featureName)) | 361 | this.Section.AddSymbol(new WixBundleMsiFeatureSymbol(this.Facade.PackageSymbol.SourceLineNumbers, new Identifier(AccessModifier.Private, this.Facade.PackageId, featureName)) |
| 362 | { | 362 | { |
| 363 | PackageRef = this.Facade.PackageId, | 363 | PackageRef = this.Facade.PackageId, |
| 364 | Name = featureName, | 364 | Name = featureName, |
| @@ -379,7 +379,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 379 | } | 379 | } |
| 380 | } | 380 | } |
| 381 | 381 | ||
| 382 | private void ImportExternalCabinetAsPayloads(Dtf.Database db, WixBundlePayloadTuple packagePayload, ISet<string> payloadNames) | 382 | private void ImportExternalCabinetAsPayloads(Dtf.Database db, WixBundlePayloadSymbol packagePayload, ISet<string> payloadNames) |
| 383 | { | 383 | { |
| 384 | if (db.Tables.Contains("Media")) | 384 | if (db.Tables.Contains("Media")) |
| 385 | { | 385 | { |
| @@ -395,9 +395,9 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 395 | if (!payloadNames.Contains(cabinetName)) | 395 | if (!payloadNames.Contains(cabinetName)) |
| 396 | { | 396 | { |
| 397 | var generatedId = Common.GenerateIdentifier("cab", packagePayload.Id.Id, cabinet); | 397 | var generatedId = Common.GenerateIdentifier("cab", packagePayload.Id.Id, cabinet); |
| 398 | var payloadSourceFile = this.ResolveRelatedFile(packagePayload.SourceFile.Path, packagePayload.UnresolvedSourceFile, cabinet, "Cabinet", this.Facade.PackageTuple.SourceLineNumbers, BindStage.Normal); | 398 | var payloadSourceFile = this.ResolveRelatedFile(packagePayload.SourceFile.Path, packagePayload.UnresolvedSourceFile, cabinet, "Cabinet", this.Facade.PackageSymbol.SourceLineNumbers, BindStage.Normal); |
| 399 | 399 | ||
| 400 | this.Section.AddTuple(new WixBundlePayloadTuple(this.Facade.PackageTuple.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId)) | 400 | this.Section.AddSymbol(new WixBundlePayloadSymbol(this.Facade.PackageSymbol.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId)) |
| 401 | { | 401 | { |
| 402 | Name = cabinetName, | 402 | Name = cabinetName, |
| 403 | SourceFile = new IntermediateFieldPathValue { Path = payloadSourceFile }, | 403 | SourceFile = new IntermediateFieldPathValue { Path = payloadSourceFile }, |
| @@ -416,7 +416,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 416 | } | 416 | } |
| 417 | } | 417 | } |
| 418 | 418 | ||
| 419 | private long ImportExternalFileAsPayloadsAndReturnInstallSize(Dtf.Database db, WixBundlePayloadTuple packagePayload, bool longNamesInImage, bool compressed, ISet<string> payloadNames) | 419 | private long ImportExternalFileAsPayloadsAndReturnInstallSize(Dtf.Database db, WixBundlePayloadSymbol packagePayload, bool longNamesInImage, bool compressed, ISet<string> payloadNames) |
| 420 | { | 420 | { |
| 421 | long size = 0; | 421 | long size = 0; |
| 422 | 422 | ||
| @@ -473,9 +473,9 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 473 | if (!payloadNames.Contains(name)) | 473 | if (!payloadNames.Contains(name)) |
| 474 | { | 474 | { |
| 475 | var generatedId = Common.GenerateIdentifier("f", packagePayload.Id.Id, record.GetString(2)); | 475 | var generatedId = Common.GenerateIdentifier("f", packagePayload.Id.Id, record.GetString(2)); |
| 476 | var payloadSourceFile = this.ResolveRelatedFile(packagePayload.SourceFile.Path, packagePayload.UnresolvedSourceFile, fileSourcePath, "File", this.Facade.PackageTuple.SourceLineNumbers, BindStage.Normal); | 476 | var payloadSourceFile = this.ResolveRelatedFile(packagePayload.SourceFile.Path, packagePayload.UnresolvedSourceFile, fileSourcePath, "File", this.Facade.PackageSymbol.SourceLineNumbers, BindStage.Normal); |
| 477 | 477 | ||
| 478 | this.Section.AddTuple(new WixBundlePayloadTuple(this.Facade.PackageTuple.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId)) | 478 | this.Section.AddSymbol(new WixBundlePayloadSymbol(this.Facade.PackageSymbol.SourceLineNumbers, new Identifier(AccessModifier.Private, generatedId)) |
| 479 | { | 479 | { |
| 480 | Name = name, | 480 | Name = name, |
| 481 | SourceFile = new IntermediateFieldPathValue { Path = payloadSourceFile }, | 481 | SourceFile = new IntermediateFieldPathValue { Path = payloadSourceFile }, |
| @@ -500,9 +500,9 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 500 | return size; | 500 | return size; |
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | private void AddMsiProperty(WixBundleMsiPackageTuple msiPackage, string name, string value) | 503 | private void AddMsiProperty(WixBundleMsiPackageSymbol msiPackage, string name, string value) |
| 504 | { | 504 | { |
| 505 | this.Section.AddTuple(new WixBundleMsiPropertyTuple(msiPackage.SourceLineNumbers, new Identifier(AccessModifier.Private, msiPackage.Id.Id, name)) | 505 | this.Section.AddSymbol(new WixBundleMsiPropertySymbol(msiPackage.SourceLineNumbers, new Identifier(AccessModifier.Private, msiPackage.Id.Id, name)) |
| 506 | { | 506 | { |
| 507 | PackageRef = msiPackage.Id.Id, | 507 | PackageRef = msiPackage.Id.Id, |
| 508 | Name = name, | 508 | Name = name, |
| @@ -510,7 +510,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 510 | }); | 510 | }); |
| 511 | } | 511 | } |
| 512 | 512 | ||
| 513 | private void ImportDependencyProviders(WixBundleMsiPackageTuple msiPackage, Dtf.Database db) | 513 | private void ImportDependencyProviders(WixBundleMsiPackageSymbol msiPackage, Dtf.Database db) |
| 514 | { | 514 | { |
| 515 | if (db.Tables.Contains("WixDependencyProvider")) | 515 | if (db.Tables.Contains("WixDependencyProvider")) |
| 516 | { | 516 | { |
| @@ -529,12 +529,12 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 529 | } | 529 | } |
| 530 | 530 | ||
| 531 | // Import the provider key and attributes. | 531 | // Import the provider key and attributes. |
| 532 | this.Section.AddTuple(new ProvidesDependencyTuple(msiPackage.SourceLineNumbers) | 532 | this.Section.AddSymbol(new ProvidesDependencySymbol(msiPackage.SourceLineNumbers) |
| 533 | { | 533 | { |
| 534 | PackageRef = msiPackage.Id.Id, | 534 | PackageRef = msiPackage.Id.Id, |
| 535 | Key = record.GetString(1), | 535 | Key = record.GetString(1), |
| 536 | Version = record.GetString(2) ?? msiPackage.ProductVersion, | 536 | Version = record.GetString(2) ?? msiPackage.ProductVersion, |
| 537 | DisplayName = record.GetString(3) ?? this.Facade.PackageTuple.DisplayName, | 537 | DisplayName = record.GetString(3) ?? this.Facade.PackageSymbol.DisplayName, |
| 538 | Attributes = record.GetInteger(4), | 538 | Attributes = record.GetInteger(4), |
| 539 | Imported = true | 539 | Imported = true |
| 540 | }); | 540 | }); |
diff --git a/src/WixToolset.Core.Burn/Bundles/ProcessMspPackageCommand.cs b/src/WixToolset.Core.Burn/Bundles/ProcessMspPackageCommand.cs index 5acffe33..f528ce20 100644 --- a/src/WixToolset.Core.Burn/Bundles/ProcessMspPackageCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/ProcessMspPackageCommand.cs | |||
| @@ -10,7 +10,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 10 | using System.Text; | 10 | using System.Text; |
| 11 | using System.Xml; | 11 | using System.Xml; |
| 12 | using WixToolset.Data; | 12 | using WixToolset.Data; |
| 13 | using WixToolset.Data.Tuples; | 13 | using WixToolset.Data.Symbols; |
| 14 | using WixToolset.Extensibility.Services; | 14 | using WixToolset.Extensibility.Services; |
| 15 | using Dtf = WixToolset.Dtf.WindowsInstaller; | 15 | using Dtf = WixToolset.Dtf.WindowsInstaller; |
| 16 | 16 | ||
| @@ -22,18 +22,18 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 22 | private const string PatchMetadataFormat = "SELECT `Value` FROM `MsiPatchMetadata` WHERE `Property` = '{0}'"; | 22 | private const string PatchMetadataFormat = "SELECT `Value` FROM `MsiPatchMetadata` WHERE `Property` = '{0}'"; |
| 23 | private static readonly Encoding XmlOutputEncoding = new UTF8Encoding(false); | 23 | private static readonly Encoding XmlOutputEncoding = new UTF8Encoding(false); |
| 24 | 24 | ||
| 25 | public ProcessMspPackageCommand(IMessaging messaging, IntermediateSection section, PackageFacade facade, Dictionary<string, WixBundlePayloadTuple> payloadTuples) | 25 | public ProcessMspPackageCommand(IMessaging messaging, IntermediateSection section, PackageFacade facade, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols) |
| 26 | { | 26 | { |
| 27 | this.Messaging = messaging; | 27 | this.Messaging = messaging; |
| 28 | 28 | ||
| 29 | this.AuthoredPayloads = payloadTuples; | 29 | this.AuthoredPayloads = payloadSymbols; |
| 30 | this.Section = section; | 30 | this.Section = section; |
| 31 | this.Facade = facade; | 31 | this.Facade = facade; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | public IMessaging Messaging { get; } | 34 | public IMessaging Messaging { get; } |
| 35 | 35 | ||
| 36 | public Dictionary<string, WixBundlePayloadTuple> AuthoredPayloads { private get; set; } | 36 | public Dictionary<string, WixBundlePayloadSymbol> AuthoredPayloads { private get; set; } |
| 37 | 37 | ||
| 38 | public PackageFacade Facade { private get; set; } | 38 | public PackageFacade Facade { private get; set; } |
| 39 | 39 | ||
| @@ -44,9 +44,9 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 44 | /// </summary> | 44 | /// </summary> |
| 45 | public void Execute() | 45 | public void Execute() |
| 46 | { | 46 | { |
| 47 | var packagePayload = this.AuthoredPayloads[this.Facade.PackageTuple.PayloadRef]; | 47 | var packagePayload = this.AuthoredPayloads[this.Facade.PackageSymbol.PayloadRef]; |
| 48 | 48 | ||
| 49 | var mspPackage = (WixBundleMspPackageTuple)this.Facade.SpecificPackageTuple; | 49 | var mspPackage = (WixBundleMspPackageSymbol)this.Facade.SpecificPackageSymbol; |
| 50 | 50 | ||
| 51 | var sourcePath = packagePayload.SourceFile.Path; | 51 | var sourcePath = packagePayload.SourceFile.Path; |
| 52 | 52 | ||
| @@ -60,14 +60,14 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 60 | 60 | ||
| 61 | using (var db = new Dtf.Database(sourcePath)) | 61 | using (var db = new Dtf.Database(sourcePath)) |
| 62 | { | 62 | { |
| 63 | if (String.IsNullOrEmpty(this.Facade.PackageTuple.DisplayName)) | 63 | if (String.IsNullOrEmpty(this.Facade.PackageSymbol.DisplayName)) |
| 64 | { | 64 | { |
| 65 | this.Facade.PackageTuple.DisplayName = ProcessMspPackageCommand.GetPatchMetadataProperty(db, "DisplayName"); | 65 | this.Facade.PackageSymbol.DisplayName = ProcessMspPackageCommand.GetPatchMetadataProperty(db, "DisplayName"); |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | if (String.IsNullOrEmpty(this.Facade.PackageTuple.Description)) | 68 | if (String.IsNullOrEmpty(this.Facade.PackageSymbol.Description)) |
| 69 | { | 69 | { |
| 70 | this.Facade.PackageTuple.Description = ProcessMspPackageCommand.GetPatchMetadataProperty(db, "Description"); | 70 | this.Facade.PackageSymbol.Description = ProcessMspPackageCommand.GetPatchMetadataProperty(db, "Description"); |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | mspPackage.Manufacturer = ProcessMspPackageCommand.GetPatchMetadataProperty(db, "ManufacturerName"); | 73 | mspPackage.Manufacturer = ProcessMspPackageCommand.GetPatchMetadataProperty(db, "ManufacturerName"); |
| @@ -81,13 +81,13 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 81 | return; | 81 | return; |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | if (String.IsNullOrEmpty(this.Facade.PackageTuple.CacheId)) | 84 | if (String.IsNullOrEmpty(this.Facade.PackageSymbol.CacheId)) |
| 85 | { | 85 | { |
| 86 | this.Facade.PackageTuple.CacheId = mspPackage.PatchCode; | 86 | this.Facade.PackageSymbol.CacheId = mspPackage.PatchCode; |
| 87 | } | 87 | } |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | private void ProcessPatchXml(WixBundlePayloadTuple packagePayload, WixBundleMspPackageTuple mspPackage, string sourcePath) | 90 | private void ProcessPatchXml(WixBundlePayloadSymbol packagePayload, WixBundleMspPackageSymbol mspPackage, string sourcePath) |
| 91 | { | 91 | { |
| 92 | var uniqueTargetCodes = new HashSet<string>(); | 92 | var uniqueTargetCodes = new HashSet<string>(); |
| 93 | 93 | ||
| @@ -127,7 +127,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 127 | 127 | ||
| 128 | if (uniqueTargetCodes.Add(targetCode)) | 128 | if (uniqueTargetCodes.Add(targetCode)) |
| 129 | { | 129 | { |
| 130 | this.Section.AddTuple(new WixBundlePatchTargetCodeTuple(packagePayload.SourceLineNumbers) | 130 | this.Section.AddSymbol(new WixBundlePatchTargetCodeSymbol(packagePayload.SourceLineNumbers) |
| 131 | { | 131 | { |
| 132 | PackageRef = packagePayload.Id.Id, | 132 | PackageRef = packagePayload.Id.Id, |
| 133 | TargetCode = targetCode, | 133 | TargetCode = targetCode, |
diff --git a/src/WixToolset.Core.Burn/Bundles/ProcessMsuPackageCommand.cs b/src/WixToolset.Core.Burn/Bundles/ProcessMsuPackageCommand.cs index 6a39f42f..af4ab3a8 100644 --- a/src/WixToolset.Core.Burn/Bundles/ProcessMsuPackageCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/ProcessMsuPackageCommand.cs | |||
| @@ -5,33 +5,33 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using WixToolset.Data; | 7 | using WixToolset.Data; |
| 8 | using WixToolset.Data.Tuples; | 8 | using WixToolset.Data.Symbols; |
| 9 | 9 | ||
| 10 | /// <summary> | 10 | /// <summary> |
| 11 | /// Processes the Msu packages to add properties and payloads from the Msu packages. | 11 | /// Processes the Msu packages to add properties and payloads from the Msu packages. |
| 12 | /// </summary> | 12 | /// </summary> |
| 13 | internal class ProcessMsuPackageCommand | 13 | internal class ProcessMsuPackageCommand |
| 14 | { | 14 | { |
| 15 | public ProcessMsuPackageCommand(PackageFacade facade, Dictionary<string, WixBundlePayloadTuple> payloadTuples) | 15 | public ProcessMsuPackageCommand(PackageFacade facade, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols) |
| 16 | { | 16 | { |
| 17 | this.AuthoredPayloads = payloadTuples; | 17 | this.AuthoredPayloads = payloadSymbols; |
| 18 | this.Facade = facade; | 18 | this.Facade = facade; |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | public Dictionary<string, WixBundlePayloadTuple> AuthoredPayloads { private get; set; } | 21 | public Dictionary<string, WixBundlePayloadSymbol> AuthoredPayloads { private get; set; } |
| 22 | 22 | ||
| 23 | public PackageFacade Facade { private get; set; } | 23 | public PackageFacade Facade { private get; set; } |
| 24 | 24 | ||
| 25 | public void Execute() | 25 | public void Execute() |
| 26 | { | 26 | { |
| 27 | var packagePayload = this.AuthoredPayloads[this.Facade.PackageTuple.PayloadRef]; | 27 | var packagePayload = this.AuthoredPayloads[this.Facade.PackageSymbol.PayloadRef]; |
| 28 | 28 | ||
| 29 | if (String.IsNullOrEmpty(this.Facade.PackageTuple.CacheId)) | 29 | if (String.IsNullOrEmpty(this.Facade.PackageSymbol.CacheId)) |
| 30 | { | 30 | { |
| 31 | this.Facade.PackageTuple.CacheId = packagePayload.Hash; | 31 | this.Facade.PackageSymbol.CacheId = packagePayload.Hash; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | this.Facade.PackageTuple.PerMachine = YesNoDefaultType.Yes; // MSUs are always per-machine. | 34 | this.Facade.PackageSymbol.PerMachine = YesNoDefaultType.Yes; // MSUs are always per-machine. |
| 35 | } | 35 | } |
| 36 | } | 36 | } |
| 37 | } | 37 | } |
diff --git a/src/WixToolset.Core.Burn/Bundles/ProcessPayloadsCommand.cs b/src/WixToolset.Core.Burn/Bundles/ProcessPayloadsCommand.cs index 7f3a2501..475b04b8 100644 --- a/src/WixToolset.Core.Burn/Bundles/ProcessPayloadsCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/ProcessPayloadsCommand.cs | |||
| @@ -11,7 +11,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 11 | using System.Text; | 11 | using System.Text; |
| 12 | using WixToolset.Data; | 12 | using WixToolset.Data; |
| 13 | using WixToolset.Data.Burn; | 13 | using WixToolset.Data.Burn; |
| 14 | using WixToolset.Data.Tuples; | 14 | using WixToolset.Data.Symbols; |
| 15 | using WixToolset.Extensibility.Data; | 15 | using WixToolset.Extensibility.Data; |
| 16 | using WixToolset.Extensibility.Services; | 16 | using WixToolset.Extensibility.Services; |
| 17 | 17 | ||
| @@ -19,7 +19,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 19 | { | 19 | { |
| 20 | private static readonly Version EmptyVersion = new Version(0, 0, 0, 0); | 20 | private static readonly Version EmptyVersion = new Version(0, 0, 0, 0); |
| 21 | 21 | ||
| 22 | public ProcessPayloadsCommand(IWixToolsetServiceProvider serviceProvider, IBackendHelper backendHelper, IEnumerable<WixBundlePayloadTuple> payloads, PackagingType defaultPackaging, string layoutDirectory) | 22 | public ProcessPayloadsCommand(IWixToolsetServiceProvider serviceProvider, IBackendHelper backendHelper, IEnumerable<WixBundlePayloadSymbol> payloads, PackagingType defaultPackaging, string layoutDirectory) |
| 23 | { | 23 | { |
| 24 | this.Messaging = serviceProvider.GetService<IMessaging>(); | 24 | this.Messaging = serviceProvider.GetService<IMessaging>(); |
| 25 | 25 | ||
| @@ -37,7 +37,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 37 | 37 | ||
| 38 | private IBackendHelper BackendHelper { get; } | 38 | private IBackendHelper BackendHelper { get; } |
| 39 | 39 | ||
| 40 | private IEnumerable<WixBundlePayloadTuple> Payloads { get; } | 40 | private IEnumerable<WixBundlePayloadSymbol> Payloads { get; } |
| 41 | 41 | ||
| 42 | private PackagingType DefaultPackaging { get; } | 42 | private PackagingType DefaultPackaging { get; } |
| 43 | 43 | ||
| @@ -92,7 +92,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 92 | this.TrackedFiles = trackedFiles; | 92 | this.TrackedFiles = trackedFiles; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | private void UpdatePayloadPackagingType(WixBundlePayloadTuple payload) | 95 | private void UpdatePayloadPackagingType(WixBundlePayloadSymbol payload) |
| 96 | { | 96 | { |
| 97 | if (!payload.Packaging.HasValue || PackagingType.Unknown == payload.Packaging) | 97 | if (!payload.Packaging.HasValue || PackagingType.Unknown == payload.Packaging) |
| 98 | { | 98 | { |
| @@ -118,7 +118,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 118 | } | 118 | } |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | private void UpdatePayloadFileInformation(WixBundlePayloadTuple payload, IntermediateFieldPathValue sourceFile) | 121 | private void UpdatePayloadFileInformation(WixBundlePayloadSymbol payload, IntermediateFieldPathValue sourceFile) |
| 122 | { | 122 | { |
| 123 | var fileInfo = new FileInfo(sourceFile.Path); | 123 | var fileInfo = new FileInfo(sourceFile.Path); |
| 124 | 124 | ||
| @@ -165,7 +165,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 165 | } | 165 | } |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | private void UpdatePayloadVersionInformation(WixBundlePayloadTuple payload, IntermediateFieldPathValue sourceFile) | 168 | private void UpdatePayloadVersionInformation(WixBundlePayloadSymbol payload, IntermediateFieldPathValue sourceFile) |
| 169 | { | 169 | { |
| 170 | var versionInfo = FileVersionInfo.GetVersionInfo(sourceFile.Path); | 170 | var versionInfo = FileVersionInfo.GetVersionInfo(sourceFile.Path); |
| 171 | 171 | ||
diff --git a/src/WixToolset.Core.Burn/Bundles/VerifyPayloadsWithCatalogCommand.cs b/src/WixToolset.Core.Burn/Bundles/VerifyPayloadsWithCatalogCommand.cs index 2b17f985..e7c97ea7 100644 --- a/src/WixToolset.Core.Burn/Bundles/VerifyPayloadsWithCatalogCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/VerifyPayloadsWithCatalogCommand.cs | |||
| @@ -9,12 +9,12 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 9 | using System.Runtime.InteropServices; | 9 | using System.Runtime.InteropServices; |
| 10 | using System.Text; | 10 | using System.Text; |
| 11 | using WixToolset.Data; | 11 | using WixToolset.Data; |
| 12 | using WixToolset.Data.Tuples; | 12 | using WixToolset.Data.Symbols; |
| 13 | using WixToolset.Extensibility.Services; | 13 | using WixToolset.Extensibility.Services; |
| 14 | 14 | ||
| 15 | internal class VerifyPayloadsWithCatalogCommand | 15 | internal class VerifyPayloadsWithCatalogCommand |
| 16 | { | 16 | { |
| 17 | public VerifyPayloadsWithCatalogCommand(IMessaging messaging, IEnumerable<WixBundleCatalogTuple> catalogs, IEnumerable<WixBundlePayloadTuple> payloads) | 17 | public VerifyPayloadsWithCatalogCommand(IMessaging messaging, IEnumerable<WixBundleCatalogSymbol> catalogs, IEnumerable<WixBundlePayloadSymbol> payloads) |
| 18 | { | 18 | { |
| 19 | this.Messaging = messaging; | 19 | this.Messaging = messaging; |
| 20 | this.Catalogs = catalogs; | 20 | this.Catalogs = catalogs; |
| @@ -23,9 +23,9 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 23 | 23 | ||
| 24 | private IMessaging Messaging { get; } | 24 | private IMessaging Messaging { get; } |
| 25 | 25 | ||
| 26 | private IEnumerable<WixBundleCatalogTuple> Catalogs { get; } | 26 | private IEnumerable<WixBundleCatalogSymbol> Catalogs { get; } |
| 27 | 27 | ||
| 28 | private IEnumerable<WixBundlePayloadTuple> Payloads { get; } | 28 | private IEnumerable<WixBundlePayloadSymbol> Payloads { get; } |
| 29 | 29 | ||
| 30 | public void Execute() | 30 | public void Execute() |
| 31 | { | 31 | { |
diff --git a/src/WixToolset.Core.Burn/ExtensibilityServices/BurnBackendHelper.cs b/src/WixToolset.Core.Burn/ExtensibilityServices/BurnBackendHelper.cs index 10ac9931..7d3acff9 100644 --- a/src/WixToolset.Core.Burn/ExtensibilityServices/BurnBackendHelper.cs +++ b/src/WixToolset.Core.Burn/ExtensibilityServices/BurnBackendHelper.cs | |||
| @@ -24,9 +24,9 @@ namespace WixToolset.Core.Burn.ExtensibilityServices | |||
| 24 | this.BootstrapperApplicationManifestData.AddXml(xml); | 24 | this.BootstrapperApplicationManifestData.AddXml(xml); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | public void AddBootstrapperApplicationData(IntermediateTuple tuple, bool tupleIdIsIdAttribute = false) | 27 | public void AddBootstrapperApplicationData(IntermediateSymbol symbol, bool symbolIdIsIdAttribute = false) |
| 28 | { | 28 | { |
| 29 | this.BootstrapperApplicationManifestData.AddTuple(tuple, tupleIdIsIdAttribute, BurnCommon.BADataNamespace); | 29 | this.BootstrapperApplicationManifestData.AddSymbol(symbol, symbolIdIsIdAttribute, BurnCommon.BADataNamespace); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | public void AddBundleExtensionData(string extensionId, string xml) | 32 | public void AddBundleExtensionData(string extensionId, string xml) |
| @@ -35,10 +35,10 @@ namespace WixToolset.Core.Burn.ExtensibilityServices | |||
| 35 | manifestData.AddXml(xml); | 35 | manifestData.AddXml(xml); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | public void AddBundleExtensionData(string extensionId, IntermediateTuple tuple, bool tupleIdIsIdAttribute = false) | 38 | public void AddBundleExtensionData(string extensionId, IntermediateSymbol symbol, bool symbolIdIsIdAttribute = false) |
| 39 | { | 39 | { |
| 40 | var manifestData = this.GetBundleExtensionManifestData(extensionId); | 40 | var manifestData = this.GetBundleExtensionManifestData(extensionId); |
| 41 | manifestData.AddTuple(tuple, tupleIdIsIdAttribute, BurnCommon.BundleExtensionDataNamespace); | 41 | manifestData.AddSymbol(symbol, symbolIdIsIdAttribute, BurnCommon.BundleExtensionDataNamespace); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | public void WriteBootstrapperApplicationData(XmlWriter writer) | 44 | public void WriteBootstrapperApplicationData(XmlWriter writer) |
| @@ -90,21 +90,21 @@ namespace WixToolset.Core.Burn.ExtensibilityServices | |||
| 90 | 90 | ||
| 91 | private StringBuilder Builder { get; } | 91 | private StringBuilder Builder { get; } |
| 92 | 92 | ||
| 93 | public void AddTuple(IntermediateTuple tuple, bool tupleIdIsIdAttribute, string ns) | 93 | public void AddSymbol(IntermediateSymbol symbol, bool symbolIdIsIdAttribute, string ns) |
| 94 | { | 94 | { |
| 95 | // There might be a more efficient way to do this, | 95 | // There might be a more efficient way to do this, |
| 96 | // but this is an easy way to ensure we're creating valid XML. | 96 | // but this is an easy way to ensure we're creating valid XML. |
| 97 | var sb = new StringBuilder(); | 97 | var sb = new StringBuilder(); |
| 98 | using (var writer = XmlWriter.Create(sb, WriterSettings)) | 98 | using (var writer = XmlWriter.Create(sb, WriterSettings)) |
| 99 | { | 99 | { |
| 100 | writer.WriteStartElement(tuple.Definition.Name, ns); | 100 | writer.WriteStartElement(symbol.Definition.Name, ns); |
| 101 | 101 | ||
| 102 | if (tupleIdIsIdAttribute && tuple.Id != null) | 102 | if (symbolIdIsIdAttribute && symbol.Id != null) |
| 103 | { | 103 | { |
| 104 | writer.WriteAttributeString("Id", tuple.Id.Id); | 104 | writer.WriteAttributeString("Id", symbol.Id.Id); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | foreach (var field in tuple.Fields) | 107 | foreach (var field in symbol.Fields) |
| 108 | { | 108 | { |
| 109 | if (!field.IsNull()) | 109 | if (!field.IsNull()) |
| 110 | { | 110 | { |
