aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-04-16 10:20:41 -0500
committerSean Hall <r.sean.hall@gmail.com>2021-04-19 23:12:55 -0500
commit5d6046bee5021052da4a666c1e2ceeb0f16af349 (patch)
tree589ddcbe270e2e4df8cffdbd26792bcee4c29e1c /src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h
parentb941c2754748251520dc5032d11396c9844fad8e (diff)
downloadwix-5d6046bee5021052da4a666c1e2ceeb0f16af349.tar.gz
wix-5d6046bee5021052da4a666c1e2ceeb0f16af349.tar.bz2
wix-5d6046bee5021052da4a666c1e2ceeb0f16af349.zip
Replace OnResolveSource with OnCacheAcquireResolving
Inactivate the engine during OnCacheAcquireBegin and Complete to allow setting the source from there. Fixes #3640 Contributes to #5253
Diffstat (limited to 'src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h')
-rw-r--r--src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h63
1 files changed, 33 insertions, 30 deletions
diff --git a/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h b/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h
index 2d086f38..cf330c29 100644
--- a/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h
+++ b/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h
@@ -54,8 +54,13 @@ enum BOOTSTRAPPER_RELATED_OPERATION
54 54
55enum BOOTSTRAPPER_CACHE_OPERATION 55enum BOOTSTRAPPER_CACHE_OPERATION
56{ 56{
57 // There is no source available.
58 BOOTSTRAPPER_CACHE_OPERATION_NONE,
59 // Copy the payload or container from the chosen local source.
57 BOOTSTRAPPER_CACHE_OPERATION_COPY, 60 BOOTSTRAPPER_CACHE_OPERATION_COPY,
61 // Download the payload or container using the download URL.
58 BOOTSTRAPPER_CACHE_OPERATION_DOWNLOAD, 62 BOOTSTRAPPER_CACHE_OPERATION_DOWNLOAD,
63 // Extract the payload from the container.
59 BOOTSTRAPPER_CACHE_OPERATION_EXTRACT, 64 BOOTSTRAPPER_CACHE_OPERATION_EXTRACT,
60}; 65};
61 66
@@ -112,7 +117,7 @@ enum BOOTSTRAPPER_APPLICATION_MESSAGE
112 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN, 117 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN,
113 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN, 118 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN,
114 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS, 119 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS,
115 BOOTSTRAPPER_APPLICATION_MESSAGE_ONRESOLVESOURCE, 120 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRERESOLVING,
116 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE, 121 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE,
117 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN, 122 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN,
118 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE, 123 BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE,
@@ -158,7 +163,7 @@ enum BOOTSTRAPPER_APPLYCOMPLETE_ACTION
158enum BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION 163enum BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION
159{ 164{
160 BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_NONE, 165 BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_NONE,
161 // Instructs the engine to try the acquisition of the package again. 166 // Instructs the engine to try the acquisition of the payload again.
162 // Ignored if hrStatus is a success. 167 // Ignored if hrStatus is a success.
163 BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_RETRY, 168 BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_RETRY,
164}; 169};
@@ -202,16 +207,6 @@ enum BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION
202 BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_SUSPEND, 207 BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_SUSPEND,
203}; 208};
204 209
205enum BOOTSTRAPPER_RESOLVESOURCE_ACTION
206{
207 // Instructs the engine that the source can't be found.
208 BOOTSTRAPPER_RESOLVESOURCE_ACTION_NONE,
209 // Instructs the engine to try the local source again.
210 BOOTSTRAPPER_RESOLVESOURCE_ACTION_RETRY,
211 // Instructs the engine to try the download source.
212 BOOTSTRAPPER_RESOLVESOURCE_ACTION_DOWNLOAD,
213};
214
215enum BOOTSTRAPPER_SHUTDOWN_ACTION 210enum BOOTSTRAPPER_SHUTDOWN_ACTION
216{ 211{
217 BOOTSTRAPPER_SHUTDOWN_ACTION_NONE, 212 BOOTSTRAPPER_SHUTDOWN_ACTION_NONE,
@@ -315,14 +310,17 @@ struct BA_ONCACHEACQUIREBEGIN_ARGS
315 DWORD cbSize; 310 DWORD cbSize;
316 LPCWSTR wzPackageOrContainerId; 311 LPCWSTR wzPackageOrContainerId;
317 LPCWSTR wzPayloadId; 312 LPCWSTR wzPayloadId;
318 BOOTSTRAPPER_CACHE_OPERATION operation;
319 LPCWSTR wzSource; 313 LPCWSTR wzSource;
314 LPCWSTR wzDownloadUrl;
315 LPCWSTR wzPayloadContainerId;
316 BOOTSTRAPPER_CACHE_OPERATION recommendation;
320}; 317};
321 318
322struct BA_ONCACHEACQUIREBEGIN_RESULTS 319struct BA_ONCACHEACQUIREBEGIN_RESULTS
323{ 320{
324 DWORD cbSize; 321 DWORD cbSize;
325 BOOL fCancel; 322 BOOL fCancel;
323 BOOTSTRAPPER_CACHE_OPERATION action;
326}; 324};
327 325
328struct BA_ONCACHEACQUIRECOMPLETE_ARGS 326struct BA_ONCACHEACQUIRECOMPLETE_ARGS
@@ -356,6 +354,28 @@ struct BA_ONCACHEACQUIREPROGRESS_RESULTS
356 BOOL fCancel; 354 BOOL fCancel;
357}; 355};
358 356
357struct BA_ONCACHEACQUIRERESOLVING_ARGS
358{
359 DWORD cbSize;
360 LPCWSTR wzPackageOrContainerId;
361 LPCWSTR wzPayloadId;
362 LPCWSTR* rgSearchPaths;
363 DWORD cSearchPaths;
364 BOOL fFoundLocal;
365 DWORD dwRecommendedSearchPath;
366 LPCWSTR wzDownloadUrl;
367 LPCWSTR wzPayloadContainerId;
368 BOOTSTRAPPER_CACHE_OPERATION recommendation;
369};
370
371struct BA_ONCACHEACQUIRERESOLVING_RESULTS
372{
373 DWORD cbSize;
374 DWORD dwChosenSearchPath;
375 BOOTSTRAPPER_CACHE_OPERATION action;
376 BOOL fCancel;
377};
378
359struct BA_ONCACHEBEGIN_ARGS 379struct BA_ONCACHEBEGIN_ARGS
360{ 380{
361 DWORD cbSize; 381 DWORD cbSize;
@@ -1013,23 +1033,6 @@ struct BA_ONREGISTERCOMPLETE_RESULTS
1013 DWORD cbSize; 1033 DWORD cbSize;
1014}; 1034};
1015 1035
1016struct BA_ONRESOLVESOURCE_ARGS
1017{
1018 DWORD cbSize;
1019 LPCWSTR wzPackageOrContainerId;
1020 LPCWSTR wzPayloadId;
1021 LPCWSTR wzLocalSource;
1022 LPCWSTR wzDownloadSource;
1023 BOOTSTRAPPER_RESOLVESOURCE_ACTION recommendation;
1024};
1025
1026struct BA_ONRESOLVESOURCE_RESULTS
1027{
1028 DWORD cbSize;
1029 BOOTSTRAPPER_RESOLVESOURCE_ACTION action;
1030 BOOL fCancel;
1031};
1032
1033struct BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS 1036struct BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS
1034{ 1037{
1035 DWORD cbSize; 1038 DWORD cbSize;