aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2020-12-12 15:48:08 -0500
committerBob Arnson <bob@firegiant.com>2020-12-12 15:55:20 -0500
commitea4cb92faf459ea90181f12a27cf6d7b1d7c5dbf (patch)
treec6797847dcf9fdf8e68ff8eee24b35a137e01d47
parente2f9e3cdc8e37693121fbc0ce61bdd325cbec626 (diff)
downloadwix-ea4cb92faf459ea90181f12a27cf6d7b1d7c5dbf.tar.gz
wix-ea4cb92faf459ea90181f12a27cf6d7b1d7c5dbf.tar.bz2
wix-ea4cb92faf459ea90181f12a27cf6d7b1d7c5dbf.zip
Fix merge module decompilation timing.
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs15
-rw-r--r--src/WixToolset.Core/CommandLine/DecompileCommand.cs2
2 files changed, 9 insertions, 8 deletions
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
2440 this.RootElement.SetAttributeValue("Codepage", codepage); 2440 this.RootElement.SetAttributeValue("Codepage", codepage);
2441 } 2441 }
2442 2442
2443 if (this.OutputType == OutputType.Module)
2444 {
2445 var table = tables["_SummaryInformation"];
2446 var row = table.Rows.SingleOrDefault(r => r.FieldAsInteger(0) == 9);
2447 this.ModularizationGuid = row?.FieldAsString(1);
2448 }
2449
2443 // index the rows from the extension libraries 2450 // index the rows from the extension libraries
2444 var indexedExtensionTables = new Dictionary<string, HashSet<string>>(); 2451 var indexedExtensionTables = new Dictionary<string, HashSet<string>>();
2445#if TODO_DECOMPILER_EXTENSIONS 2452#if TODO_DECOMPILER_EXTENSIONS
@@ -3030,12 +3037,6 @@ namespace WixToolset.Core.WindowsInstaller
3030 this.RootElement.SetAttributeValue("Language", template[template.Length - 1]); 3037 this.RootElement.SetAttributeValue("Language", template[template.Length - 1]);
3031 } 3038 }
3032 break; 3039 break;
3033 case 9:
3034 if (OutputType.Module == this.OutputType)
3035 {
3036 this.ModularizationGuid = value;
3037 }
3038 break;
3039 case 14: 3040 case 14:
3040 var installerVersion = row.FieldAsInteger(1); 3041 var installerVersion = row.FieldAsInteger(1);
3041 // Default InstallerVersion. 3042 // Default InstallerVersion.
@@ -3873,7 +3874,7 @@ namespace WixToolset.Core.WindowsInstaller
3873 xColumn.SetAttributeValue("Type", "string"); 3874 xColumn.SetAttributeValue("Type", "string");
3874 break; 3875 break;
3875 default: 3876 default:
3876 throw new InvalidOperationException($"Unknown custom column type '{columnDefinition.Type.ToString()}'."); 3877 throw new InvalidOperationException($"Unknown custom column type '{columnDefinition.Type}'.");
3877 } 3878 }
3878 } 3879 }
3879 3880
diff --git a/src/WixToolset.Core/CommandLine/DecompileCommand.cs b/src/WixToolset.Core/CommandLine/DecompileCommand.cs
index bce7a5a4..873c85ee 100644
--- a/src/WixToolset.Core/CommandLine/DecompileCommand.cs
+++ b/src/WixToolset.Core/CommandLine/DecompileCommand.cs
@@ -53,7 +53,7 @@ namespace WixToolset.Core.CommandLine
53 53
54 if (!this.Messaging.EncounteredError) 54 if (!this.Messaging.EncounteredError)
55 { 55 {
56 Directory.CreateDirectory(Path.GetDirectoryName(context.OutputPath)); 56 Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(context.OutputPath)));
57 result.Document.Save(context.OutputPath, SaveOptions.OmitDuplicateNamespaces); 57 result.Document.Save(context.OutputPath, SaveOptions.OmitDuplicateNamespaces);
58 } 58 }
59 } 59 }