Use WixToolset.Burn package to get rid of -burnStubPath. Stop using x86 stub for x64.
Use WixToolset.Burn package to get rid of -burnStubPath. Stop using x86 stub for x64.
Sean Hall committed
May 10, 2020 at 09:07 UTC
a75639ceaffcf5f56fa33094037bca86331d9ac0
8 files changed
+9
-44
nuget.config
+1
@@ -2,6 +2,7 @@
2
<configuration>
3
<packageSources>
4
<clear />
5
+ <add key="wixtoolset-burn" value="https://ci.appveyor.com/nuget/wixtoolset-burn" />
6
<add key="wixtoolset-core-native" value="https://ci.appveyor.com/nuget/wixtoolset-core-native" />
7
<add key="wixtoolset-data" value="https://ci.appveyor.com/nuget/wixtoolset-data" />
8
<add key="wixtoolset-dtf" value="https://ci.appveyor.com/nuget/wixtoolset-dtf" />
src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
+1
-4
@@ -31,7 +31,6 @@ namespace WixToolset.Core.Burn
31
32
this.BackendHelper = context.ServiceProvider.GetService<IBackendHelper>();
33
34
- this.BurnStubPath = context.BurnStubPath;
34
this.DefaultCompressionLevel = context.DefaultCompressionLevel;
35
this.DelayedFields = context.DelayedFields;
36
this.ExpectedEmbeddedFiles = context.ExpectedEmbeddedFiles;
@@ -50,8 +49,6 @@ namespace WixToolset.Core.Burn
49
50
private IBackendHelper BackendHelper { get; }
51
53
- private string BurnStubPath { get; }
54
-
52
private CompressionLevel? DefaultCompressionLevel { get; }
53
54
public IEnumerable<IDelayedField> DelayedFields { get; }
@@ -453,7 +450,7 @@ namespace WixToolset.Core.Burn
450
}
451
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);
454
command.Execute();
455
456
fileTransfers.Add(command.Transfer);
src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs
+4
-14
@@ -14,7 +14,7 @@ namespace WixToolset.Core.Burn.Bundles
14
15
internal class CreateBundleExeCommand
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
{
19
this.Messaging = messaging;
20
this.BackendHelper = backendHelper;
@@ -23,7 +23,6 @@ namespace WixToolset.Core.Burn.Bundles
23
this.BundleTuple = bundleTuple;
24
this.UXContainer = uxContainer;
25
this.Containers = containers;
26
- this.BurnStubPath = burnStubPath;
26
}
27
28
public IFileTransfer Transfer { get; private set; }
@@ -42,23 +41,14 @@ namespace WixToolset.Core.Burn.Bundles
41
42
private IEnumerable<WixBundleContainerTuple> Containers { get; }
43
45
- private string BurnStubPath { get; }
46
-
44
public void Execute()
45
{
46
var bundleFilename = Path.GetFileName(this.OutputPath);
47
51
- // Copy the burn.exe to a writable location then mark it to be moved to its final build location. Note
52
- // that today, the x64 Burn uses the x86 stub.
53
-
54
- var stubFile = this.BurnStubPath;
48
+ // Copy the burn.exe to a writable location then mark it to be moved to its final build location.
49
56
- if (String.IsNullOrEmpty(stubFile))
57
- {
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
- }
50
+ var stubPlatform = this.BundleTuple.Platform.ToString();
51
+ var stubFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), stubPlatform, "burn.exe");
52
53
var bundleTempPath = Path.Combine(this.IntermediateFolder, bundleFilename);
54
src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj
+1
@@ -22,6 +22,7 @@
22
23
<ItemGroup>
24
<PackageReference Include="System.Security.Permissions" Version="4.6.0" />
25
+ <PackageReference Include="WixToolset.Burn" Version="4.0.*" />
26
<PackageReference Include="WixToolset.Core.Native" Version="4.0.*" />
27
<PackageReference Include="WixToolset.Dtf.Resources" Version="4.0.*" NoWarn="NU1701" />
28
<PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="4.0.*" NoWarn="NU1701" />
src/WixToolset.Core/CommandLine/BuildCommand.cs
+2
-8
@@ -157,7 +157,7 @@ namespace WixToolset.Core.CommandLine
157
{
158
using (new IntermediateFieldContext("wix.bind"))
159
{
160
- this.BindPhase(wixipl, wxls, filterCultures, this.commandLine.CabCachePath, this.commandLine.BindPaths, this.commandLine.BurnStubPath);
160
+ this.BindPhase(wixipl, wxls, filterCultures, this.commandLine.CabCachePath, this.commandLine.BindPaths);
161
}
162
}
163
}
@@ -294,7 +294,7 @@ namespace WixToolset.Core.CommandLine
294
return linker.Link(context);
295
}
296
297
- private void BindPhase(Intermediate output, IEnumerable<Localization> localizations, IEnumerable<string> filterCultures, string cabCachePath, IEnumerable<IBindPath> bindPaths, string burnStubPath)
297
+ private void BindPhase(Intermediate output, IEnumerable<Localization> localizations, IEnumerable<string> filterCultures, string cabCachePath, IEnumerable<IBindPath> bindPaths)
298
{
299
var intermediateFolder = this.IntermediateFolder;
300
if (String.IsNullOrEmpty(intermediateFolder))
@@ -328,7 +328,6 @@ namespace WixToolset.Core.CommandLine
328
{
329
var context = this.ServiceProvider.GetService<IBindContext>();
330
//context.CabbingThreadCount = this.CabbingThreadCount;
331
- context.BurnStubPath = burnStubPath;
331
context.CabCachePath = cabCachePath;
332
context.Codepage = resolveResult.Codepage;
333
//context.DefaultCompressionLevel = this.DefaultCompressionLevel;
@@ -491,8 +490,6 @@ namespace WixToolset.Core.CommandLine
490
491
public List<IBindPath> BindPaths { get; } = new List<IBindPath>();
492
494
- public string BurnStubPath { get; private set; }
495
-
493
public string CabCachePath { get; private set; }
494
495
public List<string> Cultures { get; } = new List<string>();
@@ -579,9 +576,6 @@ namespace WixToolset.Core.CommandLine
576
}
577
break;
578
}
582
- case "burnstub":
583
- this.BurnStubPath = parser.GetNextArgumentOrError(arg);
584
- return true;
579
580
case "cc":
581
this.CabCachePath = parser.GetNextArgumentOrError(arg);
src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
-10
@@ -19,7 +19,6 @@ namespace WixToolsetTest.CoreIntegration
19
[Fact]
20
public void CanBuildMultiFileBundle()
21
{
22
- var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
22
var folder = TestData.Get(@"TestData\SimpleBundle");
23
24
using (var fs = new DisposableFileSystem())
@@ -35,7 +34,6 @@ namespace WixToolsetTest.CoreIntegration
34
"-loc", Path.Combine(folder, "Bundle.en-us.wxl"),
35
"-bindpath", Path.Combine(folder, "data"),
36
"-intermediateFolder", intermediateFolder,
38
- "-burnStub", burnStubPath,
37
"-o", Path.Combine(baseFolder, @"bin\test.exe")
38
});
39
@@ -49,7 +47,6 @@ namespace WixToolsetTest.CoreIntegration
47
[Fact]
48
public void CanBuildSimpleBundle()
49
{
52
- var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
50
var folder = TestData.Get(@"TestData\SimpleBundle");
51
52
using (var fs = new DisposableFileSystem())
@@ -68,7 +65,6 @@ namespace WixToolsetTest.CoreIntegration
65
"-loc", Path.Combine(folder, "Bundle.en-us.wxl"),
66
"-bindpath", Path.Combine(folder, "data"),
67
"-intermediateFolder", intermediateFolder,
71
- "-burnStub", burnStubPath,
68
"-o", exePath,
69
});
70
@@ -113,7 +109,6 @@ namespace WixToolsetTest.CoreIntegration
109
[Fact]
110
public void CanBuildSimpleBundleUsingExtensionBA()
111
{
116
- var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
112
var extensionPath = Path.GetFullPath(new Uri(typeof(ExampleExtensionFactory).Assembly.CodeBase).LocalPath);
113
var folder = TestData.Get(@"TestData\SimpleBundle");
114
@@ -130,7 +125,6 @@ namespace WixToolsetTest.CoreIntegration
125
"-ext", extensionPath,
126
"-bindpath", Path.Combine(folder, "data"),
127
"-intermediateFolder", intermediateFolder,
133
- "-burnStub", burnStubPath,
128
"-o", Path.Combine(baseFolder, @"bin\test.exe")
129
});
130
@@ -144,7 +138,6 @@ namespace WixToolsetTest.CoreIntegration
138
[Fact]
139
public void CanBuildSingleExeBundle()
140
{
147
- var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
141
var folder = TestData.Get(@"TestData");
142
143
using (var fs = new DisposableFileSystem())
@@ -161,7 +154,6 @@ namespace WixToolsetTest.CoreIntegration
154
"-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
155
"-bindpath", Path.Combine(folder, ".Data"),
156
"-intermediateFolder", intermediateFolder,
164
- "-burnStub", burnStubPath,
157
"-o", exePath,
158
});
159
@@ -174,7 +166,6 @@ namespace WixToolsetTest.CoreIntegration
166
[Fact]
167
public void CanBuildSingleExeRemotePayloadBundle()
168
{
177
- var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
169
var folder = TestData.Get(@"TestData");
170
171
using (var fs = new DisposableFileSystem())
@@ -190,7 +181,6 @@ namespace WixToolsetTest.CoreIntegration
181
Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"),
182
"-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
183
"-intermediateFolder", intermediateFolder,
193
- "-burnStub", burnStubPath,
184
"-o", exePath,
185
});
186
src/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs
-6
@@ -15,7 +15,6 @@ namespace WixToolsetTest.CoreIntegration
15
[Fact]
16
public void PopulatesManifestWithBundleExtension()
17
{
18
- var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
18
var folder = TestData.Get(@"TestData");
19
20
using (var fs = new DisposableFileSystem())
@@ -35,7 +34,6 @@ namespace WixToolsetTest.CoreIntegration
34
Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"),
35
"-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
36
"-intermediateFolder", intermediateFolder,
38
- "-burnStub", burnStubPath,
37
"-o", bundlePath
38
});
39
@@ -63,7 +61,6 @@ namespace WixToolsetTest.CoreIntegration
61
[Fact]
62
public void PopulatesManifestWithBundleExtensionSearches()
63
{
66
- var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
64
var extensionPath = Path.GetFullPath(new Uri(typeof(ExampleExtensionFactory).Assembly.CodeBase).LocalPath);
65
var folder = TestData.Get(@"TestData");
66
@@ -85,7 +82,6 @@ namespace WixToolsetTest.CoreIntegration
82
"-ext", extensionPath,
83
"-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
84
"-intermediateFolder", intermediateFolder,
88
- "-burnStub", burnStubPath,
85
"-o", bundlePath
86
});
87
@@ -117,7 +113,6 @@ namespace WixToolsetTest.CoreIntegration
113
[Fact]
114
public void PopulatesManifestWithSetVariables()
115
{
120
- var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
116
var folder = TestData.Get(@"TestData");
117
118
using (var fs = new DisposableFileSystem())
@@ -136,7 +131,6 @@ namespace WixToolsetTest.CoreIntegration
131
Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"),
132
"-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
133
"-intermediateFolder", intermediateFolder,
139
- "-burnStub", burnStubPath,
134
"-o", bundlePath
135
});
136
src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs
-2
@@ -17,7 +17,6 @@ namespace WixToolsetTest.CoreIntegration
17
[Fact]
18
public void CanBuildSimpleBundleUsingWixlib()
19
{
20
- var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
20
var folder = TestData.Get(@"TestData\SimpleBundle");
21
22
using (var fs = new DisposableFileSystem())
@@ -43,7 +42,6 @@ namespace WixToolsetTest.CoreIntegration
42
"-lib", Path.Combine(intermediateFolder, @"test.wixlib"),
43
"-bindpath", Path.Combine(folder, "data"),
44
"-intermediateFolder", intermediateFolder,
46
- "-burnStub", burnStubPath,
45
"-o", Path.Combine(baseFolder, @"bin\test.exe")
46
});
47