From a75639ceaffcf5f56fa33094037bca86331d9ac0 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 10 May 2020 09:07:42 +1000 Subject: Use WixToolset.Burn package to get rid of -burnStubPath. Stop using x86 stub for x64. --- src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs | 5 +---- .../Bundles/CreateBundleExeCommand.cs | 18 ++++-------------- src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj | 1 + 3 files changed, 6 insertions(+), 18 deletions(-) (limited to 'src/WixToolset.Core.Burn') 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 this.BackendHelper = context.ServiceProvider.GetService(); - this.BurnStubPath = context.BurnStubPath; this.DefaultCompressionLevel = context.DefaultCompressionLevel; this.DelayedFields = context.DelayedFields; this.ExpectedEmbeddedFiles = context.ExpectedEmbeddedFiles; @@ -50,8 +49,6 @@ namespace WixToolset.Core.Burn private IBackendHelper BackendHelper { get; } - private string BurnStubPath { get; } - private CompressionLevel? DefaultCompressionLevel { get; } public IEnumerable DelayedFields { get; } @@ -453,7 +450,7 @@ namespace WixToolset.Core.Burn } { - var command = new CreateBundleExeCommand(this.Messaging, this.BackendHelper, this.IntermediateFolder, this.OutputPath, bundleTuple, uxContainer, containers, this.BurnStubPath); + var command = new CreateBundleExeCommand(this.Messaging, this.BackendHelper, this.IntermediateFolder, this.OutputPath, bundleTuple, uxContainer, containers); command.Execute(); 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 internal class CreateBundleExeCommand { - public CreateBundleExeCommand(IMessaging messaging, IBackendHelper backendHelper, string intermediateFolder, string outputPath, WixBundleTuple bundleTuple, WixBundleContainerTuple uxContainer, IEnumerable containers, string burnStubPath) + public CreateBundleExeCommand(IMessaging messaging, IBackendHelper backendHelper, string intermediateFolder, string outputPath, WixBundleTuple bundleTuple, WixBundleContainerTuple uxContainer, IEnumerable containers) { this.Messaging = messaging; this.BackendHelper = backendHelper; @@ -23,7 +23,6 @@ namespace WixToolset.Core.Burn.Bundles this.BundleTuple = bundleTuple; this.UXContainer = uxContainer; this.Containers = containers; - this.BurnStubPath = burnStubPath; } public IFileTransfer Transfer { get; private set; } @@ -42,23 +41,14 @@ namespace WixToolset.Core.Burn.Bundles private IEnumerable Containers { get; } - private string BurnStubPath { get; } - public void Execute() { var bundleFilename = Path.GetFileName(this.OutputPath); - // Copy the burn.exe to a writable location then mark it to be moved to its final build location. Note - // that today, the x64 Burn uses the x86 stub. - - var stubFile = this.BurnStubPath; + // Copy the burn.exe to a writable location then mark it to be moved to its final build location. - if (String.IsNullOrEmpty(stubFile)) - { - var stubPlatform = (Platform.X64 == this.BundleTuple.Platform) ? "x86" : this.BundleTuple.Platform.ToString(); - - stubFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), stubPlatform, "burn.exe"); - } + var stubPlatform = this.BundleTuple.Platform.ToString(); + var stubFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), stubPlatform, "burn.exe"); var bundleTempPath = Path.Combine(this.IntermediateFolder, bundleFilename); 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 @@ + -- cgit v1.2.3-55-g6feb