summaryrefslogtreecommitdiff
path: root/src/burn/engine/userexperience.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-03-13 23:45:32 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-03-14 14:53:29 -0500
commit4cd1c4e06145434ca940ac828772dc47b9d9738e (patch)
treea754d685039173c63303dc6d0d8b1a2bf3ab506b /src/burn/engine/userexperience.cpp
parent89adb2e3cc232b11b28e5bdeccb0c522c8124a29 (diff)
downloadwix-4cd1c4e06145434ca940ac828772dc47b9d9738e.tar.gz
wix-4cd1c4e06145434ca940ac828772dc47b9d9738e.tar.bz2
wix-4cd1c4e06145434ca940ac828772dc47b9d9738e.zip
Allow the BA to override the bundle relation type during plan.
Diffstat (limited to 'src/burn/engine/userexperience.cpp')
-rw-r--r--src/burn/engine/userexperience.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/burn/engine/userexperience.cpp b/src/burn/engine/userexperience.cpp
index f299772b..8668cf6f 100644
--- a/src/burn/engine/userexperience.cpp
+++ b/src/burn/engine/userexperience.cpp
@@ -104,7 +104,7 @@ extern "C" HRESULT UserExperienceLoad(
104 args.pCommand = pCommand; 104 args.pCommand = pCommand;
105 args.pfnBootstrapperEngineProc = EngineForApplicationProc; 105 args.pfnBootstrapperEngineProc = EngineForApplicationProc;
106 args.pvBootstrapperEngineProcContext = pEngineContext; 106 args.pvBootstrapperEngineProcContext = pEngineContext;
107 args.qwEngineAPIVersion = MAKEQWORDVERSION(2022, 3, 4, 0); 107 args.qwEngineAPIVersion = MAKEQWORDVERSION(2022, 3, 14, 0);
108 108
109 results.cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); 109 results.cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS);
110 110
@@ -2176,6 +2176,36 @@ LExit:
2176 return hr; 2176 return hr;
2177} 2177}
2178 2178
2179EXTERN_C BAAPI UserExperienceOnPlanRelatedBundleType(
2180 __in BURN_USER_EXPERIENCE* pUserExperience,
2181 __in_z LPCWSTR wzBundleId,
2182 __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType
2183 )
2184{
2185 HRESULT hr = S_OK;
2186 BA_ONPLANRELATEDBUNDLETYPE_ARGS args = { };
2187 BA_ONPLANRELATEDBUNDLETYPE_RESULTS results = { };
2188
2189 args.cbSize = sizeof(args);
2190 args.wzBundleId = wzBundleId;
2191 args.recommendedType = *pRequestedType;
2192
2193 results.cbSize = sizeof(results);
2194 results.requestedType = *pRequestedType;
2195
2196 hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, &args, &results);
2197 ExitOnFailure(hr, "BA OnPlanRelatedBundleType failed.");
2198
2199 if (results.fCancel)
2200 {
2201 hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
2202 }
2203 *pRequestedType = results.requestedType;
2204
2205LExit:
2206 return hr;
2207}
2208
2179EXTERN_C BAAPI UserExperienceOnPlanRestoreRelatedBundle( 2209EXTERN_C BAAPI UserExperienceOnPlanRestoreRelatedBundle(
2180 __in BURN_USER_EXPERIENCE* pUserExperience, 2210 __in BURN_USER_EXPERIENCE* pUserExperience,
2181 __in_z LPCWSTR wzBundleId, 2211 __in_z LPCWSTR wzBundleId,