diff options
Diffstat (limited to 'src/WixToolset.Core/CommandLine/BuildCommand.cs')
| -rw-r--r-- | src/WixToolset.Core/CommandLine/BuildCommand.cs | 81 |
1 files changed, 44 insertions, 37 deletions
diff --git a/src/WixToolset.Core/CommandLine/BuildCommand.cs b/src/WixToolset.Core/CommandLine/BuildCommand.cs index 0868a3b6..a55fb55b 100644 --- a/src/WixToolset.Core/CommandLine/BuildCommand.cs +++ b/src/WixToolset.Core/CommandLine/BuildCommand.cs | |||
| @@ -294,47 +294,54 @@ namespace WixToolset.Core.CommandLine | |||
| 294 | return; | 294 | return; |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | IBindResult bindResult; | 297 | IBindResult bindResult = null; |
| 298 | try | ||
| 298 | { | 299 | { |
| 299 | var context = this.ServiceProvider.GetService<IBindContext>(); | 300 | { |
| 300 | //context.CabbingThreadCount = this.CabbingThreadCount; | 301 | var context = this.ServiceProvider.GetService<IBindContext>(); |
| 301 | context.BurnStubPath = burnStubPath; | 302 | //context.CabbingThreadCount = this.CabbingThreadCount; |
| 302 | context.CabCachePath = cabCachePath; | 303 | context.BurnStubPath = burnStubPath; |
| 303 | context.Codepage = resolveResult.Codepage; | 304 | context.CabCachePath = cabCachePath; |
| 304 | //context.DefaultCompressionLevel = this.DefaultCompressionLevel; | 305 | context.Codepage = resolveResult.Codepage; |
| 305 | context.DelayedFields = resolveResult.DelayedFields; | 306 | //context.DefaultCompressionLevel = this.DefaultCompressionLevel; |
| 306 | context.ExpectedEmbeddedFiles = resolveResult.ExpectedEmbeddedFiles; | 307 | context.DelayedFields = resolveResult.DelayedFields; |
| 307 | context.Extensions = this.ExtensionManager.GetServices<IBinderExtension>(); | 308 | context.ExpectedEmbeddedFiles = resolveResult.ExpectedEmbeddedFiles; |
| 308 | context.Ices = Array.Empty<string>(); // TODO: set this correctly | 309 | context.Extensions = this.ExtensionManager.GetServices<IBinderExtension>(); |
| 309 | context.IntermediateFolder = intermediateFolder; | 310 | context.Ices = Array.Empty<string>(); // TODO: set this correctly |
| 310 | context.IntermediateRepresentation = resolveResult.IntermediateRepresentation; | 311 | context.IntermediateFolder = intermediateFolder; |
| 311 | context.OutputPath = this.OutputFile; | 312 | context.IntermediateRepresentation = resolveResult.IntermediateRepresentation; |
| 312 | context.OutputPdbPath = Path.ChangeExtension(this.OutputFile, ".wixpdb"); | 313 | context.OutputPath = this.OutputFile; |
| 313 | context.SuppressIces = Array.Empty<string>(); // TODO: set this correctly | 314 | context.OutputPdbPath = Path.ChangeExtension(this.OutputFile, ".wixpdb"); |
| 314 | context.SuppressValidation = true; // TODO: set this correctly | 315 | context.SuppressIces = Array.Empty<string>(); // TODO: set this correctly |
| 315 | 316 | context.SuppressValidation = true; // TODO: set this correctly | |
| 316 | var binder = this.ServiceProvider.GetService<IBinder>(); | 317 | |
| 317 | bindResult = binder.Bind(context); | 318 | var binder = this.ServiceProvider.GetService<IBinder>(); |
| 318 | } | 319 | bindResult = binder.Bind(context); |
| 320 | } | ||
| 319 | 321 | ||
| 320 | if (this.Messaging.EncounteredError) | 322 | if (this.Messaging.EncounteredError) |
| 321 | { | 323 | { |
| 322 | return; | 324 | return; |
| 323 | } | 325 | } |
| 324 | 326 | ||
| 327 | { | ||
| 328 | var context = this.ServiceProvider.GetService<ILayoutContext>(); | ||
| 329 | context.Extensions = this.ExtensionManager.GetServices<ILayoutExtension>(); | ||
| 330 | context.TrackedFiles = bindResult.TrackedFiles; | ||
| 331 | context.FileTransfers = bindResult.FileTransfers; | ||
| 332 | context.IntermediateFolder = intermediateFolder; | ||
| 333 | context.ContentsFile = this.ContentsFile; | ||
| 334 | context.OutputsFile = this.OutputsFile; | ||
| 335 | context.BuiltOutputsFile = this.BuiltOutputsFile; | ||
| 336 | context.SuppressAclReset = false; // TODO: correctly set SuppressAclReset | ||
| 337 | |||
| 338 | var layout = this.ServiceProvider.GetService<ILayoutCreator>(); | ||
| 339 | layout.Layout(context); | ||
| 340 | } | ||
| 341 | } | ||
| 342 | finally | ||
| 325 | { | 343 | { |
| 326 | var context = this.ServiceProvider.GetService<ILayoutContext>(); | 344 | bindResult?.Dispose(); |
| 327 | context.Extensions = this.ExtensionManager.GetServices<ILayoutExtension>(); | ||
| 328 | context.TrackedFiles = bindResult.TrackedFiles; | ||
| 329 | context.FileTransfers = bindResult.FileTransfers; | ||
| 330 | context.IntermediateFolder = intermediateFolder; | ||
| 331 | context.ContentsFile = this.ContentsFile; | ||
| 332 | context.OutputsFile = this.OutputsFile; | ||
| 333 | context.BuiltOutputsFile = this.BuiltOutputsFile; | ||
| 334 | context.SuppressAclReset = false; // TODO: correctly set SuppressAclReset | ||
| 335 | |||
| 336 | var layout = this.ServiceProvider.GetService<ILayoutCreator>(); | ||
| 337 | layout.Layout(context); | ||
| 338 | } | 345 | } |
| 339 | } | 346 | } |
| 340 | 347 | ||
