From d997b6cda9e983f9dfa45fddd7122f33ae8c7666 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 27 Feb 2021 07:28:33 -0800 Subject: Absorb Tag.wixext into core SoftwareTag element Resolves wixtoolset/issues#5949 --- .../Symbols/SoftwareIdentificationTagSymbol.cs | 76 ++++++++++++++++++++ src/WixToolset.Data/Symbols/SymbolDefinitions.cs | 12 ++++ src/WixToolset.Data/Symbols/WixBundleTagSymbol.cs | 84 ++++++++++++++++++++++ src/WixToolset.Data/Symbols/WixProductTagSymbol.cs | 68 ++++++++++++++++++ .../WindowsInstallerTableDefinitions.cs | 15 ++++ 5 files changed, 255 insertions(+) create mode 100644 src/WixToolset.Data/Symbols/SoftwareIdentificationTagSymbol.cs create mode 100644 src/WixToolset.Data/Symbols/WixBundleTagSymbol.cs create mode 100644 src/WixToolset.Data/Symbols/WixProductTagSymbol.cs (limited to 'src') diff --git a/src/WixToolset.Data/Symbols/SoftwareIdentificationTagSymbol.cs b/src/WixToolset.Data/Symbols/SoftwareIdentificationTagSymbol.cs new file mode 100644 index 00000000..60bf22a2 --- /dev/null +++ b/src/WixToolset.Data/Symbols/SoftwareIdentificationTagSymbol.cs @@ -0,0 +1,76 @@ +// 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 SoftwareIdentificationTag = new IntermediateSymbolDefinition( + SymbolDefinitionType.SoftwareIdentificationTag, + new[] + { + new IntermediateFieldDefinition(nameof(SoftwareIdentificationTagSymbolFields.FileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(SoftwareIdentificationTagSymbolFields.Regid), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(SoftwareIdentificationTagSymbolFields.UniqueId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(SoftwareIdentificationTagSymbolFields.PersistentId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(SoftwareIdentificationTagSymbolFields.Alias), IntermediateFieldType.String), + }, + typeof(SoftwareIdentificationTagSymbol)); + } +} + +namespace WixToolset.Data.Symbols +{ + public enum SoftwareIdentificationTagSymbolFields + { + FileRef, + Regid, + UniqueId, + PersistentId, + Alias, + } + + public class SoftwareIdentificationTagSymbol : IntermediateSymbol + { + public SoftwareIdentificationTagSymbol() : base(SymbolDefinitions.SoftwareIdentificationTag, null, null) + { + } + + public SoftwareIdentificationTagSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.SoftwareIdentificationTag, sourceLineNumber, id) + { + } + + public IntermediateField this[SoftwareIdentificationTagSymbolFields index] => this.Fields[(int)index]; + + public string FileRef + { + get => this.Fields[(int)SoftwareIdentificationTagSymbolFields.FileRef].AsString(); + set => this.Set((int)SoftwareIdentificationTagSymbolFields.FileRef, value); + } + + public string Regid + { + get => this.Fields[(int)SoftwareIdentificationTagSymbolFields.Regid].AsString(); + set => this.Set((int)SoftwareIdentificationTagSymbolFields.Regid, value); + } + + public string TagId + { + get => this.Fields[(int)SoftwareIdentificationTagSymbolFields.UniqueId].AsString(); + set => this.Set((int)SoftwareIdentificationTagSymbolFields.UniqueId, value); + } + + public string PersistentId + { + get => this.Fields[(int)SoftwareIdentificationTagSymbolFields.PersistentId].AsString(); + set => this.Set((int)SoftwareIdentificationTagSymbolFields.PersistentId, value); + } + + public string Alias + { + get => this.Fields[(int)SoftwareIdentificationTagSymbolFields.Alias].AsString(); + set => this.Set((int)SoftwareIdentificationTagSymbolFields.Alias, value); + } + } +} diff --git a/src/WixToolset.Data/Symbols/SymbolDefinitions.cs b/src/WixToolset.Data/Symbols/SymbolDefinitions.cs index bed49b87..cfee33b7 100644 --- a/src/WixToolset.Data/Symbols/SymbolDefinitions.cs +++ b/src/WixToolset.Data/Symbols/SymbolDefinitions.cs @@ -102,6 +102,7 @@ namespace WixToolset.Data SFPCatalog, Shortcut, Signature, + SoftwareIdentificationTag, TargetFilesOptionalData, TargetImages, TextStyle, @@ -140,6 +141,7 @@ namespace WixToolset.Data WixBundleRelatedPackage, WixBundleRollbackBoundary, WixBundleSlipstreamMsp, + WixBundleTag, WixBundleUpdate, WixBundleVariable, WixChain, @@ -170,6 +172,7 @@ namespace WixToolset.Data WixPatchRef, WixPatchTarget, WixProductSearch, + WixProductTag, WixProperty, WixRegistrySearch, WixRelatedBundle, @@ -491,6 +494,9 @@ namespace WixToolset.Data case SymbolDefinitionType.Signature: return SymbolDefinitions.Signature; + case SymbolDefinitionType.SoftwareIdentificationTag: + return SymbolDefinitions.SoftwareIdentificationTag; + case SymbolDefinitionType.TargetFilesOptionalData: return SymbolDefinitions.TargetFilesOptionalData; @@ -605,6 +611,9 @@ namespace WixToolset.Data case SymbolDefinitionType.WixBundleSlipstreamMsp: return SymbolDefinitions.WixBundleSlipstreamMsp; + case SymbolDefinitionType.WixBundleTag: + return SymbolDefinitions.WixBundleTag; + case SymbolDefinitionType.WixBundleUpdate: return SymbolDefinitions.WixBundleUpdate; @@ -692,6 +701,9 @@ namespace WixToolset.Data case SymbolDefinitionType.WixProductSearch: return SymbolDefinitions.WixProductSearch; + case SymbolDefinitionType.WixProductTag: + return SymbolDefinitions.WixProductTag; + case SymbolDefinitionType.WixProperty: return SymbolDefinitions.WixProperty; diff --git a/src/WixToolset.Data/Symbols/WixBundleTagSymbol.cs b/src/WixToolset.Data/Symbols/WixBundleTagSymbol.cs new file mode 100644 index 00000000..d550dae0 --- /dev/null +++ b/src/WixToolset.Data/Symbols/WixBundleTagSymbol.cs @@ -0,0 +1,84 @@ +// 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 WixBundleTag = new IntermediateSymbolDefinition( + SymbolDefinitionType.WixBundleTag, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleTagSymbolFields.Filename), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTagSymbolFields.Regid), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTagSymbolFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTagSymbolFields.InstallPath), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTagSymbolFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleTagSymbolFields.Xml), IntermediateFieldType.String), + }, + typeof(WixBundleTagSymbol)); + } +} + +namespace WixToolset.Data.Symbols +{ + public enum WixBundleTagSymbolFields + { + Filename, + Regid, + Name, + InstallPath, + Attributes, + Xml, + } + + public class WixBundleTagSymbol : IntermediateSymbol + { + public WixBundleTagSymbol() : base(SymbolDefinitions.WixBundleTag, null, null) + { + } + + public WixBundleTagSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBundleTag, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleTagSymbolFields index] => this.Fields[(int)index]; + + public string Filename + { + get => this.Fields[(int)WixBundleTagSymbolFields.Filename].AsString(); + set => this.Set((int)WixBundleTagSymbolFields.Filename, value); + } + + public string Regid + { + get => this.Fields[(int)WixBundleTagSymbolFields.Regid].AsString(); + set => this.Set((int)WixBundleTagSymbolFields.Regid, value); + } + + public string Name + { + get => this.Fields[(int)WixBundleTagSymbolFields.Name].AsString(); + set => this.Set((int)WixBundleTagSymbolFields.Name, value); + } + + public string InstallPath + { + get => this.Fields[(int)WixBundleTagSymbolFields.InstallPath].AsString(); + set => this.Set((int)WixBundleTagSymbolFields.InstallPath, value); + } + + public int Attributes + { + get => this.Fields[(int)WixBundleTagSymbolFields.Attributes].AsNumber(); + set => this.Set((int)WixBundleTagSymbolFields.Attributes, value); + } + + public string Xml + { + get => this.Fields[(int)WixBundleTagSymbolFields.Xml].AsString(); + set => this.Set((int)WixBundleTagSymbolFields.Xml, value); + } + } +} diff --git a/src/WixToolset.Data/Symbols/WixProductTagSymbol.cs b/src/WixToolset.Data/Symbols/WixProductTagSymbol.cs new file mode 100644 index 00000000..a2f1ed11 --- /dev/null +++ b/src/WixToolset.Data/Symbols/WixProductTagSymbol.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 WixProductTag = new IntermediateSymbolDefinition( + SymbolDefinitionType.WixProductTag, + new[] + { + new IntermediateFieldDefinition(nameof(WixProductTagSymbolFields.FileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixProductTagSymbolFields.Regid), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixProductTagSymbolFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixProductTagSymbolFields.Attributes), IntermediateFieldType.Number) + }, + typeof(WixProductTagSymbol)); + } +} + +namespace WixToolset.Data.Symbols +{ + public enum WixProductTagSymbolFields + { + FileRef, + Regid, + Name, + Attributes + } + + public class WixProductTagSymbol : IntermediateSymbol + { + public WixProductTagSymbol() : base(SymbolDefinitions.WixProductTag, null, null) + { + } + + public WixProductTagSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixProductTag, sourceLineNumber, id) + { + } + + public IntermediateField this[WixProductTagSymbolFields index] => this.Fields[(int)index]; + + public string FileRef + { + get => this.Fields[(int)WixProductTagSymbolFields.FileRef].AsString(); + set => this.Set((int)WixProductTagSymbolFields.FileRef, value); + } + + public string Regid + { + get => this.Fields[(int)WixProductTagSymbolFields.Regid].AsString(); + set => this.Set((int)WixProductTagSymbolFields.Regid, value); + } + + public string Name + { + get => this.Fields[(int)WixProductTagSymbolFields.Name].AsString(); + set => this.Set((int)WixProductTagSymbolFields.Name, value); + } + + public int Attributes + { + get => this.Fields[(int)WixProductTagSymbolFields.Attributes].AsNumber(); + set => this.Set((int)WixProductTagSymbolFields.Attributes, value); + } + } +} diff --git a/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs index 86450c22..c0075a27 100644 --- a/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs +++ b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs @@ -1283,6 +1283,20 @@ namespace WixToolset.Data.WindowsInstaller symbolIdIsPrimaryKey: true ); + public static readonly TableDefinition SoftwareIdentificationTag = new TableDefinition( + "SoftwareIdentificationTag", + SymbolDefinitions.SoftwareIdentificationTag, + new[] + { + 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), + new ColumnDefinition("Regid", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Text, description: "The regid for the software id tag."), + new ColumnDefinition("TagId", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Text, description: "The unique id for the software id tag."), + new ColumnDefinition("PersistentId", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Text, description: "The type of the software id tag."), + new ColumnDefinition("Alias", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Alias for the software id tag."), + }, + symbolIdIsPrimaryKey: false + ); + public static readonly TableDefinition TextStyle = new TableDefinition( "TextStyle", SymbolDefinitions.TextStyle, @@ -1813,6 +1827,7 @@ namespace WixToolset.Data.WindowsInstaller Shortcut, MsiShortcutProperty, Signature, + SoftwareIdentificationTag, TextStyle, TypeLib, UIText, -- cgit v1.2.3-55-g6feb