aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/CalculateComponentGuids.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2019-05-22 00:58:13 -0700
committerRob Mensching <rob@firegiant.com>2019-05-23 16:02:37 -0700
commitd0462be8000f18aa7dc0791d02142f000bb19fbf (patch)
tree072aabc2bd9b8f171e17654473f85c44a8a42a66 /src/WixToolset.Core.WindowsInstaller/Bind/CalculateComponentGuids.cs
parent1ed894bc0f39397ec7f7f6344370fc2123420c43 (diff)
downloadwix-d0462be8000f18aa7dc0791d02142f000bb19fbf.tar.gz
wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.tar.bz2
wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.zip
Integrate latest changes to tuple definitions
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/CalculateComponentGuids.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/CalculateComponentGuids.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CalculateComponentGuids.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CalculateComponentGuids.cs
index a773519a..414984de 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/CalculateComponentGuids.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/CalculateComponentGuids.cs
@@ -81,25 +81,25 @@ namespace WixToolset.Core.WindowsInstaller.Bind
81 // If the directory Id already exists, we will skip it here since 81 // If the directory Id already exists, we will skip it here since
82 // checking for duplicate primary keys is done later when importing tables 82 // checking for duplicate primary keys is done later when importing tables
83 // into database 83 // into database
84 if (targetPathsByDirectoryId.ContainsKey(row.Directory)) 84 if (targetPathsByDirectoryId.ContainsKey(row.Id.Id))
85 { 85 {
86 continue; 86 continue;
87 } 87 }
88 88
89 var targetName = Common.GetName(row.DefaultDir, false, true); 89 var targetName = Common.GetName(row.DefaultDir, false, true);
90 targetPathsByDirectoryId.Add(row.Directory, new ResolvedDirectory(row.Directory_Parent, targetName)); 90 targetPathsByDirectoryId.Add(row.Id.Id, new ResolvedDirectory(row.Directory_Parent, targetName));
91 } 91 }
92 } 92 }
93 93
94 // If the component id generation seeds have not been indexed 94 // If the component id generation seeds have not been indexed
95 // from the WixDirectory table do that now. 95 // from the Directory tuples do that now.
96 if (componentIdGenSeeds is null) 96 if (componentIdGenSeeds is null)
97 { 97 {
98 // If there are any WixDirectory rows, build up the Component Guid 98 // If there are any Directory tuples, build up the Component Guid
99 // generation seeds indexed by Directory/@Id. 99 // generation seeds indexed by Directory/@Id.
100 componentIdGenSeeds = this.Section.Tuples.OfType<WixDirectoryTuple>() 100 componentIdGenSeeds = this.Section.Tuples.OfType<DirectoryTuple>()
101 .Where(t => !String.IsNullOrEmpty(t.ComponentGuidGenerationSeed)) 101 .Where(t => !String.IsNullOrEmpty(t.ComponentGuidGenerationSeed))
102 .ToDictionary(t => t.Directory_, t => t.ComponentGuidGenerationSeed); 102 .ToDictionary(t => t.Id.Id, t => t.ComponentGuidGenerationSeed);
103 } 103 }
104 104
105 // if the file rows have not been indexed by File.Component yet 105 // if the file rows have not been indexed by File.Component yet
@@ -123,13 +123,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind
123 } 123 }
124 124
125 // validate component meets all the conditions to have a generated guid 125 // validate component meets all the conditions to have a generated guid
126 var currentComponentFiles = filesByComponentId[componentTuple.Component]; 126 var currentComponentFiles = filesByComponentId[componentTuple.Id.Id];
127 var numFilesInComponent = currentComponentFiles.Count; 127 var numFilesInComponent = currentComponentFiles.Count;
128 string path = null; 128 string path = null;
129 129
130 foreach (var fileRow in currentComponentFiles) 130 foreach (var fileRow in currentComponentFiles)
131 { 131 {
132 if (fileRow.File == componentTuple.KeyPath) 132 if (fileRow.Id.Id == componentTuple.KeyPath)
133 { 133 {
134 // calculate the key file's canonical target path 134 // calculate the key file's canonical target path
135 string directoryPath = PathResolver.GetDirectoryPath(targetPathsByDirectoryId, componentIdGenSeeds, componentTuple.Directory_, true); 135 string directoryPath = PathResolver.GetDirectoryPath(targetPathsByDirectoryId, componentIdGenSeeds, componentTuple.Directory_, true);