aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.Burn
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core.Burn')
-rw-r--r--src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs5
-rw-r--r--src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs18
-rw-r--r--src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj1
3 files changed, 6 insertions, 18 deletions
diff --git a/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs b/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
index 192e479b..733996c0 100644
--- a/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
+++ b/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
@@ -31,7 +31,6 @@ namespace WixToolset.Core.Burn
31 31
32 this.BackendHelper = context.ServiceProvider.GetService<IBackendHelper>(); 32 this.BackendHelper = context.ServiceProvider.GetService<IBackendHelper>();
33 33
34 this.BurnStubPath = context.BurnStubPath;
35 this.DefaultCompressionLevel = context.DefaultCompressionLevel; 34 this.DefaultCompressionLevel = context.DefaultCompressionLevel;
36 this.DelayedFields = context.DelayedFields; 35 this.DelayedFields = context.DelayedFields;
37 this.ExpectedEmbeddedFiles = context.ExpectedEmbeddedFiles; 36 this.ExpectedEmbeddedFiles = context.ExpectedEmbeddedFiles;
@@ -50,8 +49,6 @@ namespace WixToolset.Core.Burn
50 49
51 private IBackendHelper BackendHelper { get; } 50 private IBackendHelper BackendHelper { get; }
52 51
53 private string BurnStubPath { get; }
54
55 private CompressionLevel? DefaultCompressionLevel { get; } 52 private CompressionLevel? DefaultCompressionLevel { get; }
56 53
57 public IEnumerable<IDelayedField> DelayedFields { get; } 54 public IEnumerable<IDelayedField> DelayedFields { get; }
@@ -453,7 +450,7 @@ namespace WixToolset.Core.Burn
453 } 450 }
454 451
455 { 452 {
456 var command = new CreateBundleExeCommand(this.Messaging, this.BackendHelper, this.IntermediateFolder, this.OutputPath, bundleTuple, uxContainer, containers, this.BurnStubPath); 453 var command = new CreateBundleExeCommand(this.Messaging, this.BackendHelper, this.IntermediateFolder, this.OutputPath, bundleTuple, uxContainer, containers);
457 command.Execute(); 454 command.Execute();
458 455
459 fileTransfers.Add(command.Transfer); 456 fileTransfers.Add(command.Transfer);
diff --git a/src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs b/src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs
index 53636509..03102d5e 100644
--- a/src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs
+++ b/src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs
@@ -14,7 +14,7 @@ namespace WixToolset.Core.Burn.Bundles
14 14
15 internal class CreateBundleExeCommand 15 internal class CreateBundleExeCommand
16 { 16 {
17 public CreateBundleExeCommand(IMessaging messaging, IBackendHelper backendHelper, string intermediateFolder, string outputPath, WixBundleTuple bundleTuple, WixBundleContainerTuple uxContainer, IEnumerable<WixBundleContainerTuple> containers, string burnStubPath) 17 public CreateBundleExeCommand(IMessaging messaging, IBackendHelper backendHelper, string intermediateFolder, string outputPath, WixBundleTuple bundleTuple, WixBundleContainerTuple uxContainer, IEnumerable<WixBundleContainerTuple> containers)
18 { 18 {
19 this.Messaging = messaging; 19 this.Messaging = messaging;
20 this.BackendHelper = backendHelper; 20 this.BackendHelper = backendHelper;
@@ -23,7 +23,6 @@ namespace WixToolset.Core.Burn.Bundles
23 this.BundleTuple = bundleTuple; 23 this.BundleTuple = bundleTuple;
24 this.UXContainer = uxContainer; 24 this.UXContainer = uxContainer;
25 this.Containers = containers; 25 this.Containers = containers;
26 this.BurnStubPath = burnStubPath;
27 } 26 }
28 27
29 public IFileTransfer Transfer { get; private set; } 28 public IFileTransfer Transfer { get; private set; }
@@ -42,23 +41,14 @@ namespace WixToolset.Core.Burn.Bundles
42 41
43 private IEnumerable<WixBundleContainerTuple> Containers { get; } 42 private IEnumerable<WixBundleContainerTuple> Containers { get; }
44 43
45 private string BurnStubPath { get; }
46
47 public void Execute() 44 public void Execute()
48 { 45 {
49 var bundleFilename = Path.GetFileName(this.OutputPath); 46 var bundleFilename = Path.GetFileName(this.OutputPath);
50 47
51 // Copy the burn.exe to a writable location then mark it to be moved to its final build location. Note 48 // Copy the burn.exe to a writable location then mark it to be moved to its final build location.
52 // that today, the x64 Burn uses the x86 stub.
53
54 var stubFile = this.BurnStubPath;
55 49
56 if (String.IsNullOrEmpty(stubFile)) 50 var stubPlatform = this.BundleTuple.Platform.ToString();
57 { 51 var stubFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), stubPlatform, "burn.exe");
58 var stubPlatform = (Platform.X64 == this.BundleTuple.Platform) ? "x86" : this.BundleTuple.Platform.ToString();
59
60 stubFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), stubPlatform, "burn.exe");
61 }
62 52
63 var bundleTempPath = Path.Combine(this.IntermediateFolder, bundleFilename); 53 var bundleTempPath = Path.Combine(this.IntermediateFolder, bundleFilename);
64 54
diff --git a/src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj b/src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj
index 786db9be..d42094ae 100644
--- a/src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj
+++ b/src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj
@@ -22,6 +22,7 @@
22 22
23 <ItemGroup> 23 <ItemGroup>
24 <PackageReference Include="System.Security.Permissions" Version="4.6.0" /> 24 <PackageReference Include="System.Security.Permissions" Version="4.6.0" />
25 <PackageReference Include="WixToolset.Burn" Version="4.0.*" />
25 <PackageReference Include="WixToolset.Core.Native" Version="4.0.*" /> 26 <PackageReference Include="WixToolset.Core.Native" Version="4.0.*" />
26 <PackageReference Include="WixToolset.Dtf.Resources" Version="4.0.*" NoWarn="NU1701" /> 27 <PackageReference Include="WixToolset.Dtf.Resources" Version="4.0.*" NoWarn="NU1701" />
27 <PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="4.0.*" NoWarn="NU1701" /> 28 <PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="4.0.*" NoWarn="NU1701" />