aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-01-08 15:32:36 -0800
committerRob Mensching <rob@firegiant.com>2021-01-08 15:47:31 -0800
commit4de24fe6e542391a9cdd55b00df9a1664273c5e2 (patch)
tree4de6ecff59d9e3a2372c933dc2230e176a76b541
parent4362960feec4a770f665419eaebd7b4ed14ecb9e (diff)
downloadwix-4de24fe6e542391a9cdd55b00df9a1664273c5e2.tar.gz
wix-4de24fe6e542391a9cdd55b00df9a1664273c5e2.tar.bz2
wix-4de24fe6e542391a9cdd55b00df9a1664273c5e2.zip
Rename ExePackage/@XxxCommand attributes to @XxxArguments
Fixes wixtoolset/issues#6245
-rw-r--r--src/WixToolset.Core/Compiler_Bundle.cs40
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/ExePackage/MissingDetectCondition.wxs2
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/ExePackage/RequireDetectCondition.wxs4
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs6
4 files changed, 26 insertions, 26 deletions
diff --git a/src/WixToolset.Core/Compiler_Bundle.cs b/src/WixToolset.Core/Compiler_Bundle.cs
index 1bee3823..f0060a3e 100644
--- a/src/WixToolset.Core/Compiler_Bundle.cs
+++ b/src/WixToolset.Core/Compiler_Bundle.cs
@@ -2112,9 +2112,9 @@ namespace WixToolset.Core
2112 var permanent = YesNoType.NotSet; 2112 var permanent = YesNoType.NotSet;
2113 var visible = YesNoType.NotSet; 2113 var visible = YesNoType.NotSet;
2114 var vital = YesNoType.Yes; 2114 var vital = YesNoType.Yes;
2115 string installCommand = null; 2115 string installArguments = null;
2116 string repairCommand = null; 2116 string repairArguments = null;
2117 string uninstallCommand = null; 2117 string uninstallArguments = null;
2118 var perMachine = YesNoDefaultType.NotSet; 2118 var perMachine = YesNoDefaultType.NotSet;
2119 string detectCondition = null; 2119 string detectCondition = null;
2120 string protocol = null; 2120 string protocol = null;
@@ -2215,16 +2215,16 @@ namespace WixToolset.Core
2215 case "Vital": 2215 case "Vital":
2216 vital = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 2216 vital = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
2217 break; 2217 break;
2218 case "InstallCommand": 2218 case "InstallArguments":
2219 installCommand = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 2219 installArguments = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2220 allowed = (packageType == WixBundlePackageType.Exe); 2220 allowed = (packageType == WixBundlePackageType.Exe);
2221 break; 2221 break;
2222 case "RepairCommand": 2222 case "RepairArguments":
2223 repairCommand = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); 2223 repairArguments = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
2224 allowed = (packageType == WixBundlePackageType.Exe); 2224 allowed = (packageType == WixBundlePackageType.Exe);
2225 break; 2225 break;
2226 case "UninstallCommand": 2226 case "UninstallArguments":
2227 uninstallCommand = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 2227 uninstallArguments = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2228 allowed = (packageType == WixBundlePackageType.Exe); 2228 allowed = (packageType == WixBundlePackageType.Exe);
2229 break; 2229 break;
2230 case "PerMachine": 2230 case "PerMachine":
@@ -2371,19 +2371,19 @@ namespace WixToolset.Core
2371 { 2371 {
2372 foreach (var expectedArgument in expectedNetFx4Args) 2372 foreach (var expectedArgument in expectedNetFx4Args)
2373 { 2373 {
2374 if (null == installCommand || -1 == installCommand.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase)) 2374 if (null == installArguments || -1 == installArguments.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
2375 { 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 } 2377 }
2378 2378
2379 if (!String.IsNullOrEmpty(repairCommand) && -1 == repairCommand.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase)) 2379 if (!String.IsNullOrEmpty(repairArguments) && -1 == repairArguments.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
2380 { 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 } 2382 }
2383 2383
2384 if (!String.IsNullOrEmpty(uninstallCommand) && -1 == uninstallCommand.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase)) 2384 if (!String.IsNullOrEmpty(uninstallArguments) && -1 == uninstallArguments.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
2385 { 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 } 2387 }
2388 } 2388 }
2389 } 2389 }
@@ -2398,13 +2398,13 @@ namespace WixToolset.Core
2398 // (depending on whether uninstall arguments were provided). 2398 // (depending on whether uninstall arguments were provided).
2399 if ((packageType == WixBundlePackageType.Exe || packageType == WixBundlePackageType.Msu) && String.IsNullOrEmpty(detectCondition)) 2399 if ((packageType == WixBundlePackageType.Exe || packageType == WixBundlePackageType.Msu) && String.IsNullOrEmpty(detectCondition))
2400 { 2400 {
2401 if (String.IsNullOrEmpty(uninstallCommand)) 2401 if (String.IsNullOrEmpty(uninstallArguments))
2402 { 2402 {
2403 this.Core.Write(WarningMessages.DetectConditionRecommended(sourceLineNumbers, node.Name.LocalName)); 2403 this.Core.Write(WarningMessages.DetectConditionRecommended(sourceLineNumbers, node.Name.LocalName));
2404 } 2404 }
2405 else 2405 else
2406 { 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 } 2408 }
2409 } 2409 }
2410 2410
@@ -2526,9 +2526,9 @@ namespace WixToolset.Core
2526 { 2526 {
2527 Attributes = WixBundleExePackageAttributes.None, 2527 Attributes = WixBundleExePackageAttributes.None,
2528 DetectCondition = detectCondition, 2528 DetectCondition = detectCondition,
2529 InstallCommand = installCommand, 2529 InstallCommand = installArguments,
2530 RepairCommand = repairCommand, 2530 RepairCommand = repairArguments,
2531 UninstallCommand = uninstallCommand, 2531 UninstallCommand = uninstallArguments,
2532 ExeProtocol = protocol 2532 ExeProtocol = protocol
2533 }); 2533 });
2534 break; 2534 break;
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/ExePackage/MissingDetectCondition.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/ExePackage/MissingDetectCondition.wxs
index 21b4269b..e57180f7 100644
--- a/src/test/WixToolsetTest.CoreIntegration/TestData/ExePackage/MissingDetectCondition.wxs
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/ExePackage/MissingDetectCondition.wxs
@@ -2,7 +2,7 @@
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> 2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment> 3 <Fragment>
4 <PackageGroup Id="TestPackageGroup"> 4 <PackageGroup Id="TestPackageGroup">
5 <ExePackage InstallCommand="-install" 5 <ExePackage InstallArguments="-install"
6 SourceFile="testsetup.exe" /> 6 SourceFile="testsetup.exe" />
7 </PackageGroup> 7 </PackageGroup>
8 </Fragment> 8 </Fragment>
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/ExePackage/RequireDetectCondition.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/ExePackage/RequireDetectCondition.wxs
index 42253f18..0b094860 100644
--- a/src/test/WixToolsetTest.CoreIntegration/TestData/ExePackage/RequireDetectCondition.wxs
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/ExePackage/RequireDetectCondition.wxs
@@ -3,8 +3,8 @@
3 <Fragment> 3 <Fragment>
4 <PackageGroup Id="TestPackageGroup"> 4 <PackageGroup Id="TestPackageGroup">
5 <ExePackage DetectCondition="" 5 <ExePackage DetectCondition=""
6 InstallCommand="-install" 6 InstallArguments="-install"
7 UninstallCommand="-uninstall" 7 UninstallArguments="-uninstall"
8 SourceFile="testsetup.exe" /> 8 SourceFile="testsetup.exe" />
9 </PackageGroup> 9 </PackageGroup>
10 </Fragment> 10 </Fragment>
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs
index 709dc9e7..6c6903b1 100644
--- a/src/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs
@@ -3,9 +3,9 @@
3 <Fragment> 3 <Fragment>
4 <PackageGroup Id="BundlePackages"> 4 <PackageGroup Id="BundlePackages">
5 <ExePackage 5 <ExePackage
6 InstallCommand="/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 RepairCommand="/q /norestart /repair /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx462FullLog].html&quot;" 7 RepairArguments="/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;" 8 UninstallArguments="/uninstall /q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx462FullLog].html&quot;"
9 PerMachine="yes" 9 PerMachine="yes"
10 DetectCondition="A" 10 DetectCondition="A"
11 InstallCondition="B" 11 InstallCondition="B"