aboutsummaryrefslogtreecommitdiff
path: root/src/engine/package.cpp
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/engine/package.cpp
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/engine/package.cpp')
-rw-r--r--src/engine/package.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/package.cpp b/src/engine/package.cpp
index dd4e498a..3f8c8b0f 100644
--- a/src/engine/package.cpp
+++ b/src/engine/package.cpp
@@ -118,20 +118,20 @@ extern "C" HRESULT PackagesParseFromXml(
118 { 118 {
119 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"remove", -1)) 119 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"remove", -1))
120 { 120 {
121 pPackage->cacheType = BURN_CACHE_TYPE_NO; 121 pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_REMOVE;
122 } 122 }
123 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"keep", -1)) 123 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"keep", -1))
124 { 124 {
125 pPackage->cacheType = BURN_CACHE_TYPE_YES; 125 pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_KEEP;
126 } 126 }
127 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"force", -1)) 127 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"force", -1))
128 { 128 {
129 pPackage->cacheType = BURN_CACHE_TYPE_ALWAYS; 129 pPackage->authoredCacheType = BOOTSTRAPPER_CACHE_TYPE_FORCE;
130 } 130 }
131 else 131 else
132 { 132 {
133 hr = E_UNEXPECTED; 133 hr = E_UNEXPECTED;
134 ExitOnFailure(hr, "Invalid cache type: %ls", scz); 134 ExitOnRootFailure(hr, "Invalid cache type: %ls", scz);
135 } 135 }
136 } 136 }
137 ExitOnFailure(hr, "Failed to get @Cache."); 137 ExitOnFailure(hr, "Failed to get @Cache.");