aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-03-14 07:38:48 -0700
committerRob Mensching <rob@firegiant.com>2021-03-14 07:47:48 -0700
commit3ccd5e439da4296d6f2b66ce47075ab20d039676 (patch)
treeb5546552613b869367d09f444492a0bbcfadcfe0 /src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
parent574785ab1421c9b67336c13ade5c2263e665ca07 (diff)
downloadwix-3ccd5e439da4296d6f2b66ce47075ab20d039676.tar.gz
wix-3ccd5e439da4296d6f2b66ce47075ab20d039676.tar.bz2
wix-3ccd5e439da4296d6f2b66ce47075ab20d039676.zip
Minimize public surface area of Core
Fixes wixtoolset/issues#6374
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
index 292f1572..b6244a6e 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
@@ -6,7 +6,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using System.IO; 7 using System.IO;
8 using System.Linq; 8 using System.Linq;
9 using WixToolset.Core.Bind;
10 using WixToolset.Data; 9 using WixToolset.Data;
11 using WixToolset.Data.Symbols; 10 using WixToolset.Data.Symbols;
12 using WixToolset.Data.WindowsInstaller; 11 using WixToolset.Data.WindowsInstaller;
@@ -133,7 +132,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind
133 Platform platform; 132 Platform platform;
134 string modularizationSuffix; 133 string modularizationSuffix;
135 { 134 {
136 var command = new BindSummaryInfoCommand(section); 135 var branding = this.ServiceProvider.GetService<IWixBranding>();
136
137 var command = new BindSummaryInfoCommand(section, this.WindowsInstallerBackendHelper, branding);
137 command.Execute(); 138 command.Execute();
138 139
139 compressed = command.Compressed; 140 compressed = command.Compressed;
@@ -151,7 +152,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
151 // Set the ProductCode if it is to be generated. 152 // Set the ProductCode if it is to be generated.
152 if ("ProductCode".Equals(propertyRow.Id.Id, StringComparison.Ordinal) && "*".Equals(propertyRow.Value, StringComparison.Ordinal)) 153 if ("ProductCode".Equals(propertyRow.Id.Id, StringComparison.Ordinal) && "*".Equals(propertyRow.Value, StringComparison.Ordinal))
153 { 154 {
154 propertyRow.Value = Common.GenerateGuid(); 155 propertyRow.Value = this.WindowsInstallerBackendHelper.CreateGuid();
155 156
156#if TODO_PATCHING // Is this still necessary? 157#if TODO_PATCHING // Is this still necessary?
157 158
@@ -235,24 +236,23 @@ namespace WixToolset.Core.WindowsInstaller.Bind
235 236
236 // Extract files that come from binary .wixlibs and WixExtensions (this does not extract files from merge modules). 237 // Extract files that come from binary .wixlibs and WixExtensions (this does not extract files from merge modules).
237 { 238 {
238 var command = new ExtractEmbeddedFilesCommand(this.WindowsInstallerBackendHelper, this.ExpectedEmbeddedFiles); 239 var extractedFiles = this.WindowsInstallerBackendHelper.ExtractEmbeddedFiles(this.ExpectedEmbeddedFiles);
239 command.Execute();
240 240
241 trackedFiles.AddRange(command.TrackedFiles); 241 trackedFiles.AddRange(extractedFiles);
242 } 242 }
243 243
244 // This must occur after all variables and source paths have been resolved. 244 // This must occur after all variables and source paths have been resolved.
245 List<FileFacade> fileFacades; 245 List<IFileFacade> fileFacades;
246 if (SectionType.Patch == section.Type) 246 if (SectionType.Patch == section.Type)
247 { 247 {
248 var command = new GetFileFacadesFromTransforms(this.Messaging, this.FileSystemManager, this.SubStorages); 248 var command = new GetFileFacadesFromTransforms(this.Messaging, this.WindowsInstallerBackendHelper, this.FileSystemManager, this.SubStorages);
249 command.Execute(); 249 command.Execute();
250 250
251 fileFacades = command.FileFacades; 251 fileFacades = command.FileFacades;
252 } 252 }
253 else 253 else
254 { 254 {
255 var command = new GetFileFacadesCommand(section); 255 var command = new GetFileFacadesCommand(section, this.WindowsInstallerBackendHelper);
256 command.Execute(); 256 command.Execute();
257 257
258 fileFacades = command.FileFacades; 258 fileFacades = command.FileFacades;
@@ -267,7 +267,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
267 { 267 {
268 containsMergeModules = true; 268 containsMergeModules = true;
269 269
270 var command = new ExtractMergeModuleFilesCommand(this.Messaging, wixMergeSymbols, fileFacades, installerVersion, this.IntermediateFolder, this.SuppressLayout); 270 var command = new ExtractMergeModuleFilesCommand(this.Messaging, this.WindowsInstallerBackendHelper, wixMergeSymbols, fileFacades, installerVersion, this.IntermediateFolder, this.SuppressLayout);
271 command.Execute(); 271 command.Execute();
272 272
273 fileFacades.AddRange(command.MergeModulesFileFacades); 273 fileFacades.AddRange(command.MergeModulesFileFacades);
@@ -307,8 +307,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
307 // Now that the variable cache is populated, resolve any delayed fields. 307 // Now that the variable cache is populated, resolve any delayed fields.
308 if (this.DelayedFields.Any()) 308 if (this.DelayedFields.Any())
309 { 309 {
310 var command = new ResolveDelayedFieldsCommand(this.Messaging, this.DelayedFields, variableCache); 310 this.WindowsInstallerBackendHelper.ResolveDelayedFields(this.DelayedFields, variableCache);
311 command.Execute();
312 } 311 }
313 312
314 // Update symbols that reference text files on disk. 313 // Update symbols that reference text files on disk.
@@ -330,7 +329,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
330 329
331 if (dependencyRefs.Any()) 330 if (dependencyRefs.Any())
332 { 331 {
333 var command = new ProcessDependencyReferencesCommand(section, dependencyRefs); 332 var command = new ProcessDependencyReferencesCommand(this.WindowsInstallerBackendHelper, section, dependencyRefs);
334 command.Execute(); 333 command.Execute();
335 } 334 }
336 } 335 }
@@ -379,8 +378,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
379 } 378 }
380 379
381 // Assign files to media and update file sequences. 380 // Assign files to media and update file sequences.
382 Dictionary<MediaSymbol, IEnumerable<FileFacade>> filesByCabinetMedia; 381 Dictionary<MediaSymbol, IEnumerable<IFileFacade>> filesByCabinetMedia;
383 IEnumerable<FileFacade> uncompressedFiles; 382 IEnumerable<IFileFacade> uncompressedFiles;
384 { 383 {
385 var order = new OptimizeFileFacadesOrderCommand(this.WindowsInstallerBackendHelper, this.PathResolver, section, platform, fileFacades); 384 var order = new OptimizeFileFacadesOrderCommand(this.WindowsInstallerBackendHelper, this.PathResolver, section, platform, fileFacades);
386 order.Execute(); 385 order.Execute();
@@ -414,7 +413,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
414 if (data.Type == OutputType.Module) 413 if (data.Type == OutputType.Module)
415 { 414 {
416 // Modularize identifiers. 415 // Modularize identifiers.
417 var modularize = new ModularizeCommand(data, modularizationSuffix, section.Symbols.OfType<WixSuppressModularizationSymbol>()); 416 var modularize = new ModularizeCommand(this.WindowsInstallerBackendHelper, data, modularizationSuffix, section.Symbols.OfType<WixSuppressModularizationSymbol>());
418 modularize.Execute(); 417 modularize.Execute();
419 418
420 // Ensure all sequence tables in place because, mergemod.dll requires them. 419 // Ensure all sequence tables in place because, mergemod.dll requires them.