aboutsummaryrefslogtreecommitdiff
path: root/src/api/burn
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/burn')
-rw-r--r--src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h1
-rw-r--r--src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs4
-rw-r--r--src/api/burn/WixToolset.Mba.Core/EventArgs.cs8
-rw-r--r--src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs1
-rw-r--r--src/api/burn/WixToolset.Mba.Core/IPackageInfo.cs7
-rw-r--r--src/api/burn/WixToolset.Mba.Core/PackageInfo.cs5
-rw-r--r--src/api/burn/balutil/balinfo.cpp7
-rw-r--r--src/api/burn/balutil/inc/BalBaseBAFunctions.h1
-rw-r--r--src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h1
-rw-r--r--src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h2
-rw-r--r--src/api/burn/balutil/inc/IBootstrapperApplication.h1
-rw-r--r--src/api/burn/balutil/inc/balinfo.h1
12 files changed, 34 insertions, 5 deletions
diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h
index fbbd10ee..f0b5dad4 100644
--- a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h
+++ b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h
@@ -1243,6 +1243,7 @@ struct BA_ONPLANPACKAGEBEGIN_ARGS
1243 BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition; 1243 BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition;
1244 BOOTSTRAPPER_REQUEST_STATE recommendedState; 1244 BOOTSTRAPPER_REQUEST_STATE recommendedState;
1245 BOOTSTRAPPER_CACHE_TYPE recommendedCacheType; 1245 BOOTSTRAPPER_CACHE_TYPE recommendedCacheType;
1246 BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition;
1246}; 1247};
1247 1248
1248struct BA_ONPLANPACKAGEBEGIN_RESULTS 1249struct BA_ONPLANPACKAGEBEGIN_RESULTS
diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs
index 41738bf6..6738a4a6 100644
--- a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs
+++ b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs
@@ -1598,9 +1598,9 @@ namespace WixToolset.Mba.Core
1598 return args.HResult; 1598 return args.HResult;
1599 } 1599 }
1600 1600
1601 int IBootstrapperApplication.OnPlanPackageBegin(string wzPackageId, PackageState state, bool fCached, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, RequestState recommendedState, BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, ref RequestState pRequestedState, ref BOOTSTRAPPER_CACHE_TYPE pRequestedCacheType, ref bool fCancel) 1601 int IBootstrapperApplication.OnPlanPackageBegin(string wzPackageId, PackageState state, bool fCached, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition, RequestState recommendedState, BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, ref RequestState pRequestedState, ref BOOTSTRAPPER_CACHE_TYPE pRequestedCacheType, ref bool fCancel)
1602 { 1602 {
1603 PlanPackageBeginEventArgs args = new PlanPackageBeginEventArgs(wzPackageId, state, fCached, installCondition, recommendedState, recommendedCacheType, pRequestedState, pRequestedCacheType, fCancel); 1603 PlanPackageBeginEventArgs args = new PlanPackageBeginEventArgs(wzPackageId, state, fCached, installCondition, repairCondition, recommendedState, recommendedCacheType, pRequestedState, pRequestedCacheType, fCancel);
1604 this.OnPlanPackageBegin(args); 1604 this.OnPlanPackageBegin(args);
1605 1605
1606 pRequestedState = args.State; 1606 pRequestedState = args.State;
diff --git a/src/api/burn/WixToolset.Mba.Core/EventArgs.cs b/src/api/burn/WixToolset.Mba.Core/EventArgs.cs
index 07b14b3d..d79ac402 100644
--- a/src/api/burn/WixToolset.Mba.Core/EventArgs.cs
+++ b/src/api/burn/WixToolset.Mba.Core/EventArgs.cs
@@ -783,13 +783,14 @@ namespace WixToolset.Mba.Core
783 public class PlanPackageBeginEventArgs : CancellableHResultEventArgs 783 public class PlanPackageBeginEventArgs : CancellableHResultEventArgs
784 { 784 {
785 /// <summary /> 785 /// <summary />
786 public PlanPackageBeginEventArgs(string packageId, PackageState currentState, bool cached, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, RequestState recommendedState, BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, RequestState state, BOOTSTRAPPER_CACHE_TYPE cacheType, bool cancelRecommendation) 786 public PlanPackageBeginEventArgs(string packageId, PackageState currentState, bool cached, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition, RequestState recommendedState, BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, RequestState state, BOOTSTRAPPER_CACHE_TYPE cacheType, bool cancelRecommendation)
787 : base(cancelRecommendation) 787 : base(cancelRecommendation)
788 { 788 {
789 this.PackageId = packageId; 789 this.PackageId = packageId;
790 this.CurrentState = currentState; 790 this.CurrentState = currentState;
791 this.Cached = cached; 791 this.Cached = cached;
792 this.InstallCondition = installCondition; 792 this.InstallCondition = installCondition;
793 this.RepairCondition = repairCondition;
793 this.RecommendedState = recommendedState; 794 this.RecommendedState = recommendedState;
794 this.RecommendedCacheType = recommendedCacheType; 795 this.RecommendedCacheType = recommendedCacheType;
795 this.State = state; 796 this.State = state;
@@ -817,6 +818,11 @@ namespace WixToolset.Mba.Core
817 public BOOTSTRAPPER_PACKAGE_CONDITION_RESULT InstallCondition { get; private set; } 818 public BOOTSTRAPPER_PACKAGE_CONDITION_RESULT InstallCondition { get; private set; }
818 819
819 /// <summary> 820 /// <summary>
821 /// Gets the evaluated result of the package's repair condition.
822 /// </summary>
823 public BOOTSTRAPPER_PACKAGE_CONDITION_RESULT RepairCondition { get; private set; }
824
825 /// <summary>
820 /// Gets the recommended requested state for the package. 826 /// Gets the recommended requested state for the package.
821 /// </summary> 827 /// </summary>
822 public RequestState RecommendedState { get; private set; } 828 public RequestState RecommendedState { get; private set; }
diff --git a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs
index ae642474..2877d4de 100644
--- a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs
+++ b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs
@@ -314,6 +314,7 @@ namespace WixToolset.Mba.Core
314 [MarshalAs(UnmanagedType.U4)] PackageState state, 314 [MarshalAs(UnmanagedType.U4)] PackageState state,
315 [MarshalAs(UnmanagedType.Bool)] bool fCached, 315 [MarshalAs(UnmanagedType.Bool)] bool fCached,
316 [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, 316 [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition,
317 [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition,
317 [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, 318 [MarshalAs(UnmanagedType.U4)] RequestState recommendedState,
318 [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, 319 [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_CACHE_TYPE recommendedCacheType,
319 [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, 320 [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState,
diff --git a/src/api/burn/WixToolset.Mba.Core/IPackageInfo.cs b/src/api/burn/WixToolset.Mba.Core/IPackageInfo.cs
index a1d99b10..ee3be820 100644
--- a/src/api/burn/WixToolset.Mba.Core/IPackageInfo.cs
+++ b/src/api/burn/WixToolset.Mba.Core/IPackageInfo.cs
@@ -45,6 +45,11 @@ namespace WixToolset.Mba.Core
45 /// <summary> 45 /// <summary>
46 /// 46 ///
47 /// </summary> 47 /// </summary>
48 string RepairCondition { get; }
49
50 /// <summary>
51 ///
52 /// </summary>
48 bool Permanent { get; } 53 bool Permanent { get; }
49 54
50 /// <summary> 55 /// <summary>
@@ -87,4 +92,4 @@ namespace WixToolset.Mba.Core
87 /// </summary> 92 /// </summary>
88 bool Vital { get; } 93 bool Vital { get; }
89 } 94 }
90} \ No newline at end of file 95}
diff --git a/src/api/burn/WixToolset.Mba.Core/PackageInfo.cs b/src/api/burn/WixToolset.Mba.Core/PackageInfo.cs
index 39fe4d73..e400cbe4 100644
--- a/src/api/burn/WixToolset.Mba.Core/PackageInfo.cs
+++ b/src/api/burn/WixToolset.Mba.Core/PackageInfo.cs
@@ -102,6 +102,9 @@ namespace WixToolset.Mba.Core
102 public string InstallCondition { get; internal set; } 102 public string InstallCondition { get; internal set; }
103 103
104 /// <inheritdoc/> 104 /// <inheritdoc/>
105 public string RepairCondition { get; internal set; }
106
107 /// <inheritdoc/>
105 public BOOTSTRAPPER_CACHE_TYPE CacheType { get; internal set; } 108 public BOOTSTRAPPER_CACHE_TYPE CacheType { get; internal set; }
106 109
107 /// <inheritdoc/> 110 /// <inheritdoc/>
@@ -174,6 +177,8 @@ namespace WixToolset.Mba.Core
174 177
175 package.InstallCondition = BootstrapperApplicationData.GetAttribute(node, "InstallCondition"); 178 package.InstallCondition = BootstrapperApplicationData.GetAttribute(node, "InstallCondition");
176 179
180 package.RepairCondition = BootstrapperApplicationData.GetAttribute(node, "RepairCondition");
181
177 packagesById.Add(package.Id, package); 182 packagesById.Add(package.Id, package);
178 } 183 }
179 184
diff --git a/src/api/burn/balutil/balinfo.cpp b/src/api/burn/balutil/balinfo.cpp
index f0eb9904..29e453f6 100644
--- a/src/api/burn/balutil/balinfo.cpp
+++ b/src/api/burn/balutil/balinfo.cpp
@@ -304,6 +304,7 @@ DAPI_(void) BalInfoUninitialize(
304 ReleaseStr(pBundle->packages.rgPackages[i].sczUpgradeCode); 304 ReleaseStr(pBundle->packages.rgPackages[i].sczUpgradeCode);
305 ReleaseStr(pBundle->packages.rgPackages[i].sczVersion); 305 ReleaseStr(pBundle->packages.rgPackages[i].sczVersion);
306 ReleaseStr(pBundle->packages.rgPackages[i].sczInstallCondition); 306 ReleaseStr(pBundle->packages.rgPackages[i].sczInstallCondition);
307 ReleaseStr(pBundle->packages.rgPackages[i].sczRepairCondition);
307 ReleaseStr(pBundle->packages.rgPackages[i].sczPrereqLicenseFile); 308 ReleaseStr(pBundle->packages.rgPackages[i].sczPrereqLicenseFile);
308 ReleaseStr(pBundle->packages.rgPackages[i].sczPrereqLicenseUrl); 309 ReleaseStr(pBundle->packages.rgPackages[i].sczPrereqLicenseUrl);
309 } 310 }
@@ -484,6 +485,12 @@ static HRESULT ParsePackagesFromXml(
484 ExitOnFailure(hr, "Failed to get install condition for package."); 485 ExitOnFailure(hr, "Failed to get install condition for package.");
485 } 486 }
486 487
488 hr = XmlGetAttributeEx(pNode, L"RepairCondition", &prgPackages[iPackage].sczRepairCondition);
489 if (E_NOTFOUND != hr)
490 {
491 ExitOnFailure(hr, "Failed to get repair condition for package.");
492 }
493
487 hr = XmlGetAttributeEx(pNode, L"Cache", &scz); 494 hr = XmlGetAttributeEx(pNode, L"Cache", &scz);
488 ExitOnFailure(hr, "Failed to get cache type for package."); 495 ExitOnFailure(hr, "Failed to get cache type for package.");
489 496
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctions.h b/src/api/burn/balutil/inc/BalBaseBAFunctions.h
index 6bde05d2..9ff58d2b 100644
--- a/src/api/burn/balutil/inc/BalBaseBAFunctions.h
+++ b/src/api/burn/balutil/inc/BalBaseBAFunctions.h
@@ -276,6 +276,7 @@ public: // IBootstrapperApplication
276 __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, 276 __in BOOTSTRAPPER_PACKAGE_STATE /*state*/,
277 __in BOOL /*fCached*/, 277 __in BOOL /*fCached*/,
278 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT /*installCondition*/, 278 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT /*installCondition*/,
279 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT /*repairCondition*/,
279 __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, 280 __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/,
280 __in BOOTSTRAPPER_CACHE_TYPE /*recommendedCacheType*/, 281 __in BOOTSTRAPPER_CACHE_TYPE /*recommendedCacheType*/,
281 __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestState*/, 282 __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestState*/,
diff --git a/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h b/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h
index b661c7c9..2e848df7 100644
--- a/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h
+++ b/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h
@@ -290,6 +290,7 @@ public: // IBootstrapperApplication
290 __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, 290 __in BOOTSTRAPPER_PACKAGE_STATE /*state*/,
291 __in BOOL /*fCached*/, 291 __in BOOL /*fCached*/,
292 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT /*installCondition*/, 292 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT /*installCondition*/,
293 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT /*repairCondition*/,
293 __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, 294 __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/,
294 __in BOOTSTRAPPER_CACHE_TYPE /*recommendedCacheType*/, 295 __in BOOTSTRAPPER_CACHE_TYPE /*recommendedCacheType*/,
295 __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestState*/, 296 __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestState*/,
diff --git a/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h b/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h
index 4ef7bac5..e35678ad 100644
--- a/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h
+++ b/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h
@@ -195,7 +195,7 @@ static HRESULT BalBaseBAProcOnPlanPackageBegin(
195 __inout BA_ONPLANPACKAGEBEGIN_RESULTS* pResults 195 __inout BA_ONPLANPACKAGEBEGIN_RESULTS* pResults
196 ) 196 )
197{ 197{
198 return pBA->OnPlanPackageBegin(pArgs->wzPackageId, pArgs->state, pArgs->fCached, pArgs->installCondition, pArgs->recommendedState, pArgs->recommendedCacheType, &pResults->requestedState, &pResults->requestedCacheType, &pResults->fCancel); 198 return pBA->OnPlanPackageBegin(pArgs->wzPackageId, pArgs->state, pArgs->fCached, pArgs->installCondition, pArgs->repairCondition, pArgs->recommendedState, pArgs->recommendedCacheType, &pResults->requestedState, &pResults->requestedCacheType, &pResults->fCancel);
199} 199}
200 200
201static HRESULT BalBaseBAProcOnPlanCompatibleMsiPackageBegin( 201static HRESULT BalBaseBAProcOnPlanCompatibleMsiPackageBegin(
diff --git a/src/api/burn/balutil/inc/IBootstrapperApplication.h b/src/api/burn/balutil/inc/IBootstrapperApplication.h
index a4840228..6eca90fa 100644
--- a/src/api/burn/balutil/inc/IBootstrapperApplication.h
+++ b/src/api/burn/balutil/inc/IBootstrapperApplication.h
@@ -182,6 +182,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A
182 __in BOOTSTRAPPER_PACKAGE_STATE state, 182 __in BOOTSTRAPPER_PACKAGE_STATE state,
183 __in BOOL fCached, 183 __in BOOL fCached,
184 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, 184 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition,
185 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition,
185 __in BOOTSTRAPPER_REQUEST_STATE recommendedState, 186 __in BOOTSTRAPPER_REQUEST_STATE recommendedState,
186 __in BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, 187 __in BOOTSTRAPPER_CACHE_TYPE recommendedCacheType,
187 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState, 188 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState,
diff --git a/src/api/burn/balutil/inc/balinfo.h b/src/api/burn/balutil/inc/balinfo.h
index 0c7a5b93..cd61f34d 100644
--- a/src/api/burn/balutil/inc/balinfo.h
+++ b/src/api/burn/balutil/inc/balinfo.h
@@ -49,6 +49,7 @@ typedef struct _BAL_INFO_PACKAGE
49 LPWSTR sczUpgradeCode; 49 LPWSTR sczUpgradeCode;
50 LPWSTR sczVersion; 50 LPWSTR sczVersion;
51 LPWSTR sczInstallCondition; 51 LPWSTR sczInstallCondition;
52 LPWSTR sczRepairCondition;
52 BOOTSTRAPPER_CACHE_TYPE cacheType; 53 BOOTSTRAPPER_CACHE_TYPE cacheType;
53 BOOL fPrereqPackage; 54 BOOL fPrereqPackage;
54 LPWSTR sczPrereqLicenseFile; 55 LPWSTR sczPrereqLicenseFile;