@joebigelow / wix-1 / commits / 4de24fe6

Rename ExePackage/@XxxCommand attributes to @XxxArguments

Fixes wixtoolset/issues#6245

Rob Mensching committed Jan 8, 2021 at 15:32 UTC 4de24fe6e542391a9cdd55b00df9a1664273c5e2
4 files changed +26 -26
src/WixToolset.Core/Compiler_Bundle.cs
+20 -20
@@ -2112,9 +2112,9 @@ namespace WixToolset.Core
2112 var permanent = YesNoType.NotSet;
2113 var visible = YesNoType.NotSet;
2114 var vital = YesNoType.Yes;
2115 - string installCommand = null;
2116 - string repairCommand = null;
2117 - string uninstallCommand = null;
2115 + string installArguments = null;
2116 + string repairArguments = null;
2117 + string uninstallArguments = null;
2118 var perMachine = YesNoDefaultType.NotSet;
2119 string detectCondition = null;
2120 string protocol = null;
@@ -2215,16 +2215,16 @@ namespace WixToolset.Core
2215 case "Vital":
2216 vital = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
2217 break;
2218 - case "InstallCommand":
2219 - installCommand = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2218 + case "InstallArguments":
2219 + installArguments = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2220 allowed = (packageType == WixBundlePackageType.Exe);
2221 break;
2222 - case "RepairCommand":
2223 - repairCommand = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
2222 + case "RepairArguments":
2223 + repairArguments = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
2224 allowed = (packageType == WixBundlePackageType.Exe);
2225 break;
2226 - case "UninstallCommand":
2227 - uninstallCommand = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2226 + case "UninstallArguments":
2227 + uninstallArguments = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2228 allowed = (packageType == WixBundlePackageType.Exe);
2229 break;
2230 case "PerMachine":
@@ -2371,19 +2371,19 @@ namespace WixToolset.Core
2371 {
2372 foreach (var expectedArgument in expectedNetFx4Args)
2373 {
2374 - if (null == installCommand || -1 == installCommand.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
2374 + if (null == installArguments || -1 == installArguments.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
2375 {
2376 - this.Core.Write(WarningMessages.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "InstallCommand", installCommand, expectedArgument, "Protocol", "netfx4"));
2376 + this.Core.Write(WarningMessages.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "InstallArguments", installArguments, expectedArgument, "Protocol", "netfx4"));
2377 }
2378
2379 - if (!String.IsNullOrEmpty(repairCommand) && -1 == repairCommand.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
2379 + if (!String.IsNullOrEmpty(repairArguments) && -1 == repairArguments.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
2380 {
2381 - this.Core.Write(WarningMessages.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "RepairCommand", repairCommand, expectedArgument, "Protocol", "netfx4"));
2381 + this.Core.Write(WarningMessages.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "RepairArguments", repairArguments, expectedArgument, "Protocol", "netfx4"));
2382 }
2383
2384 - if (!String.IsNullOrEmpty(uninstallCommand) && -1 == uninstallCommand.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
2384 + if (!String.IsNullOrEmpty(uninstallArguments) && -1 == uninstallArguments.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
2385 {
2386 - this.Core.Write(WarningMessages.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "UninstallCommand", uninstallCommand, expectedArgument, "Protocol", "netfx4"));
2386 + this.Core.Write(WarningMessages.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "UninstallArguments", uninstallArguments, expectedArgument, "Protocol", "netfx4"));
2387 }
2388 }
2389 }
@@ -2398,13 +2398,13 @@ namespace WixToolset.Core
2398 // (depending on whether uninstall arguments were provided).
2399 if ((packageType == WixBundlePackageType.Exe || packageType == WixBundlePackageType.Msu) && String.IsNullOrEmpty(detectCondition))
2400 {
2401 - if (String.IsNullOrEmpty(uninstallCommand))
2401 + if (String.IsNullOrEmpty(uninstallArguments))
2402 {
2403 this.Core.Write(WarningMessages.DetectConditionRecommended(sourceLineNumbers, node.Name.LocalName));
2404 }
2405 else
2406 {
2407 - this.Core.Write(ErrorMessages.ExpectedAttributeWithValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DetectCondition", "UninstallCommand"));
2407 + this.Core.Write(ErrorMessages.ExpectedAttributeWithValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DetectCondition", "UninstallArguments"));
2408 }
2409 }
2410
@@ -2526,9 +2526,9 @@ namespace WixToolset.Core
2526 {
2527 Attributes = WixBundleExePackageAttributes.None,
2528 DetectCondition = detectCondition,
2529 - InstallCommand = installCommand,
2530 - RepairCommand = repairCommand,
2531 - UninstallCommand = uninstallCommand,
2529 + InstallCommand = installArguments,
2530 + RepairCommand = repairArguments,
2531 + UninstallCommand = uninstallArguments,
2532 ExeProtocol = protocol
2533 });
2534 break;
src/test/WixToolsetTest.CoreIntegration/TestData/ExePackage/MissingDetectCondition.wxs
+1 -1
@@ -2,7 +2,7 @@
2 <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment>
4 <PackageGroup Id="TestPackageGroup">
5 - <ExePackage InstallCommand="-install"
5 + <ExePackage InstallArguments="-install"
6 SourceFile="testsetup.exe" />
7 </PackageGroup>
8 </Fragment>
src/test/WixToolsetTest.CoreIntegration/TestData/ExePackage/RequireDetectCondition.wxs
+2 -2
@@ -3,8 +3,8 @@
3 <Fragment>
4 <PackageGroup Id="TestPackageGroup">
5 <ExePackage DetectCondition=""
6 - InstallCommand="-install"
7 - UninstallCommand="-uninstall"
6 + InstallArguments="-install"
7 + UninstallArguments="-uninstall"
8 SourceFile="testsetup.exe" />
9 </PackageGroup>
10 </Fragment>
src/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs
+3 -3
@@ -3,9 +3,9 @@
3 <Fragment>
4 <PackageGroup Id="BundlePackages">
5 <ExePackage
6 - InstallCommand="/q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx462FullLog].html&quot;"
7 - RepairCommand="/q /norestart /repair /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx462FullLog].html&quot;"
8 - UninstallCommand="/uninstall /q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx462FullLog].html&quot;"
6 + InstallArguments="/q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx462FullLog].html&quot;"
7 + RepairArguments="/q /norestart /repair /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx462FullLog].html&quot;"
8 + UninstallArguments="/uninstall /q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx462FullLog].html&quot;"
9 PerMachine="yes"
10 DetectCondition="A"
11 InstallCondition="B"