From f1ddeb81aa8c709582fc11a5711b39da596f4f22 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 17 Mar 2020 21:16:55 -0400 Subject: Partial WixPdbs stop the backend before binding. --- src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs | 2 +- .../Bind/BindDatabaseCommand.cs | 10 +++---- src/WixToolset.Core/BindContext.cs | 4 ++- src/WixToolset.Core/Binder.cs | 2 +- src/WixToolset.Core/CommandLine/BuildCommand.cs | 32 +++++++++++++++++++++- 5 files changed, 41 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs b/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs index 283cd115..da655469 100644 --- a/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs +++ b/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs @@ -38,7 +38,7 @@ namespace WixToolset.Core.Burn this.IntermediateFolder = context.IntermediateFolder; this.Output = context.IntermediateRepresentation; this.OutputPath = context.OutputPath; - this.OutputPdbPath = context.OutputPdbPath; + this.OutputPdbPath = context.PdbPath; //this.VariableResolver = context.VariableResolver; this.BackendExtensions = backedExtensions; diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs index 67985df6..7412e6da 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs @@ -45,7 +45,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind this.FileSystemExtensions = context.FileSystemExtensions; this.Intermediate = context.IntermediateRepresentation; this.OutputPath = context.OutputPath; - this.OutputPdbPath = context.OutputPdbPath; + this.OutputPdbPath = context.PdbPath; + this.PdbType = context.PdbType; this.IntermediateFolder = context.IntermediateFolder; this.SubStorages = subStorages; this.Validator = validator; @@ -85,6 +86,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind private string OutputPath { get; } + public PdbType PdbType { get; set; } + private string OutputPdbPath { get; } private bool SuppressAddingValidationRows { get; } @@ -213,11 +216,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind return null; } - // Call extension - var ExtensionSaidSkip = false; - WindowsInstallerData output; - if (ExtensionSaidSkip) + if (this.PdbType == PdbType.Partial) { // Time to create the output object, since we're bypassing everything that touches files. var command = new CreateOutputFromIRCommand(this.Messaging, section, tableDefinitions, this.BackendExtensions); diff --git a/src/WixToolset.Core/BindContext.cs b/src/WixToolset.Core/BindContext.cs index 7882b22d..67ce744a 100644 --- a/src/WixToolset.Core/BindContext.cs +++ b/src/WixToolset.Core/BindContext.cs @@ -45,7 +45,9 @@ namespace WixToolset.Core public string OutputPath { get; set; } - public string OutputPdbPath { get; set; } + public PdbType PdbType { get; set; } + + public string PdbPath { get; set; } public IEnumerable SuppressIces { get; set; } diff --git a/src/WixToolset.Core/Binder.cs b/src/WixToolset.Core/Binder.cs index 29fad7f0..fcf5a669 100644 --- a/src/WixToolset.Core/Binder.cs +++ b/src/WixToolset.Core/Binder.cs @@ -35,7 +35,7 @@ namespace WixToolset.Core // Bind. // - this.WriteBuildInfoTuple(context.IntermediateRepresentation, context.OutputPath, context.OutputPdbPath); + this.WriteBuildInfoTuple(context.IntermediateRepresentation, context.OutputPath, context.PdbPath); var bindResult = this.BackendBind(context); diff --git a/src/WixToolset.Core/CommandLine/BuildCommand.cs b/src/WixToolset.Core/CommandLine/BuildCommand.cs index a55fb55b..718b3015 100644 --- a/src/WixToolset.Core/CommandLine/BuildCommand.cs +++ b/src/WixToolset.Core/CommandLine/BuildCommand.cs @@ -40,6 +40,10 @@ namespace WixToolset.Core.CommandLine private List IncludeSearchPaths { get; set; } + public string PdbFile { get; set; } + + public PdbType PdbType { get; set; } + private Platform Platform { get; set; } private string OutputFile { get; set; } @@ -64,6 +68,10 @@ namespace WixToolset.Core.CommandLine this.IncludeSearchPaths = this.commandLine.IncludeSearchPaths; + this.PdbFile = this.commandLine.PdbFile; + + this.PdbType = this.commandLine.PdbType; + this.Platform = this.commandLine.Platform; this.OutputFile = this.commandLine.OutputFile; @@ -311,7 +319,8 @@ namespace WixToolset.Core.CommandLine context.IntermediateFolder = intermediateFolder; context.IntermediateRepresentation = resolveResult.IntermediateRepresentation; context.OutputPath = this.OutputFile; - context.OutputPdbPath = Path.ChangeExtension(this.OutputFile, ".wixpdb"); + context.PdbType = this.PdbType; + context.PdbPath = this.PdbType == PdbType.None ? null : this.PdbFile ?? Path.ChangeExtension(this.OutputFile, ".wixpdb"); context.SuppressIces = Array.Empty(); // TODO: set this correctly context.SuppressValidation = true; // TODO: set this correctly @@ -433,6 +442,10 @@ namespace WixToolset.Core.CommandLine public Platform Platform { get; private set; } + public string PdbFile { get; private set; } + + public PdbType PdbType { get; private set; } + public bool ShowLogo { get; private set; } public bool ShowHelp { get; private set; } @@ -514,9 +527,11 @@ namespace WixToolset.Core.CommandLine case "contentsfile": this.ContentsFile = parser.GetNextArgumentAsFilePathOrError(arg); return true; + case "outputsfile": this.OutputsFile = parser.GetNextArgumentAsFilePathOrError(arg); return true; + case "builtoutputsfile": this.BuiltOutputsFile = parser.GetNextArgumentAsFilePathOrError(arg); return true; @@ -552,6 +567,21 @@ namespace WixToolset.Core.CommandLine this.OutputType = parser.GetNextArgumentOrError(arg); return true; + case "pdb": + this.PdbFile = parser.GetNextArgumentAsFilePathOrError(arg); + return true; + + case "pdbtype": + { + var value = parser.GetNextArgumentOrError(arg); + if (Enum.TryParse(value, true, out PdbType pdbType)) + { + this.PdbType = pdbType; + return true; + } + break; + } + case "nologo": this.ShowLogo = false; return true; -- cgit v1.2.3-55-g6feb