@joebigelow / wix-1 / commits / c2bc01b4

Fix ServiceControl/@Wait translation.

Bob Arnson committed Jan 21, 2020 at 19:12 UTC c2bc01b47cca2a70ddeb2cc9e9b2e3b9906bb647
3 files changed +9 -4
src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs
+4 -1
@@ -803,7 +803,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
803 row[1] = tuple.Name;
804 row[2] = events;
805 row[3] = tuple.Arguments;
806 - row[4] = tuple.Wait;
806 + if (tuple.Wait.HasValue)
807 + {
808 + row[4] = tuple.Wait.Value ? 1 : 0;
809 + }
810 row[5] = tuple.ComponentRef;
811 }
812
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+3 -2
@@ -817,7 +817,7 @@ namespace WixToolsetTest.CoreIntegration
817 }
818
819 [Fact]
820 - public void PopulatesServiceInstallTable()
820 + public void PopulatesServiceTables()
821 {
822 var folder = TestData.Get(@"TestData");
823
@@ -841,9 +841,10 @@ namespace WixToolsetTest.CoreIntegration
841 result.AssertSuccess();
842
843 Assert.True(File.Exists(msiPath));
844 - var results = Query.QueryDatabase(msiPath, new[] { "ServiceInstall" });
844 + var results = Query.QueryDatabase(msiPath, new[] { "ServiceInstall", "ServiceControl" });
845 Assert.Equal(new[]
846 {
847 + "ServiceControl:SampleService\tSampleService\t161\t\t1\ttest.txt",
848 "ServiceInstall:SampleService\tSampleService\t\t16\t4\t0\t\t\t\t\t\ttest.txt\t",
849 }, results);
850 }
src/test/WixToolsetTest.CoreIntegration/TestData/ServiceInstall/OwnProcess.wxs
+2 -1
@@ -4,7 +4,8 @@
4 <ComponentGroup Id="ProductComponents">
5 <Component Directory="INSTALLFOLDER">
6 <File Id="test.txt" Source="test.txt" />
7 - <ServiceInstall Name="SampleService" ErrorControl="ignore" Start="disabled" Type="ownProcess"></ServiceInstall>
7 + <ServiceInstall Name="SampleService" ErrorControl="ignore" Start="disabled" Type="ownProcess" />
8 + <ServiceControl Name="SampleService" Start="install" Stop="uninstall" Remove="uninstall" Wait="yes" />
9 </Component>
10 </ComponentGroup>
11 </Fragment>