aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-04-10 15:24:33 -0700
committerRob Mensching <rob@firegiant.com>2021-04-12 10:24:01 -0700
commitd77302d94b356a1db2b2b834e45c8962381eae6b (patch)
treeaf44629cacb074bafb7b561e2e0db9d45a6a1727
parent3441afb46c4dc056493ab84f9b27434c4185d713 (diff)
downloadwix-d77302d94b356a1db2b2b834e45c8962381eae6b.tar.gz
wix-d77302d94b356a1db2b2b834e45c8962381eae6b.tar.bz2
wix-d77302d94b356a1db2b2b834e45c8962381eae6b.zip
Add support for RepairCondition on Exe, Msi and Msp packages
-rw-r--r--src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs13
-rw-r--r--src/WixToolset.Core/Compiler_Bundle.cs8
2 files changed, 21 insertions, 0 deletions
diff --git a/src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs b/src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs
index fa44a8e3..128c7a5f 100644
--- a/src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs
+++ b/src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs
@@ -399,6 +399,10 @@ namespace WixToolset.Core.Burn.Bundles
399 writer.WriteAttributeString("InstallArguments", exePackage.InstallCommand); 399 writer.WriteAttributeString("InstallArguments", exePackage.InstallCommand);
400 writer.WriteAttributeString("UninstallArguments", exePackage.UninstallCommand); 400 writer.WriteAttributeString("UninstallArguments", exePackage.UninstallCommand);
401 writer.WriteAttributeString("RepairArguments", exePackage.RepairCommand); 401 writer.WriteAttributeString("RepairArguments", exePackage.RepairCommand);
402 if (!String.IsNullOrEmpty(exePackage.RepairCondition))
403 {
404 writer.WriteAttributeString("RepairCondition", exePackage.RepairCondition);
405 }
402 writer.WriteAttributeString("Repairable", exePackage.Repairable ? "yes" : "no"); 406 writer.WriteAttributeString("Repairable", exePackage.Repairable ? "yes" : "no");
403 if (!String.IsNullOrEmpty(exePackage.ExeProtocol)) 407 if (!String.IsNullOrEmpty(exePackage.ExeProtocol))
404 { 408 {
@@ -410,6 +414,10 @@ namespace WixToolset.Core.Burn.Bundles
410 writer.WriteAttributeString("ProductCode", msiPackage.ProductCode); 414 writer.WriteAttributeString("ProductCode", msiPackage.ProductCode);
411 writer.WriteAttributeString("Language", msiPackage.ProductLanguage.ToString(CultureInfo.InvariantCulture)); 415 writer.WriteAttributeString("Language", msiPackage.ProductLanguage.ToString(CultureInfo.InvariantCulture));
412 writer.WriteAttributeString("Version", msiPackage.ProductVersion); 416 writer.WriteAttributeString("Version", msiPackage.ProductVersion);
417 if (!String.IsNullOrEmpty(msiPackage.RepairCondition))
418 {
419 writer.WriteAttributeString("RepairCondition", msiPackage.RepairCondition);
420 }
413 if (!String.IsNullOrEmpty(msiPackage.UpgradeCode)) 421 if (!String.IsNullOrEmpty(msiPackage.UpgradeCode))
414 { 422 {
415 writer.WriteAttributeString("UpgradeCode", msiPackage.UpgradeCode); 423 writer.WriteAttributeString("UpgradeCode", msiPackage.UpgradeCode);
@@ -420,6 +428,11 @@ namespace WixToolset.Core.Burn.Bundles
420 writer.WriteAttributeString("PatchCode", mspPackage.PatchCode); 428 writer.WriteAttributeString("PatchCode", mspPackage.PatchCode);
421 writer.WriteAttributeString("PatchXml", mspPackage.PatchXml); 429 writer.WriteAttributeString("PatchXml", mspPackage.PatchXml);
422 430
431 if (!String.IsNullOrEmpty(mspPackage.RepairCondition))
432 {
433 writer.WriteAttributeString("RepairCondition", mspPackage.RepairCondition);
434 }
435
423 // If there is still a chance that all of our patches will target a narrow set of 436 // If there is still a chance that all of our patches will target a narrow set of
424 // product codes, add the patch list to the overall list. 437 // product codes, add the patch list to the overall list.
425 if (null != targetCodes) 438 if (null != targetCodes)
diff --git a/src/WixToolset.Core/Compiler_Bundle.cs b/src/WixToolset.Core/Compiler_Bundle.cs
index 779ad376..d6e9e7af 100644
--- a/src/WixToolset.Core/Compiler_Bundle.cs
+++ b/src/WixToolset.Core/Compiler_Bundle.cs
@@ -1974,6 +1974,7 @@ namespace WixToolset.Core
1974 var perMachine = YesNoDefaultType.NotSet; 1974 var perMachine = YesNoDefaultType.NotSet;
1975 string detectCondition = null; 1975 string detectCondition = null;
1976 string protocol = null; 1976 string protocol = null;
1977 string repairCondition = null;
1977 var installSize = CompilerConstants.IntegerNotSet; 1978 var installSize = CompilerConstants.IntegerNotSet;
1978 string msuKB = null; 1979 string msuKB = null;
1979 var enableFeatureSelection = YesNoType.NotSet; 1980 var enableFeatureSelection = YesNoType.NotSet;
@@ -2093,6 +2094,10 @@ namespace WixToolset.Core
2093 protocol = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 2094 protocol = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2094 allowed = (packageType == WixBundlePackageType.Exe); 2095 allowed = (packageType == WixBundlePackageType.Exe);
2095 break; 2096 break;
2097 case "RepairCondition":
2098 repairCondition = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
2099 allowed = (packageType == WixBundlePackageType.Exe || packageType == WixBundlePackageType.Msi || packageType == WixBundlePackageType.Msp);
2100 break;
2096 case "InstallSize": 2101 case "InstallSize":
2097 installSize = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue); 2102 installSize = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue);
2098 break; 2103 break;
@@ -2340,6 +2345,7 @@ namespace WixToolset.Core
2340 InstallCommand = installArguments, 2345 InstallCommand = installArguments,
2341 RepairCommand = repairArguments, 2346 RepairCommand = repairArguments,
2342 UninstallCommand = uninstallArguments, 2347 UninstallCommand = uninstallArguments,
2348 RepairCondition = repairCondition,
2343 ExeProtocol = protocol 2349 ExeProtocol = protocol
2344 }); 2350 });
2345 break; 2351 break;
@@ -2351,6 +2357,7 @@ namespace WixToolset.Core
2351 2357
2352 this.Core.AddSymbol(new WixBundleMsiPackageSymbol(sourceLineNumbers, id) 2358 this.Core.AddSymbol(new WixBundleMsiPackageSymbol(sourceLineNumbers, id)
2353 { 2359 {
2360 RepairCondition = repairCondition,
2354 Attributes = msiAttributes 2361 Attributes = msiAttributes
2355 }); 2362 });
2356 break; 2363 break;
@@ -2361,6 +2368,7 @@ namespace WixToolset.Core
2361 2368
2362 this.Core.AddSymbol(new WixBundleMspPackageSymbol(sourceLineNumbers, id) 2369 this.Core.AddSymbol(new WixBundleMspPackageSymbol(sourceLineNumbers, id)
2363 { 2370 {
2371 RepairCondition = repairCondition,
2364 Attributes = mspAttributes 2372 Attributes = mspAttributes
2365 }); 2373 });
2366 break; 2374 break;