aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-05-10 09:07:42 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-05-10 14:03:30 +1000
commita75639ceaffcf5f56fa33094037bca86331d9ac0 (patch)
treed34b808eeae67744d6f3065c4eba6ec5c5780644 /src
parenta74cbd658fb7bf904275ed5f27a7b15bedc18435 (diff)
downloadwix-a75639ceaffcf5f56fa33094037bca86331d9ac0.tar.gz
wix-a75639ceaffcf5f56fa33094037bca86331d9ac0.tar.bz2
wix-a75639ceaffcf5f56fa33094037bca86331d9ac0.zip
Use WixToolset.Burn package to get rid of -burnStubPath.
Stop using x86 stub for x64.
Diffstat (limited to 'src')
-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
-rw-r--r--src/WixToolset.Core/CommandLine/BuildCommand.cs10
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs10
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs6
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs2
7 files changed, 8 insertions, 44 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" />
diff --git a/src/WixToolset.Core/CommandLine/BuildCommand.cs b/src/WixToolset.Core/CommandLine/BuildCommand.cs
index dbdad0a9..80003392 100644
--- a/src/WixToolset.Core/CommandLine/BuildCommand.cs
+++ b/src/WixToolset.Core/CommandLine/BuildCommand.cs
@@ -157,7 +157,7 @@ namespace WixToolset.Core.CommandLine
157 { 157 {
158 using (new IntermediateFieldContext("wix.bind")) 158 using (new IntermediateFieldContext("wix.bind"))
159 { 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 } 161 }
162 } 162 }
163 } 163 }
@@ -294,7 +294,7 @@ namespace WixToolset.Core.CommandLine
294 return linker.Link(context); 294 return linker.Link(context);
295 } 295 }
296 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 { 298 {
299 var intermediateFolder = this.IntermediateFolder; 299 var intermediateFolder = this.IntermediateFolder;
300 if (String.IsNullOrEmpty(intermediateFolder)) 300 if (String.IsNullOrEmpty(intermediateFolder))
@@ -328,7 +328,6 @@ namespace WixToolset.Core.CommandLine
328 { 328 {
329 var context = this.ServiceProvider.GetService<IBindContext>(); 329 var context = this.ServiceProvider.GetService<IBindContext>();
330 //context.CabbingThreadCount = this.CabbingThreadCount; 330 //context.CabbingThreadCount = this.CabbingThreadCount;
331 context.BurnStubPath = burnStubPath;
332 context.CabCachePath = cabCachePath; 331 context.CabCachePath = cabCachePath;
333 context.Codepage = resolveResult.Codepage; 332 context.Codepage = resolveResult.Codepage;
334 //context.DefaultCompressionLevel = this.DefaultCompressionLevel; 333 //context.DefaultCompressionLevel = this.DefaultCompressionLevel;
@@ -491,8 +490,6 @@ namespace WixToolset.Core.CommandLine
491 490
492 public List<IBindPath> BindPaths { get; } = new List<IBindPath>(); 491 public List<IBindPath> BindPaths { get; } = new List<IBindPath>();
493 492
494 public string BurnStubPath { get; private set; }
495
496 public string CabCachePath { get; private set; } 493 public string CabCachePath { get; private set; }
497 494
498 public List<string> Cultures { get; } = new List<string>(); 495 public List<string> Cultures { get; } = new List<string>();
@@ -579,9 +576,6 @@ namespace WixToolset.Core.CommandLine
579 } 576 }
580 break; 577 break;
581 } 578 }
582 case "burnstub":
583 this.BurnStubPath = parser.GetNextArgumentOrError(arg);
584 return true;
585 579
586 case "cc": 580 case "cc":
587 this.CabCachePath = parser.GetNextArgumentOrError(arg); 581 this.CabCachePath = parser.GetNextArgumentOrError(arg);
diff --git a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
index 6e66aa74..acddd2d5 100644
--- a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
+++ b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
@@ -19,7 +19,6 @@ namespace WixToolsetTest.CoreIntegration
19 [Fact] 19 [Fact]
20 public void CanBuildMultiFileBundle() 20 public void CanBuildMultiFileBundle()
21 { 21 {
22 var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
23 var folder = TestData.Get(@"TestData\SimpleBundle"); 22 var folder = TestData.Get(@"TestData\SimpleBundle");
24 23
25 using (var fs = new DisposableFileSystem()) 24 using (var fs = new DisposableFileSystem())
@@ -35,7 +34,6 @@ namespace WixToolsetTest.CoreIntegration
35 "-loc", Path.Combine(folder, "Bundle.en-us.wxl"), 34 "-loc", Path.Combine(folder, "Bundle.en-us.wxl"),
36 "-bindpath", Path.Combine(folder, "data"), 35 "-bindpath", Path.Combine(folder, "data"),
37 "-intermediateFolder", intermediateFolder, 36 "-intermediateFolder", intermediateFolder,
38 "-burnStub", burnStubPath,
39 "-o", Path.Combine(baseFolder, @"bin\test.exe") 37 "-o", Path.Combine(baseFolder, @"bin\test.exe")
40 }); 38 });
41 39
@@ -49,7 +47,6 @@ namespace WixToolsetTest.CoreIntegration
49 [Fact] 47 [Fact]
50 public void CanBuildSimpleBundle() 48 public void CanBuildSimpleBundle()
51 { 49 {
52 var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
53 var folder = TestData.Get(@"TestData\SimpleBundle"); 50 var folder = TestData.Get(@"TestData\SimpleBundle");
54 51
55 using (var fs = new DisposableFileSystem()) 52 using (var fs = new DisposableFileSystem())
@@ -68,7 +65,6 @@ namespace WixToolsetTest.CoreIntegration
68 "-loc", Path.Combine(folder, "Bundle.en-us.wxl"), 65 "-loc", Path.Combine(folder, "Bundle.en-us.wxl"),
69 "-bindpath", Path.Combine(folder, "data"), 66 "-bindpath", Path.Combine(folder, "data"),
70 "-intermediateFolder", intermediateFolder, 67 "-intermediateFolder", intermediateFolder,
71 "-burnStub", burnStubPath,
72 "-o", exePath, 68 "-o", exePath,
73 }); 69 });
74 70
@@ -113,7 +109,6 @@ namespace WixToolsetTest.CoreIntegration
113 [Fact] 109 [Fact]
114 public void CanBuildSimpleBundleUsingExtensionBA() 110 public void CanBuildSimpleBundleUsingExtensionBA()
115 { 111 {
116 var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
117 var extensionPath = Path.GetFullPath(new Uri(typeof(ExampleExtensionFactory).Assembly.CodeBase).LocalPath); 112 var extensionPath = Path.GetFullPath(new Uri(typeof(ExampleExtensionFactory).Assembly.CodeBase).LocalPath);
118 var folder = TestData.Get(@"TestData\SimpleBundle"); 113 var folder = TestData.Get(@"TestData\SimpleBundle");
119 114
@@ -130,7 +125,6 @@ namespace WixToolsetTest.CoreIntegration
130 "-ext", extensionPath, 125 "-ext", extensionPath,
131 "-bindpath", Path.Combine(folder, "data"), 126 "-bindpath", Path.Combine(folder, "data"),
132 "-intermediateFolder", intermediateFolder, 127 "-intermediateFolder", intermediateFolder,
133 "-burnStub", burnStubPath,
134 "-o", Path.Combine(baseFolder, @"bin\test.exe") 128 "-o", Path.Combine(baseFolder, @"bin\test.exe")
135 }); 129 });
136 130
@@ -144,7 +138,6 @@ namespace WixToolsetTest.CoreIntegration
144 [Fact] 138 [Fact]
145 public void CanBuildSingleExeBundle() 139 public void CanBuildSingleExeBundle()
146 { 140 {
147 var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
148 var folder = TestData.Get(@"TestData"); 141 var folder = TestData.Get(@"TestData");
149 142
150 using (var fs = new DisposableFileSystem()) 143 using (var fs = new DisposableFileSystem())
@@ -161,7 +154,6 @@ namespace WixToolsetTest.CoreIntegration
161 "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), 154 "-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
162 "-bindpath", Path.Combine(folder, ".Data"), 155 "-bindpath", Path.Combine(folder, ".Data"),
163 "-intermediateFolder", intermediateFolder, 156 "-intermediateFolder", intermediateFolder,
164 "-burnStub", burnStubPath,
165 "-o", exePath, 157 "-o", exePath,
166 }); 158 });
167 159
@@ -174,7 +166,6 @@ namespace WixToolsetTest.CoreIntegration
174 [Fact] 166 [Fact]
175 public void CanBuildSingleExeRemotePayloadBundle() 167 public void CanBuildSingleExeRemotePayloadBundle()
176 { 168 {
177 var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
178 var folder = TestData.Get(@"TestData"); 169 var folder = TestData.Get(@"TestData");
179 170
180 using (var fs = new DisposableFileSystem()) 171 using (var fs = new DisposableFileSystem())
@@ -190,7 +181,6 @@ namespace WixToolsetTest.CoreIntegration
190 Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), 181 Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"),
191 "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), 182 "-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
192 "-intermediateFolder", intermediateFolder, 183 "-intermediateFolder", intermediateFolder,
193 "-burnStub", burnStubPath,
194 "-o", exePath, 184 "-o", exePath,
195 }); 185 });
196 186
diff --git a/src/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs
index 174ac21b..ebfdb872 100644
--- a/src/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs
+++ b/src/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs
@@ -15,7 +15,6 @@ namespace WixToolsetTest.CoreIntegration
15 [Fact] 15 [Fact]
16 public void PopulatesManifestWithBundleExtension() 16 public void PopulatesManifestWithBundleExtension()
17 { 17 {
18 var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
19 var folder = TestData.Get(@"TestData"); 18 var folder = TestData.Get(@"TestData");
20 19
21 using (var fs = new DisposableFileSystem()) 20 using (var fs = new DisposableFileSystem())
@@ -35,7 +34,6 @@ namespace WixToolsetTest.CoreIntegration
35 Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), 34 Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"),
36 "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), 35 "-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
37 "-intermediateFolder", intermediateFolder, 36 "-intermediateFolder", intermediateFolder,
38 "-burnStub", burnStubPath,
39 "-o", bundlePath 37 "-o", bundlePath
40 }); 38 });
41 39
@@ -63,7 +61,6 @@ namespace WixToolsetTest.CoreIntegration
63 [Fact] 61 [Fact]
64 public void PopulatesManifestWithBundleExtensionSearches() 62 public void PopulatesManifestWithBundleExtensionSearches()
65 { 63 {
66 var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
67 var extensionPath = Path.GetFullPath(new Uri(typeof(ExampleExtensionFactory).Assembly.CodeBase).LocalPath); 64 var extensionPath = Path.GetFullPath(new Uri(typeof(ExampleExtensionFactory).Assembly.CodeBase).LocalPath);
68 var folder = TestData.Get(@"TestData"); 65 var folder = TestData.Get(@"TestData");
69 66
@@ -85,7 +82,6 @@ namespace WixToolsetTest.CoreIntegration
85 "-ext", extensionPath, 82 "-ext", extensionPath,
86 "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), 83 "-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
87 "-intermediateFolder", intermediateFolder, 84 "-intermediateFolder", intermediateFolder,
88 "-burnStub", burnStubPath,
89 "-o", bundlePath 85 "-o", bundlePath
90 }); 86 });
91 87
@@ -117,7 +113,6 @@ namespace WixToolsetTest.CoreIntegration
117 [Fact] 113 [Fact]
118 public void PopulatesManifestWithSetVariables() 114 public void PopulatesManifestWithSetVariables()
119 { 115 {
120 var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
121 var folder = TestData.Get(@"TestData"); 116 var folder = TestData.Get(@"TestData");
122 117
123 using (var fs = new DisposableFileSystem()) 118 using (var fs = new DisposableFileSystem())
@@ -136,7 +131,6 @@ namespace WixToolsetTest.CoreIntegration
136 Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), 131 Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"),
137 "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), 132 "-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
138 "-intermediateFolder", intermediateFolder, 133 "-intermediateFolder", intermediateFolder,
139 "-burnStub", burnStubPath,
140 "-o", bundlePath 134 "-o", bundlePath
141 }); 135 });
142 136
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs b/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs
index 44a0e283..f63d1144 100644
--- a/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs
+++ b/src/test/WixToolsetTest.CoreIntegration/WixlibFixture.cs
@@ -17,7 +17,6 @@ namespace WixToolsetTest.CoreIntegration
17 [Fact] 17 [Fact]
18 public void CanBuildSimpleBundleUsingWixlib() 18 public void CanBuildSimpleBundleUsingWixlib()
19 { 19 {
20 var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe");
21 var folder = TestData.Get(@"TestData\SimpleBundle"); 20 var folder = TestData.Get(@"TestData\SimpleBundle");
22 21
23 using (var fs = new DisposableFileSystem()) 22 using (var fs = new DisposableFileSystem())
@@ -43,7 +42,6 @@ namespace WixToolsetTest.CoreIntegration
43 "-lib", Path.Combine(intermediateFolder, @"test.wixlib"), 42 "-lib", Path.Combine(intermediateFolder, @"test.wixlib"),
44 "-bindpath", Path.Combine(folder, "data"), 43 "-bindpath", Path.Combine(folder, "data"),
45 "-intermediateFolder", intermediateFolder, 44 "-intermediateFolder", intermediateFolder,
46 "-burnStub", burnStubPath,
47 "-o", Path.Combine(baseFolder, @"bin\test.exe") 45 "-o", Path.Combine(baseFolder, @"bin\test.exe")
48 }); 46 });
49 47