diff options
author | Bob Arnson <bob@firegiant.com> | 2024-03-17 12:10:29 -0400 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2024-03-18 14:38:06 -0400 |
commit | db7727a8b38e9ca118792c1f22835b3291314869 (patch) | |
tree | 2055ca1287ca24e44bbcbfc89f65d01385a10329 | |
parent | 3b842aeea892c9dae01e5167e5f2e35c448f5bda (diff) | |
download | wix-db7727a8b38e9ca118792c1f22835b3291314869.tar.gz wix-db7727a8b38e9ca118792c1f22835b3291314869.tar.bz2 wix-db7727a8b38e9ca118792c1f22835b3291314869.zip |
Fix Profile column definition.
It's a formatted field but was too short.
Fixes https://github.com/wixtoolset/issues/issues/8043.
5 files changed, 20 insertions, 7 deletions
diff --git a/src/ext/Firewall/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs b/src/ext/Firewall/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs index e39fafaa..65016865 100644 --- a/src/ext/Firewall/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs +++ b/src/ext/Firewall/test/WixToolsetTest.Firewall/FirewallExtensionFixture.cs | |||
@@ -654,7 +654,7 @@ namespace WixToolsetTest.Firewall | |||
654 | var build = new Builder(folder, typeof(FirewallExtensionFactory), new[] { folder }); | 654 | var build = new Builder(folder, typeof(FirewallExtensionFactory), new[] { folder }); |
655 | var output = Path.Combine(folder, $"Firewall{ruleName}.xml"); | 655 | var output = Path.Combine(folder, $"Firewall{ruleName}.xml"); |
656 | 656 | ||
657 | build.BuildAndDecompileAndBuild(Build, Decompile, output); | 657 | build.BuildAndDecompileAndBuild(Build, Decompile, output, validate: true); |
658 | 658 | ||
659 | var doc = XDocument.Load(output); | 659 | var doc = XDocument.Load(output); |
660 | var actual = doc.Descendants() | 660 | var actual = doc.Descendants() |
diff --git a/src/ext/Firewall/test/WixToolsetTest.Firewall/TestData/UsingProperties/PackageComponents.wxs b/src/ext/Firewall/test/WixToolsetTest.Firewall/TestData/UsingProperties/PackageComponents.wxs index 05c3ea8a..1aab3896 100644 --- a/src/ext/Firewall/test/WixToolsetTest.Firewall/TestData/UsingProperties/PackageComponents.wxs +++ b/src/ext/Firewall/test/WixToolsetTest.Firewall/TestData/UsingProperties/PackageComponents.wxs | |||
@@ -4,6 +4,7 @@ | |||
4 | <Fragment> | 4 | <Fragment> |
5 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | 5 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> |
6 | <Component Id="FirewallComponent" Guid="28DF3387-F30E-4DBE-90E2-D2C760CB4DD9"> | 6 | <Component Id="FirewallComponent" Guid="28DF3387-F30E-4DBE-90E2-D2C760CB4DD9"> |
7 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
7 | <fw:FirewallException | 8 | <fw:FirewallException |
8 | Name="[NAME]" | 9 | Name="[NAME]" |
9 | Port="[LOCALPORT]" | 10 | Port="[LOCALPORT]" |
@@ -31,8 +32,8 @@ | |||
31 | /> | 32 | /> |
32 | 33 | ||
33 | <fw:FirewallException Name="Single Nested properties" > | 34 | <fw:FirewallException Name="Single Nested properties" > |
34 | <fw:RemoteAddress Value="[REMOTEADDRESS]" /> | 35 | <fw:RemoteAddress Value="[REMOTEADDRESS]" /> |
35 | <fw:LocalAddress Value="[LOCALADDRESS]" /> | 36 | <fw:LocalAddress Value="[LOCALADDRESS]" /> |
36 | <fw:InterfaceType Value="[INTERFACETYPE]" /> | 37 | <fw:InterfaceType Value="[INTERFACETYPE]" /> |
37 | <fw:Interface Name="[INTERFACE]" /> | 38 | <fw:Interface Name="[INTERFACE]" /> |
38 | </fw:FirewallException> | 39 | </fw:FirewallException> |
diff --git a/src/ext/Firewall/wixext/FirewallTableDefinitions.cs b/src/ext/Firewall/wixext/FirewallTableDefinitions.cs index 7a35bb59..fc8d7a36 100644 --- a/src/ext/Firewall/wixext/FirewallTableDefinitions.cs +++ b/src/ext/Firewall/wixext/FirewallTableDefinitions.cs | |||
@@ -18,10 +18,10 @@ namespace WixToolset.Firewall | |||
18 | new ColumnDefinition("Protocol", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, minValue: 0, maxValue: 255, description: "Protocol (6=TCP; 17=UDP). https://www.iana.org/assignments/protocol-numbers", modularizeType: ColumnModularizeType.Property), | 18 | new ColumnDefinition("Protocol", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, minValue: 0, maxValue: 255, description: "Protocol (6=TCP; 17=UDP). https://www.iana.org/assignments/protocol-numbers", modularizeType: ColumnModularizeType.Property), |
19 | new ColumnDefinition("Program", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Exception for a program (formatted path name).", modularizeType: ColumnModularizeType.Property), | 19 | new ColumnDefinition("Program", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Exception for a program (formatted path name).", modularizeType: ColumnModularizeType.Property), |
20 | new ColumnDefinition("Attributes", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Vital=1; IgnoreUpdates=2; EnableOnChange=4; INetFwRule2=8; INetFwRule3=16"), | 20 | new ColumnDefinition("Attributes", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown, description: "Vital=1; IgnoreUpdates=2; EnableOnChange=4; INetFwRule2=8; INetFwRule3=16"), |
21 | new ColumnDefinition("Profile", ColumnType.String, 4, primaryKey: false, nullable: true, ColumnCategory.Formatted, minValue: 1, maxValue: 2147483647, description: "Profile (1=domain; 2=private; 4=public; 2147483647=all).", modularizeType: ColumnModularizeType.Property), | 21 | new ColumnDefinition("Profile", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, minValue: 1, maxValue: 2147483647, description: "Profile (1=domain; 2=private; 4=public; 2147483647=all).", modularizeType: ColumnModularizeType.Property), |
22 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key into the Component table referencing component that controls the firewall configuration.", modularizeType: ColumnModularizeType.Column), | 22 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key into the Component table referencing component that controls the firewall configuration.", modularizeType: ColumnModularizeType.Column), |
23 | new ColumnDefinition("Description", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Description displayed in Windows Firewall manager for this firewall rule."), | 23 | new ColumnDefinition("Description", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Description displayed in Windows Firewall manager for this firewall rule."), |
24 | new ColumnDefinition("Direction", ColumnType.Number, 1, primaryKey: false, nullable: false, ColumnCategory.Integer, minValue: 1, maxValue: 2, description: "Direction (1=in; 2=out)"), | 24 | new ColumnDefinition("Direction", ColumnType.Number, 1, primaryKey: false, nullable: false, ColumnCategory.Unknown, minValue: 1, maxValue: 2, description: "Direction (1=in; 2=out)"), |
25 | new ColumnDefinition("Action", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, minValue: 0, maxValue: 1, description: "Action (0=Block; 1=Allow).", modularizeType: ColumnModularizeType.Property), | 25 | new ColumnDefinition("Action", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, minValue: 0, maxValue: 1, description: "Action (0=Block; 1=Allow).", modularizeType: ColumnModularizeType.Property), |
26 | new ColumnDefinition("EdgeTraversal", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, minValue: 0, maxValue: 3, description: "Edge traversal (0=Deny; 1=Allow; 2=DeferToApp; 3=DeferToUser).", modularizeType: ColumnModularizeType.Property), | 26 | new ColumnDefinition("EdgeTraversal", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, minValue: 0, maxValue: 3, description: "Edge traversal (0=Deny; 1=Allow; 2=DeferToApp; 3=DeferToUser).", modularizeType: ColumnModularizeType.Property), |
27 | new ColumnDefinition("Enabled", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, minValue: 0, maxValue: 1, description: "Enabled (0=Disabled; 1=Enabled).", modularizeType: ColumnModularizeType.Property), | 27 | new ColumnDefinition("Enabled", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, minValue: 0, maxValue: 1, description: "Enabled (0=Disabled; 1=Enabled).", modularizeType: ColumnModularizeType.Property), |
diff --git a/src/internal/WixInternal.TestSupport/Builder.cs b/src/internal/WixInternal.TestSupport/Builder.cs index 51b7bb0a..eec51797 100644 --- a/src/internal/WixInternal.TestSupport/Builder.cs +++ b/src/internal/WixInternal.TestSupport/Builder.cs | |||
@@ -100,7 +100,7 @@ namespace WixInternal.TestSupport | |||
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
103 | public void BuildAndDecompileAndBuild(Action<string[]> buildFunc, Action<string[]> decompileFunc, string decompilePath) | 103 | public void BuildAndDecompileAndBuild(Action<string[]> buildFunc, Action<string[]> decompileFunc, string decompilePath, bool validate = false) |
104 | { | 104 | { |
105 | var sourceFiles = Directory.GetFiles(this.SourceFolder, "*.wxs"); | 105 | var sourceFiles = Directory.GetFiles(this.SourceFolder, "*.wxs"); |
106 | var wxlFiles = Directory.GetFiles(this.SourceFolder, "*.wxl"); | 106 | var wxlFiles = Directory.GetFiles(this.SourceFolder, "*.wxl"); |
@@ -145,6 +145,19 @@ namespace WixInternal.TestSupport | |||
145 | 145 | ||
146 | buildFunc(firstBuildArgs.ToArray()); | 146 | buildFunc(firstBuildArgs.ToArray()); |
147 | 147 | ||
148 | if (validate) | ||
149 | { | ||
150 | firstBuildArgs = new List<string> | ||
151 | { | ||
152 | "msi", | ||
153 | "validate", | ||
154 | "-intermediateFolder", intermediateFolder, | ||
155 | outputPath, | ||
156 | }; | ||
157 | |||
158 | buildFunc(firstBuildArgs.ToArray()); | ||
159 | } | ||
160 | |||
148 | // Decompile built output. | 161 | // Decompile built output. |
149 | var decompileArgs = new List<string> | 162 | var decompileArgs = new List<string> |
150 | { | 163 | { |
diff --git a/src/internal/WixInternal.TestSupport/XunitExtensions/WixAssert.cs b/src/internal/WixInternal.TestSupport/XunitExtensions/WixAssert.cs index 1df98d3b..5ac28de1 100644 --- a/src/internal/WixInternal.TestSupport/XunitExtensions/WixAssert.cs +++ b/src/internal/WixInternal.TestSupport/XunitExtensions/WixAssert.cs | |||
@@ -4,7 +4,6 @@ namespace WixInternal.TestSupport | |||
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
7 | using System.IO; | ||
8 | using System.Linq; | 7 | using System.Linq; |
9 | using System.Text; | 8 | using System.Text; |
10 | using System.Xml.Linq; | 9 | using System.Xml.Linq; |