From 49f1209035aac1fcfad5dbbe25f7b2306d3be86c Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 7 Dec 2017 14:19:05 -0800 Subject: Support MSI backends creating custom tables and remove WixToolset.Data.WindowsInstaller --- .../Bind/BindDatabaseCommand.cs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs') diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs index 012998e6..9e30aed2 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs @@ -10,6 +10,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind using WixToolset.Data; using WixToolset.Data.Bind; using WixToolset.Data.Tuples; + using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; using WixToolset.Extensibility.Services; @@ -21,7 +22,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind // As outlined in RFC 4122, this is our namespace for generating name-based (version 3) UUIDs. internal static readonly Guid WixComponentGuidNamespace = new Guid("{3064E5C6-FB63-4FE9-AC49-E446A792EFA5}"); - public BindDatabaseCommand(IBindContext context, Validator validator) + public BindDatabaseCommand(IBindContext context, IEnumerable backendExtension, Validator validator) { this.TableDefinitions = WindowsInstallerStandardInternal.GetTableDefinitions(); @@ -40,7 +41,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind this.Validator = validator; this.WixVariableResolver = context.WixVariableResolver; - this.BackendExtensions = context.ExtensionManager.Create(); + this.BackendExtensions = backendExtension; } private IEnumerable BindPaths { get; } @@ -298,7 +299,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind // Try to put as much above here as possible, updating the IR is better. Output output; { - var command = new CreateOutputFromIRCommand(section, this.TableDefinitions); + var command = new CreateOutputFromIRCommand(section, this.TableDefinitions, this.BackendExtensions); command.Execute(); output = command.Output; @@ -313,13 +314,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind // Modularize identifiers and add tables with real streams to the import tables. if (OutputType.Module == output.Type) { - // Gather all the suppress modularization identifiers - var suppressModularizationIdentifiers = new HashSet(section.Tuples.OfType().Select(s => s.WixSuppressModularization)); - - foreach (var table in output.Tables) - { - table.Modularize(modularizationGuid, suppressModularizationIdentifiers); - } + var command = new ModularaizeCommand(output, modularizationGuid, section.Tuples.OfType()); + command.Execute(); } #if TODO_FINISH_UPDATE @@ -897,7 +893,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind { Dictionary componentGuidConditions = new Dictionary(componentTable.Rows.Count); - foreach (Data.Rows.ComponentRow row in componentTable.Rows) + foreach (Data.WindowsInstaller.Rows.ComponentRow row in componentTable.Rows) { // we don't care about unmanaged components and if there's a * GUID remaining, // there's already an error that prevented it from being replaced with a real GUID. -- cgit v1.2.3-55-g6feb