@joebigelow / wix / commits / 6e6771e8

Fix several missed identifiers in Compiler and other small cleanup

Rob Mensching committed Dec 29, 2017 at 04:06 UTC 6e6771e80225c1697ea418ad99d95be8dac61102
3 files changed +29 -23
src/WixToolset.BuildTasks/AssemblyInfo.cs new
+7
@@ -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)]
src/WixToolset.Core/Compiler.cs
+22 -20
@@ -81,7 +81,7 @@ namespace WixToolset.Core
81
82 public string CompliationId { get; set; }
83
84 - public string OutputPath { get; set; }
84 + public string OutputPath { get; set; }
85
86 public Platform Platform { get; set; }
87
@@ -497,8 +497,8 @@ namespace WixToolset.Core
497
498 if (!this.Core.EncounteredError)
499 {
500 - var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.AppId);
501 - row.Set(0, appId);
500 + var id = new Identifier(appId, AccessModifier.Public);
501 + var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.AppId, id);
502 row.Set(1, remoteServerName);
503 row.Set(2, localService);
504 row.Set(3, serviceParameters);
@@ -2411,7 +2411,7 @@ namespace WixToolset.Core
2411
2412 if (shouldAddCreateFolder)
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);
2416 row.Set(1, id.Id);
2417 }
@@ -2876,7 +2876,7 @@ namespace WixToolset.Core
2876
2877 if (!this.Core.EncounteredError)
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);
2881 row.Set(1, componentId);
2882 }
@@ -3988,8 +3988,8 @@ namespace WixToolset.Core
3988
3989 if (!this.Core.EncounteredError)
3990 {
3991 - var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixCustomTable);
3992 - row.Set(0, tableId);
3991 + var id = new Identifier(tableId, AccessModifier.Public);
3992 + var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixCustomTable, id);
3993 row.Set(1, columnCount);
3994 row.Set(2, columnNames);
3995 row.Set(3, columnTypes);
@@ -4473,20 +4473,23 @@ namespace WixToolset.Core
4473
4474 if (!this.Core.EncounteredError)
4475 {
4476 - Identifier rowId = id;
4476 + var access = id.Access;
4477 + var rowId = id.Id;
4478
4479 // If AssignToProperty is set, the DrLocator row created by
4480 // ParseFileSearchElement creates the directory entry to return
4481 // and the row created here is for the file search.
4482 if (assignToProperty)
4483 {
4483 - rowId = new Identifier(signature, AccessModifier.Private);
4484 + access = AccessModifier.Private;
4485 + rowId = signature;
4486
4487 // The property should be set to the directory search Id.
4488 signature = id.Id;
4489 }
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);
4493 row.Set(1, parentSignature);
4494 row.Set(2, path);
4495 if (CompilerConstants.IntegerNotSet != depth)
@@ -6053,13 +6056,14 @@ namespace WixToolset.Core
6056 {
6057 // Creates the DrLocator row for the directory search while
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));
6060 row.Set(0, parentSignature);
6058 - row.Set(1, id);
6061 + row.Set(1, id.Id);
6062 }
6063 else
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);
6067 row.Set(1, parentSignature);
6068 }
6069 }
@@ -7158,7 +7162,7 @@ namespace WixToolset.Core
7162 }
7163
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"));
7166 row.Set(0, "InstallExecuteSequence");
7167 row.Set(1, "RemoveExistingProducts");
7168 // row.Set(2, condition);
@@ -13486,7 +13490,7 @@ namespace WixToolset.Core
13490 }
13491 else
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));
13494 row.Set(0, sequenceTable);
13495 row.Set(1, actionName);
13496 row.Set(2, condition);
@@ -14526,8 +14530,7 @@ namespace WixToolset.Core
14530 // add the row and any references needed
14531 if (!this.Core.EncounteredError)
14532 {
14529 - var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CustomAction);
14530 - row.Set(0, actionName);
14533 + var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CustomAction, new Identifier(AccessModifier.Public, actionName));
14534 row.Set(1, MsiInterop.MsidbCustomActionTypeProperty | MsiInterop.MsidbCustomActionTypeTextData | extraBits);
14535 row.Set(2, id);
14536 row.Set(3, value);
@@ -14660,15 +14663,14 @@ namespace WixToolset.Core
14663 this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "After", afterAction));
14664 }
14665
14663 - var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CustomAction);
14664 - row.Set(0, actionName);
14666 + var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CustomAction, new Identifier(AccessModifier.Public, actionName));
14667 row.Set(1, MsiInterop.MsidbCustomActionTypeProperty | MsiInterop.MsidbCustomActionTypeTextData | extraBits);
14668 row.Set(2, id);
14669 row.Set(3, value);
14670
14671 foreach (string sequence in sequences)
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));
14674 sequenceRow.Set(0, sequence);
14675 sequenceRow.Set(1, actionName);
14676 sequenceRow.Set(2, condition);
src/test/TestData/Example.Extension/Example.Extension.csproj
-3
@@ -12,9 +12,6 @@
12 </ItemGroup>
13
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 -
15 <ProjectReference Include="$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj" Condition=" '$(Configuration)' == 'Debug' And 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') " />
17 </ItemGroup>