diff options
-rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs index a3f2da94..b3b9023c 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs | |||
@@ -32,7 +32,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
32 | 32 | ||
33 | this.Messaging = context.ServiceProvider.GetService<IMessaging>(); | 33 | this.Messaging = context.ServiceProvider.GetService<IMessaging>(); |
34 | 34 | ||
35 | this.BackendHelper = context.ServiceProvider.GetService<IBackendHelper>(); | ||
36 | this.WindowsInstallerBackendHelper = context.ServiceProvider.GetService<IWindowsInstallerBackendHelper>(); | 35 | this.WindowsInstallerBackendHelper = context.ServiceProvider.GetService<IWindowsInstallerBackendHelper>(); |
37 | 36 | ||
38 | this.PathResolver = this.ServiceProvider.GetService<IPathResolver>(); | 37 | this.PathResolver = this.ServiceProvider.GetService<IPathResolver>(); |
@@ -61,8 +60,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
61 | 60 | ||
62 | private IMessaging Messaging { get; } | 61 | private IMessaging Messaging { get; } |
63 | 62 | ||
64 | private IBackendHelper BackendHelper { get; } | ||
65 | |||
66 | private IWindowsInstallerBackendHelper WindowsInstallerBackendHelper { get; } | 63 | private IWindowsInstallerBackendHelper WindowsInstallerBackendHelper { get; } |
67 | 64 | ||
68 | private IPathResolver PathResolver { get; } | 65 | private IPathResolver PathResolver { get; } |
@@ -237,7 +234,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
237 | 234 | ||
238 | // Extract files that come from binary .wixlibs and WixExtensions (this does not extract files from merge modules). | 235 | // Extract files that come from binary .wixlibs and WixExtensions (this does not extract files from merge modules). |
239 | { | 236 | { |
240 | var command = new ExtractEmbeddedFilesCommand(this.BackendHelper, this.ExpectedEmbeddedFiles); | 237 | var command = new ExtractEmbeddedFilesCommand(this.WindowsInstallerBackendHelper, this.ExpectedEmbeddedFiles); |
241 | command.Execute(); | 238 | command.Execute(); |
242 | 239 | ||
243 | trackedFiles.AddRange(command.TrackedFiles); | 240 | trackedFiles.AddRange(command.TrackedFiles); |
@@ -371,7 +368,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
371 | 368 | ||
372 | // Set generated component guids. | 369 | // Set generated component guids. |
373 | { | 370 | { |
374 | var command = new CalculateComponentGuids(this.Messaging, this.BackendHelper, this.PathResolver, section, platform); | 371 | var command = new CalculateComponentGuids(this.Messaging, this.WindowsInstallerBackendHelper, this.PathResolver, section, platform); |
375 | command.Execute(); | 372 | command.Execute(); |
376 | } | 373 | } |
377 | 374 | ||
@@ -384,7 +381,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
384 | Dictionary<MediaSymbol, IEnumerable<FileFacade>> filesByCabinetMedia; | 381 | Dictionary<MediaSymbol, IEnumerable<FileFacade>> filesByCabinetMedia; |
385 | IEnumerable<FileFacade> uncompressedFiles; | 382 | IEnumerable<FileFacade> uncompressedFiles; |
386 | { | 383 | { |
387 | var order = new OptimizeFileFacadesOrderCommand(this.BackendHelper, this.PathResolver, section, platform, fileFacades); | 384 | var order = new OptimizeFileFacadesOrderCommand(this.WindowsInstallerBackendHelper, this.PathResolver, section, platform, fileFacades); |
388 | order.Execute(); | 385 | order.Execute(); |
389 | 386 | ||
390 | fileFacades = order.FileFacades; | 387 | fileFacades = order.FileFacades; |
@@ -457,7 +454,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
457 | 454 | ||
458 | var mediaTemplate = section.Symbols.OfType<WixMediaTemplateSymbol>().FirstOrDefault(); | 455 | var mediaTemplate = section.Symbols.OfType<WixMediaTemplateSymbol>().FirstOrDefault(); |
459 | 456 | ||
460 | var command = new CreateCabinetsCommand(this.ServiceProvider, this.BackendHelper, mediaTemplate); | 457 | var command = new CreateCabinetsCommand(this.ServiceProvider, this.WindowsInstallerBackendHelper, mediaTemplate); |
461 | command.CabbingThreadCount = this.CabbingThreadCount; | 458 | command.CabbingThreadCount = this.CabbingThreadCount; |
462 | command.CabCachePath = this.CabCachePath; | 459 | command.CabCachePath = this.CabCachePath; |
463 | command.DefaultCompressionLevel = this.DefaultCompressionLevel; | 460 | command.DefaultCompressionLevel = this.DefaultCompressionLevel; |
@@ -486,7 +483,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
486 | // We can create instance transforms since Component Guids and Outputs are created. | 483 | // We can create instance transforms since Component Guids and Outputs are created. |
487 | if (output.Type == OutputType.Product) | 484 | if (output.Type == OutputType.Product) |
488 | { | 485 | { |
489 | var command = new CreateInstanceTransformsCommand(section, output, tableDefinitions, this.BackendHelper); | 486 | var command = new CreateInstanceTransformsCommand(section, output, tableDefinitions, this.WindowsInstallerBackendHelper); |
490 | command.Execute(); | 487 | command.Execute(); |
491 | } | 488 | } |
492 | else if (output.Type == OutputType.Patch) | 489 | else if (output.Type == OutputType.Patch) |
@@ -500,10 +497,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
500 | this.Messaging.Write(VerboseMessages.GeneratingDatabase()); | 497 | this.Messaging.Write(VerboseMessages.GeneratingDatabase()); |
501 | 498 | ||
502 | { | 499 | { |
503 | var trackMsi = this.BackendHelper.TrackFile(this.OutputPath, TrackedFileType.Final); | 500 | var trackMsi = this.WindowsInstallerBackendHelper.TrackFile(this.OutputPath, TrackedFileType.Final); |
504 | trackedFiles.Add(trackMsi); | 501 | trackedFiles.Add(trackMsi); |
505 | 502 | ||
506 | var command = new GenerateDatabaseCommand(this.Messaging, this.BackendHelper, this.FileSystemManager, output, trackMsi.Path, tableDefinitions, this.IntermediateFolder, this.Codepage, keepAddedColumns: false, this.SuppressAddingValidationRows, useSubdirectory: false); | 503 | var command = new GenerateDatabaseCommand(this.Messaging, this.WindowsInstallerBackendHelper, this.FileSystemManager, output, trackMsi.Path, tableDefinitions, this.IntermediateFolder, this.Codepage, keepAddedColumns: false, this.SuppressAddingValidationRows, useSubdirectory: false); |
507 | command.Execute(); | 504 | command.Execute(); |
508 | 505 | ||
509 | trackedFiles.AddRange(command.GeneratedTemporaryFiles); | 506 | trackedFiles.AddRange(command.GeneratedTemporaryFiles); |
@@ -556,7 +553,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
556 | // Process uncompressed files. | 553 | // Process uncompressed files. |
557 | if (!this.Messaging.EncounteredError && !this.SuppressLayout && uncompressedFiles.Any()) | 554 | if (!this.Messaging.EncounteredError && !this.SuppressLayout && uncompressedFiles.Any()) |
558 | { | 555 | { |
559 | var command = new ProcessUncompressedFilesCommand(section, this.BackendHelper, this.PathResolver); | 556 | var command = new ProcessUncompressedFilesCommand(section, this.WindowsInstallerBackendHelper, this.PathResolver); |
560 | command.Compressed = compressed; | 557 | command.Compressed = compressed; |
561 | command.FileFacades = uncompressedFiles; | 558 | command.FileFacades = uncompressedFiles; |
562 | command.LayoutDirectory = layoutDirectory; | 559 | command.LayoutDirectory = layoutDirectory; |
@@ -570,7 +567,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
570 | } | 567 | } |
571 | 568 | ||
572 | // TODO: this is not sufficient to collect all Input files (for example, it misses Binary and Icon tables). | 569 | // TODO: this is not sufficient to collect all Input files (for example, it misses Binary and Icon tables). |
573 | trackedFiles.AddRange(fileFacades.Select(f => this.BackendHelper.TrackFile(f.SourcePath, TrackedFileType.Input, f.SourceLineNumber))); | 570 | trackedFiles.AddRange(fileFacades.Select(f => this.WindowsInstallerBackendHelper.TrackFile(f.SourcePath, TrackedFileType.Input, f.SourceLineNumber))); |
574 | 571 | ||
575 | var result = this.ServiceProvider.GetService<IBindResult>(); | 572 | var result = this.ServiceProvider.GetService<IBindResult>(); |
576 | result.FileTransfers = fileTransfers; | 573 | result.FileTransfers = fileTransfers; |
@@ -590,7 +587,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
590 | } | 587 | } |
591 | else | 588 | else |
592 | { | 589 | { |
593 | var trackPdb = this.BackendHelper.TrackFile(this.OutputPdbPath, TrackedFileType.Final); | 590 | var trackPdb = this.WindowsInstallerBackendHelper.TrackFile(this.OutputPdbPath, TrackedFileType.Final); |
594 | trackedFiles.Add(trackPdb); | 591 | trackedFiles.Add(trackPdb); |
595 | 592 | ||
596 | wixout = WixOutput.Create(trackPdb.Path); | 593 | wixout = WixOutput.Create(trackPdb.Path); |