From 752f0e0576dc27e937c553ed9dce5576bd388e95 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 28 Apr 2021 16:43:48 -0500 Subject: Let BA override the package's cache type during Plan. Rename cache types to REMOVE, KEEP, FORCE. Change implementation of FORCE to not be through CACHED request state. Create package condition enum so BA can tell when InstallCondition wasn't specified. Tell BA when package is cached. Tell BA when package is planned to be cached and uncached. --- .../inc/BootstrapperApplication.h | 22 +++++++++++++++++++++- .../inc/BootstrapperEngine.h | 1 - 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'src/WixToolset.BootstrapperCore.Native') diff --git a/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h b/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h index 603df890..2a6d5c8a 100644 --- a/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h +++ b/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h @@ -103,6 +103,20 @@ enum BOOTSTRAPPER_RELATION_TYPE BOOTSTRAPPER_RELATION_UPDATE, }; +enum BOOTSTRAPPER_CACHE_TYPE +{ + BOOTSTRAPPER_CACHE_TYPE_REMOVE, + BOOTSTRAPPER_CACHE_TYPE_KEEP, + BOOTSTRAPPER_CACHE_TYPE_FORCE, +}; + +enum BOOTSTRAPPER_PACKAGE_CONDITION_RESULT +{ + BOOTSTRAPPER_PACKAGE_CONDITION_DEFAULT, + BOOTSTRAPPER_PACKAGE_CONDITION_FALSE, + BOOTSTRAPPER_PACKAGE_CONDITION_TRUE, +}; + enum BOOTSTRAPPER_APPLICATION_MESSAGE { BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN, @@ -682,6 +696,7 @@ struct BA_ONDETECTPACKAGECOMPLETE_ARGS LPCWSTR wzPackageId; HRESULT hrStatus; BOOTSTRAPPER_PACKAGE_STATE state; + BOOL fCached; }; struct BA_ONDETECTPACKAGECOMPLETE_RESULTS @@ -1062,6 +1077,8 @@ struct BA_ONPLANNEDPACKAGE_ARGS LPCWSTR wzPackageId; BOOTSTRAPPER_ACTION_STATE execute; BOOTSTRAPPER_ACTION_STATE rollback; + BOOL fPlannedCache; + BOOL fPlannedUncache; }; struct BA_ONPLANNEDPACKAGE_RESULTS @@ -1074,8 +1091,10 @@ struct BA_ONPLANPACKAGEBEGIN_ARGS DWORD cbSize; LPCWSTR wzPackageId; BOOTSTRAPPER_PACKAGE_STATE state; - BOOL fInstallCondition; + BOOL fCached; + BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition; BOOTSTRAPPER_REQUEST_STATE recommendedState; + BOOTSTRAPPER_CACHE_TYPE recommendedCacheType; }; struct BA_ONPLANPACKAGEBEGIN_RESULTS @@ -1083,6 +1102,7 @@ struct BA_ONPLANPACKAGEBEGIN_RESULTS DWORD cbSize; BOOL fCancel; BOOTSTRAPPER_REQUEST_STATE requestedState; + BOOTSTRAPPER_CACHE_TYPE requestedCacheType; }; struct BA_ONPLANPACKAGECOMPLETE_ARGS diff --git a/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h b/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h index f6804733..9c9b38a5 100644 --- a/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h +++ b/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h @@ -47,7 +47,6 @@ enum BOOTSTRAPPER_PACKAGE_STATE BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN, BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE, BOOTSTRAPPER_PACKAGE_STATE_ABSENT, - BOOTSTRAPPER_PACKAGE_STATE_CACHED, BOOTSTRAPPER_PACKAGE_STATE_PRESENT, BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED, }; -- cgit v1.2.3-55-g6feb