diff options
author | Rob Mensching <rob@firegiant.com> | 2022-09-27 01:46:38 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2022-09-27 16:25:20 -0700 |
commit | 586d83b42ef69c576303720a6d9c727889842b62 (patch) | |
tree | 8f8182c9cecf320bd46cef420dfebc03d3a4f0c1 | |
parent | 28a1a91cd2c20486276ee37dacce623ed8a75d6e (diff) | |
download | wix-586d83b42ef69c576303720a6d9c727889842b62.tar.gz wix-586d83b42ef69c576303720a6d9c727889842b62.tar.bz2 wix-586d83b42ef69c576303720a6d9c727889842b62.zip |
Rename MsiPatchSequenceSymbol to MsiPatchFamilySymbol and fix the Id
The symbol now matches the name from the language. Also, fix the
MsiPatchFamilySymbol id calculation to fix the linker issue and
unblock patch filtering.
6 files changed, 74 insertions, 74 deletions
diff --git a/src/api/wix/WixToolset.Data/Symbols/MsiPatchFamilySymbol.cs b/src/api/wix/WixToolset.Data/Symbols/MsiPatchFamilySymbol.cs new file mode 100644 index 00000000..e3f064fe --- /dev/null +++ b/src/api/wix/WixToolset.Data/Symbols/MsiPatchFamilySymbol.cs | |||
@@ -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 MsiPatchFamily = new IntermediateSymbolDefinition( | ||
10 | SymbolDefinitionType.MsiPatchFamily, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(MsiPatchFamilySymbolFields.PatchFamily), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(MsiPatchFamilySymbolFields.ProductCode), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(MsiPatchFamilySymbolFields.Sequence), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(MsiPatchFamilySymbolFields.Attributes), IntermediateFieldType.Number), | ||
17 | }, | ||
18 | typeof(MsiPatchFamilySymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Data.Symbols | ||
23 | { | ||
24 | public enum MsiPatchFamilySymbolFields | ||
25 | { | ||
26 | PatchFamily, | ||
27 | ProductCode, | ||
28 | Sequence, | ||
29 | Attributes, | ||
30 | } | ||
31 | |||
32 | public class MsiPatchFamilySymbol : IntermediateSymbol | ||
33 | { | ||
34 | public MsiPatchFamilySymbol() : base(SymbolDefinitions.MsiPatchFamily, null, null) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | public MsiPatchFamilySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.MsiPatchFamily, sourceLineNumber, id) | ||
39 | { | ||
40 | } | ||
41 | |||
42 | public IntermediateField this[MsiPatchFamilySymbolFields index] => this.Fields[(int)index]; | ||
43 | |||
44 | public string PatchFamily | ||
45 | { | ||
46 | get => (string)this.Fields[(int)MsiPatchFamilySymbolFields.PatchFamily]; | ||
47 | set => this.Set((int)MsiPatchFamilySymbolFields.PatchFamily, value); | ||
48 | } | ||
49 | |||
50 | public string ProductCode | ||
51 | { | ||
52 | get => (string)this.Fields[(int)MsiPatchFamilySymbolFields.ProductCode]; | ||
53 | set => this.Set((int)MsiPatchFamilySymbolFields.ProductCode, value); | ||
54 | } | ||
55 | |||
56 | public string Sequence | ||
57 | { | ||
58 | get => (string)this.Fields[(int)MsiPatchFamilySymbolFields.Sequence]; | ||
59 | set => this.Set((int)MsiPatchFamilySymbolFields.Sequence, value); | ||
60 | } | ||
61 | |||
62 | public int? Attributes | ||
63 | { | ||
64 | get => (int?)this.Fields[(int)MsiPatchFamilySymbolFields.Attributes]; | ||
65 | set => this.Set((int)MsiPatchFamilySymbolFields.Attributes, value); | ||
66 | } | ||
67 | } | ||
68 | } \ No newline at end of file | ||
diff --git a/src/api/wix/WixToolset.Data/Symbols/MsiPatchSequenceSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/MsiPatchSequenceSymbol.cs deleted file mode 100644 index ac2b0dc4..00000000 --- a/src/api/wix/WixToolset.Data/Symbols/MsiPatchSequenceSymbol.cs +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
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 MsiPatchSequence = new IntermediateSymbolDefinition( | ||
10 | SymbolDefinitionType.MsiPatchSequence, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(MsiPatchSequenceSymbolFields.PatchFamily), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(MsiPatchSequenceSymbolFields.ProductCode), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(MsiPatchSequenceSymbolFields.Sequence), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(MsiPatchSequenceSymbolFields.Attributes), IntermediateFieldType.Number), | ||
17 | }, | ||
18 | typeof(MsiPatchSequenceSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Data.Symbols | ||
23 | { | ||
24 | public enum MsiPatchSequenceSymbolFields | ||
25 | { | ||
26 | PatchFamily, | ||
27 | ProductCode, | ||
28 | Sequence, | ||
29 | Attributes, | ||
30 | } | ||
31 | |||
32 | public class MsiPatchSequenceSymbol : IntermediateSymbol | ||
33 | { | ||
34 | public MsiPatchSequenceSymbol() : base(SymbolDefinitions.MsiPatchSequence, null, null) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | public MsiPatchSequenceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.MsiPatchSequence, sourceLineNumber, id) | ||
39 | { | ||
40 | } | ||
41 | |||
42 | public IntermediateField this[MsiPatchSequenceSymbolFields index] => this.Fields[(int)index]; | ||
43 | |||
44 | public string PatchFamily | ||
45 | { | ||
46 | get => (string)this.Fields[(int)MsiPatchSequenceSymbolFields.PatchFamily]; | ||
47 | set => this.Set((int)MsiPatchSequenceSymbolFields.PatchFamily, value); | ||
48 | } | ||
49 | |||
50 | public string ProductCode | ||
51 | { | ||
52 | get => (string)this.Fields[(int)MsiPatchSequenceSymbolFields.ProductCode]; | ||
53 | set => this.Set((int)MsiPatchSequenceSymbolFields.ProductCode, value); | ||
54 | } | ||
55 | |||
56 | public string Sequence | ||
57 | { | ||
58 | get => (string)this.Fields[(int)MsiPatchSequenceSymbolFields.Sequence]; | ||
59 | set => this.Set((int)MsiPatchSequenceSymbolFields.Sequence, value); | ||
60 | } | ||
61 | |||
62 | public int? Attributes | ||
63 | { | ||
64 | get => (int?)this.Fields[(int)MsiPatchSequenceSymbolFields.Attributes]; | ||
65 | set => this.Set((int)MsiPatchSequenceSymbolFields.Attributes, value); | ||
66 | } | ||
67 | } | ||
68 | } \ No newline at end of file | ||
diff --git a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs index 4a3269c5..6df3109b 100644 --- a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs +++ b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs | |||
@@ -74,7 +74,7 @@ namespace WixToolset.Data | |||
74 | MsiPatchMetadata, | 74 | MsiPatchMetadata, |
75 | MsiPatchOldAssemblyFile, | 75 | MsiPatchOldAssemblyFile, |
76 | MsiPatchOldAssemblyName, | 76 | MsiPatchOldAssemblyName, |
77 | MsiPatchSequence, | 77 | MsiPatchFamily, |
78 | MsiServiceConfig, | 78 | MsiServiceConfig, |
79 | MsiServiceConfigFailureActions, | 79 | MsiServiceConfigFailureActions, |
80 | MsiShortcutProperty, | 80 | MsiShortcutProperty, |
@@ -422,8 +422,8 @@ namespace WixToolset.Data | |||
422 | case SymbolDefinitionType.MsiPatchOldAssemblyName: | 422 | case SymbolDefinitionType.MsiPatchOldAssemblyName: |
423 | return SymbolDefinitions.MsiPatchOldAssemblyName; | 423 | return SymbolDefinitions.MsiPatchOldAssemblyName; |
424 | 424 | ||
425 | case SymbolDefinitionType.MsiPatchSequence: | 425 | case SymbolDefinitionType.MsiPatchFamily: |
426 | return SymbolDefinitions.MsiPatchSequence; | 426 | return SymbolDefinitions.MsiPatchFamily; |
427 | 427 | ||
428 | case SymbolDefinitionType.MsiServiceConfig: | 428 | case SymbolDefinitionType.MsiServiceConfig: |
429 | return SymbolDefinitions.MsiServiceConfig; | 429 | return SymbolDefinitions.MsiServiceConfig; |
diff --git a/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs b/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs index d2519aef..7c065bc2 100644 --- a/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs +++ b/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs | |||
@@ -923,7 +923,7 @@ namespace WixToolset.Data.WindowsInstaller | |||
923 | 923 | ||
924 | public static readonly TableDefinition MsiPatchSequence = new TableDefinition( | 924 | public static readonly TableDefinition MsiPatchSequence = new TableDefinition( |
925 | "MsiPatchSequence", | 925 | "MsiPatchSequence", |
926 | SymbolDefinitions.MsiPatchSequence, | 926 | SymbolDefinitions.MsiPatchFamily, |
927 | new[] | 927 | new[] |
928 | { | 928 | { |
929 | new ColumnDefinition("PatchFamily", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Unknown), | 929 | new ColumnDefinition("PatchFamily", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Unknown), |
diff --git a/src/wix/WixToolset.Core/Compiler.cs b/src/wix/WixToolset.Core/Compiler.cs index e100c5be..b9c42aaf 100644 --- a/src/wix/WixToolset.Core/Compiler.cs +++ b/src/wix/WixToolset.Core/Compiler.cs | |||
@@ -3620,7 +3620,7 @@ namespace WixToolset.Core | |||
3620 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); | 3620 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); |
3621 | } | 3621 | } |
3622 | 3622 | ||
3623 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.MsiPatchSequence, primaryKeys); | 3623 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.MsiPatchFamily, primaryKeys); |
3624 | 3624 | ||
3625 | this.Core.ParseForExtensionElements(node); | 3625 | this.Core.ParseForExtensionElements(node); |
3626 | 3626 | ||
diff --git a/src/wix/WixToolset.Core/Compiler_Patch.cs b/src/wix/WixToolset.Core/Compiler_Patch.cs index c9cae183..0ea3c441 100644 --- a/src/wix/WixToolset.Core/Compiler_Patch.cs +++ b/src/wix/WixToolset.Core/Compiler_Patch.cs | |||
@@ -431,7 +431,7 @@ namespace WixToolset.Core | |||
431 | 431 | ||
432 | if (!this.Core.EncounteredError) | 432 | if (!this.Core.EncounteredError) |
433 | { | 433 | { |
434 | this.Core.AddSymbol(new MsiPatchSequenceSymbol(sourceLineNumbers) | 434 | this.Core.AddSymbol(new MsiPatchFamilySymbol(sourceLineNumbers, new Identifier(id.Access, id.Id, productCode)) |
435 | { | 435 | { |
436 | PatchFamily = id.Id, | 436 | PatchFamily = id.Id, |
437 | ProductCode = productCode, | 437 | ProductCode = productCode, |