aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2019-01-16 22:53:19 -0500
committerBob Arnson <bob@firegiant.com>2019-01-16 22:56:07 -0500
commit28779cbbaa5fcba61009d416654345d50a96fa91 (patch)
tree227487e9dac45abaa971425723bd94aadd9c4173 /src
parent7d174960818d9d13b244ee3e7342588a2f71df63 (diff)
downloadwix-28779cbbaa5fcba61009d416654345d50a96fa91.tar.gz
wix-28779cbbaa5fcba61009d416654345d50a96fa91.tar.bz2
wix-28779cbbaa5fcba61009d416654345d50a96fa91.zip
Plumb InstallerPlatform through MSBuild task.
Diffstat (limited to 'src')
-rw-r--r--src/WixToolset.BuildTasks/DoIt.cs1
-rw-r--r--src/test/WixToolsetTest.BuildTasks/MsbuildFixture.cs28
2 files changed, 29 insertions, 0 deletions
diff --git a/src/WixToolset.BuildTasks/DoIt.cs b/src/WixToolset.BuildTasks/DoIt.cs
index ac0f895c..7089ff12 100644
--- a/src/WixToolset.BuildTasks/DoIt.cs
+++ b/src/WixToolset.BuildTasks/DoIt.cs
@@ -159,6 +159,7 @@ namespace WixToolset.BuildTasks
159 159
160 commandLineBuilder.AppendTextUnquoted("build"); 160 commandLineBuilder.AppendTextUnquoted("build");
161 161
162 commandLineBuilder.AppendSwitchIfNotNull("-platform ", this.InstallerPlatform);
162 commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile); 163 commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile);
163 commandLineBuilder.AppendSwitchIfNotNull("-outputType ", this.OutputType); 164 commandLineBuilder.AppendSwitchIfNotNull("-outputType ", this.OutputType);
164 commandLineBuilder.AppendIfTrue("-nologo", this.NoLogo); 165 commandLineBuilder.AppendIfTrue("-nologo", this.NoLogo);
diff --git a/src/test/WixToolsetTest.BuildTasks/MsbuildFixture.cs b/src/test/WixToolsetTest.BuildTasks/MsbuildFixture.cs
index 3b96f0ba..74978322 100644
--- a/src/test/WixToolsetTest.BuildTasks/MsbuildFixture.cs
+++ b/src/test/WixToolsetTest.BuildTasks/MsbuildFixture.cs
@@ -39,6 +39,9 @@ namespace WixToolsetTest.BuildTasks
39 }); 39 });
40 result.AssertSuccess(); 40 result.AssertSuccess();
41 41
42 var platformSwitches = result.Output.Where(line => line.TrimStart().StartsWith("wix.exe build -platform x86"));
43 Assert.Single(platformSwitches);
44
42 var warnings = result.Output.Where(line => line.Contains(": warning")); 45 var warnings = result.Output.Where(line => line.Contains(": warning"));
43 Assert.Equal(4, warnings.Count()); 46 Assert.Equal(4, warnings.Count());
44 47
@@ -55,6 +58,31 @@ namespace WixToolsetTest.BuildTasks
55 } 58 }
56 } 59 }
57 60
61 [Fact]
62 public void CanBuild64BitMsiPackage()
63 {
64 var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj");
65
66 using (var fs = new DisposableFileSystem())
67 {
68 var baseFolder = fs.GetFolder();
69 var binFolder = Path.Combine(baseFolder, @"bin\");
70 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
71
72 var result = this.MsbuildRunner.Execute(projectPath, new[]
73 {
74 $"-p:WixTargetsPath={WixTargetsPath}",
75 $"-p:IntermediateOutputPath={intermediateFolder}",
76 $"-p:OutputPath={binFolder}",
77 $"-p:InstallerPlatform=x64",
78 });
79 result.AssertSuccess();
80
81 var platformSwitches = result.Output.Where(line => line.TrimStart().StartsWith("wix.exe build -platform x64"));
82 Assert.Single(platformSwitches);
83 }
84 }
85
58 [Fact(Skip = "Currently fails")] 86 [Fact(Skip = "Currently fails")]
59 public void CanBuildSimpleMsiPackageWithIceSuppressions() 87 public void CanBuildSimpleMsiPackageWithIceSuppressions()
60 { 88 {