diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-06-04 11:22:16 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-06-04 11:32:20 -0700 |
| commit | 2c3793752060e50fe2049d860a8ccb4a2475414c (patch) | |
| tree | 24cd612c3dd4f7a773b6328dfc1d28f983028712 /src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs | |
| parent | f89238b23402e33c2fc09b13a02217f03b722216 (diff) | |
| download | wix-2c3793752060e50fe2049d860a8ccb4a2475414c.tar.gz wix-2c3793752060e50fe2049d860a8ccb4a2475414c.tar.bz2 wix-2c3793752060e50fe2049d860a8ccb4a2475414c.zip | |
Minor code cleanup
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs | 34 |
1 files changed, 16 insertions, 18 deletions
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 | |||
| 238 | 238 | ||
| 239 | // This must occur after all variables and source paths have been resolved. | 239 | // This must occur after all variables and source paths have been resolved. |
| 240 | List<FileFacade> fileFacades; | 240 | List<FileFacade> fileFacades; |
| 241 | if (SectionType.Patch == section.Type) | ||
| 242 | { | ||
| 243 | var command = new GetFileFacadesFromTransforms(this.Messaging, this.FileSystemManager, this.SubStorages); | ||
| 244 | command.Execute(); | ||
| 245 | |||
| 246 | fileFacades = command.FileFacades; | ||
| 247 | } | ||
| 248 | else | ||
| 241 | { | 249 | { |
| 242 | var command = new GetFileFacadesCommand(section); | 250 | var command = new GetFileFacadesCommand(section); |
| 243 | command.Execute(); | 251 | command.Execute(); |
| @@ -254,24 +262,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 254 | { | 262 | { |
| 255 | containsMergeModules = true; | 263 | containsMergeModules = true; |
| 256 | 264 | ||
| 257 | var command = new ExtractMergeModuleFilesCommand(this.Messaging, section, wixMergeTuples); | 265 | var command = new ExtractMergeModuleFilesCommand(this.Messaging, wixMergeTuples, fileFacades, installerVersion, this.IntermediateFolder, this.SuppressLayout); |
| 258 | command.FileFacades = fileFacades; | ||
| 259 | command.OutputInstallerVersion = installerVersion; | ||
| 260 | command.SuppressLayout = this.SuppressLayout; | ||
| 261 | command.IntermediateFolder = this.IntermediateFolder; | ||
| 262 | command.Execute(); | 266 | command.Execute(); |
| 263 | 267 | ||
| 264 | fileFacades.AddRange(command.MergeModulesFileFacades); | 268 | fileFacades.AddRange(command.MergeModulesFileFacades); |
| 265 | } | 269 | } |
| 266 | } | 270 | } |
| 267 | else if (SectionType.Patch == section.Type) | ||
| 268 | { | ||
| 269 | var command = new GetFileFacadesFromTransforms(this.Messaging, this.FileSystemManager, this.SubStorages); | ||
| 270 | command.Execute(); | ||
| 271 | var filesFromTransforms = command.FileFacades; | ||
| 272 | |||
| 273 | fileFacades.AddRange(filesFromTransforms); | ||
| 274 | } | ||
| 275 | 271 | ||
| 276 | // stop processing if an error previously occurred | 272 | // stop processing if an error previously occurred |
| 277 | if (this.Messaging.EncounteredError) | 273 | if (this.Messaging.EncounteredError) |
| @@ -368,11 +364,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 368 | output.SubStorages.Add(storage); | 364 | output.SubStorages.Add(storage); |
| 369 | } | 365 | } |
| 370 | } | 366 | } |
| 371 | else // we can create instance transforms since Component Guids are set. | ||
| 372 | { | ||
| 373 | var command = new CreateInstanceTransformsCommand(section, output, tableDefinitions, this.BackendHelper); | ||
| 374 | command.Execute(); | ||
| 375 | } | ||
| 376 | 367 | ||
| 377 | #if TODO_FINISH_UPDATE | 368 | #if TODO_FINISH_UPDATE |
| 378 | // Extended binder extensions can be called now that fields are resolved. | 369 | // Extended binder extensions can be called now that fields are resolved. |
| @@ -412,6 +403,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 412 | 403 | ||
| 413 | this.ValidateComponentGuids(output); | 404 | this.ValidateComponentGuids(output); |
| 414 | 405 | ||
| 406 | // We can create instance transforms since Component Guids and Outputs are created. | ||
| 407 | if (output.Type == OutputType.Product) | ||
| 408 | { | ||
| 409 | var command = new CreateInstanceTransformsCommand(section, output, tableDefinitions, this.BackendHelper); | ||
| 410 | command.Execute(); | ||
| 411 | } | ||
| 412 | |||
| 415 | // Stop processing if an error previously occurred. | 413 | // Stop processing if an error previously occurred. |
| 416 | if (this.Messaging.EncounteredError) | 414 | if (this.Messaging.EncounteredError) |
| 417 | { | 415 | { |
