Partial WixPdbs stop the backend before binding.
Bob Arnson committed
Mar 17, 2020 at 21:16 UTC
f1ddeb81aa8c709582fc11a5711b39da596f4f22
5 files changed
+41
-9
src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
+1
-1
@@ -38,7 +38,7 @@ namespace WixToolset.Core.Burn
38
this.IntermediateFolder = context.IntermediateFolder;
39
this.Output = context.IntermediateRepresentation;
40
this.OutputPath = context.OutputPath;
41
- this.OutputPdbPath = context.OutputPdbPath;
41
+ this.OutputPdbPath = context.PdbPath;
42
//this.VariableResolver = context.VariableResolver;
43
44
this.BackendExtensions = backedExtensions;
src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
+5
-5
@@ -45,7 +45,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
45
this.FileSystemExtensions = context.FileSystemExtensions;
46
this.Intermediate = context.IntermediateRepresentation;
47
this.OutputPath = context.OutputPath;
48
- this.OutputPdbPath = context.OutputPdbPath;
48
+ this.OutputPdbPath = context.PdbPath;
49
+ this.PdbType = context.PdbType;
50
this.IntermediateFolder = context.IntermediateFolder;
51
this.SubStorages = subStorages;
52
this.Validator = validator;
@@ -85,6 +86,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
86
87
private string OutputPath { get; }
88
89
+ public PdbType PdbType { get; set; }
90
+
91
private string OutputPdbPath { get; }
92
93
private bool SuppressAddingValidationRows { get; }
@@ -213,11 +216,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
216
return null;
217
}
218
216
- // Call extension
217
- var ExtensionSaidSkip = false;
218
-
219
WindowsInstallerData output;
220
- if (ExtensionSaidSkip)
220
+ if (this.PdbType == PdbType.Partial)
221
{
222
// Time to create the output object, since we're bypassing everything that touches files.
223
var command = new CreateOutputFromIRCommand(this.Messaging, section, tableDefinitions, this.BackendExtensions);
src/WixToolset.Core/BindContext.cs
+3
-1
@@ -45,7 +45,9 @@ namespace WixToolset.Core
45
46
public string OutputPath { get; set; }
47
48
- public string OutputPdbPath { get; set; }
48
+ public PdbType PdbType { get; set; }
49
+
50
+ public string PdbPath { get; set; }
51
52
public IEnumerable<string> SuppressIces { get; set; }
53
src/WixToolset.Core/Binder.cs
+1
-1
@@ -35,7 +35,7 @@ namespace WixToolset.Core
35
36
// Bind.
37
//
38
- this.WriteBuildInfoTuple(context.IntermediateRepresentation, context.OutputPath, context.OutputPdbPath);
38
+ this.WriteBuildInfoTuple(context.IntermediateRepresentation, context.OutputPath, context.PdbPath);
39
40
var bindResult = this.BackendBind(context);
41
src/WixToolset.Core/CommandLine/BuildCommand.cs
+31
-1
@@ -40,6 +40,10 @@ namespace WixToolset.Core.CommandLine
40
41
private List<string> IncludeSearchPaths { get; set; }
42
43
+ public string PdbFile { get; set; }
44
+
45
+ public PdbType PdbType { get; set; }
46
+
47
private Platform Platform { get; set; }
48
49
private string OutputFile { get; set; }
@@ -64,6 +68,10 @@ namespace WixToolset.Core.CommandLine
68
69
this.IncludeSearchPaths = this.commandLine.IncludeSearchPaths;
70
71
+ this.PdbFile = this.commandLine.PdbFile;
72
+
73
+ this.PdbType = this.commandLine.PdbType;
74
+
75
this.Platform = this.commandLine.Platform;
76
77
this.OutputFile = this.commandLine.OutputFile;
@@ -311,7 +319,8 @@ namespace WixToolset.Core.CommandLine
319
context.IntermediateFolder = intermediateFolder;
320
context.IntermediateRepresentation = resolveResult.IntermediateRepresentation;
321
context.OutputPath = this.OutputFile;
314
- context.OutputPdbPath = Path.ChangeExtension(this.OutputFile, ".wixpdb");
322
+ context.PdbType = this.PdbType;
323
+ context.PdbPath = this.PdbType == PdbType.None ? null : this.PdbFile ?? Path.ChangeExtension(this.OutputFile, ".wixpdb");
324
context.SuppressIces = Array.Empty<string>(); // TODO: set this correctly
325
context.SuppressValidation = true; // TODO: set this correctly
326
@@ -433,6 +442,10 @@ namespace WixToolset.Core.CommandLine
442
443
public Platform Platform { get; private set; }
444
445
+ public string PdbFile { get; private set; }
446
+
447
+ public PdbType PdbType { get; private set; }
448
+
449
public bool ShowLogo { get; private set; }
450
451
public bool ShowHelp { get; private set; }
@@ -514,9 +527,11 @@ namespace WixToolset.Core.CommandLine
527
case "contentsfile":
528
this.ContentsFile = parser.GetNextArgumentAsFilePathOrError(arg);
529
return true;
530
+
531
case "outputsfile":
532
this.OutputsFile = parser.GetNextArgumentAsFilePathOrError(arg);
533
return true;
534
+
535
case "builtoutputsfile":
536
this.BuiltOutputsFile = parser.GetNextArgumentAsFilePathOrError(arg);
537
return true;
@@ -552,6 +567,21 @@ namespace WixToolset.Core.CommandLine
567
this.OutputType = parser.GetNextArgumentOrError(arg);
568
return true;
569
570
+ case "pdb":
571
+ this.PdbFile = parser.GetNextArgumentAsFilePathOrError(arg);
572
+ return true;
573
+
574
+ case "pdbtype":
575
+ {
576
+ var value = parser.GetNextArgumentOrError(arg);
577
+ if (Enum.TryParse(value, true, out PdbType pdbType))
578
+ {
579
+ this.PdbType = pdbType;
580
+ return true;
581
+ }
582
+ break;
583
+ }
584
+
585
case "nologo":
586
this.ShowLogo = false;
587
return true;