Absorb Tag.wixext into core SoftwareTag element
Resolves wixtoolset/issues#5949
Rob Mensching committed
Feb 27, 2021 at 07:28 UTC
d997b6cda9e983f9dfa45fddd7122f33ae8c7666
5 files changed
+255
src/WixToolset.Data/Symbols/SoftwareIdentificationTagSymbol.cs
new
+76
@@ -0,0 +1,76 @@
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
+
3
+namespace WixToolset.Data
4
+{
5
+ using WixToolset.Data.Symbols;
6
+
7
+ public static partial class SymbolDefinitions
8
+ {
9
+ public static readonly IntermediateSymbolDefinition SoftwareIdentificationTag = new IntermediateSymbolDefinition(
10
+ SymbolDefinitionType.SoftwareIdentificationTag,
11
+ new[]
12
+ {
13
+ new IntermediateFieldDefinition(nameof(SoftwareIdentificationTagSymbolFields.FileRef), IntermediateFieldType.String),
14
+ new IntermediateFieldDefinition(nameof(SoftwareIdentificationTagSymbolFields.Regid), IntermediateFieldType.String),
15
+ new IntermediateFieldDefinition(nameof(SoftwareIdentificationTagSymbolFields.UniqueId), IntermediateFieldType.String),
16
+ new IntermediateFieldDefinition(nameof(SoftwareIdentificationTagSymbolFields.PersistentId), IntermediateFieldType.String),
17
+ new IntermediateFieldDefinition(nameof(SoftwareIdentificationTagSymbolFields.Alias), IntermediateFieldType.String),
18
+ },
19
+ typeof(SoftwareIdentificationTagSymbol));
20
+ }
21
+}
22
+
23
+namespace WixToolset.Data.Symbols
24
+{
25
+ public enum SoftwareIdentificationTagSymbolFields
26
+ {
27
+ FileRef,
28
+ Regid,
29
+ UniqueId,
30
+ PersistentId,
31
+ Alias,
32
+ }
33
+
34
+ public class SoftwareIdentificationTagSymbol : IntermediateSymbol
35
+ {
36
+ public SoftwareIdentificationTagSymbol() : base(SymbolDefinitions.SoftwareIdentificationTag, null, null)
37
+ {
38
+ }
39
+
40
+ public SoftwareIdentificationTagSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.SoftwareIdentificationTag, sourceLineNumber, id)
41
+ {
42
+ }
43
+
44
+ public IntermediateField this[SoftwareIdentificationTagSymbolFields index] => this.Fields[(int)index];
45
+
46
+ public string FileRef
47
+ {
48
+ get => this.Fields[(int)SoftwareIdentificationTagSymbolFields.FileRef].AsString();
49
+ set => this.Set((int)SoftwareIdentificationTagSymbolFields.FileRef, value);
50
+ }
51
+
52
+ public string Regid
53
+ {
54
+ get => this.Fields[(int)SoftwareIdentificationTagSymbolFields.Regid].AsString();
55
+ set => this.Set((int)SoftwareIdentificationTagSymbolFields.Regid, value);
56
+ }
57
+
58
+ public string TagId
59
+ {
60
+ get => this.Fields[(int)SoftwareIdentificationTagSymbolFields.UniqueId].AsString();
61
+ set => this.Set((int)SoftwareIdentificationTagSymbolFields.UniqueId, value);
62
+ }
63
+
64
+ public string PersistentId
65
+ {
66
+ get => this.Fields[(int)SoftwareIdentificationTagSymbolFields.PersistentId].AsString();
67
+ set => this.Set((int)SoftwareIdentificationTagSymbolFields.PersistentId, value);
68
+ }
69
+
70
+ public string Alias
71
+ {
72
+ get => this.Fields[(int)SoftwareIdentificationTagSymbolFields.Alias].AsString();
73
+ set => this.Set((int)SoftwareIdentificationTagSymbolFields.Alias, value);
74
+ }
75
+ }
76
+}
src/WixToolset.Data/Symbols/SymbolDefinitions.cs
+12
@@ -102,6 +102,7 @@ namespace WixToolset.Data
102
SFPCatalog,
103
Shortcut,
104
Signature,
105
+ SoftwareIdentificationTag,
106
TargetFilesOptionalData,
107
TargetImages,
108
TextStyle,
@@ -140,6 +141,7 @@ namespace WixToolset.Data
141
WixBundleRelatedPackage,
142
WixBundleRollbackBoundary,
143
WixBundleSlipstreamMsp,
144
+ WixBundleTag,
145
WixBundleUpdate,
146
WixBundleVariable,
147
WixChain,
@@ -170,6 +172,7 @@ namespace WixToolset.Data
172
WixPatchRef,
173
WixPatchTarget,
174
WixProductSearch,
175
+ WixProductTag,
176
WixProperty,
177
WixRegistrySearch,
178
WixRelatedBundle,
@@ -491,6 +494,9 @@ namespace WixToolset.Data
494
case SymbolDefinitionType.Signature:
495
return SymbolDefinitions.Signature;
496
497
+ case SymbolDefinitionType.SoftwareIdentificationTag:
498
+ return SymbolDefinitions.SoftwareIdentificationTag;
499
+
500
case SymbolDefinitionType.TargetFilesOptionalData:
501
return SymbolDefinitions.TargetFilesOptionalData;
502
@@ -605,6 +611,9 @@ namespace WixToolset.Data
611
case SymbolDefinitionType.WixBundleSlipstreamMsp:
612
return SymbolDefinitions.WixBundleSlipstreamMsp;
613
614
+ case SymbolDefinitionType.WixBundleTag:
615
+ return SymbolDefinitions.WixBundleTag;
616
+
617
case SymbolDefinitionType.WixBundleUpdate:
618
return SymbolDefinitions.WixBundleUpdate;
619
@@ -692,6 +701,9 @@ namespace WixToolset.Data
701
case SymbolDefinitionType.WixProductSearch:
702
return SymbolDefinitions.WixProductSearch;
703
704
+ case SymbolDefinitionType.WixProductTag:
705
+ return SymbolDefinitions.WixProductTag;
706
+
707
case SymbolDefinitionType.WixProperty:
708
return SymbolDefinitions.WixProperty;
709
src/WixToolset.Data/Symbols/WixBundleTagSymbol.cs
new
+84
@@ -0,0 +1,84 @@
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
+
3
+namespace WixToolset.Data
4
+{
5
+ using WixToolset.Data.Symbols;
6
+
7
+ public static partial class SymbolDefinitions
8
+ {
9
+ public static readonly IntermediateSymbolDefinition WixBundleTag = new IntermediateSymbolDefinition(
10
+ SymbolDefinitionType.WixBundleTag,
11
+ new[]
12
+ {
13
+ new IntermediateFieldDefinition(nameof(WixBundleTagSymbolFields.Filename), IntermediateFieldType.String),
14
+ new IntermediateFieldDefinition(nameof(WixBundleTagSymbolFields.Regid), IntermediateFieldType.String),
15
+ new IntermediateFieldDefinition(nameof(WixBundleTagSymbolFields.Name), IntermediateFieldType.String),
16
+ new IntermediateFieldDefinition(nameof(WixBundleTagSymbolFields.InstallPath), IntermediateFieldType.String),
17
+ new IntermediateFieldDefinition(nameof(WixBundleTagSymbolFields.Attributes), IntermediateFieldType.Number),
18
+ new IntermediateFieldDefinition(nameof(WixBundleTagSymbolFields.Xml), IntermediateFieldType.String),
19
+ },
20
+ typeof(WixBundleTagSymbol));
21
+ }
22
+}
23
+
24
+namespace WixToolset.Data.Symbols
25
+{
26
+ public enum WixBundleTagSymbolFields
27
+ {
28
+ Filename,
29
+ Regid,
30
+ Name,
31
+ InstallPath,
32
+ Attributes,
33
+ Xml,
34
+ }
35
+
36
+ public class WixBundleTagSymbol : IntermediateSymbol
37
+ {
38
+ public WixBundleTagSymbol() : base(SymbolDefinitions.WixBundleTag, null, null)
39
+ {
40
+ }
41
+
42
+ public WixBundleTagSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBundleTag, sourceLineNumber, id)
43
+ {
44
+ }
45
+
46
+ public IntermediateField this[WixBundleTagSymbolFields index] => this.Fields[(int)index];
47
+
48
+ public string Filename
49
+ {
50
+ get => this.Fields[(int)WixBundleTagSymbolFields.Filename].AsString();
51
+ set => this.Set((int)WixBundleTagSymbolFields.Filename, value);
52
+ }
53
+
54
+ public string Regid
55
+ {
56
+ get => this.Fields[(int)WixBundleTagSymbolFields.Regid].AsString();
57
+ set => this.Set((int)WixBundleTagSymbolFields.Regid, value);
58
+ }
59
+
60
+ public string Name
61
+ {
62
+ get => this.Fields[(int)WixBundleTagSymbolFields.Name].AsString();
63
+ set => this.Set((int)WixBundleTagSymbolFields.Name, value);
64
+ }
65
+
66
+ public string InstallPath
67
+ {
68
+ get => this.Fields[(int)WixBundleTagSymbolFields.InstallPath].AsString();
69
+ set => this.Set((int)WixBundleTagSymbolFields.InstallPath, value);
70
+ }
71
+
72
+ public int Attributes
73
+ {
74
+ get => this.Fields[(int)WixBundleTagSymbolFields.Attributes].AsNumber();
75
+ set => this.Set((int)WixBundleTagSymbolFields.Attributes, value);
76
+ }
77
+
78
+ public string Xml
79
+ {
80
+ get => this.Fields[(int)WixBundleTagSymbolFields.Xml].AsString();
81
+ set => this.Set((int)WixBundleTagSymbolFields.Xml, value);
82
+ }
83
+ }
84
+}
src/WixToolset.Data/Symbols/WixProductTagSymbol.cs
new
+68
@@ -0,0 +1,68 @@
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
+
3
+namespace WixToolset.Data
4
+{
5
+ using WixToolset.Data.Symbols;
6
+
7
+ public static partial class SymbolDefinitions
8
+ {
9
+ public static readonly IntermediateSymbolDefinition WixProductTag = new IntermediateSymbolDefinition(
10
+ SymbolDefinitionType.WixProductTag,
11
+ new[]
12
+ {
13
+ new IntermediateFieldDefinition(nameof(WixProductTagSymbolFields.FileRef), IntermediateFieldType.String),
14
+ new IntermediateFieldDefinition(nameof(WixProductTagSymbolFields.Regid), IntermediateFieldType.String),
15
+ new IntermediateFieldDefinition(nameof(WixProductTagSymbolFields.Name), IntermediateFieldType.String),
16
+ new IntermediateFieldDefinition(nameof(WixProductTagSymbolFields.Attributes), IntermediateFieldType.Number)
17
+ },
18
+ typeof(WixProductTagSymbol));
19
+ }
20
+}
21
+
22
+namespace WixToolset.Data.Symbols
23
+{
24
+ public enum WixProductTagSymbolFields
25
+ {
26
+ FileRef,
27
+ Regid,
28
+ Name,
29
+ Attributes
30
+ }
31
+
32
+ public class WixProductTagSymbol : IntermediateSymbol
33
+ {
34
+ public WixProductTagSymbol() : base(SymbolDefinitions.WixProductTag, null, null)
35
+ {
36
+ }
37
+
38
+ public WixProductTagSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixProductTag, sourceLineNumber, id)
39
+ {
40
+ }
41
+
42
+ public IntermediateField this[WixProductTagSymbolFields index] => this.Fields[(int)index];
43
+
44
+ public string FileRef
45
+ {
46
+ get => this.Fields[(int)WixProductTagSymbolFields.FileRef].AsString();
47
+ set => this.Set((int)WixProductTagSymbolFields.FileRef, value);
48
+ }
49
+
50
+ public string Regid
51
+ {
52
+ get => this.Fields[(int)WixProductTagSymbolFields.Regid].AsString();
53
+ set => this.Set((int)WixProductTagSymbolFields.Regid, value);
54
+ }
55
+
56
+ public string Name
57
+ {
58
+ get => this.Fields[(int)WixProductTagSymbolFields.Name].AsString();
59
+ set => this.Set((int)WixProductTagSymbolFields.Name, value);
60
+ }
61
+
62
+ public int Attributes
63
+ {
64
+ get => this.Fields[(int)WixProductTagSymbolFields.Attributes].AsNumber();
65
+ set => this.Set((int)WixProductTagSymbolFields.Attributes, value);
66
+ }
67
+ }
68
+}
src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs
+15
@@ -1283,6 +1283,20 @@ namespace WixToolset.Data.WindowsInstaller
1283
symbolIdIsPrimaryKey: true
1284
);
1285
1286
+ public static readonly TableDefinition SoftwareIdentificationTag = new TableDefinition(
1287
+ "SoftwareIdentificationTag",
1288
+ SymbolDefinitions.SoftwareIdentificationTag,
1289
+ new[]
1290
+ {
1291
+ new ColumnDefinition("File_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "The file that installs the software id tag.", modularizeType: ColumnModularizeType.Column),
1292
+ new ColumnDefinition("Regid", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Text, description: "The regid for the software id tag."),
1293
+ new ColumnDefinition("TagId", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Text, description: "The unique id for the software id tag."),
1294
+ new ColumnDefinition("PersistentId", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Text, description: "The type of the software id tag."),
1295
+ new ColumnDefinition("Alias", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Alias for the software id tag."),
1296
+ },
1297
+ symbolIdIsPrimaryKey: false
1298
+ );
1299
+
1300
public static readonly TableDefinition TextStyle = new TableDefinition(
1301
"TextStyle",
1302
SymbolDefinitions.TextStyle,
@@ -1813,6 +1827,7 @@ namespace WixToolset.Data.WindowsInstaller
1827
Shortcut,
1828
MsiShortcutProperty,
1829
Signature,
1830
+ SoftwareIdentificationTag,
1831
TextStyle,
1832
TypeLib,
1833
UIText,