@joebigelow / wix / commits / bfd28011

Update Extensiblity for update to IWindowsInstallerBackendExtension.PostBackendBind()

Rob Mensching committed Jan 3, 2018 at 15:05 UTC bfd280115ae55bf0e63f5a787c0ab3a3cf8efa32
3 files changed +17 -13
src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
+3 -11
@@ -36,7 +36,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
36 this.Intermediate = context.IntermediateRepresentation;
37 this.Messaging = context.Messaging;
38 this.OutputPath = context.OutputPath;
39 - this.PdbFile = context.OutputPdbPath;
39 this.IntermediateFolder = context.IntermediateFolder;
40 this.Validator = validator;
41
@@ -61,8 +60,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
60
61 private IEnumerable<IWindowsInstallerBackendExtension> BackendExtensions { get; }
62
64 - private string PdbFile { get; }
65 -
63 private Intermediate Intermediate { get; }
64
65 private IMessaging Messaging { get; }
@@ -84,6 +81,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
81
82 public IEnumerable<string> ContentFilePaths { get; private set; }
83
84 + public Pdb Pdb { get; private set; }
85 +
86 public void Execute()
87 {
88 var section = this.Intermediate.Sections.Single();
@@ -428,14 +427,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
427 return;
428 }
429
431 - // Output the output to a file.
432 - if (!String.IsNullOrEmpty(this.PdbFile))
433 - {
434 - Pdb pdb = new Pdb();
435 - pdb.Output = output;
436 - pdb.Save(this.PdbFile);
437 - }
438 -
430 // Merge modules.
431 if (containsMergeModules)
432 {
@@ -514,6 +505,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
505
506 this.FileTransfers = fileTransfers;
507 this.ContentFilePaths = fileFacades.Select(r => r.WixFile.Source.Path).ToList();
508 + this.Pdb = new Pdb { Output = output };
509
510 // TODO: Eventually this gets removed
511 var intermediate = new Intermediate(this.Intermediate.Id, new[] { section }, this.Intermediate.Localizations.ToDictionary(l => l.Culture, StringComparer.OrdinalIgnoreCase), this.Intermediate.EmbedFilePaths);
src/WixToolset.Core.WindowsInstaller/MsiBackend.cs
+7 -1
@@ -2,6 +2,7 @@
2
3 namespace WixToolset.Core.WindowsInstaller
4 {
5 + using System;
6 using WixToolset.Core.WindowsInstaller.Bind;
7 using WixToolset.Core.WindowsInstaller.Inscribe;
8 using WixToolset.Core.WindowsInstaller.Unbind;
@@ -32,7 +33,12 @@ namespace WixToolset.Core.WindowsInstaller
33
34 foreach (var extension in backendExtensions)
35 {
35 - extension.PostBackendBind(result);
36 + extension.PostBackendBind(result, command.Pdb);
37 + }
38 +
39 + if (!String.IsNullOrEmpty(context.OutputPdbPath))
40 + {
41 + command.Pdb?.Save(context.OutputPdbPath);
42 }
43
44 return result;
src/WixToolset.Core.WindowsInstaller/MsmBackend.cs
+7 -1
@@ -2,6 +2,7 @@
2
3 namespace WixToolset.Core.WindowsInstaller
4 {
5 + using System;
6 using WixToolset.Core.WindowsInstaller.Bind;
7 using WixToolset.Core.WindowsInstaller.Unbind;
8 using WixToolset.Data;
@@ -31,7 +32,12 @@ namespace WixToolset.Core.WindowsInstaller
32
33 foreach (var extension in backendExtensions)
34 {
34 - extension.PostBackendBind(result);
35 + extension.PostBackendBind(result, command.Pdb);
36 + }
37 +
38 + if (!String.IsNullOrEmpty(context.OutputPdbPath))
39 + {
40 + command.Pdb?.Save(context.OutputPdbPath);
41 }
42
43 return result;