aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Util/wixext
diff options
context:
space:
mode:
authorBevan Weiss <bevan.weiss@gmail.com>2024-06-18 19:03:40 +1000
committerRob Mensching <rob@firegiant.com>2025-02-11 23:14:49 -0800
commit7b1bb025dea1d1e9e144cce0dcbba2d86f053b8f (patch)
treec2fc969615d858ee40f54cfba406648e9c2743c3 /src/ext/Util/wixext
parent040e50ec2859c1de70cd8e9f957474321774f293 (diff)
downloadwix-7b1bb025dea1d1e9e144cce0dcbba2d86f053b8f.tar.gz
wix-7b1bb025dea1d1e9e144cce0dcbba2d86f053b8f.tar.bz2
wix-7b1bb025dea1d1e9e144cce0dcbba2d86f053b8f.zip
CreateGroups additions
Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Diffstat (limited to 'src/ext/Util/wixext')
-rw-r--r--src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs56
-rw-r--r--src/ext/Util/wixext/Symbols/GroupSymbol.cs97
-rw-r--r--src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs8
-rw-r--r--src/ext/Util/wixext/UtilCompiler.cs141
-rw-r--r--src/ext/Util/wixext/UtilDecompiler.cs62
-rw-r--r--src/ext/Util/wixext/UtilTableDefinitions.cs25
6 files changed, 357 insertions, 32 deletions
diff --git a/src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs b/src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs
new file mode 100644
index 00000000..fdd1ee76
--- /dev/null
+++ b/src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs
@@ -0,0 +1,56 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolset.Util
4{
5 using WixToolset.Data;
6 using WixToolset.Util.Symbols;
7
8 public static partial class UtilSymbolDefinitions
9 {
10 public static readonly IntermediateSymbolDefinition GroupGroup = new IntermediateSymbolDefinition(
11 UtilSymbolDefinitionType.GroupGroup.ToString(),
12 new[]
13 {
14 new IntermediateFieldDefinition(nameof(GroupGroupSymbol.SymbolFields.ParentGroupRef), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(GroupGroupSymbol.SymbolFields.ChildGroupRef), IntermediateFieldType.String),
16 },
17 typeof(UserGroupSymbol));
18 }
19}
20
21namespace WixToolset.Util.Symbols
22{
23 using WixToolset.Data;
24
25 public class GroupGroupSymbol : IntermediateSymbol
26 {
27 public enum SymbolFields
28 {
29 ParentGroupRef,
30 ChildGroupRef,
31 }
32
33 public GroupGroupSymbol() : base(UtilSymbolDefinitions.GroupGroup, null, null)
34 {
35 }
36
37 public GroupGroupSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.GroupGroup, sourceLineNumber, id)
38 {
39 }
40
41 public IntermediateField this[GroupGroupSymbol.SymbolFields index] => this.Fields[(int)index];
42
43 public string ParentGroupRef
44 {
45 get => this.Fields[(int)GroupGroupSymbol.SymbolFields.ParentGroupRef].AsString();
46 set => this.Set((int)GroupGroupSymbol.SymbolFields.ParentGroupRef, value);
47 }
48
49 public string ChildGroupRef
50 {
51 get => this.Fields[(int)GroupGroupSymbol.SymbolFields.ChildGroupRef].AsString();
52 set => this.Set((int)GroupGroupSymbol.SymbolFields.ChildGroupRef, value);
53 }
54
55 }
56}
diff --git a/src/ext/Util/wixext/Symbols/GroupSymbol.cs b/src/ext/Util/wixext/Symbols/GroupSymbol.cs
index b378db44..ef1dc33f 100644
--- a/src/ext/Util/wixext/Symbols/GroupSymbol.cs
+++ b/src/ext/Util/wixext/Symbols/GroupSymbol.cs
@@ -11,27 +11,38 @@ namespace WixToolset.Util
11 UtilSymbolDefinitionType.Group.ToString(), 11 UtilSymbolDefinitionType.Group.ToString(),
12 new[] 12 new[]
13 { 13 {
14 new IntermediateFieldDefinition(nameof(GroupSymbolFields.ComponentRef), IntermediateFieldType.String), 14 new IntermediateFieldDefinition(nameof(GroupSymbol.SymbolFields.ComponentRef), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(GroupSymbolFields.Name), IntermediateFieldType.String), 15 new IntermediateFieldDefinition(nameof(GroupSymbol.SymbolFields.Name), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(GroupSymbolFields.Domain), IntermediateFieldType.String), 16 new IntermediateFieldDefinition(nameof(GroupSymbol.SymbolFields.Domain), IntermediateFieldType.String),
17 }, 17 },
18 typeof(GroupSymbol)); 18 typeof(GroupSymbol));
19
20 public static readonly IntermediateSymbolDefinition Group6 = new IntermediateSymbolDefinition(
21 UtilSymbolDefinitionType.Group6.ToString(),
22 new[]
23 {
24 new IntermediateFieldDefinition(nameof(Group6Symbol.SymbolFields.GroupRef), IntermediateFieldType.String),
25 new IntermediateFieldDefinition(nameof(Group6Symbol.SymbolFields.Comment), IntermediateFieldType.String),
26 new IntermediateFieldDefinition(nameof(Group6Symbol.SymbolFields.Attributes), IntermediateFieldType.Number),
27 },
28 typeof(Group6Symbol));
19 } 29 }
20} 30}
21 31
22namespace WixToolset.Util.Symbols 32namespace WixToolset.Util.Symbols
23{ 33{
34 using System;
24 using WixToolset.Data; 35 using WixToolset.Data;
25 36
26 public enum GroupSymbolFields
27 {
28 ComponentRef,
29 Name,
30 Domain,
31 }
32
33 public class GroupSymbol : IntermediateSymbol 37 public class GroupSymbol : IntermediateSymbol
34 { 38 {
39 public enum SymbolFields
40 {
41 ComponentRef,
42 Name,
43 Domain,
44 }
45
35 public GroupSymbol() : base(UtilSymbolDefinitions.Group, null, null) 46 public GroupSymbol() : base(UtilSymbolDefinitions.Group, null, null)
36 { 47 {
37 } 48 }
@@ -40,24 +51,74 @@ namespace WixToolset.Util.Symbols
40 { 51 {
41 } 52 }
42 53
43 public IntermediateField this[GroupSymbolFields index] => this.Fields[(int)index]; 54 public IntermediateField this[GroupSymbol.SymbolFields index] => this.Fields[(int)index];
44 55
45 public string ComponentRef 56 public string ComponentRef
46 { 57 {
47 get => this.Fields[(int)GroupSymbolFields.ComponentRef].AsString(); 58 get => this.Fields[(int)GroupSymbol.SymbolFields.ComponentRef].AsString();
48 set => this.Set((int)GroupSymbolFields.ComponentRef, value); 59 set => this.Set((int)GroupSymbol.SymbolFields.ComponentRef, value);
49 } 60 }
50 61
51 public string Name 62 public string Name
52 { 63 {
53 get => this.Fields[(int)GroupSymbolFields.Name].AsString(); 64 get => this.Fields[(int)GroupSymbol.SymbolFields.Name].AsString();
54 set => this.Set((int)GroupSymbolFields.Name, value); 65 set => this.Set((int)GroupSymbol.SymbolFields.Name, value);
55 } 66 }
56 67
57 public string Domain 68 public string Domain
58 { 69 {
59 get => this.Fields[(int)GroupSymbolFields.Domain].AsString(); 70 get => this.Fields[(int)GroupSymbol.SymbolFields.Domain].AsString();
60 set => this.Set((int)GroupSymbolFields.Domain, value); 71 set => this.Set((int)GroupSymbol.SymbolFields.Domain, value);
61 } 72 }
62 } 73 }
63} \ No newline at end of file 74
75 public class Group6Symbol : IntermediateSymbol
76 {
77 [Flags]
78 public enum SymbolAttributes
79 {
80 None = 0x00000000,
81 FailIfExists = 0x00000001,
82 UpdateIfExists = 0x00000002,
83 DontRemoveOnUninstall = 0x00000004,
84 DontCreateGroup = 0x00000008,
85 NonVital = 0x00000010,
86 RemoveComment = 0x00000020,
87 }
88
89 public enum SymbolFields
90 {
91 GroupRef,
92 Comment,
93 Attributes,
94 }
95
96 public Group6Symbol() : base(UtilSymbolDefinitions.Group6, null, null)
97 {
98 }
99
100 public Group6Symbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(UtilSymbolDefinitions.Group6, sourceLineNumber, id)
101 {
102 }
103
104 public IntermediateField this[Group6Symbol.SymbolFields index] => this.Fields[(int)index];
105
106 public string GroupRef
107 {
108 get => this.Fields[(int)Group6Symbol.SymbolFields.GroupRef].AsString();
109 set => this.Set((int)Group6Symbol.SymbolFields.GroupRef, value);
110 }
111
112 public string Comment
113 {
114 get => this.Fields[(int)Group6Symbol.SymbolFields.Comment].AsString();
115 set => this.Set((int)Group6Symbol.SymbolFields.Comment, value);
116 }
117
118 public SymbolAttributes Attributes
119 {
120 get => (SymbolAttributes)this.Fields[(int)Group6Symbol.SymbolFields.Attributes].AsNumber();
121 set => this.Set((int)Group6Symbol.SymbolFields.Attributes, (int)value);
122 }
123 }
124}
diff --git a/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs b/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs
index 8152868f..43d0fca0 100644
--- a/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs
+++ b/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs
@@ -12,6 +12,8 @@ namespace WixToolset.Util
12 FileShare, 12 FileShare,
13 FileSharePermissions, 13 FileSharePermissions,
14 Group, 14 Group,
15 Group6,
16 GroupGroup,
15 Perfmon, 17 Perfmon,
16 PerfmonManifest, 18 PerfmonManifest,
17 PerformanceCategory, 19 PerformanceCategory,
@@ -59,6 +61,12 @@ namespace WixToolset.Util
59 case UtilSymbolDefinitionType.Group: 61 case UtilSymbolDefinitionType.Group:
60 return UtilSymbolDefinitions.Group; 62 return UtilSymbolDefinitions.Group;
61 63
64 case UtilSymbolDefinitionType.Group6:
65 return UtilSymbolDefinitions.Group6;
66
67 case UtilSymbolDefinitionType.GroupGroup:
68 return UtilSymbolDefinitions.GroupGroup;
69
62 case UtilSymbolDefinitionType.Perfmon: 70 case UtilSymbolDefinitionType.Perfmon:
63 return UtilSymbolDefinitions.Perfmon; 71 return UtilSymbolDefinitions.Perfmon;
64 72
diff --git a/src/ext/Util/wixext/UtilCompiler.cs b/src/ext/Util/wixext/UtilCompiler.cs
index 3bcd2c0b..aff7dd0d 100644
--- a/src/ext/Util/wixext/UtilCompiler.cs
+++ b/src/ext/Util/wixext/UtilCompiler.cs
@@ -139,6 +139,9 @@ namespace WixToolset.Util
139 case "TouchFile": 139 case "TouchFile":
140 this.ParseTouchFileElement(intermediate, section, element, componentId, componentWin64); 140 this.ParseTouchFileElement(intermediate, section, element, componentId, componentWin64);
141 break; 141 break;
142 case "Group":
143 this.ParseGroupElement(intermediate, section, element, componentId);
144 break;
142 case "User": 145 case "User":
143 this.ParseUserElement(intermediate, section, element, componentId); 146 this.ParseUserElement(intermediate, section, element, componentId);
144 break; 147 break;
@@ -1357,6 +1360,8 @@ namespace WixToolset.Util
1357 Identifier id = null; 1360 Identifier id = null;
1358 string domain = null; 1361 string domain = null;
1359 string name = null; 1362 string name = null;
1363 string comment = null;
1364 Group6Symbol.SymbolAttributes attributes = Group6Symbol.SymbolAttributes.None;
1360 1365
1361 foreach (var attrib in element.Attributes()) 1366 foreach (var attrib in element.Attributes())
1362 { 1367 {
@@ -1373,6 +1378,75 @@ namespace WixToolset.Util
1373 case "Domain": 1378 case "Domain":
1374 domain = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); 1379 domain = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1375 break; 1380 break;
1381 case "Comment":
1382 if (null == componentId)
1383 {
1384 this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
1385 }
1386
1387 comment = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1388 break;
1389 case "CreateGroup":
1390 if (null == componentId)
1391 {
1392 this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
1393 }
1394
1395 if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1396 {
1397 attributes |= Group6Symbol.SymbolAttributes.DontCreateGroup;
1398 }
1399 break;
1400 case "FailIfExists":
1401 if (null == componentId)
1402 {
1403 this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
1404 }
1405
1406 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1407 {
1408 attributes |= Group6Symbol.SymbolAttributes.FailIfExists;
1409 }
1410 break;
1411 case "UpdateIfExists":
1412 if (null == componentId)
1413 {
1414 this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
1415 }
1416
1417 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1418 {
1419 attributes |= Group6Symbol.SymbolAttributes.UpdateIfExists;
1420 }
1421 break;
1422 case "RemoveComment":
1423 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1424 {
1425 attributes |= Group6Symbol.SymbolAttributes.RemoveComment;
1426 }
1427 break;
1428 case "RemoveOnUninstall":
1429 if (null == componentId)
1430 {
1431 this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
1432 }
1433
1434 if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1435 {
1436 attributes |= Group6Symbol.SymbolAttributes.DontRemoveOnUninstall;
1437 }
1438 break;
1439 case "Vital":
1440 if (null == componentId)
1441 {
1442 this.Messaging.Write(UtilErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
1443 }
1444
1445 if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1446 {
1447 attributes |= Group6Symbol.SymbolAttributes.NonVital;
1448 }
1449 break;
1376 default: 1450 default:
1377 this.ParseHelper.UnexpectedAttribute(element, attrib); 1451 this.ParseHelper.UnexpectedAttribute(element, attrib);
1378 break; 1452 break;
@@ -1389,7 +1463,40 @@ namespace WixToolset.Util
1389 id = this.ParseHelper.CreateIdentifier("ugr", componentId, domain, name); 1463 id = this.ParseHelper.CreateIdentifier("ugr", componentId, domain, name);
1390 } 1464 }
1391 1465
1392 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); 1466 if (null == name)
1467 {
1468 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
1469 }
1470
1471 if (null != comment && (Group6Symbol.SymbolAttributes.RemoveComment & attributes) != 0)
1472 {
1473 this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Comment", "RemoveComment"));
1474 }
1475
1476 if (null != componentId)
1477 {
1478 this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "Wix4ConfigureGroups", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM64);
1479 }
1480
1481 foreach (var child in element.Elements())
1482 {
1483 if (this.Namespace == child.Name.Namespace)
1484 {
1485 switch (child.Name.LocalName)
1486 {
1487 case "GroupRef":
1488 this.ParseGroupRefElement(intermediate, section, child, id.Id, groupType:true);
1489 break;
1490 default:
1491 //this.ParseHelper.UnexpectedElement(element, child);
1492 break;
1493 }
1494 }
1495 else
1496 {
1497 this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
1498 }
1499 }
1393 1500
1394 if (!this.Messaging.EncounteredError) 1501 if (!this.Messaging.EncounteredError)
1395 { 1502 {
@@ -1399,6 +1506,12 @@ namespace WixToolset.Util
1399 Name = name, 1506 Name = name,
1400 Domain = domain, 1507 Domain = domain,
1401 }); 1508 });
1509 section.AddSymbol(new Group6Symbol(sourceLineNumbers, id)
1510 {
1511 GroupRef = id.Id,
1512 Comment = comment,
1513 Attributes = attributes,
1514 });
1402 } 1515 }
1403 } 1516 }
1404 1517
@@ -1406,8 +1519,9 @@ namespace WixToolset.Util
1406 /// Parses a GroupRef element 1519 /// Parses a GroupRef element
1407 /// </summary> 1520 /// </summary>
1408 /// <param name="element">Element to parse.</param> 1521 /// <param name="element">Element to parse.</param>
1409 /// <param name="userId">Required user id to be joined to the group.</param> 1522 /// <param name="childId">Required child id to be joined to the group.</param>
1410 private void ParseGroupRefElement(Intermediate intermediate, IntermediateSection section, XElement element, string userId) 1523 /// <param name="groupType">whether the child is a group (true) or a user (false)</param>
1524 private void ParseGroupRefElement(Intermediate intermediate, IntermediateSection section, XElement element, string childId, bool groupType=false)
1411 { 1525 {
1412 var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); 1526 var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1413 string groupId = null; 1527 string groupId = null;
@@ -1437,11 +1551,22 @@ namespace WixToolset.Util
1437 1551
1438 if (!this.Messaging.EncounteredError) 1552 if (!this.Messaging.EncounteredError)
1439 { 1553 {
1440 section.AddSymbol(new UserGroupSymbol(sourceLineNumbers) 1554 if (!groupType)
1441 { 1555 {
1442 UserRef = userId, 1556 section.AddSymbol(new UserGroupSymbol(sourceLineNumbers)
1443 GroupRef = groupId, 1557 {
1444 }); 1558 UserRef = childId,
1559 GroupRef = groupId,
1560 });
1561 }
1562 else
1563 {
1564 section.AddSymbol(new GroupGroupSymbol(sourceLineNumbers)
1565 {
1566 ChildGroupRef = childId,
1567 ParentGroupRef = groupId,
1568 });
1569 }
1445 } 1570 }
1446 } 1571 }
1447 1572
@@ -3460,7 +3585,7 @@ namespace WixToolset.Util
3460 this.Messaging.Write(UtilErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); 3585 this.Messaging.Write(UtilErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
3461 } 3586 }
3462 3587
3463 this.ParseGroupRefElement(intermediate, section, child, id.Id); 3588 this.ParseGroupRefElement(intermediate, section, child, id.Id, groupType:false);
3464 break; 3589 break;
3465 default: 3590 default:
3466 this.ParseHelper.UnexpectedElement(element, child); 3591 this.ParseHelper.UnexpectedElement(element, child);
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.
diff --git a/src/ext/Util/wixext/UtilTableDefinitions.cs b/src/ext/Util/wixext/UtilTableDefinitions.cs
index baa1d25b..908b7eea 100644
--- a/src/ext/Util/wixext/UtilTableDefinitions.cs
+++ b/src/ext/Util/wixext/UtilTableDefinitions.cs
@@ -105,6 +105,29 @@ namespace WixToolset.Util
105 symbolIdIsPrimaryKey: true 105 symbolIdIsPrimaryKey: true
106 ); 106 );
107 107
108 public static readonly TableDefinition Wix6Group = new TableDefinition(
109 "Wix6Group",
110 UtilSymbolDefinitions.Group6,
111 new[]
112 {
113 new ColumnDefinition("Group_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "Wix4Group", keyColumn: 1, description: "Primary key, non-localized token", modularizeType: ColumnModularizeType.Column),
114 new ColumnDefinition("Comment", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Group comment", modularizeType: ColumnModularizeType.Property),
115 new ColumnDefinition("Attributes", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown, minValue: 0, maxValue: 65535, description: "Attributes describing how to create the group"),
116 },
117 symbolIdIsPrimaryKey: false
118 );
119
120 public static readonly TableDefinition Wix6GroupGroup = new TableDefinition(
121 "Wix6GroupGroup",
122 UtilSymbolDefinitions.GroupGroup,
123 new[]
124 {
125 new ColumnDefinition("Parent_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "Wix4Group", keyColumn: 1, description: "Parent Group", modularizeType: ColumnModularizeType.Column),
126 new ColumnDefinition("Child_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "Wix4Group", keyColumn: 1, description: "Child Group, a member of the Parent Group", modularizeType: ColumnModularizeType.Column),
127 },
128 symbolIdIsPrimaryKey: false
129 );
130
108 public static readonly TableDefinition Wix4InternetShortcut = new TableDefinition( 131 public static readonly TableDefinition Wix4InternetShortcut = new TableDefinition(
109 "Wix4InternetShortcut", 132 "Wix4InternetShortcut",
110 UtilSymbolDefinitions.WixInternetShortcut, 133 UtilSymbolDefinitions.WixInternetShortcut,
@@ -302,6 +325,8 @@ namespace WixToolset.Util
302 Wix4FileShare, 325 Wix4FileShare,
303 Wix4FileSharePermissions, 326 Wix4FileSharePermissions,
304 Wix4Group, 327 Wix4Group,
328 Wix6Group,
329 Wix6GroupGroup,
305 Wix4InternetShortcut, 330 Wix4InternetShortcut,
306 Wix4PerformanceCategory, 331 Wix4PerformanceCategory,
307 Wix4Perfmon, 332 Wix4Perfmon,