diff options
author | Rob Mensching <rob@firegiant.com> | 2021-02-27 07:29:10 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-02-27 07:39:31 -0800 |
commit | 55252821d8effa420f95d10824f59d5e176a43b3 (patch) | |
tree | bf0da82a3b1fed2543bae2c2ece3341986d71056 /src | |
parent | d997b6cda9e983f9dfa45fddd7122f33ae8c7666 (diff) | |
download | wix-55252821d8effa420f95d10824f59d5e176a43b3.tar.gz wix-55252821d8effa420f95d10824f59d5e176a43b3.tar.bz2 wix-55252821d8effa420f95d10824f59d5e176a43b3.zip |
Absorb Dependency.wixext into Data
Partly resolves wixtoolset/issues#5949
Diffstat (limited to 'src')
6 files changed, 187 insertions, 4 deletions
diff --git a/src/WixToolset.Data/Symbols/SymbolDefinitions.cs b/src/WixToolset.Data/Symbols/SymbolDefinitions.cs index cfee33b7..a224b742 100644 --- a/src/WixToolset.Data/Symbols/SymbolDefinitions.cs +++ b/src/WixToolset.Data/Symbols/SymbolDefinitions.cs | |||
@@ -154,6 +154,8 @@ namespace WixToolset.Data | |||
154 | WixCustomTableColumn, | 154 | WixCustomTableColumn, |
155 | WixDeltaPatchFile, | 155 | WixDeltaPatchFile, |
156 | WixDeltaPatchSymbolPaths, | 156 | WixDeltaPatchSymbolPaths, |
157 | WixDependency, | ||
158 | WixDependencyRef, | ||
157 | WixDependencyProvider, | 159 | WixDependencyProvider, |
158 | WixEnsureTable, | 160 | WixEnsureTable, |
159 | WixFeatureGroup, | 161 | WixFeatureGroup, |
@@ -650,6 +652,12 @@ namespace WixToolset.Data | |||
650 | case SymbolDefinitionType.WixDeltaPatchSymbolPaths: | 652 | case SymbolDefinitionType.WixDeltaPatchSymbolPaths: |
651 | return SymbolDefinitions.WixDeltaPatchSymbolPaths; | 653 | return SymbolDefinitions.WixDeltaPatchSymbolPaths; |
652 | 654 | ||
655 | case SymbolDefinitionType.WixDependency: | ||
656 | return SymbolDefinitions.WixDependency; | ||
657 | |||
658 | case SymbolDefinitionType.WixDependencyRef: | ||
659 | return SymbolDefinitions.WixDependencyRef; | ||
660 | |||
653 | case SymbolDefinitionType.WixEnsureTable: | 661 | case SymbolDefinitionType.WixEnsureTable: |
654 | return SymbolDefinitions.WixEnsureTable; | 662 | return SymbolDefinitions.WixEnsureTable; |
655 | 663 | ||
diff --git a/src/WixToolset.Data/Symbols/WixDeltaPatchSymbolPathsSymbol.cs b/src/WixToolset.Data/Symbols/WixDeltaPatchSymbolPathsSymbol.cs index 6e50d07f..20f30da4 100644 --- a/src/WixToolset.Data/Symbols/WixDeltaPatchSymbolPathsSymbol.cs +++ b/src/WixToolset.Data/Symbols/WixDeltaPatchSymbolPathsSymbol.cs | |||
@@ -1,7 +1,5 @@ | |||
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. | 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 | 2 | ||
3 | using System; | ||
4 | |||
5 | namespace WixToolset.Data | 3 | namespace WixToolset.Data |
6 | { | 4 | { |
7 | using WixToolset.Data.Symbols; | 5 | using WixToolset.Data.Symbols; |
@@ -72,4 +70,4 @@ namespace WixToolset.Data.Symbols | |||
72 | set => this.Set((int)WixDeltaPatchSymbolPathsSymbolFields.SymbolPaths, value); | 70 | set => this.Set((int)WixDeltaPatchSymbolPathsSymbolFields.SymbolPaths, value); |
73 | } | 71 | } |
74 | } | 72 | } |
75 | } \ No newline at end of file | 73 | } |
diff --git a/src/WixToolset.Data/Symbols/WixDependencyProviderSymbol.cs b/src/WixToolset.Data/Symbols/WixDependencyProviderSymbol.cs index 3ede1097..a4604a9c 100644 --- a/src/WixToolset.Data/Symbols/WixDependencyProviderSymbol.cs +++ b/src/WixToolset.Data/Symbols/WixDependencyProviderSymbol.cs | |||
@@ -7,7 +7,7 @@ namespace WixToolset.Data | |||
7 | public static partial class SymbolDefinitions | 7 | public static partial class SymbolDefinitions |
8 | { | 8 | { |
9 | public static readonly IntermediateSymbolDefinition WixDependencyProvider = new IntermediateSymbolDefinition( | 9 | public static readonly IntermediateSymbolDefinition WixDependencyProvider = new IntermediateSymbolDefinition( |
10 | SymbolDefinitionType.WixDependencyProvider.ToString(), | 10 | SymbolDefinitionType.WixDependencyProvider, |
11 | new[] | 11 | new[] |
12 | { | 12 | { |
13 | new IntermediateFieldDefinition(nameof(WixDependencyProviderSymbolFields.ComponentRef), IntermediateFieldType.String), | 13 | new IntermediateFieldDefinition(nameof(WixDependencyProviderSymbolFields.ComponentRef), IntermediateFieldType.String), |
diff --git a/src/WixToolset.Data/Symbols/WixDependencyRefSymbol.cs b/src/WixToolset.Data/Symbols/WixDependencyRefSymbol.cs new file mode 100644 index 00000000..d6076d57 --- /dev/null +++ b/src/WixToolset.Data/Symbols/WixDependencyRefSymbol.cs | |||
@@ -0,0 +1,52 @@ | |||
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 WixDependencyRef = new IntermediateSymbolDefinition( | ||
10 | SymbolDefinitionType.WixDependencyRef, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(WixDependencyRefSymbolFields.WixDependencyProviderRef), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(WixDependencyRefSymbolFields.WixDependencyRef), IntermediateFieldType.String), | ||
15 | }, | ||
16 | typeof(WixDependencyRefSymbol)); | ||
17 | } | ||
18 | } | ||
19 | |||
20 | namespace WixToolset.Data.Symbols | ||
21 | { | ||
22 | public enum WixDependencyRefSymbolFields | ||
23 | { | ||
24 | WixDependencyProviderRef, | ||
25 | WixDependencyRef, | ||
26 | } | ||
27 | |||
28 | public class WixDependencyRefSymbol : IntermediateSymbol | ||
29 | { | ||
30 | public WixDependencyRefSymbol() : base(SymbolDefinitions.WixDependencyRef, null, null) | ||
31 | { | ||
32 | } | ||
33 | |||
34 | public WixDependencyRefSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixDependencyRef, sourceLineNumber, id) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | public IntermediateField this[WixDependencyRefSymbolFields index] => this.Fields[(int)index]; | ||
39 | |||
40 | public string WixDependencyProviderRef | ||
41 | { | ||
42 | get => this.Fields[(int)WixDependencyRefSymbolFields.WixDependencyProviderRef].AsString(); | ||
43 | set => this.Set((int)WixDependencyRefSymbolFields.WixDependencyProviderRef, value); | ||
44 | } | ||
45 | |||
46 | public string WixDependencyRef | ||
47 | { | ||
48 | get => this.Fields[(int)WixDependencyRefSymbolFields.WixDependencyRef].AsString(); | ||
49 | set => this.Set((int)WixDependencyRefSymbolFields.WixDependencyRef, value); | ||
50 | } | ||
51 | } | ||
52 | } | ||
diff --git a/src/WixToolset.Data/Symbols/WixDependencySymbol.cs b/src/WixToolset.Data/Symbols/WixDependencySymbol.cs new file mode 100644 index 00000000..840331bb --- /dev/null +++ b/src/WixToolset.Data/Symbols/WixDependencySymbol.cs | |||
@@ -0,0 +1,82 @@ | |||
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 WixDependency = new IntermediateSymbolDefinition( | ||
10 | SymbolDefinitionType.WixDependency, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(WixDependencySymbolFields.ProviderKey), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(WixDependencySymbolFields.MinVersion), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixDependencySymbolFields.MaxVersion), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixDependencySymbolFields.Attributes), IntermediateFieldType.Number), | ||
17 | }, | ||
18 | typeof(WixDependencySymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Data.Symbols | ||
23 | { | ||
24 | using System; | ||
25 | |||
26 | public enum WixDependencySymbolFields | ||
27 | { | ||
28 | ProviderKey, | ||
29 | MinVersion, | ||
30 | MaxVersion, | ||
31 | Attributes, | ||
32 | } | ||
33 | |||
34 | [Flags] | ||
35 | public enum WixDependencySymbolAttributes : int | ||
36 | { | ||
37 | None = 0x0, | ||
38 | RequiresAttributesMinVersionInclusive = 0x100, | ||
39 | RequiresAttributesMaxVersionInclusive = 0x200, | ||
40 | } | ||
41 | |||
42 | public class WixDependencySymbol : IntermediateSymbol | ||
43 | { | ||
44 | public WixDependencySymbol() : base(SymbolDefinitions.WixDependency, null, null) | ||
45 | { | ||
46 | } | ||
47 | |||
48 | public WixDependencySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixDependency, sourceLineNumber, id) | ||
49 | { | ||
50 | } | ||
51 | |||
52 | public IntermediateField this[WixDependencySymbolFields index] => this.Fields[(int)index]; | ||
53 | |||
54 | public string ProviderKey | ||
55 | { | ||
56 | get => this.Fields[(int)WixDependencySymbolFields.ProviderKey].AsString(); | ||
57 | set => this.Set((int)WixDependencySymbolFields.ProviderKey, value); | ||
58 | } | ||
59 | |||
60 | public string MinVersion | ||
61 | { | ||
62 | get => this.Fields[(int)WixDependencySymbolFields.MinVersion].AsString(); | ||
63 | set => this.Set((int)WixDependencySymbolFields.MinVersion, value); | ||
64 | } | ||
65 | |||
66 | public string MaxVersion | ||
67 | { | ||
68 | get => this.Fields[(int)WixDependencySymbolFields.MaxVersion].AsString(); | ||
69 | set => this.Set((int)WixDependencySymbolFields.MaxVersion, value); | ||
70 | } | ||
71 | |||
72 | public WixDependencySymbolAttributes Attributes | ||
73 | { | ||
74 | get => (WixDependencySymbolAttributes)this.Fields[(int)WixDependencySymbolFields.Attributes].AsNumber(); | ||
75 | set => this.Set((int)WixDependencySymbolFields.Attributes, (int)value); | ||
76 | } | ||
77 | |||
78 | public bool RequiresAttributesMinVersionInclusive => (this.Attributes & WixDependencySymbolAttributes.RequiresAttributesMinVersionInclusive) == WixDependencySymbolAttributes.RequiresAttributesMinVersionInclusive; | ||
79 | |||
80 | public bool RequiresAttributesMaxVersionInclusive => (this.Attributes & WixDependencySymbolAttributes.RequiresAttributesMaxVersionInclusive) == WixDependencySymbolAttributes.RequiresAttributesMaxVersionInclusive; | ||
81 | } | ||
82 | } | ||
diff --git a/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs index c0075a27..dab5ed02 100644 --- a/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs +++ b/src/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs | |||
@@ -1732,6 +1732,46 @@ namespace WixToolset.Data.WindowsInstaller | |||
1732 | symbolIdIsPrimaryKey: false | 1732 | symbolIdIsPrimaryKey: false |
1733 | ); | 1733 | ); |
1734 | 1734 | ||
1735 | public static readonly TableDefinition WixDependencyProvider = new TableDefinition( | ||
1736 | "WixDependencyProvider", | ||
1737 | SymbolDefinitions.WixDependencyProvider, | ||
1738 | new[] | ||
1739 | { | ||
1740 | new ColumnDefinition("WixDependencyProvider", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "The non-localized primary key for the table.", modularizeType: ColumnModularizeType.Column), | ||
1741 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "The foreign key into the Component table used to determine install state.", modularizeType: ColumnModularizeType.Column), | ||
1742 | new ColumnDefinition("ProviderKey", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Text, description: "The name of the registry key that holds the provider identity."), | ||
1743 | new ColumnDefinition("Version", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Version, description: "The version of the package."), | ||
1744 | new ColumnDefinition("DisplayName", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Text, description: "The display name of the package."), | ||
1745 | new ColumnDefinition("Attributes", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown, minValue: 0, maxValue: 2147483647, description: "A 32-bit word that specifies the attribute flags to be applied."), | ||
1746 | }, | ||
1747 | symbolIdIsPrimaryKey: true | ||
1748 | ); | ||
1749 | |||
1750 | public static readonly TableDefinition WixDependency = new TableDefinition( | ||
1751 | "WixDependency", | ||
1752 | SymbolDefinitions.WixDependency, | ||
1753 | new[] | ||
1754 | { | ||
1755 | new ColumnDefinition("WixDependency", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "The non-localized primary key for the table.", modularizeType: ColumnModularizeType.Column), | ||
1756 | new ColumnDefinition("ProviderKey", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Text, description: "The name of the registry key that holds the provider identity."), | ||
1757 | new ColumnDefinition("MinVersion", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Version, description: "The minimum version of the provider supported."), | ||
1758 | new ColumnDefinition("MaxVersion", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Version, description: "The maximum version of the provider supported."), | ||
1759 | new ColumnDefinition("Attributes", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown, minValue: 0, maxValue: 2147483647, description: "A 32-bit word that specifies the attribute flags to be applied."), | ||
1760 | }, | ||
1761 | symbolIdIsPrimaryKey: true | ||
1762 | ); | ||
1763 | |||
1764 | public static readonly TableDefinition WixDependencyRef = new TableDefinition( | ||
1765 | "WixDependencyRef", | ||
1766 | SymbolDefinitions.WixDependencyRef, | ||
1767 | new[] | ||
1768 | { | ||
1769 | new ColumnDefinition("WixDependencyProvider_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "WixDependencyProvider", keyColumn: 1, description: "Foreign key into the Component table.", modularizeType: ColumnModularizeType.Column), | ||
1770 | new ColumnDefinition("WixDependency_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "WixDependency", keyColumn: 1, description: "Foreign key into the WixDependency table.", modularizeType: ColumnModularizeType.Column), | ||
1771 | }, | ||
1772 | symbolIdIsPrimaryKey: false | ||
1773 | ); | ||
1774 | |||
1735 | public static readonly TableDefinition[] All = new[] | 1775 | public static readonly TableDefinition[] All = new[] |
1736 | { | 1776 | { |
1737 | ActionText, | 1777 | ActionText, |
@@ -1859,6 +1899,9 @@ namespace WixToolset.Data.WindowsInstaller | |||
1859 | SummaryInformation, | 1899 | SummaryInformation, |
1860 | TransformView, | 1900 | TransformView, |
1861 | Validation, | 1901 | Validation, |
1902 | WixDependency, | ||
1903 | WixDependencyProvider, | ||
1904 | WixDependencyRef, | ||
1862 | }; | 1905 | }; |
1863 | } | 1906 | } |
1864 | } | 1907 | } |