diff options
author | Rob Mensching <rob@firegiant.com> | 2019-05-22 00:58:13 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2019-05-23 16:02:37 -0700 |
commit | d0462be8000f18aa7dc0791d02142f000bb19fbf (patch) | |
tree | 072aabc2bd9b8f171e17654473f85c44a8a42a66 /src/WixToolset.Core/Linker.cs | |
parent | 1ed894bc0f39397ec7f7f6344370fc2123420c43 (diff) | |
download | wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.tar.gz wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.tar.bz2 wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.zip |
Integrate latest changes to tuple definitions
Diffstat (limited to 'src/WixToolset.Core/Linker.cs')
-rw-r--r-- | src/WixToolset.Core/Linker.cs | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/WixToolset.Core/Linker.cs b/src/WixToolset.Core/Linker.cs index 13efe6c5..fa4c97b0 100644 --- a/src/WixToolset.Core/Linker.cs +++ b/src/WixToolset.Core/Linker.cs | |||
@@ -20,8 +20,8 @@ namespace WixToolset.Core | |||
20 | /// </summary> | 20 | /// </summary> |
21 | internal class Linker : ILinker | 21 | internal class Linker : ILinker |
22 | { | 22 | { |
23 | private static readonly char[] colonCharacter = ":".ToCharArray(); | 23 | private static readonly char[] ColonCharacter = new[] { ':' }; |
24 | private static readonly string emptyGuid = Guid.Empty.ToString("B"); | 24 | private static readonly string EmptyGuid = Guid.Empty.ToString("B"); |
25 | 25 | ||
26 | private readonly bool sectionIdOnRows; | 26 | private readonly bool sectionIdOnRows; |
27 | 27 | ||
@@ -428,21 +428,22 @@ namespace WixToolset.Core | |||
428 | // check for colliding values and collect the wix variable rows | 428 | // check for colliding values and collect the wix variable rows |
429 | { | 429 | { |
430 | var row = (WixVariableTuple)tuple; | 430 | var row = (WixVariableTuple)tuple; |
431 | var id = row.Id.Id; | ||
431 | 432 | ||
432 | if (wixVariables.TryGetValue(row.WixVariable, out var collidingRow)) | 433 | if (wixVariables.TryGetValue(id, out var collidingRow)) |
433 | { | 434 | { |
434 | if (collidingRow.Overridable && !row.Overridable) | 435 | if (collidingRow.Overridable && !row.Overridable) |
435 | { | 436 | { |
436 | wixVariables[row.WixVariable] = row; | 437 | wixVariables[id] = row; |
437 | } | 438 | } |
438 | else if (!row.Overridable || (collidingRow.Overridable && row.Overridable)) | 439 | else if (!row.Overridable || (collidingRow.Overridable && row.Overridable)) |
439 | { | 440 | { |
440 | this.OnMessage(ErrorMessages.WixVariableCollision(row.SourceLineNumbers, row.WixVariable)); | 441 | this.OnMessage(ErrorMessages.WixVariableCollision(row.SourceLineNumbers, id)); |
441 | } | 442 | } |
442 | } | 443 | } |
443 | else | 444 | else |
444 | { | 445 | { |
445 | wixVariables.Add(row.WixVariable, row); | 446 | wixVariables.Add(id, row); |
446 | } | 447 | } |
447 | } | 448 | } |
448 | 449 | ||
@@ -1609,14 +1610,14 @@ namespace WixToolset.Core | |||
1609 | var groups = new WixGroupingOrdering(entrySection, this.Messaging); | 1610 | var groups = new WixGroupingOrdering(entrySection, this.Messaging); |
1610 | 1611 | ||
1611 | // Create UX payloads and Package payloads | 1612 | // Create UX payloads and Package payloads |
1612 | groups.UseTypes(new string[] { "Container", "Layout", "PackageGroup", "PayloadGroup", "Package" }, new string[] { "PackageGroup", "Package", "PayloadGroup", "Payload" }); | 1613 | groups.UseTypes(new[] { ComplexReferenceParentType.Container, ComplexReferenceParentType.Layout, ComplexReferenceParentType.PackageGroup, ComplexReferenceParentType.PayloadGroup, ComplexReferenceParentType.Package }, new[] { ComplexReferenceChildType.PackageGroup, ComplexReferenceChildType.Package, ComplexReferenceChildType.PayloadGroup, ComplexReferenceChildType.Payload }); |
1613 | groups.FlattenAndRewriteGroups("Package", false); | 1614 | groups.FlattenAndRewriteGroups(ComplexReferenceParentType.Package, false); |
1614 | groups.FlattenAndRewriteGroups("Container", false); | 1615 | groups.FlattenAndRewriteGroups(ComplexReferenceParentType.Container, false); |
1615 | groups.FlattenAndRewriteGroups("Layout", false); | 1616 | groups.FlattenAndRewriteGroups(ComplexReferenceParentType.Layout, false); |
1616 | 1617 | ||
1617 | // Create Chain packages... | 1618 | // Create Chain packages... |
1618 | groups.UseTypes(new string[] { "PackageGroup" }, new string[] { "Package", "PackageGroup" }); | 1619 | groups.UseTypes(new[] { ComplexReferenceParentType.PackageGroup }, new[] { ComplexReferenceChildType.Package, ComplexReferenceChildType.PackageGroup }); |
1619 | groups.FlattenAndRewriteRows("PackageGroup", "WixChain", false); | 1620 | groups.FlattenAndRewriteRows(ComplexReferenceChildType.PackageGroup, "WixChain", false); |
1620 | 1621 | ||
1621 | groups.RemoveUsedGroupRows(); | 1622 | groups.RemoveUsedGroupRows(); |
1622 | } | 1623 | } |
@@ -1702,7 +1703,7 @@ namespace WixToolset.Core | |||
1702 | var connectionId = row.AsString(connectionColumn); | 1703 | var connectionId = row.AsString(connectionColumn); |
1703 | var featureId = row.AsString(featureColumn); | 1704 | var featureId = row.AsString(featureColumn); |
1704 | 1705 | ||
1705 | if (emptyGuid == featureId) | 1706 | if (EmptyGuid == featureId) |
1706 | { | 1707 | { |
1707 | var connection = connectToFeatures[connectionId]; | 1708 | var connection = connectToFeatures[connectionId]; |
1708 | 1709 | ||