From 1adfdda935b814541693cd550bb34fdbf2942b1f Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 26 Mar 2020 13:51:14 -0400 Subject: Add intermediate levels to track how IR has been lowered. --- .../Bind/BindDatabaseCommand.cs | 25 ++++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller') diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs index 7412e6da..6878aed5 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs @@ -100,6 +100,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind public IBindResult Execute() { + if (!this.Intermediate.HasLevel(Data.IntermediateLevels.Linked) && !this.Intermediate.HasLevel(Data.IntermediateLevels.Resolved)) + { + this.Messaging.Write(ErrorMessages.IntermediatesMustBeResolved(this.Intermediate.Id)); + } + var section = this.Intermediate.Sections.Single(); var fileTransfers = new List(); @@ -178,15 +183,18 @@ namespace WixToolset.Core.WindowsInstaller.Bind } } - // Sequence all the actions. + if (!this.Intermediate.HasLevel(Data.WindowsInstaller.IntermediateLevels.PartiallyBound)) { - var command = new SequenceActionsCommand(this.Messaging, section); - command.Execute(); - } + // Sequence all the actions. + { + var command = new SequenceActionsCommand(this.Messaging, section); + command.Execute(); + } - { - var command = new CreateSpecialPropertiesCommand(section); - command.Execute(); + { + var command = new CreateSpecialPropertiesCommand(section); + command.Execute(); + } } #if TODO_PATCHING @@ -220,6 +228,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind if (this.PdbType == PdbType.Partial) { // Time to create the output object, since we're bypassing everything that touches files. + this.Intermediate.UpdateLevel(Data.WindowsInstaller.IntermediateLevels.PartiallyBound); + var command = new CreateOutputFromIRCommand(this.Messaging, section, tableDefinitions, this.BackendExtensions); command.Execute(); @@ -227,6 +237,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind } else { + this.Intermediate.UpdateLevel(Data.WindowsInstaller.IntermediateLevels.FullyBound); this.Messaging.Write(VerboseMessages.UpdatingFileInformation()); // Extract files that come from binary .wixlibs and WixExtensions (this does not extract files from merge modules). -- cgit v1.2.3-55-g6feb