aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs46
1 files changed, 31 insertions, 15 deletions
diff --git a/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs b/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
index 989a1b65..af129998 100644
--- a/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
+++ b/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
@@ -74,6 +74,8 @@ namespace WixToolset.Core.Burn
74 74
75 public IEnumerable<ITrackedFile> TrackedFiles { get; private set; } 75 public IEnumerable<ITrackedFile> TrackedFiles { get; private set; }
76 76
77 public WixOutput Wixout { get; private set; }
78
77 public void Execute() 79 public void Execute()
78 { 80 {
79 var section = this.Output.Sections.Single(); 81 var section = this.Output.Sections.Single();
@@ -381,21 +383,25 @@ namespace WixToolset.Core.Burn
381 this.ResolveBundleInstallScope(section, bundleTuple, orderedFacades); 383 this.ResolveBundleInstallScope(section, bundleTuple, orderedFacades);
382 384
383 // Generate the core-defined BA manifest tables... 385 // Generate the core-defined BA manifest tables...
386 string baManifestPath;
384 { 387 {
385 var command = new CreateBootstrapperApplicationManifestCommand(section, bundleTuple, orderedFacades, uxPayloadIndex, payloadTuples, this.IntermediateFolder); 388 var command = new CreateBootstrapperApplicationManifestCommand(section, bundleTuple, orderedFacades, uxPayloadIndex, payloadTuples, this.IntermediateFolder);
386 command.Execute(); 389 command.Execute();
387 390
388 var baManifestPayload = command.BootstrapperApplicationManifestPayloadRow; 391 var baManifestPayload = command.BootstrapperApplicationManifestPayloadRow;
392 baManifestPath = command.OutputPath;
389 payloadTuples.Add(baManifestPayload.Id.Id, baManifestPayload); 393 payloadTuples.Add(baManifestPayload.Id.Id, baManifestPayload);
390 ++uxPayloadIndex; 394 ++uxPayloadIndex;
391 } 395 }
392 396
393 // Generate the bundle extension manifest... 397 // Generate the bundle extension manifest...
398 string bextManifestPath;
394 { 399 {
395 var command = new CreateBundleExtensionManifestCommand(section, bundleTuple, extensionSearchTuplesById, uxPayloadIndex, this.IntermediateFolder); 400 var command = new CreateBundleExtensionManifestCommand(section, bundleTuple, extensionSearchTuplesById, uxPayloadIndex, this.IntermediateFolder);
396 command.Execute(); 401 command.Execute();
397 402
398 var bextManifestPayload = command.BundleExtensionManifestPayloadRow; 403 var bextManifestPayload = command.BundleExtensionManifestPayloadRow;
404 bextManifestPath = command.OutputPath;
399 payloadTuples.Add(bextManifestPayload.Id.Id, bextManifestPayload); 405 payloadTuples.Add(bextManifestPayload.Id.Id, bextManifestPayload);
400 ++uxPayloadIndex; 406 ++uxPayloadIndex;
401 } 407 }
@@ -450,29 +456,39 @@ namespace WixToolset.Core.Burn
450 fileTransfers.Add(command.Transfer); 456 fileTransfers.Add(command.Transfer);
451 } 457 }
452 458
453#if TODO 459#if TODO // does this need to come back, or do they only need to be in TrackedFiles?
454 this.Pdb = new Pdb { Output = output }; 460 this.ContentFilePaths = payloadTuples.Values.Where(p => p.ContentFile).Select(p => p.FullFileName).ToList();
461#endif
462 this.FileTransfers = fileTransfers;
463 this.TrackedFiles = trackedFiles;
464 this.Wixout = this.CreateWixout(trackedFiles, this.Output, manifestPath, baManifestPath, bextManifestPath);
465 }
466
467 private WixOutput CreateWixout(List<ITrackedFile> trackedFiles, Intermediate intermediate, string manifestPath, string baDataPath, string bextDataPath)
468 {
469 WixOutput wixout;
455 470
456 if (!String.IsNullOrEmpty(this.OutputPdbPath)) 471 if (String.IsNullOrEmpty(this.OutputPdbPath))
472 {
473 wixout = WixOutput.Create();
474 }
475 else
457 { 476 {
458 var trackPdb = this.BackendHelper.TrackFile(this.OutputPdbPath, TrackedFileType.Final); 477 var trackPdb = this.BackendHelper.TrackFile(this.OutputPdbPath, TrackedFileType.Final);
459 trackedFiles.Add(trackPdb); 478 trackedFiles.Add(trackPdb);
460 479
461 this.Pdb.Save(trackPdb.Path); 480 wixout = WixOutput.Create(trackPdb.Path);
462 } 481 }
463#endif
464 482
465#if TODO // does this need to come back, or do they only need to be in TrackedFiles? 483 intermediate.Save(wixout);
466 this.ContentFilePaths = payloadTuples.Values.Where(p => p.ContentFile).Select(p => p.FullFileName).ToList(); 484
467#endif 485 wixout.ImportDataStream(BurnConstants.BurnManifestWixOutputStreamName, manifestPath);
468 this.FileTransfers = fileTransfers; 486 wixout.ImportDataStream(BurnConstants.BootstrapperApplicationDataWixOutputStreamName, baDataPath);
469 this.TrackedFiles = trackedFiles; 487 wixout.ImportDataStream(BurnConstants.BundleExtensionDataWixOutputStreamName, bextDataPath);
488
489 wixout.Reopen();
470 490
471 // TODO: Eventually this gets removed 491 return wixout;
472 var intermediate = new Intermediate(this.Output.Id, new[] { section }, this.Output.Localizations.ToDictionary(l => l.Culture, StringComparer.OrdinalIgnoreCase));
473 var trackIntermediate = this.BackendHelper.TrackFile(Path.Combine(this.IntermediateFolder, Path.GetFileName(Path.ChangeExtension(this.OutputPath, "wir"))), TrackedFileType.Intermediate);
474 intermediate.Save(trackIntermediate.Path);
475 trackedFiles.Add(trackIntermediate);
476 } 492 }
477 493
478 /// <summary> 494 /// <summary>