diff options
author | Rob Mensching <rob@firegiant.com> | 2017-12-29 04:06:57 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2017-12-29 04:06:57 -0800 |
commit | 6e6771e80225c1697ea418ad99d95be8dac61102 (patch) | |
tree | 464ee01bb28eb856902613ebd82eb4dde3bda9eb | |
parent | be163ecb92398a8d569a7e97aaf25bc7e5fb9eec (diff) | |
download | wix-6e6771e80225c1697ea418ad99d95be8dac61102.tar.gz wix-6e6771e80225c1697ea418ad99d95be8dac61102.tar.bz2 wix-6e6771e80225c1697ea418ad99d95be8dac61102.zip |
Fix several missed identifiers in Compiler and other small cleanup
-rw-r--r-- | src/WixToolset.BuildTasks/AssemblyInfo.cs | 7 | ||||
-rw-r--r-- | src/WixToolset.Core/Compiler.cs | 42 | ||||
-rw-r--r-- | src/test/TestData/Example.Extension/Example.Extension.csproj | 3 |
3 files changed, 29 insertions, 23 deletions
diff --git a/src/WixToolset.BuildTasks/AssemblyInfo.cs b/src/WixToolset.BuildTasks/AssemblyInfo.cs new file mode 100644 index 00000000..ae52fce8 --- /dev/null +++ b/src/WixToolset.BuildTasks/AssemblyInfo.cs | |||
@@ -0,0 +1,7 @@ | |||
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 | using System.Reflection; | ||
4 | using System.Runtime.InteropServices; | ||
5 | |||
6 | [assembly: AssemblyCulture("")] | ||
7 | [assembly: ComVisible(false)] | ||
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs index 587c24fe..8819721b 100644 --- a/src/WixToolset.Core/Compiler.cs +++ b/src/WixToolset.Core/Compiler.cs | |||
@@ -81,7 +81,7 @@ namespace WixToolset.Core | |||
81 | 81 | ||
82 | public string CompliationId { get; set; } | 82 | public string CompliationId { get; set; } |
83 | 83 | ||
84 | public string OutputPath { get; set; } | 84 | public string OutputPath { get; set; } |
85 | 85 | ||
86 | public Platform Platform { get; set; } | 86 | public Platform Platform { get; set; } |
87 | 87 | ||
@@ -497,8 +497,8 @@ namespace WixToolset.Core | |||
497 | 497 | ||
498 | if (!this.Core.EncounteredError) | 498 | if (!this.Core.EncounteredError) |
499 | { | 499 | { |
500 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.AppId); | 500 | var id = new Identifier(appId, AccessModifier.Public); |
501 | row.Set(0, appId); | 501 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.AppId, id); |
502 | row.Set(1, remoteServerName); | 502 | row.Set(1, remoteServerName); |
503 | row.Set(2, localService); | 503 | row.Set(2, localService); |
504 | row.Set(3, serviceParameters); | 504 | row.Set(3, serviceParameters); |
@@ -2411,7 +2411,7 @@ namespace WixToolset.Core | |||
2411 | 2411 | ||
2412 | if (shouldAddCreateFolder) | 2412 | if (shouldAddCreateFolder) |
2413 | { | 2413 | { |
2414 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CreateFolder); | 2414 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CreateFolder, new Identifier(AccessModifier.Public, directoryId, id.Id)); |
2415 | row.Set(0, directoryId); | 2415 | row.Set(0, directoryId); |
2416 | row.Set(1, id.Id); | 2416 | row.Set(1, id.Id); |
2417 | } | 2417 | } |
@@ -2876,7 +2876,7 @@ namespace WixToolset.Core | |||
2876 | 2876 | ||
2877 | if (!this.Core.EncounteredError) | 2877 | if (!this.Core.EncounteredError) |
2878 | { | 2878 | { |
2879 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CreateFolder); | 2879 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CreateFolder, new Identifier(AccessModifier.Public, directoryId, componentId)); |
2880 | row.Set(0, directoryId); | 2880 | row.Set(0, directoryId); |
2881 | row.Set(1, componentId); | 2881 | row.Set(1, componentId); |
2882 | } | 2882 | } |
@@ -3988,8 +3988,8 @@ namespace WixToolset.Core | |||
3988 | 3988 | ||
3989 | if (!this.Core.EncounteredError) | 3989 | if (!this.Core.EncounteredError) |
3990 | { | 3990 | { |
3991 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixCustomTable); | 3991 | var id = new Identifier(tableId, AccessModifier.Public); |
3992 | row.Set(0, tableId); | 3992 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixCustomTable, id); |
3993 | row.Set(1, columnCount); | 3993 | row.Set(1, columnCount); |
3994 | row.Set(2, columnNames); | 3994 | row.Set(2, columnNames); |
3995 | row.Set(3, columnTypes); | 3995 | row.Set(3, columnTypes); |
@@ -4473,20 +4473,23 @@ namespace WixToolset.Core | |||
4473 | 4473 | ||
4474 | if (!this.Core.EncounteredError) | 4474 | if (!this.Core.EncounteredError) |
4475 | { | 4475 | { |
4476 | Identifier rowId = id; | 4476 | var access = id.Access; |
4477 | var rowId = id.Id; | ||
4477 | 4478 | ||
4478 | // If AssignToProperty is set, the DrLocator row created by | 4479 | // If AssignToProperty is set, the DrLocator row created by |
4479 | // ParseFileSearchElement creates the directory entry to return | 4480 | // ParseFileSearchElement creates the directory entry to return |
4480 | // and the row created here is for the file search. | 4481 | // and the row created here is for the file search. |
4481 | if (assignToProperty) | 4482 | if (assignToProperty) |
4482 | { | 4483 | { |
4483 | rowId = new Identifier(signature, AccessModifier.Private); | 4484 | access = AccessModifier.Private; |
4485 | rowId = signature; | ||
4484 | 4486 | ||
4485 | // The property should be set to the directory search Id. | 4487 | // The property should be set to the directory search Id. |
4486 | signature = id.Id; | 4488 | signature = id.Id; |
4487 | } | 4489 | } |
4488 | 4490 | ||
4489 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.DrLocator, rowId); | 4491 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.DrLocator, new Identifier(access, rowId, parentSignature, path)); |
4492 | row.Set(0, rowId); | ||
4490 | row.Set(1, parentSignature); | 4493 | row.Set(1, parentSignature); |
4491 | row.Set(2, path); | 4494 | row.Set(2, path); |
4492 | if (CompilerConstants.IntegerNotSet != depth) | 4495 | if (CompilerConstants.IntegerNotSet != depth) |
@@ -6053,13 +6056,14 @@ namespace WixToolset.Core | |||
6053 | { | 6056 | { |
6054 | // Creates the DrLocator row for the directory search while | 6057 | // Creates the DrLocator row for the directory search while |
6055 | // the parent DirectorySearch creates the file locator row. | 6058 | // the parent DirectorySearch creates the file locator row. |
6056 | row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.DrLocator); | 6059 | row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.DrLocator, new Identifier(AccessModifier.Public, parentSignature, id.Id, String.Empty)); |
6057 | row.Set(0, parentSignature); | 6060 | row.Set(0, parentSignature); |
6058 | row.Set(1, id); | 6061 | row.Set(1, id.Id); |
6059 | } | 6062 | } |
6060 | else | 6063 | else |
6061 | { | 6064 | { |
6062 | row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.DrLocator, id); | 6065 | row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.DrLocator, new Identifier(AccessModifier.Public, id.Id, parentSignature, String.Empty)); |
6066 | row.Set(0, id.Id); | ||
6063 | row.Set(1, parentSignature); | 6067 | row.Set(1, parentSignature); |
6064 | } | 6068 | } |
6065 | } | 6069 | } |
@@ -7158,7 +7162,7 @@ namespace WixToolset.Core | |||
7158 | } | 7162 | } |
7159 | 7163 | ||
7160 | // finally, schedule RemoveExistingProducts | 7164 | // finally, schedule RemoveExistingProducts |
7161 | row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixAction, new Identifier("InstallExecuteSequence/RemoveExistingProducts", AccessModifier.Public)); | 7165 | row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixAction, new Identifier(AccessModifier.Public, "InstallExecuteSequence", "RemoveExistingProducts")); |
7162 | row.Set(0, "InstallExecuteSequence"); | 7166 | row.Set(0, "InstallExecuteSequence"); |
7163 | row.Set(1, "RemoveExistingProducts"); | 7167 | row.Set(1, "RemoveExistingProducts"); |
7164 | // row.Set(2, condition); | 7168 | // row.Set(2, condition); |
@@ -13486,7 +13490,7 @@ namespace WixToolset.Core | |||
13486 | } | 13490 | } |
13487 | else | 13491 | else |
13488 | { | 13492 | { |
13489 | var row = this.Core.CreateRow(childSourceLineNumbers, TupleDefinitionType.WixAction, new Identifier($"{sequenceTable}/{actionName}", AccessModifier.Public)); | 13493 | var row = this.Core.CreateRow(childSourceLineNumbers, TupleDefinitionType.WixAction, new Identifier(AccessModifier.Public, sequenceTable, actionName)); |
13490 | row.Set(0, sequenceTable); | 13494 | row.Set(0, sequenceTable); |
13491 | row.Set(1, actionName); | 13495 | row.Set(1, actionName); |
13492 | row.Set(2, condition); | 13496 | row.Set(2, condition); |
@@ -14526,8 +14530,7 @@ namespace WixToolset.Core | |||
14526 | // add the row and any references needed | 14530 | // add the row and any references needed |
14527 | if (!this.Core.EncounteredError) | 14531 | if (!this.Core.EncounteredError) |
14528 | { | 14532 | { |
14529 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CustomAction); | 14533 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CustomAction, new Identifier(AccessModifier.Public, actionName)); |
14530 | row.Set(0, actionName); | ||
14531 | row.Set(1, MsiInterop.MsidbCustomActionTypeProperty | MsiInterop.MsidbCustomActionTypeTextData | extraBits); | 14534 | row.Set(1, MsiInterop.MsidbCustomActionTypeProperty | MsiInterop.MsidbCustomActionTypeTextData | extraBits); |
14532 | row.Set(2, id); | 14535 | row.Set(2, id); |
14533 | row.Set(3, value); | 14536 | row.Set(3, value); |
@@ -14660,15 +14663,14 @@ namespace WixToolset.Core | |||
14660 | this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "After", afterAction)); | 14663 | this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "After", afterAction)); |
14661 | } | 14664 | } |
14662 | 14665 | ||
14663 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CustomAction); | 14666 | var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CustomAction, new Identifier(AccessModifier.Public, actionName)); |
14664 | row.Set(0, actionName); | ||
14665 | row.Set(1, MsiInterop.MsidbCustomActionTypeProperty | MsiInterop.MsidbCustomActionTypeTextData | extraBits); | 14667 | row.Set(1, MsiInterop.MsidbCustomActionTypeProperty | MsiInterop.MsidbCustomActionTypeTextData | extraBits); |
14666 | row.Set(2, id); | 14668 | row.Set(2, id); |
14667 | row.Set(3, value); | 14669 | row.Set(3, value); |
14668 | 14670 | ||
14669 | foreach (string sequence in sequences) | 14671 | foreach (string sequence in sequences) |
14670 | { | 14672 | { |
14671 | var sequenceRow = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixAction); | 14673 | var sequenceRow = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixAction, new Identifier(AccessModifier.Public, sequence, actionName)); |
14672 | sequenceRow.Set(0, sequence); | 14674 | sequenceRow.Set(0, sequence); |
14673 | sequenceRow.Set(1, actionName); | 14675 | sequenceRow.Set(1, actionName); |
14674 | sequenceRow.Set(2, condition); | 14676 | sequenceRow.Set(2, condition); |
diff --git a/src/test/TestData/Example.Extension/Example.Extension.csproj b/src/test/TestData/Example.Extension/Example.Extension.csproj index d04ce553..f3071fa3 100644 --- a/src/test/TestData/Example.Extension/Example.Extension.csproj +++ b/src/test/TestData/Example.Extension/Example.Extension.csproj | |||
@@ -12,9 +12,6 @@ | |||
12 | </ItemGroup> | 12 | </ItemGroup> |
13 | 13 | ||
14 | <ItemGroup> | 14 | <ItemGroup> |
15 | <ProjectReference Include="$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj') " /> | ||
16 | <PackageReference Include="WixToolset.Data" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj') " /> | ||
17 | |||
18 | <ProjectReference Include="$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj') " /> | 15 | <ProjectReference Include="$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj') " /> |
19 | <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj') " /> | 16 | <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj') " /> |
20 | </ItemGroup> | 17 | </ItemGroup> |