diff options
-rw-r--r-- | src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs | 26 | ||||
-rw-r--r-- | src/ext/Util/wixext/Symbols/GroupSymbol.cs | 92 | ||||
-rw-r--r-- | src/ext/Util/wixext/UtilCompiler.cs | 16 | ||||
-rw-r--r-- | src/ext/Util/wixext/UtilDecompiler.cs | 14 |
4 files changed, 74 insertions, 74 deletions
diff --git a/src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs b/src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs index fdd1ee76..a4ec6ddd 100644 --- a/src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs +++ b/src/ext/Util/wixext/Symbols/GroupGroupSymbol.cs | |||
@@ -11,8 +11,8 @@ namespace WixToolset.Util | |||
11 | UtilSymbolDefinitionType.GroupGroup.ToString(), | 11 | UtilSymbolDefinitionType.GroupGroup.ToString(), |
12 | new[] | 12 | new[] |
13 | { | 13 | { |
14 | new IntermediateFieldDefinition(nameof(GroupGroupSymbol.SymbolFields.ParentGroupRef), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(GroupGroupSymbolFields.ParentGroupRef), IntermediateFieldType.String), |
15 | new IntermediateFieldDefinition(nameof(GroupGroupSymbol.SymbolFields.ChildGroupRef), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(GroupGroupSymbolFields.ChildGroupRef), IntermediateFieldType.String), |
16 | }, | 16 | }, |
17 | typeof(UserGroupSymbol)); | 17 | typeof(UserGroupSymbol)); |
18 | } | 18 | } |
@@ -22,14 +22,14 @@ namespace WixToolset.Util.Symbols | |||
22 | { | 22 | { |
23 | using WixToolset.Data; | 23 | using WixToolset.Data; |
24 | 24 | ||
25 | public class GroupGroupSymbol : IntermediateSymbol | 25 | public enum GroupGroupSymbolFields |
26 | { | 26 | { |
27 | public enum SymbolFields | 27 | ParentGroupRef, |
28 | { | 28 | ChildGroupRef, |
29 | ParentGroupRef, | 29 | } |
30 | ChildGroupRef, | ||
31 | } | ||
32 | 30 | ||
31 | public class GroupGroupSymbol : IntermediateSymbol | ||
32 | { | ||
33 | public GroupGroupSymbol() : base(UtilSymbolDefinitions.GroupGroup, null, null) | 33 | public GroupGroupSymbol() : base(UtilSymbolDefinitions.GroupGroup, null, null) |
34 | { | 34 | { |
35 | } | 35 | } |
@@ -38,18 +38,18 @@ namespace WixToolset.Util.Symbols | |||
38 | { | 38 | { |
39 | } | 39 | } |
40 | 40 | ||
41 | public IntermediateField this[GroupGroupSymbol.SymbolFields index] => this.Fields[(int)index]; | 41 | public IntermediateField this[GroupGroupSymbolFields index] => this.Fields[(int)index]; |
42 | 42 | ||
43 | public string ParentGroupRef | 43 | public string ParentGroupRef |
44 | { | 44 | { |
45 | get => this.Fields[(int)GroupGroupSymbol.SymbolFields.ParentGroupRef].AsString(); | 45 | get => this.Fields[(int)GroupGroupSymbolFields.ParentGroupRef].AsString(); |
46 | set => this.Set((int)GroupGroupSymbol.SymbolFields.ParentGroupRef, value); | 46 | set => this.Set((int)GroupGroupSymbolFields.ParentGroupRef, value); |
47 | } | 47 | } |
48 | 48 | ||
49 | public string ChildGroupRef | 49 | public string ChildGroupRef |
50 | { | 50 | { |
51 | get => this.Fields[(int)GroupGroupSymbol.SymbolFields.ChildGroupRef].AsString(); | 51 | get => this.Fields[(int)GroupGroupSymbolFields.ChildGroupRef].AsString(); |
52 | set => this.Set((int)GroupGroupSymbol.SymbolFields.ChildGroupRef, value); | 52 | set => this.Set((int)GroupGroupSymbolFields.ChildGroupRef, value); |
53 | } | 53 | } |
54 | 54 | ||
55 | } | 55 | } |
diff --git a/src/ext/Util/wixext/Symbols/GroupSymbol.cs b/src/ext/Util/wixext/Symbols/GroupSymbol.cs index ac6f6608..551b22e7 100644 --- a/src/ext/Util/wixext/Symbols/GroupSymbol.cs +++ b/src/ext/Util/wixext/Symbols/GroupSymbol.cs | |||
@@ -11,9 +11,9 @@ namespace WixToolset.Util | |||
11 | UtilSymbolDefinitionType.Group.ToString(), | 11 | UtilSymbolDefinitionType.Group.ToString(), |
12 | new[] | 12 | new[] |
13 | { | 13 | { |
14 | new IntermediateFieldDefinition(nameof(GroupSymbol.SymbolFields.ComponentRef), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(GroupSymbolFields.ComponentRef), IntermediateFieldType.String), |
15 | new IntermediateFieldDefinition(nameof(GroupSymbol.SymbolFields.Name), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(GroupSymbolFields.Name), IntermediateFieldType.String), |
16 | new IntermediateFieldDefinition(nameof(GroupSymbol.SymbolFields.Domain), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(GroupSymbolFields.Domain), IntermediateFieldType.String), |
17 | }, | 17 | }, |
18 | typeof(GroupSymbol)); | 18 | typeof(GroupSymbol)); |
19 | 19 | ||
@@ -21,9 +21,9 @@ namespace WixToolset.Util | |||
21 | UtilSymbolDefinitionType.Group6.ToString(), | 21 | UtilSymbolDefinitionType.Group6.ToString(), |
22 | new[] | 22 | new[] |
23 | { | 23 | { |
24 | new IntermediateFieldDefinition(nameof(Group6Symbol.SymbolFields.GroupRef), IntermediateFieldType.String), | 24 | new IntermediateFieldDefinition(nameof(Group6SymbolFields.GroupRef), IntermediateFieldType.String), |
25 | new IntermediateFieldDefinition(nameof(Group6Symbol.SymbolFields.Comment), IntermediateFieldType.String), | 25 | new IntermediateFieldDefinition(nameof(Group6SymbolFields.Comment), IntermediateFieldType.String), |
26 | new IntermediateFieldDefinition(nameof(Group6Symbol.SymbolFields.Attributes), IntermediateFieldType.Number), | 26 | new IntermediateFieldDefinition(nameof(Group6SymbolFields.Attributes), IntermediateFieldType.Number), |
27 | }, | 27 | }, |
28 | typeof(Group6Symbol)); | 28 | typeof(Group6Symbol)); |
29 | } | 29 | } |
@@ -34,15 +34,15 @@ namespace WixToolset.Util.Symbols | |||
34 | using System; | 34 | using System; |
35 | using WixToolset.Data; | 35 | using WixToolset.Data; |
36 | 36 | ||
37 | public class GroupSymbol : IntermediateSymbol | 37 | public enum GroupSymbolFields |
38 | { | 38 | { |
39 | public enum SymbolFields | 39 | ComponentRef, |
40 | { | 40 | Name, |
41 | ComponentRef, | 41 | Domain, |
42 | Name, | 42 | } |
43 | Domain, | ||
44 | } | ||
45 | 43 | ||
44 | public class GroupSymbol : IntermediateSymbol | ||
45 | { | ||
46 | public GroupSymbol() : base(UtilSymbolDefinitions.Group, null, null) | 46 | public GroupSymbol() : base(UtilSymbolDefinitions.Group, null, null) |
47 | { | 47 | { |
48 | } | 48 | } |
@@ -51,48 +51,48 @@ namespace WixToolset.Util.Symbols | |||
51 | { | 51 | { |
52 | } | 52 | } |
53 | 53 | ||
54 | public IntermediateField this[GroupSymbol.SymbolFields index] => this.Fields[(int)index]; | 54 | public IntermediateField this[GroupSymbolFields index] => this.Fields[(int)index]; |
55 | 55 | ||
56 | public string ComponentRef | 56 | public string ComponentRef |
57 | { | 57 | { |
58 | get => this.Fields[(int)GroupSymbol.SymbolFields.ComponentRef].AsString(); | 58 | get => this.Fields[(int)GroupSymbolFields.ComponentRef].AsString(); |
59 | set => this.Set((int)GroupSymbol.SymbolFields.ComponentRef, value); | 59 | set => this.Set((int)GroupSymbolFields.ComponentRef, value); |
60 | } | 60 | } |
61 | 61 | ||
62 | public string Name | 62 | public string Name |
63 | { | 63 | { |
64 | get => this.Fields[(int)GroupSymbol.SymbolFields.Name].AsString(); | 64 | get => this.Fields[(int)GroupSymbolFields.Name].AsString(); |
65 | set => this.Set((int)GroupSymbol.SymbolFields.Name, value); | 65 | set => this.Set((int)GroupSymbolFields.Name, value); |
66 | } | 66 | } |
67 | 67 | ||
68 | public string Domain | 68 | public string Domain |
69 | { | 69 | { |
70 | get => this.Fields[(int)GroupSymbol.SymbolFields.Domain].AsString(); | 70 | get => this.Fields[(int)GroupSymbolFields.Domain].AsString(); |
71 | set => this.Set((int)GroupSymbol.SymbolFields.Domain, value); | 71 | set => this.Set((int)GroupSymbolFields.Domain, value); |
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | public class Group6Symbol : IntermediateSymbol | 75 | [Flags] |
76 | public enum Group6SymbolAttributes | ||
76 | { | 77 | { |
77 | [Flags] | 78 | None = 0x00000000, |
78 | public enum SymbolAttributes | 79 | FailIfExists = 0x00000010, |
79 | { | 80 | UpdateIfExists = 0x00000020, |
80 | None = 0x00000000, | 81 | DontRemoveOnUninstall = 0x00000100, |
81 | FailIfExists = 0x00000010, | 82 | DontCreateGroup = 0x00000200, |
82 | UpdateIfExists = 0x00000020, | 83 | NonVital = 0x00000400, |
83 | DontRemoveOnUninstall = 0x00000100, | 84 | RemoveComment = 0x00000800, |
84 | DontCreateGroup = 0x00000200, | 85 | } |
85 | NonVital = 0x00000400, | ||
86 | RemoveComment = 0x00000800, | ||
87 | } | ||
88 | 86 | ||
89 | public enum SymbolFields | 87 | public enum Group6SymbolFields |
90 | { | 88 | { |
91 | GroupRef, | 89 | GroupRef, |
92 | Comment, | 90 | Comment, |
93 | Attributes, | 91 | Attributes, |
94 | } | 92 | } |
95 | 93 | ||
94 | public class Group6Symbol : IntermediateSymbol | ||
95 | { | ||
96 | public Group6Symbol() : base(UtilSymbolDefinitions.Group6, null, null) | 96 | public Group6Symbol() : base(UtilSymbolDefinitions.Group6, null, null) |
97 | { | 97 | { |
98 | } | 98 | } |
@@ -101,24 +101,24 @@ namespace WixToolset.Util.Symbols | |||
101 | { | 101 | { |
102 | } | 102 | } |
103 | 103 | ||
104 | public IntermediateField this[Group6Symbol.SymbolFields index] => this.Fields[(int)index]; | 104 | public IntermediateField this[Group6SymbolFields index] => this.Fields[(int)index]; |
105 | 105 | ||
106 | public string GroupRef | 106 | public string GroupRef |
107 | { | 107 | { |
108 | get => this.Fields[(int)Group6Symbol.SymbolFields.GroupRef].AsString(); | 108 | get => this.Fields[(int)Group6SymbolFields.GroupRef].AsString(); |
109 | set => this.Set((int)Group6Symbol.SymbolFields.GroupRef, value); | 109 | set => this.Set((int)Group6SymbolFields.GroupRef, value); |
110 | } | 110 | } |
111 | 111 | ||
112 | public string Comment | 112 | public string Comment |
113 | { | 113 | { |
114 | get => this.Fields[(int)Group6Symbol.SymbolFields.Comment].AsString(); | 114 | get => this.Fields[(int)Group6SymbolFields.Comment].AsString(); |
115 | set => this.Set((int)Group6Symbol.SymbolFields.Comment, value); | 115 | set => this.Set((int)Group6SymbolFields.Comment, value); |
116 | } | 116 | } |
117 | 117 | ||
118 | public SymbolAttributes Attributes | 118 | public Group6SymbolAttributes Attributes |
119 | { | 119 | { |
120 | get => (SymbolAttributes)this.Fields[(int)Group6Symbol.SymbolFields.Attributes].AsNumber(); | 120 | get => (Group6SymbolAttributes)this.Fields[(int)Group6SymbolFields.Attributes].AsNumber(); |
121 | set => this.Set((int)Group6Symbol.SymbolFields.Attributes, (int)value); | 121 | set => this.Set((int)Group6SymbolFields.Attributes, (int)value); |
122 | } | 122 | } |
123 | } | 123 | } |
124 | } | 124 | } |
diff --git a/src/ext/Util/wixext/UtilCompiler.cs b/src/ext/Util/wixext/UtilCompiler.cs index f59ffcd6..1ad27322 100644 --- a/src/ext/Util/wixext/UtilCompiler.cs +++ b/src/ext/Util/wixext/UtilCompiler.cs | |||
@@ -1361,7 +1361,7 @@ namespace WixToolset.Util | |||
1361 | string domain = null; | 1361 | string domain = null; |
1362 | string name = null; | 1362 | string name = null; |
1363 | string comment = null; | 1363 | string comment = null; |
1364 | Group6Symbol.SymbolAttributes attributes = Group6Symbol.SymbolAttributes.None; | 1364 | Group6SymbolAttributes attributes = Group6SymbolAttributes.None; |
1365 | 1365 | ||
1366 | foreach (var attrib in element.Attributes()) | 1366 | foreach (var attrib in element.Attributes()) |
1367 | { | 1367 | { |
@@ -1394,7 +1394,7 @@ namespace WixToolset.Util | |||
1394 | 1394 | ||
1395 | if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 1395 | if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
1396 | { | 1396 | { |
1397 | attributes |= Group6Symbol.SymbolAttributes.DontCreateGroup; | 1397 | attributes |= Group6SymbolAttributes.DontCreateGroup; |
1398 | } | 1398 | } |
1399 | break; | 1399 | break; |
1400 | case "FailIfExists": | 1400 | case "FailIfExists": |
@@ -1405,7 +1405,7 @@ namespace WixToolset.Util | |||
1405 | 1405 | ||
1406 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 1406 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
1407 | { | 1407 | { |
1408 | attributes |= Group6Symbol.SymbolAttributes.FailIfExists; | 1408 | attributes |= Group6SymbolAttributes.FailIfExists; |
1409 | } | 1409 | } |
1410 | break; | 1410 | break; |
1411 | case "UpdateIfExists": | 1411 | case "UpdateIfExists": |
@@ -1416,13 +1416,13 @@ namespace WixToolset.Util | |||
1416 | 1416 | ||
1417 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 1417 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
1418 | { | 1418 | { |
1419 | attributes |= Group6Symbol.SymbolAttributes.UpdateIfExists; | 1419 | attributes |= Group6SymbolAttributes.UpdateIfExists; |
1420 | } | 1420 | } |
1421 | break; | 1421 | break; |
1422 | case "RemoveComment": | 1422 | case "RemoveComment": |
1423 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 1423 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
1424 | { | 1424 | { |
1425 | attributes |= Group6Symbol.SymbolAttributes.RemoveComment; | 1425 | attributes |= Group6SymbolAttributes.RemoveComment; |
1426 | } | 1426 | } |
1427 | break; | 1427 | break; |
1428 | case "RemoveOnUninstall": | 1428 | case "RemoveOnUninstall": |
@@ -1433,7 +1433,7 @@ namespace WixToolset.Util | |||
1433 | 1433 | ||
1434 | if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 1434 | if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
1435 | { | 1435 | { |
1436 | attributes |= Group6Symbol.SymbolAttributes.DontRemoveOnUninstall; | 1436 | attributes |= Group6SymbolAttributes.DontRemoveOnUninstall; |
1437 | } | 1437 | } |
1438 | break; | 1438 | break; |
1439 | case "Vital": | 1439 | case "Vital": |
@@ -1444,7 +1444,7 @@ namespace WixToolset.Util | |||
1444 | 1444 | ||
1445 | if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 1445 | if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
1446 | { | 1446 | { |
1447 | attributes |= Group6Symbol.SymbolAttributes.NonVital; | 1447 | attributes |= Group6SymbolAttributes.NonVital; |
1448 | } | 1448 | } |
1449 | break; | 1449 | break; |
1450 | default: | 1450 | default: |
@@ -1468,7 +1468,7 @@ namespace WixToolset.Util | |||
1468 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); | 1468 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); |
1469 | } | 1469 | } |
1470 | 1470 | ||
1471 | if (null != comment && (Group6Symbol.SymbolAttributes.RemoveComment & attributes) != 0) | 1471 | if (null != comment && (Group6SymbolAttributes.RemoveComment & attributes) != 0) |
1472 | { | 1472 | { |
1473 | this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Comment", "RemoveComment")); | 1473 | this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Comment", "RemoveComment")); |
1474 | } | 1474 | } |
diff --git a/src/ext/Util/wixext/UtilDecompiler.cs b/src/ext/Util/wixext/UtilDecompiler.cs index a236ece9..1f3079d8 100644 --- a/src/ext/Util/wixext/UtilDecompiler.cs +++ b/src/ext/Util/wixext/UtilDecompiler.cs | |||
@@ -453,14 +453,14 @@ namespace WixToolset.Util | |||
453 | var groupId = row.FieldAsString(0); | 453 | var groupId = row.FieldAsString(0); |
454 | if (this.DecompilerHelper.TryGetIndexedElement("Group", groupId, out var group)) | 454 | if (this.DecompilerHelper.TryGetIndexedElement("Group", groupId, out var group)) |
455 | { | 455 | { |
456 | var attributes = (Group6Symbol.SymbolAttributes)(row.FieldAsNullableInteger(2) ?? 0); | 456 | var attributes = (Group6SymbolAttributes)(row.FieldAsNullableInteger(2) ?? 0); |
457 | group.Add(AttributeIfNotNull("Comment", row, 1)); | 457 | group.Add(AttributeIfNotNull("Comment", row, 1)); |
458 | group.Add(AttributeIfTrue("FailIfExists", ((attributes & Group6Symbol.SymbolAttributes.FailIfExists) != 0))); | 458 | group.Add(AttributeIfTrue("FailIfExists", ((attributes & Group6SymbolAttributes.FailIfExists) != 0))); |
459 | group.Add(AttributeIfTrue("UpdateIfExists", ((attributes & Group6Symbol.SymbolAttributes.UpdateIfExists) != 0))); | 459 | group.Add(AttributeIfTrue("UpdateIfExists", ((attributes & Group6SymbolAttributes.UpdateIfExists) != 0))); |
460 | group.Add(AttributeIfTrue("DontRemoveOnUninstall", ((attributes & Group6Symbol.SymbolAttributes.DontRemoveOnUninstall) != 0))); | 460 | group.Add(AttributeIfTrue("DontRemoveOnUninstall", ((attributes & Group6SymbolAttributes.DontRemoveOnUninstall) != 0))); |
461 | group.Add(AttributeIfTrue("DontCreateGroup", ((attributes & Group6Symbol.SymbolAttributes.DontCreateGroup) != 0))); | 461 | group.Add(AttributeIfTrue("DontCreateGroup", ((attributes & Group6SymbolAttributes.DontCreateGroup) != 0))); |
462 | group.Add(AttributeIfTrue("NonVital", ((attributes & Group6Symbol.SymbolAttributes.NonVital) != 0))); | 462 | group.Add(AttributeIfTrue("NonVital", ((attributes & Group6SymbolAttributes.NonVital) != 0))); |
463 | group.Add(AttributeIfTrue("RemoveComment", ((attributes & Group6Symbol.SymbolAttributes.RemoveComment) != 0))); | 463 | group.Add(AttributeIfTrue("RemoveComment", ((attributes & Group6SymbolAttributes.RemoveComment) != 0))); |
464 | } | 464 | } |
465 | else | 465 | else |
466 | { | 466 | { |