From ea4cb92faf459ea90181f12a27cf6d7b1d7c5dbf Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Sat, 12 Dec 2020 15:48:08 -0500 Subject: Fix merge module decompilation timing. --- .../Decompile/Decompiler.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller') diff --git a/src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs b/src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs index d11a890c..2288cedf 100644 --- a/src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs +++ b/src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs @@ -2440,6 +2440,13 @@ namespace WixToolset.Core.WindowsInstaller this.RootElement.SetAttributeValue("Codepage", codepage); } + if (this.OutputType == OutputType.Module) + { + var table = tables["_SummaryInformation"]; + var row = table.Rows.SingleOrDefault(r => r.FieldAsInteger(0) == 9); + this.ModularizationGuid = row?.FieldAsString(1); + } + // index the rows from the extension libraries var indexedExtensionTables = new Dictionary>(); #if TODO_DECOMPILER_EXTENSIONS @@ -3030,12 +3037,6 @@ namespace WixToolset.Core.WindowsInstaller this.RootElement.SetAttributeValue("Language", template[template.Length - 1]); } break; - case 9: - if (OutputType.Module == this.OutputType) - { - this.ModularizationGuid = value; - } - break; case 14: var installerVersion = row.FieldAsInteger(1); // Default InstallerVersion. @@ -3873,7 +3874,7 @@ namespace WixToolset.Core.WindowsInstaller xColumn.SetAttributeValue("Type", "string"); break; default: - throw new InvalidOperationException($"Unknown custom column type '{columnDefinition.Type.ToString()}'."); + throw new InvalidOperationException($"Unknown custom column type '{columnDefinition.Type}'."); } } -- cgit v1.2.3-55-g6feb