Fix merge module decompilation timing.
Bob Arnson committed
Dec 12, 2020 at 15:48 UTC
ea4cb92faf459ea90181f12a27cf6d7b1d7c5dbf
2 files changed
+9
-8
src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
+8
-7
@@ -2440,6 +2440,13 @@ namespace WixToolset.Core.WindowsInstaller
2440
this.RootElement.SetAttributeValue("Codepage", codepage);
2441
}
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
+
2450
// index the rows from the extension libraries
2451
var indexedExtensionTables = new Dictionary<string, HashSet<string>>();
2452
#if TODO_DECOMPILER_EXTENSIONS
@@ -3030,12 +3037,6 @@ namespace WixToolset.Core.WindowsInstaller
3037
this.RootElement.SetAttributeValue("Language", template[template.Length - 1]);
3038
}
3039
break;
3033
- case 9:
3034
- if (OutputType.Module == this.OutputType)
3035
- {
3036
- this.ModularizationGuid = value;
3037
- }
3038
- break;
3040
case 14:
3041
var installerVersion = row.FieldAsInteger(1);
3042
// Default InstallerVersion.
@@ -3873,7 +3874,7 @@ namespace WixToolset.Core.WindowsInstaller
3874
xColumn.SetAttributeValue("Type", "string");
3875
break;
3876
default:
3876
- throw new InvalidOperationException($"Unknown custom column type '{columnDefinition.Type.ToString()}'.");
3877
+ throw new InvalidOperationException($"Unknown custom column type '{columnDefinition.Type}'.");
3878
}
3879
}
3880
src/WixToolset.Core/CommandLine/DecompileCommand.cs
+1
-1
@@ -53,7 +53,7 @@ namespace WixToolset.Core.CommandLine
53
54
if (!this.Messaging.EncounteredError)
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);
58
}
59
}