From 2c3793752060e50fe2049d860a8ccb4a2475414c Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 4 Jun 2020 11:22:16 -0700 Subject: Minor code cleanup --- .../Bind/BindDatabaseCommand.cs | 34 ++++++++++------------ 1 file changed, 16 insertions(+), 18 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 8887d4eb..a4b9be85 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs @@ -238,6 +238,14 @@ namespace WixToolset.Core.WindowsInstaller.Bind // This must occur after all variables and source paths have been resolved. List fileFacades; + if (SectionType.Patch == section.Type) + { + var command = new GetFileFacadesFromTransforms(this.Messaging, this.FileSystemManager, this.SubStorages); + command.Execute(); + + fileFacades = command.FileFacades; + } + else { var command = new GetFileFacadesCommand(section); command.Execute(); @@ -254,24 +262,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind { containsMergeModules = true; - var command = new ExtractMergeModuleFilesCommand(this.Messaging, section, wixMergeTuples); - command.FileFacades = fileFacades; - command.OutputInstallerVersion = installerVersion; - command.SuppressLayout = this.SuppressLayout; - command.IntermediateFolder = this.IntermediateFolder; + var command = new ExtractMergeModuleFilesCommand(this.Messaging, wixMergeTuples, fileFacades, installerVersion, this.IntermediateFolder, this.SuppressLayout); command.Execute(); fileFacades.AddRange(command.MergeModulesFileFacades); } } - else if (SectionType.Patch == section.Type) - { - var command = new GetFileFacadesFromTransforms(this.Messaging, this.FileSystemManager, this.SubStorages); - command.Execute(); - var filesFromTransforms = command.FileFacades; - - fileFacades.AddRange(filesFromTransforms); - } // stop processing if an error previously occurred if (this.Messaging.EncounteredError) @@ -368,11 +364,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind output.SubStorages.Add(storage); } } - else // we can create instance transforms since Component Guids are set. - { - var command = new CreateInstanceTransformsCommand(section, output, tableDefinitions, this.BackendHelper); - command.Execute(); - } #if TODO_FINISH_UPDATE // Extended binder extensions can be called now that fields are resolved. @@ -412,6 +403,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind this.ValidateComponentGuids(output); + // We can create instance transforms since Component Guids and Outputs are created. + if (output.Type == OutputType.Product) + { + var command = new CreateInstanceTransformsCommand(section, output, tableDefinitions, this.BackendHelper); + command.Execute(); + } + // Stop processing if an error previously occurred. if (this.Messaging.EncounteredError) { -- cgit v1.2.3-55-g6feb