aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.BootstrapperCore.Native
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-04-28 16:43:48 -0500
committerSean Hall <r.sean.hall@gmail.com>2021-04-29 14:05:34 -0500
commit752f0e0576dc27e937c553ed9dce5576bd388e95 (patch)
treef95013ccb3bdea206cf8879d6bbf2411a04663c6 /src/WixToolset.BootstrapperCore.Native
parent7099dd38ab902e7fb92706314fa8710a34f165a5 (diff)
downloadwix-752f0e0576dc27e937c553ed9dce5576bd388e95.tar.gz
wix-752f0e0576dc27e937c553ed9dce5576bd388e95.tar.bz2
wix-752f0e0576dc27e937c553ed9dce5576bd388e95.zip
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.
Diffstat (limited to 'src/WixToolset.BootstrapperCore.Native')
-rw-r--r--src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h22
-rw-r--r--src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h1
2 files changed, 21 insertions, 2 deletions
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
103 BOOTSTRAPPER_RELATION_UPDATE, 103 BOOTSTRAPPER_RELATION_UPDATE,
104}; 104};
105 105
106enum BOOTSTRAPPER_CACHE_TYPE
107{
108 BOOTSTRAPPER_CACHE_TYPE_REMOVE,
109 BOOTSTRAPPER_CACHE_TYPE_KEEP,
110 BOOTSTRAPPER_CACHE_TYPE_FORCE,
111};
112
113enum BOOTSTRAPPER_PACKAGE_CONDITION_RESULT
114{
115 BOOTSTRAPPER_PACKAGE_CONDITION_DEFAULT,
116 BOOTSTRAPPER_PACKAGE_CONDITION_FALSE,
117 BOOTSTRAPPER_PACKAGE_CONDITION_TRUE,
118};
119
106enum BOOTSTRAPPER_APPLICATION_MESSAGE 120enum BOOTSTRAPPER_APPLICATION_MESSAGE
107{ 121{
108 BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN, 122 BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN,
@@ -682,6 +696,7 @@ struct BA_ONDETECTPACKAGECOMPLETE_ARGS
682 LPCWSTR wzPackageId; 696 LPCWSTR wzPackageId;
683 HRESULT hrStatus; 697 HRESULT hrStatus;
684 BOOTSTRAPPER_PACKAGE_STATE state; 698 BOOTSTRAPPER_PACKAGE_STATE state;
699 BOOL fCached;
685}; 700};
686 701
687struct BA_ONDETECTPACKAGECOMPLETE_RESULTS 702struct BA_ONDETECTPACKAGECOMPLETE_RESULTS
@@ -1062,6 +1077,8 @@ struct BA_ONPLANNEDPACKAGE_ARGS
1062 LPCWSTR wzPackageId; 1077 LPCWSTR wzPackageId;
1063 BOOTSTRAPPER_ACTION_STATE execute; 1078 BOOTSTRAPPER_ACTION_STATE execute;
1064 BOOTSTRAPPER_ACTION_STATE rollback; 1079 BOOTSTRAPPER_ACTION_STATE rollback;
1080 BOOL fPlannedCache;
1081 BOOL fPlannedUncache;
1065}; 1082};
1066 1083
1067struct BA_ONPLANNEDPACKAGE_RESULTS 1084struct BA_ONPLANNEDPACKAGE_RESULTS
@@ -1074,8 +1091,10 @@ struct BA_ONPLANPACKAGEBEGIN_ARGS
1074 DWORD cbSize; 1091 DWORD cbSize;
1075 LPCWSTR wzPackageId; 1092 LPCWSTR wzPackageId;
1076 BOOTSTRAPPER_PACKAGE_STATE state; 1093 BOOTSTRAPPER_PACKAGE_STATE state;
1077 BOOL fInstallCondition; 1094 BOOL fCached;
1095 BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition;
1078 BOOTSTRAPPER_REQUEST_STATE recommendedState; 1096 BOOTSTRAPPER_REQUEST_STATE recommendedState;
1097 BOOTSTRAPPER_CACHE_TYPE recommendedCacheType;
1079}; 1098};
1080 1099
1081struct BA_ONPLANPACKAGEBEGIN_RESULTS 1100struct BA_ONPLANPACKAGEBEGIN_RESULTS
@@ -1083,6 +1102,7 @@ struct BA_ONPLANPACKAGEBEGIN_RESULTS
1083 DWORD cbSize; 1102 DWORD cbSize;
1084 BOOL fCancel; 1103 BOOL fCancel;
1085 BOOTSTRAPPER_REQUEST_STATE requestedState; 1104 BOOTSTRAPPER_REQUEST_STATE requestedState;
1105 BOOTSTRAPPER_CACHE_TYPE requestedCacheType;
1086}; 1106};
1087 1107
1088struct BA_ONPLANPACKAGECOMPLETE_ARGS 1108struct 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
47 BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN, 47 BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN,
48 BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE, 48 BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE,
49 BOOTSTRAPPER_PACKAGE_STATE_ABSENT, 49 BOOTSTRAPPER_PACKAGE_STATE_ABSENT,
50 BOOTSTRAPPER_PACKAGE_STATE_CACHED,
51 BOOTSTRAPPER_PACKAGE_STATE_PRESENT, 50 BOOTSTRAPPER_PACKAGE_STATE_PRESENT,
52 BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED, 51 BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED,
53}; 52};