From 586d83b42ef69c576303720a6d9c727889842b62 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 27 Sep 2022 01:46:38 -0700 Subject: 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. --- .../Symbols/MsiPatchFamilySymbol.cs | 68 ++++++++++++++++++++++ .../Symbols/MsiPatchSequenceSymbol.cs | 68 ---------------------- .../WixToolset.Data/Symbols/SymbolDefinitions.cs | 6 +- .../WindowsInstallerTableDefinitions.cs | 2 +- 4 files changed, 72 insertions(+), 72 deletions(-) create mode 100644 src/api/wix/WixToolset.Data/Symbols/MsiPatchFamilySymbol.cs delete mode 100644 src/api/wix/WixToolset.Data/Symbols/MsiPatchSequenceSymbol.cs (limited to 'src/api') 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 @@ +// 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. + +namespace WixToolset.Data +{ + using WixToolset.Data.Symbols; + + public static partial class SymbolDefinitions + { + public static readonly IntermediateSymbolDefinition MsiPatchFamily = new IntermediateSymbolDefinition( + SymbolDefinitionType.MsiPatchFamily, + new[] + { + new IntermediateFieldDefinition(nameof(MsiPatchFamilySymbolFields.PatchFamily), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchFamilySymbolFields.ProductCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchFamilySymbolFields.Sequence), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchFamilySymbolFields.Attributes), IntermediateFieldType.Number), + }, + typeof(MsiPatchFamilySymbol)); + } +} + +namespace WixToolset.Data.Symbols +{ + public enum MsiPatchFamilySymbolFields + { + PatchFamily, + ProductCode, + Sequence, + Attributes, + } + + public class MsiPatchFamilySymbol : IntermediateSymbol + { + public MsiPatchFamilySymbol() : base(SymbolDefinitions.MsiPatchFamily, null, null) + { + } + + public MsiPatchFamilySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.MsiPatchFamily, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiPatchFamilySymbolFields index] => this.Fields[(int)index]; + + public string PatchFamily + { + get => (string)this.Fields[(int)MsiPatchFamilySymbolFields.PatchFamily]; + set => this.Set((int)MsiPatchFamilySymbolFields.PatchFamily, value); + } + + public string ProductCode + { + get => (string)this.Fields[(int)MsiPatchFamilySymbolFields.ProductCode]; + set => this.Set((int)MsiPatchFamilySymbolFields.ProductCode, value); + } + + public string Sequence + { + get => (string)this.Fields[(int)MsiPatchFamilySymbolFields.Sequence]; + set => this.Set((int)MsiPatchFamilySymbolFields.Sequence, value); + } + + public int? Attributes + { + get => (int?)this.Fields[(int)MsiPatchFamilySymbolFields.Attributes]; + set => this.Set((int)MsiPatchFamilySymbolFields.Attributes, value); + } + } +} \ 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 @@ -// 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. - -namespace WixToolset.Data -{ - using WixToolset.Data.Symbols; - - public static partial class SymbolDefinitions - { - public static readonly IntermediateSymbolDefinition MsiPatchSequence = new IntermediateSymbolDefinition( - SymbolDefinitionType.MsiPatchSequence, - new[] - { - new IntermediateFieldDefinition(nameof(MsiPatchSequenceSymbolFields.PatchFamily), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(MsiPatchSequenceSymbolFields.ProductCode), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(MsiPatchSequenceSymbolFields.Sequence), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(MsiPatchSequenceSymbolFields.Attributes), IntermediateFieldType.Number), - }, - typeof(MsiPatchSequenceSymbol)); - } -} - -namespace WixToolset.Data.Symbols -{ - public enum MsiPatchSequenceSymbolFields - { - PatchFamily, - ProductCode, - Sequence, - Attributes, - } - - public class MsiPatchSequenceSymbol : IntermediateSymbol - { - public MsiPatchSequenceSymbol() : base(SymbolDefinitions.MsiPatchSequence, null, null) - { - } - - public MsiPatchSequenceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.MsiPatchSequence, sourceLineNumber, id) - { - } - - public IntermediateField this[MsiPatchSequenceSymbolFields index] => this.Fields[(int)index]; - - public string PatchFamily - { - get => (string)this.Fields[(int)MsiPatchSequenceSymbolFields.PatchFamily]; - set => this.Set((int)MsiPatchSequenceSymbolFields.PatchFamily, value); - } - - public string ProductCode - { - get => (string)this.Fields[(int)MsiPatchSequenceSymbolFields.ProductCode]; - set => this.Set((int)MsiPatchSequenceSymbolFields.ProductCode, value); - } - - public string Sequence - { - get => (string)this.Fields[(int)MsiPatchSequenceSymbolFields.Sequence]; - set => this.Set((int)MsiPatchSequenceSymbolFields.Sequence, value); - } - - public int? Attributes - { - get => (int?)this.Fields[(int)MsiPatchSequenceSymbolFields.Attributes]; - set => this.Set((int)MsiPatchSequenceSymbolFields.Attributes, value); - } - } -} \ 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 MsiPatchMetadata, MsiPatchOldAssemblyFile, MsiPatchOldAssemblyName, - MsiPatchSequence, + MsiPatchFamily, MsiServiceConfig, MsiServiceConfigFailureActions, MsiShortcutProperty, @@ -422,8 +422,8 @@ namespace WixToolset.Data case SymbolDefinitionType.MsiPatchOldAssemblyName: return SymbolDefinitions.MsiPatchOldAssemblyName; - case SymbolDefinitionType.MsiPatchSequence: - return SymbolDefinitions.MsiPatchSequence; + case SymbolDefinitionType.MsiPatchFamily: + return SymbolDefinitions.MsiPatchFamily; case SymbolDefinitionType.MsiServiceConfig: 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 public static readonly TableDefinition MsiPatchSequence = new TableDefinition( "MsiPatchSequence", - SymbolDefinitions.MsiPatchSequence, + SymbolDefinitions.MsiPatchFamily, new[] { new ColumnDefinition("PatchFamily", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Unknown), -- cgit v1.2.3-55-g6feb