diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-04-27 22:26:16 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-04-29 14:40:09 -0500 |
| commit | 8deeffb615244c62a0c94ea99d01ece88b1caf09 (patch) | |
| tree | f28b80cc68fbcbd1a987d101bfdd305cec2a7fea /src/balutil | |
| parent | 11fe2c881d182f9caff28bd9ff08c2e4fe513989 (diff) | |
| download | wix-8deeffb615244c62a0c94ea99d01ece88b1caf09.tar.gz wix-8deeffb615244c62a0c94ea99d01ece88b1caf09.tar.bz2 wix-8deeffb615244c62a0c94ea99d01ece88b1caf09.zip | |
Integrate size_t and OnPlanPackageBegin changes in Burn headers.
Diffstat (limited to 'src/balutil')
| -rw-r--r-- | src/balutil/BalBootstrapperEngine.cpp | 10 | ||||
| -rw-r--r-- | src/balutil/balcondition.cpp | 6 | ||||
| -rw-r--r-- | src/balutil/balinfo.cpp | 12 | ||||
| -rw-r--r-- | src/balutil/balutil.cpp | 10 | ||||
| -rw-r--r-- | src/balutil/balutil.vcxproj | 8 | ||||
| -rw-r--r-- | src/balutil/inc/BalBaseBAFunctions.h | 12 | ||||
| -rw-r--r-- | src/balutil/inc/BalBaseBootstrapperApplication.h | 12 | ||||
| -rw-r--r-- | src/balutil/inc/BalBaseBootstrapperApplicationProc.h | 6 | ||||
| -rw-r--r-- | src/balutil/inc/IBootstrapperApplication.h | 12 | ||||
| -rw-r--r-- | src/balutil/inc/IBootstrapperEngine.h | 10 | ||||
| -rw-r--r-- | src/balutil/inc/balinfo.h | 9 | ||||
| -rw-r--r-- | src/balutil/inc/balutil.h | 2 | ||||
| -rw-r--r-- | src/balutil/packages.config | 4 |
13 files changed, 62 insertions, 51 deletions
diff --git a/src/balutil/BalBootstrapperEngine.cpp b/src/balutil/BalBootstrapperEngine.cpp index dda98cb9..301b88a5 100644 --- a/src/balutil/BalBootstrapperEngine.cpp +++ b/src/balutil/BalBootstrapperEngine.cpp | |||
| @@ -107,7 +107,7 @@ public: // IBootstrapperEngine | |||
| 107 | virtual STDMETHODIMP GetVariableString( | 107 | virtual STDMETHODIMP GetVariableString( |
| 108 | __in_z LPCWSTR wzVariable, | 108 | __in_z LPCWSTR wzVariable, |
| 109 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, | 109 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, |
| 110 | __inout DWORD* pcchValue | 110 | __inout SIZE_T* pcchValue |
| 111 | ) | 111 | ) |
| 112 | { | 112 | { |
| 113 | HRESULT hr = S_OK; | 113 | HRESULT hr = S_OK; |
| @@ -134,7 +134,7 @@ public: // IBootstrapperEngine | |||
| 134 | virtual STDMETHODIMP GetVariableVersion( | 134 | virtual STDMETHODIMP GetVariableVersion( |
| 135 | __in_z LPCWSTR wzVariable, | 135 | __in_z LPCWSTR wzVariable, |
| 136 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, | 136 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, |
| 137 | __inout DWORD* pcchValue | 137 | __inout SIZE_T* pcchValue |
| 138 | ) | 138 | ) |
| 139 | { | 139 | { |
| 140 | HRESULT hr = S_OK; | 140 | HRESULT hr = S_OK; |
| @@ -161,7 +161,7 @@ public: // IBootstrapperEngine | |||
| 161 | virtual STDMETHODIMP FormatString( | 161 | virtual STDMETHODIMP FormatString( |
| 162 | __in_z LPCWSTR wzIn, | 162 | __in_z LPCWSTR wzIn, |
| 163 | __out_ecount_opt(*pcchOut) LPWSTR wzOut, | 163 | __out_ecount_opt(*pcchOut) LPWSTR wzOut, |
| 164 | __inout DWORD* pcchOut | 164 | __inout SIZE_T* pcchOut |
| 165 | ) | 165 | ) |
| 166 | { | 166 | { |
| 167 | HRESULT hr = S_OK; | 167 | HRESULT hr = S_OK; |
| @@ -188,7 +188,7 @@ public: // IBootstrapperEngine | |||
| 188 | virtual STDMETHODIMP EscapeString( | 188 | virtual STDMETHODIMP EscapeString( |
| 189 | __in_z LPCWSTR wzIn, | 189 | __in_z LPCWSTR wzIn, |
| 190 | __out_ecount_opt(*pcchOut) LPWSTR wzOut, | 190 | __out_ecount_opt(*pcchOut) LPWSTR wzOut, |
| 191 | __inout DWORD* pcchOut | 191 | __inout SIZE_T* pcchOut |
| 192 | ) | 192 | ) |
| 193 | { | 193 | { |
| 194 | HRESULT hr = S_OK; | 194 | HRESULT hr = S_OK; |
| @@ -485,7 +485,7 @@ public: // IBootstrapperEngine | |||
| 485 | } | 485 | } |
| 486 | 486 | ||
| 487 | virtual STDMETHODIMP Apply( | 487 | virtual STDMETHODIMP Apply( |
| 488 | __in_opt HWND hwndParent | 488 | __in HWND hwndParent |
| 489 | ) | 489 | ) |
| 490 | { | 490 | { |
| 491 | BAENGINE_APPLY_ARGS args = { }; | 491 | BAENGINE_APPLY_ARGS args = { }; |
diff --git a/src/balutil/balcondition.cpp b/src/balutil/balcondition.cpp index 11d3e218..8b05508f 100644 --- a/src/balutil/balcondition.cpp +++ b/src/balutil/balcondition.cpp | |||
| @@ -78,7 +78,7 @@ DAPI_(HRESULT) BalConditionEvaluate( | |||
| 78 | ) | 78 | ) |
| 79 | { | 79 | { |
| 80 | HRESULT hr = S_OK; | 80 | HRESULT hr = S_OK; |
| 81 | DWORD_PTR cchMessage = 0; | 81 | SIZE_T cchMessage = 0; |
| 82 | 82 | ||
| 83 | hr = pEngine->EvaluateCondition(pCondition->sczCondition, pfResult); | 83 | hr = pEngine->EvaluateCondition(pCondition->sczCondition, pfResult); |
| 84 | ExitOnFailure(hr, "Failed to evaluate condition with bootstrapper engine."); | 84 | ExitOnFailure(hr, "Failed to evaluate condition with bootstrapper engine."); |
| @@ -91,7 +91,7 @@ DAPI_(HRESULT) BalConditionEvaluate( | |||
| 91 | ExitOnFailure(hr, "Failed to get length of message."); | 91 | ExitOnFailure(hr, "Failed to get length of message."); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | hr = pEngine->FormatString(pCondition->sczMessage, *psczMessage, reinterpret_cast<DWORD*>(&cchMessage)); | 94 | hr = pEngine->FormatString(pCondition->sczMessage, *psczMessage, &cchMessage); |
| 95 | if (E_MOREDATA == hr) | 95 | if (E_MOREDATA == hr) |
| 96 | { | 96 | { |
| 97 | ++cchMessage; | 97 | ++cchMessage; |
| @@ -99,7 +99,7 @@ DAPI_(HRESULT) BalConditionEvaluate( | |||
| 99 | hr = StrAllocSecure(psczMessage, cchMessage); | 99 | hr = StrAllocSecure(psczMessage, cchMessage); |
| 100 | ExitOnFailure(hr, "Failed to allocate string for condition's formatted message."); | 100 | ExitOnFailure(hr, "Failed to allocate string for condition's formatted message."); |
| 101 | 101 | ||
| 102 | hr = pEngine->FormatString(pCondition->sczMessage, *psczMessage, reinterpret_cast<DWORD*>(&cchMessage)); | 102 | hr = pEngine->FormatString(pCondition->sczMessage, *psczMessage, &cchMessage); |
| 103 | } | 103 | } |
| 104 | ExitOnFailure(hr, "Failed to format condition's message."); | 104 | ExitOnFailure(hr, "Failed to format condition's message."); |
| 105 | } | 105 | } |
diff --git a/src/balutil/balinfo.cpp b/src/balutil/balinfo.cpp index 492c8e08..3abb9286 100644 --- a/src/balutil/balinfo.cpp +++ b/src/balutil/balinfo.cpp | |||
| @@ -261,17 +261,17 @@ static HRESULT ParsePackagesFromXml( | |||
| 261 | hr = XmlGetAttributeEx(pNode, L"Cache", &scz); | 261 | hr = XmlGetAttributeEx(pNode, L"Cache", &scz); |
| 262 | ExitOnFailure(hr, "Failed to get cache type for package."); | 262 | ExitOnFailure(hr, "Failed to get cache type for package."); |
| 263 | 263 | ||
| 264 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, scz, -1, L"no", -1)) | 264 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, scz, -1, L"remove", -1)) |
| 265 | { | 265 | { |
| 266 | prgPackages[iPackage].cacheType = BAL_INFO_CACHE_TYPE_NO; | 266 | prgPackages[iPackage].cacheType = BOOTSTRAPPER_CACHE_TYPE_REMOVE; |
| 267 | } | 267 | } |
| 268 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, scz, -1, L"yes", -1)) | 268 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, scz, -1, L"keep", -1)) |
| 269 | { | 269 | { |
| 270 | prgPackages[iPackage].cacheType = BAL_INFO_CACHE_TYPE_YES; | 270 | prgPackages[iPackage].cacheType = BOOTSTRAPPER_CACHE_TYPE_KEEP; |
| 271 | } | 271 | } |
| 272 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, scz, -1, L"always", -1)) | 272 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, scz, -1, L"force", -1)) |
| 273 | { | 273 | { |
| 274 | prgPackages[iPackage].cacheType = BAL_INFO_CACHE_TYPE_ALWAYS; | 274 | prgPackages[iPackage].cacheType = BOOTSTRAPPER_CACHE_TYPE_FORCE; |
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | ++iPackage; | 277 | ++iPackage; |
diff --git a/src/balutil/balutil.cpp b/src/balutil/balutil.cpp index faca70f5..7a638219 100644 --- a/src/balutil/balutil.cpp +++ b/src/balutil/balutil.cpp | |||
| @@ -96,7 +96,7 @@ DAPI_(HRESULT) BalFormatString( | |||
| 96 | ) | 96 | ) |
| 97 | { | 97 | { |
| 98 | HRESULT hr = S_OK; | 98 | HRESULT hr = S_OK; |
| 99 | DWORD cch = 0; | 99 | SIZE_T cch = 0; |
| 100 | 100 | ||
| 101 | if (!vpEngine) | 101 | if (!vpEngine) |
| 102 | { | 102 | { |
| @@ -106,7 +106,7 @@ DAPI_(HRESULT) BalFormatString( | |||
| 106 | 106 | ||
| 107 | if (*psczOut) | 107 | if (*psczOut) |
| 108 | { | 108 | { |
| 109 | hr = StrMaxLength(*psczOut, reinterpret_cast<DWORD_PTR*>(&cch)); | 109 | hr = StrMaxLength(*psczOut, &cch); |
| 110 | ExitOnFailure(hr, "Failed to determine length of value."); | 110 | ExitOnFailure(hr, "Failed to determine length of value."); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| @@ -172,7 +172,7 @@ DAPI_(BOOL) BalVariableExists( | |||
| 172 | ) | 172 | ) |
| 173 | { | 173 | { |
| 174 | HRESULT hr = S_OK; | 174 | HRESULT hr = S_OK; |
| 175 | DWORD cch = 0; | 175 | SIZE_T cch = 0; |
| 176 | 176 | ||
| 177 | if (!vpEngine) | 177 | if (!vpEngine) |
| 178 | { | 178 | { |
| @@ -194,7 +194,7 @@ DAPI_(HRESULT) BalGetStringVariable( | |||
| 194 | ) | 194 | ) |
| 195 | { | 195 | { |
| 196 | HRESULT hr = S_OK; | 196 | HRESULT hr = S_OK; |
| 197 | DWORD cch = 0; | 197 | SIZE_T cch = 0; |
| 198 | 198 | ||
| 199 | if (!vpEngine) | 199 | if (!vpEngine) |
| 200 | { | 200 | { |
| @@ -204,7 +204,7 @@ DAPI_(HRESULT) BalGetStringVariable( | |||
| 204 | 204 | ||
| 205 | if (*psczValue) | 205 | if (*psczValue) |
| 206 | { | 206 | { |
| 207 | hr = StrMaxLength(*psczValue, reinterpret_cast<DWORD_PTR*>(&cch)); | 207 | hr = StrMaxLength(*psczValue, &cch); |
| 208 | ExitOnFailure(hr, "Failed to determine length of value."); | 208 | ExitOnFailure(hr, "Failed to determine length of value."); |
| 209 | } | 209 | } |
| 210 | 210 | ||
diff --git a/src/balutil/balutil.vcxproj b/src/balutil/balutil.vcxproj index a47e994f..73153d5e 100644 --- a/src/balutil/balutil.vcxproj +++ b/src/balutil/balutil.vcxproj | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
| 3 | 3 | ||
| 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props')" /> | 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props')" /> |
| 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" /> | 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" /> |
| 7 | 7 | ||
| 8 | <ItemGroup Label="ProjectConfigurations"> | 8 | <ItemGroup Label="ProjectConfigurations"> |
| 9 | <ProjectConfiguration Include="Debug|ARM64"> | 9 | <ProjectConfiguration Include="Debug|ARM64"> |
| @@ -98,8 +98,8 @@ | |||
| 98 | <PropertyGroup> | 98 | <PropertyGroup> |
| 99 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | 99 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
| 100 | </PropertyGroup> | 100 | </PropertyGroup> |
| 101 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props'))" /> | 101 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" /> |
| 102 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> | 102 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> |
| 103 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props'))" /> | 103 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props'))" /> |
| 104 | </Target> | 104 | </Target> |
| 105 | </Project> \ No newline at end of file | 105 | </Project> \ No newline at end of file |
diff --git a/src/balutil/inc/BalBaseBAFunctions.h b/src/balutil/inc/BalBaseBAFunctions.h index 054bfb26..ee2e452f 100644 --- a/src/balutil/inc/BalBaseBAFunctions.h +++ b/src/balutil/inc/BalBaseBAFunctions.h | |||
| @@ -222,7 +222,8 @@ public: // IBootstrapperApplication | |||
| 222 | virtual STDMETHODIMP OnDetectPackageComplete( | 222 | virtual STDMETHODIMP OnDetectPackageComplete( |
| 223 | __in_z LPCWSTR /*wzPackageId*/, | 223 | __in_z LPCWSTR /*wzPackageId*/, |
| 224 | __in HRESULT /*hrStatus*/, | 224 | __in HRESULT /*hrStatus*/, |
| 225 | __in BOOTSTRAPPER_PACKAGE_STATE /*state*/ | 225 | __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, |
| 226 | __in BOOL /*fCached*/ | ||
| 226 | ) | 227 | ) |
| 227 | { | 228 | { |
| 228 | return S_OK; | 229 | return S_OK; |
| @@ -257,9 +258,12 @@ public: // IBootstrapperApplication | |||
| 257 | virtual STDMETHODIMP OnPlanPackageBegin( | 258 | virtual STDMETHODIMP OnPlanPackageBegin( |
| 258 | __in_z LPCWSTR /*wzPackageId*/, | 259 | __in_z LPCWSTR /*wzPackageId*/, |
| 259 | __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, | 260 | __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, |
| 260 | __in BOOL /*fInstallCondition*/, | 261 | __in BOOL /*fCached*/, |
| 262 | __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT /*installCondition*/, | ||
| 261 | __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, | 263 | __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, |
| 264 | __in BOOTSTRAPPER_CACHE_TYPE /*recommendedCacheType*/, | ||
| 262 | __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestState*/, | 265 | __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestState*/, |
| 266 | __inout BOOTSTRAPPER_CACHE_TYPE* /*pRequestedCacheType*/, | ||
| 263 | __inout BOOL* /*pfCancel*/ | 267 | __inout BOOL* /*pfCancel*/ |
| 264 | ) | 268 | ) |
| 265 | { | 269 | { |
| @@ -313,7 +317,9 @@ public: // IBootstrapperApplication | |||
| 313 | virtual STDMETHODIMP OnPlannedPackage( | 317 | virtual STDMETHODIMP OnPlannedPackage( |
| 314 | __in_z LPCWSTR /*wzPackageId*/, | 318 | __in_z LPCWSTR /*wzPackageId*/, |
| 315 | __in BOOTSTRAPPER_ACTION_STATE /*execute*/, | 319 | __in BOOTSTRAPPER_ACTION_STATE /*execute*/, |
| 316 | __in BOOTSTRAPPER_ACTION_STATE /*rollback*/ | 320 | __in BOOTSTRAPPER_ACTION_STATE /*rollback*/, |
| 321 | __in BOOL /*fPlannedCache*/, | ||
| 322 | __in BOOL /*fPlannedUncache*/ | ||
| 317 | ) | 323 | ) |
| 318 | { | 324 | { |
| 319 | return S_OK; | 325 | return S_OK; |
diff --git a/src/balutil/inc/BalBaseBootstrapperApplication.h b/src/balutil/inc/BalBaseBootstrapperApplication.h index 812025eb..bf21c4a5 100644 --- a/src/balutil/inc/BalBaseBootstrapperApplication.h +++ b/src/balutil/inc/BalBaseBootstrapperApplication.h | |||
| @@ -228,7 +228,8 @@ public: // IBootstrapperApplication | |||
| 228 | virtual STDMETHODIMP OnDetectPackageComplete( | 228 | virtual STDMETHODIMP OnDetectPackageComplete( |
| 229 | __in_z LPCWSTR /*wzPackageId*/, | 229 | __in_z LPCWSTR /*wzPackageId*/, |
| 230 | __in HRESULT /*hrStatus*/, | 230 | __in HRESULT /*hrStatus*/, |
| 231 | __in BOOTSTRAPPER_PACKAGE_STATE /*state*/ | 231 | __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, |
| 232 | __in BOOL /*fCached*/ | ||
| 232 | ) | 233 | ) |
| 233 | { | 234 | { |
| 234 | return S_OK; | 235 | return S_OK; |
| @@ -265,9 +266,12 @@ public: // IBootstrapperApplication | |||
| 265 | virtual STDMETHODIMP OnPlanPackageBegin( | 266 | virtual STDMETHODIMP OnPlanPackageBegin( |
| 266 | __in_z LPCWSTR /*wzPackageId*/, | 267 | __in_z LPCWSTR /*wzPackageId*/, |
| 267 | __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, | 268 | __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, |
| 268 | __in BOOL /*fInstallCondition*/, | 269 | __in BOOL /*fCached*/, |
| 270 | __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT /*installCondition*/, | ||
| 269 | __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, | 271 | __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, |
| 272 | __in BOOTSTRAPPER_CACHE_TYPE /*recommendedCacheType*/, | ||
| 270 | __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestState*/, | 273 | __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestState*/, |
| 274 | __inout BOOTSTRAPPER_CACHE_TYPE* /*pRequestedCacheType*/, | ||
| 271 | __inout BOOL* pfCancel | 275 | __inout BOOL* pfCancel |
| 272 | ) | 276 | ) |
| 273 | { | 277 | { |
| @@ -325,7 +329,9 @@ public: // IBootstrapperApplication | |||
| 325 | virtual STDMETHODIMP OnPlannedPackage( | 329 | virtual STDMETHODIMP OnPlannedPackage( |
| 326 | __in_z LPCWSTR /*wzPackageId*/, | 330 | __in_z LPCWSTR /*wzPackageId*/, |
| 327 | __in BOOTSTRAPPER_ACTION_STATE /*execute*/, | 331 | __in BOOTSTRAPPER_ACTION_STATE /*execute*/, |
| 328 | __in BOOTSTRAPPER_ACTION_STATE /*rollback*/ | 332 | __in BOOTSTRAPPER_ACTION_STATE /*rollback*/, |
| 333 | __in BOOL /*fPlannedCache*/, | ||
| 334 | __in BOOL /*fPlannedUncache*/ | ||
| 329 | ) | 335 | ) |
| 330 | { | 336 | { |
| 331 | return S_OK; | 337 | return S_OK; |
diff --git a/src/balutil/inc/BalBaseBootstrapperApplicationProc.h b/src/balutil/inc/BalBaseBootstrapperApplicationProc.h index 10769529..7fe3ffd8 100644 --- a/src/balutil/inc/BalBaseBootstrapperApplicationProc.h +++ b/src/balutil/inc/BalBaseBootstrapperApplicationProc.h | |||
| @@ -159,7 +159,7 @@ static HRESULT BalBaseBAProcOnDetectPackageComplete( | |||
| 159 | __inout BA_ONDETECTPACKAGECOMPLETE_RESULTS* /*pResults*/ | 159 | __inout BA_ONDETECTPACKAGECOMPLETE_RESULTS* /*pResults*/ |
| 160 | ) | 160 | ) |
| 161 | { | 161 | { |
| 162 | return pBA->OnDetectPackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->state); | 162 | return pBA->OnDetectPackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->state, pArgs->fCached); |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | static HRESULT BalBaseBAProcOnPlanRelatedBundle( | 165 | static HRESULT BalBaseBAProcOnPlanRelatedBundle( |
| @@ -177,7 +177,7 @@ static HRESULT BalBaseBAProcOnPlanPackageBegin( | |||
| 177 | __inout BA_ONPLANPACKAGEBEGIN_RESULTS* pResults | 177 | __inout BA_ONPLANPACKAGEBEGIN_RESULTS* pResults |
| 178 | ) | 178 | ) |
| 179 | { | 179 | { |
| 180 | return pBA->OnPlanPackageBegin(pArgs->wzPackageId, pArgs->state, pArgs->fInstallCondition, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); | 180 | return pBA->OnPlanPackageBegin(pArgs->wzPackageId, pArgs->state, pArgs->fCached, pArgs->installCondition, pArgs->recommendedState, pArgs->recommendedCacheType, &pResults->requestedState, &pResults->requestedCacheType, &pResults->fCancel); |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | static HRESULT BalBaseBAProcOnPlanPatchTarget( | 183 | static HRESULT BalBaseBAProcOnPlanPatchTarget( |
| @@ -213,7 +213,7 @@ static HRESULT BalBaseBAProcOnPlannedPackage( | |||
| 213 | __inout BA_ONPLANNEDPACKAGE_RESULTS* /*pResults*/ | 213 | __inout BA_ONPLANNEDPACKAGE_RESULTS* /*pResults*/ |
| 214 | ) | 214 | ) |
| 215 | { | 215 | { |
| 216 | return pBA->OnPlannedPackage(pArgs->wzPackageId, pArgs->execute, pArgs->rollback); | 216 | return pBA->OnPlannedPackage(pArgs->wzPackageId, pArgs->execute, pArgs->rollback, pArgs->fPlannedCache, pArgs->fPlannedUncache); |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | static HRESULT BalBaseBAProcOnApplyBegin( | 219 | static HRESULT BalBaseBAProcOnApplyBegin( |
diff --git a/src/balutil/inc/IBootstrapperApplication.h b/src/balutil/inc/IBootstrapperApplication.h index 7d6a7164..c284cb49 100644 --- a/src/balutil/inc/IBootstrapperApplication.h +++ b/src/balutil/inc/IBootstrapperApplication.h | |||
| @@ -135,7 +135,8 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A | |||
| 135 | STDMETHOD(OnDetectPackageComplete)( | 135 | STDMETHOD(OnDetectPackageComplete)( |
| 136 | __in_z LPCWSTR wzPackageId, | 136 | __in_z LPCWSTR wzPackageId, |
| 137 | __in HRESULT hrStatus, | 137 | __in HRESULT hrStatus, |
| 138 | __in BOOTSTRAPPER_PACKAGE_STATE state | 138 | __in BOOTSTRAPPER_PACKAGE_STATE state, |
| 139 | __in BOOL fCached | ||
| 139 | ) = 0; | 140 | ) = 0; |
| 140 | 141 | ||
| 141 | // OnDetectPackageComplete - called after the engine completes detection. | 142 | // OnDetectPackageComplete - called after the engine completes detection. |
| @@ -164,9 +165,12 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A | |||
| 164 | STDMETHOD(OnPlanPackageBegin)( | 165 | STDMETHOD(OnPlanPackageBegin)( |
| 165 | __in_z LPCWSTR wzPackageId, | 166 | __in_z LPCWSTR wzPackageId, |
| 166 | __in BOOTSTRAPPER_PACKAGE_STATE state, | 167 | __in BOOTSTRAPPER_PACKAGE_STATE state, |
| 167 | __in BOOL fInstallCondition, | 168 | __in BOOL fCached, |
| 169 | __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, | ||
| 168 | __in BOOTSTRAPPER_REQUEST_STATE recommendedState, | 170 | __in BOOTSTRAPPER_REQUEST_STATE recommendedState, |
| 171 | __in BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, | ||
| 169 | __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState, | 172 | __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState, |
| 173 | __inout BOOTSTRAPPER_CACHE_TYPE* pRequestedCacheType, | ||
| 170 | __inout BOOL* pfCancel | 174 | __inout BOOL* pfCancel |
| 171 | ) = 0; | 175 | ) = 0; |
| 172 | 176 | ||
| @@ -214,7 +218,9 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A | |||
| 214 | STDMETHOD(OnPlannedPackage)( | 218 | STDMETHOD(OnPlannedPackage)( |
| 215 | __in_z LPCWSTR wzPackageId, | 219 | __in_z LPCWSTR wzPackageId, |
| 216 | __in BOOTSTRAPPER_ACTION_STATE execute, | 220 | __in BOOTSTRAPPER_ACTION_STATE execute, |
| 217 | __in BOOTSTRAPPER_ACTION_STATE rollback | 221 | __in BOOTSTRAPPER_ACTION_STATE rollback, |
| 222 | __in BOOL fPlannedCache, | ||
| 223 | __in BOOL fPlannedUncache | ||
| 218 | ) = 0; | 224 | ) = 0; |
| 219 | 225 | ||
| 220 | // OnPlanComplete - called when the engine completes planning. | 226 | // OnPlanComplete - called when the engine completes planning. |
diff --git a/src/balutil/inc/IBootstrapperEngine.h b/src/balutil/inc/IBootstrapperEngine.h index af6379f4..ccb07f4f 100644 --- a/src/balutil/inc/IBootstrapperEngine.h +++ b/src/balutil/inc/IBootstrapperEngine.h | |||
| @@ -16,25 +16,25 @@ DECLARE_INTERFACE_IID_(IBootstrapperEngine, IUnknown, "6480D616-27A0-44D7-905B-8 | |||
| 16 | STDMETHOD(GetVariableString)( | 16 | STDMETHOD(GetVariableString)( |
| 17 | __in_z LPCWSTR wzVariable, | 17 | __in_z LPCWSTR wzVariable, |
| 18 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, | 18 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, |
| 19 | __inout DWORD* pcchValue | 19 | __inout SIZE_T* pcchValue |
| 20 | ) = 0; | 20 | ) = 0; |
| 21 | 21 | ||
| 22 | STDMETHOD(GetVariableVersion)( | 22 | STDMETHOD(GetVariableVersion)( |
| 23 | __in_z LPCWSTR wzVariable, | 23 | __in_z LPCWSTR wzVariable, |
| 24 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, | 24 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, |
| 25 | __inout DWORD* pcchValue | 25 | __inout SIZE_T * pcchValue |
| 26 | ) = 0; | 26 | ) = 0; |
| 27 | 27 | ||
| 28 | STDMETHOD(FormatString)( | 28 | STDMETHOD(FormatString)( |
| 29 | __in_z LPCWSTR wzIn, | 29 | __in_z LPCWSTR wzIn, |
| 30 | __out_ecount_opt(*pcchOut) LPWSTR wzOut, | 30 | __out_ecount_opt(*pcchOut) LPWSTR wzOut, |
| 31 | __inout DWORD* pcchOut | 31 | __inout SIZE_T * pcchOut |
| 32 | ) = 0; | 32 | ) = 0; |
| 33 | 33 | ||
| 34 | STDMETHOD(EscapeString)( | 34 | STDMETHOD(EscapeString)( |
| 35 | __in_z LPCWSTR wzIn, | 35 | __in_z LPCWSTR wzIn, |
| 36 | __out_ecount_opt(*pcchOut) LPWSTR wzOut, | 36 | __out_ecount_opt(*pcchOut) LPWSTR wzOut, |
| 37 | __inout DWORD* pcchOut | 37 | __inout SIZE_T * pcchOut |
| 38 | ) = 0; | 38 | ) = 0; |
| 39 | 39 | ||
| 40 | STDMETHOD(EvaluateCondition)( | 40 | STDMETHOD(EvaluateCondition)( |
| @@ -114,7 +114,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperEngine, IUnknown, "6480D616-27A0-44D7-905B-8 | |||
| 114 | ) = 0; | 114 | ) = 0; |
| 115 | 115 | ||
| 116 | STDMETHOD(Apply)( | 116 | STDMETHOD(Apply)( |
| 117 | __in_opt HWND hwndParent | 117 | __in HWND hwndParent |
| 118 | ) = 0; | 118 | ) = 0; |
| 119 | 119 | ||
| 120 | STDMETHOD(Quit)( | 120 | STDMETHOD(Quit)( |
diff --git a/src/balutil/inc/balinfo.h b/src/balutil/inc/balinfo.h index 0d838ae3..8c2155e9 100644 --- a/src/balutil/inc/balinfo.h +++ b/src/balutil/inc/balinfo.h | |||
| @@ -18,13 +18,6 @@ typedef enum BAL_INFO_PACKAGE_TYPE | |||
| 18 | BAL_INFO_PACKAGE_TYPE_BUNDLE_PATCH, | 18 | BAL_INFO_PACKAGE_TYPE_BUNDLE_PATCH, |
| 19 | } BAL_INFO_PACKAGE_TYPE; | 19 | } BAL_INFO_PACKAGE_TYPE; |
| 20 | 20 | ||
| 21 | typedef enum BAL_INFO_CACHE_TYPE | ||
| 22 | { | ||
| 23 | BAL_INFO_CACHE_TYPE_NO, | ||
| 24 | BAL_INFO_CACHE_TYPE_YES, | ||
| 25 | BAL_INFO_CACHE_TYPE_ALWAYS, | ||
| 26 | } BAL_INFO_CACHE_TYPE; | ||
| 27 | |||
| 28 | 21 | ||
| 29 | typedef struct _BAL_INFO_PACKAGE | 22 | typedef struct _BAL_INFO_PACKAGE |
| 30 | { | 23 | { |
| @@ -39,7 +32,7 @@ typedef struct _BAL_INFO_PACKAGE | |||
| 39 | LPWSTR sczUpgradeCode; | 32 | LPWSTR sczUpgradeCode; |
| 40 | LPWSTR sczVersion; | 33 | LPWSTR sczVersion; |
| 41 | LPWSTR sczInstallCondition; | 34 | LPWSTR sczInstallCondition; |
| 42 | BAL_INFO_CACHE_TYPE cacheType; | 35 | BOOTSTRAPPER_CACHE_TYPE cacheType; |
| 43 | BOOL fPrereqPackage; | 36 | BOOL fPrereqPackage; |
| 44 | LPWSTR sczPrereqLicenseFile; | 37 | LPWSTR sczPrereqLicenseFile; |
| 45 | LPWSTR sczPrereqLicenseUrl; | 38 | LPWSTR sczPrereqLicenseUrl; |
diff --git a/src/balutil/inc/balutil.h b/src/balutil/inc/balutil.h index affa4925..fad8a471 100644 --- a/src/balutil/inc/balutil.h +++ b/src/balutil/inc/balutil.h | |||
| @@ -51,7 +51,7 @@ DAPI_(void) BalInitialize( | |||
| 51 | ********************************************************************/ | 51 | ********************************************************************/ |
| 52 | DAPI_(HRESULT) BalInitializeFromCreateArgs( | 52 | DAPI_(HRESULT) BalInitializeFromCreateArgs( |
| 53 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | 53 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, |
| 54 | __out IBootstrapperEngine** ppEngine | 54 | __out_opt IBootstrapperEngine** ppEngine |
| 55 | ); | 55 | ); |
| 56 | 56 | ||
| 57 | /******************************************************************* | 57 | /******************************************************************* |
diff --git a/src/balutil/packages.config b/src/balutil/packages.config index de70fed1..08ea3364 100644 --- a/src/balutil/packages.config +++ b/src/balutil/packages.config | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <packages> | 2 | <packages> |
| 3 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> | 3 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> |
| 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.132" targetFramework="native" /> | 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.141" targetFramework="native" /> |
| 5 | <package id="WixToolset.DUtil" version="4.0.70" targetFramework="native" /> | 5 | <package id="WixToolset.DUtil" version="4.0.72" targetFramework="native" /> |
| 6 | </packages> \ No newline at end of file | 6 | </packages> \ No newline at end of file |
