diff options
Diffstat (limited to 'src/ext/Util/wixext/UtilDecompiler.cs')
-rw-r--r-- | src/ext/Util/wixext/UtilDecompiler.cs | 62 |
1 files changed, 56 insertions, 6 deletions
diff --git a/src/ext/Util/wixext/UtilDecompiler.cs b/src/ext/Util/wixext/UtilDecompiler.cs index 52b64889..53b75b8d 100644 --- a/src/ext/Util/wixext/UtilDecompiler.cs +++ b/src/ext/Util/wixext/UtilDecompiler.cs | |||
@@ -176,6 +176,14 @@ namespace WixToolset.Util | |||
176 | case "Wix4Group": | 176 | case "Wix4Group": |
177 | this.DecompileGroupTable(table); | 177 | this.DecompileGroupTable(table); |
178 | break; | 178 | break; |
179 | case "Group6": | ||
180 | case "Wix6Group": | ||
181 | this.DecompileGroup6Table(table); | ||
182 | break; | ||
183 | case "GroupGroup": | ||
184 | case "Wix6GroupGroup": | ||
185 | this.DecompileGroupGroup6Table(table); | ||
186 | break; | ||
179 | case "Perfmon": | 187 | case "Perfmon": |
180 | case "Wix4Perfmon": | 188 | case "Wix4Perfmon": |
181 | this.DecompilePerfmonTable(table); | 189 | this.DecompilePerfmonTable(table); |
@@ -427,18 +435,60 @@ namespace WixToolset.Util | |||
427 | { | 435 | { |
428 | foreach (var row in table.Rows) | 436 | foreach (var row in table.Rows) |
429 | { | 437 | { |
430 | if (null != row[1]) | ||
431 | { | ||
432 | this.Messaging.Write(WarningMessages.UnrepresentableColumnValue(row.SourceLineNumbers, table.Name, "Component_", (string)row[1])); | ||
433 | } | ||
434 | |||
435 | this.DecompilerHelper.AddElementToRoot(UtilConstants.GroupName, | 438 | this.DecompilerHelper.AddElementToRoot(UtilConstants.GroupName, |
436 | new XAttribute("Id", row.FieldAsString(0)), | 439 | new XAttribute("Id", row.FieldAsString(0)), |
437 | new XAttribute("Name", row.FieldAsString(1)), | 440 | new XAttribute("Name", row.FieldAsString(2)), |
438 | AttributeIfNotNull("Domain", row, 3) | 441 | AttributeIfNotNull("Domain", row, 3) |
439 | ); | 442 | ); |
440 | } | 443 | } |
441 | } | 444 | } |
445 | /// <summary> | ||
446 | /// Decompile the Group6 table. | ||
447 | /// </summary> | ||
448 | /// <param name="table">The table to decompile.</param> | ||
449 | private void DecompileGroup6Table(Table table) | ||
450 | { | ||
451 | foreach (var row in table.Rows) | ||
452 | { | ||
453 | var groupId = row.FieldAsString(0); | ||
454 | if (this.DecompilerHelper.TryGetIndexedElement("Group", groupId, out var group)) | ||
455 | { | ||
456 | var attributes = (Group6Symbol.SymbolAttributes)(row.FieldAsNullableInteger(2) ?? 0); | ||
457 | group.Add(AttributeIfNotNull("Comment", row, 1)); | ||
458 | group.Add(AttributeIfTrue("FailIfExists", ((attributes & Group6Symbol.SymbolAttributes.FailIfExists) != 0))); | ||
459 | group.Add(AttributeIfTrue("UpdateIfExists", ((attributes & Group6Symbol.SymbolAttributes.UpdateIfExists) != 0))); | ||
460 | group.Add(AttributeIfTrue("DontRemoveOnUninstall", ((attributes & Group6Symbol.SymbolAttributes.DontRemoveOnUninstall) != 0))); | ||
461 | group.Add(AttributeIfTrue("DontCreateGroup", ((attributes & Group6Symbol.SymbolAttributes.DontCreateGroup) != 0))); | ||
462 | group.Add(AttributeIfTrue("NonVital", ((attributes & Group6Symbol.SymbolAttributes.NonVital) != 0))); | ||
463 | group.Add(AttributeIfTrue("RemoveComment", ((attributes & Group6Symbol.SymbolAttributes.RemoveComment) != 0))); | ||
464 | } | ||
465 | else | ||
466 | { | ||
467 | this.Messaging.Write(WarningMessages.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(), "Group_", groupId, "Group")); | ||
468 | } | ||
469 | } | ||
470 | } | ||
471 | |||
472 | |||
473 | /// <summary> | ||
474 | /// Decompile the GroupGroup6 table. | ||
475 | /// </summary> | ||
476 | /// <param name="table">The table to decompile.</param> | ||
477 | private void DecompileGroupGroup6Table(Table table) | ||
478 | { | ||
479 | foreach (var row in table.Rows) | ||
480 | { | ||
481 | var childId = row.FieldAsString(1); | ||
482 | if (this.DecompilerHelper.TryGetIndexedElement("Group", childId, out var group)) | ||
483 | { | ||
484 | group.Add(new XElement(UtilConstants.GroupRefName, new XAttribute("Id", row.FieldAsString(0)))); | ||
485 | } | ||
486 | else | ||
487 | { | ||
488 | this.Messaging.Write(WarningMessages.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(), "Parent_", childId, "Group")); | ||
489 | } | ||
490 | } | ||
491 | } | ||
442 | 492 | ||
443 | /// <summary> | 493 | /// <summary> |
444 | /// Decompile the WixInternetShortcut table. | 494 | /// Decompile the WixInternetShortcut table. |