@joebigelow / wix-1 / commits / 0741acf8

Add warning for non-x86 bundles.

Sean Hall committed Jan 19, 2021 at 15:37 UTC 0741acf89631bf226acb2d226981f0de0065c1f1
2 files changed +8 -2
src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs
+5
@@ -56,6 +56,11 @@ namespace WixToolset.Core.Burn.Bundles
56 var stubPlatform = this.BundleSymbol.Platform.ToString();
57 var stubFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), stubPlatform, "burn.exe");
58
59 + if (stubPlatform != "X86")
60 + {
61 + this.Messaging.Write(WarningMessages.ExperimentalBundlePlatform(stubPlatform));
62 + }
63 +
64 var bundleTempPath = Path.Combine(this.IntermediateFolder, bundleFilename);
65
66 this.Messaging.Write(VerboseMessages.GeneratingBundle(bundleTempPath, stubFile));
src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
+3 -2
@@ -146,7 +146,7 @@ namespace WixToolsetTest.CoreIntegration
146 var baFolderPath = Path.Combine(baseFolder, "ba");
147 var extractFolderPath = Path.Combine(baseFolder, "extract");
148
149 - var result = WixRunner.Execute(new[]
149 + var result = WixRunner.Execute(false, new[] // TODO: go back to elevating warnings as errors.
150 {
151 "build",
152 "-arch", "x64",
@@ -158,7 +158,8 @@ namespace WixToolsetTest.CoreIntegration
158 });
159
160 result.AssertSuccess();
161 - Assert.Empty(result.Messages.Where(m => m.Level == MessageLevel.Warning));
161 + var warning = Assert.Single(result.Messages.Where(m => m.Level == MessageLevel.Warning));
162 + Assert.Equal((int)WarningMessages.Ids.ExperimentalBundlePlatform, warning.Id);
163
164 Assert.True(File.Exists(exePath));
165 Assert.True(File.Exists(pdbPath));