diff options
Diffstat (limited to '')
-rw-r--r-- | src/engine/apply.cpp | 171 |
1 files changed, 117 insertions, 54 deletions
diff --git a/src/engine/apply.cpp b/src/engine/apply.cpp index 304c88f4..6f6225b4 100644 --- a/src/engine/apply.cpp +++ b/src/engine/apply.cpp | |||
@@ -14,9 +14,12 @@ const DWORD BURN_CACHE_MAX_RECOMMENDED_VERIFY_TRYAGAIN_ATTEMPTS = 2; | |||
14 | enum BURN_CACHE_PROGRESS_TYPE | 14 | enum BURN_CACHE_PROGRESS_TYPE |
15 | { | 15 | { |
16 | BURN_CACHE_PROGRESS_TYPE_ACQUIRE, | 16 | BURN_CACHE_PROGRESS_TYPE_ACQUIRE, |
17 | BURN_CACHE_PROGRESS_TYPE_VERIFY, | ||
18 | BURN_CACHE_PROGRESS_TYPE_CONTAINER_OR_PAYLOAD_VERIFY, | 17 | BURN_CACHE_PROGRESS_TYPE_CONTAINER_OR_PAYLOAD_VERIFY, |
19 | BURN_CACHE_PROGRESS_TYPE_EXTRACT, | 18 | BURN_CACHE_PROGRESS_TYPE_EXTRACT, |
19 | BURN_CACHE_PROGRESS_TYPE_FINALIZE, | ||
20 | BURN_CACHE_PROGRESS_TYPE_HASH, | ||
21 | BURN_CACHE_PROGRESS_TYPE_PAYLOAD_VERIFY, | ||
22 | BURN_CACHE_PROGRESS_TYPE_STAGE, | ||
20 | }; | 23 | }; |
21 | 24 | ||
22 | // structs | 25 | // structs |
@@ -151,6 +154,10 @@ static HRESULT DownloadPayload( | |||
151 | __in BURN_CACHE_PROGRESS_CONTEXT* pProgress, | 154 | __in BURN_CACHE_PROGRESS_CONTEXT* pProgress, |
152 | __in_z LPCWSTR wzDestinationPath | 155 | __in_z LPCWSTR wzDestinationPath |
153 | ); | 156 | ); |
157 | static HRESULT CALLBACK CacheMessageHandler( | ||
158 | __in BURN_CACHE_MESSAGE* pMessage, | ||
159 | __in LPVOID pvContext | ||
160 | ); | ||
154 | static HRESULT CompleteCacheProgress( | 161 | static HRESULT CompleteCacheProgress( |
155 | __in BURN_CACHE_PROGRESS_CONTEXT* pContext, | 162 | __in BURN_CACHE_PROGRESS_CONTEXT* pContext, |
156 | __in DWORD64 qwFileSize | 163 | __in DWORD64 qwFileSize |
@@ -993,7 +1000,8 @@ static HRESULT ApplyLayoutContainer( | |||
993 | } | 1000 | } |
994 | 1001 | ||
995 | ++cTryAgainAttempts; | 1002 | ++cTryAgainAttempts; |
996 | pContext->qwSuccessfulCacheProgress -= pContainer->qwFileSize; | 1003 | pContext->qwSuccessfulCacheProgress -= pContainer->qwCommittedCacheProgress; |
1004 | pContainer->qwCommittedCacheProgress = 0; | ||
997 | ReleaseNullStr(pContext->sczLastUsedFolderCandidate); | 1005 | ReleaseNullStr(pContext->sczLastUsedFolderCandidate); |
998 | LogErrorId(hr, MSG_APPLY_RETRYING_CONTAINER, pContainer->sczId, NULL, NULL); | 1006 | LogErrorId(hr, MSG_APPLY_RETRYING_CONTAINER, pContainer->sczId, NULL, NULL); |
999 | } | 1007 | } |
@@ -1075,49 +1083,25 @@ static HRESULT ApplyCacheVerifyContainerOrPayload( | |||
1075 | 1083 | ||
1076 | HRESULT hr = S_OK; | 1084 | HRESULT hr = S_OK; |
1077 | BURN_CACHE_PROGRESS_CONTEXT progress = { }; | 1085 | BURN_CACHE_PROGRESS_CONTEXT progress = { }; |
1078 | LPCWSTR wzPackageOrContainerId = pContainer ? pContainer->sczId : pPackage ? pPackage->sczId : NULL; | ||
1079 | LPCWSTR wzPayloadId = pPayloadGroupItem ? pPayloadGroupItem->pPayload->sczKey : NULL; | ||
1080 | DWORD64 qwFileSize = pContainer ? pContainer->qwFileSize : pPayloadGroupItem->pPayload->qwFileSize; | ||
1081 | 1086 | ||
1082 | progress.pCacheContext = pContext; | 1087 | progress.pCacheContext = pContext; |
1083 | progress.pContainer = pContainer; | 1088 | progress.pContainer = pContainer; |
1084 | progress.pPackage = pPackage; | 1089 | progress.pPackage = pPackage; |
1085 | progress.pPayloadGroupItem = pPayloadGroupItem; | 1090 | progress.pPayloadGroupItem = pPayloadGroupItem; |
1086 | progress.type = BURN_CACHE_PROGRESS_TYPE_CONTAINER_OR_PAYLOAD_VERIFY; | ||
1087 | |||
1088 | hr = UserExperienceOnCacheContainerOrPayloadVerifyBegin(pContext->pUX, wzPackageOrContainerId, wzPayloadId); | ||
1089 | ExitOnRootFailure(hr, "BA aborted cache container or payload verify begin."); | ||
1090 | 1091 | ||
1091 | if (pContainer) | 1092 | if (pContainer) |
1092 | { | 1093 | { |
1093 | hr = CacheVerifyContainer(pContainer, pContext->wzLayoutDirectory); | 1094 | hr = CacheVerifyContainer(pContainer, pContext->wzLayoutDirectory, CacheMessageHandler, CacheProgressRoutine, &progress); |
1094 | } | 1095 | } |
1095 | else if (!pContext->wzLayoutDirectory && INVALID_HANDLE_VALUE != pContext->hPipe) | 1096 | else if (!pContext->wzLayoutDirectory && INVALID_HANDLE_VALUE != pContext->hPipe) |
1096 | { | 1097 | { |
1097 | hr = ElevationCacheVerifyPayload(pContext->hPipe, pPackage, pPayloadGroupItem->pPayload); | 1098 | hr = ElevationCacheVerifyPayload(pContext->hPipe, pPackage, pPayloadGroupItem->pPayload, CacheMessageHandler, CacheProgressRoutine, &progress); |
1098 | } | 1099 | } |
1099 | else | 1100 | else |
1100 | { | 1101 | { |
1101 | hr = CacheVerifyPayload(pPayloadGroupItem->pPayload, pContext->wzLayoutDirectory ? pContext->wzLayoutDirectory : pPackage->sczCacheFolder); | 1102 | hr = CacheVerifyPayload(pPayloadGroupItem->pPayload, pContext->wzLayoutDirectory ? pContext->wzLayoutDirectory : pPackage->sczCacheFolder, CacheMessageHandler, CacheProgressRoutine, &progress); |
1102 | } | ||
1103 | |||
1104 | // This was best effort to avoid acquiring the container or payload. | ||
1105 | if (FAILED(hr)) | ||
1106 | { | ||
1107 | ExitFunction(); | ||
1108 | } | 1103 | } |
1109 | 1104 | ||
1110 | pContext->qwSuccessfulCacheProgress += qwFileSize; | ||
1111 | if (pPayloadGroupItem) | ||
1112 | { | ||
1113 | pPayloadGroupItem->qwCommittedCacheProgress += qwFileSize; | ||
1114 | } | ||
1115 | |||
1116 | hr = CompleteCacheProgress(&progress, qwFileSize); | ||
1117 | |||
1118 | LExit: | ||
1119 | UserExperienceOnCacheContainerOrPayloadVerifyComplete(pContext->pUX, wzPackageOrContainerId, wzPayloadId, hr); | ||
1120 | |||
1121 | return hr; | 1105 | return hr; |
1122 | } | 1106 | } |
1123 | 1107 | ||
@@ -1252,8 +1236,6 @@ static HRESULT LayoutBundle( | |||
1252 | ExitOnRootFailure(hr, "BA aborted cache payload verify begin."); | 1236 | ExitOnRootFailure(hr, "BA aborted cache payload verify begin."); |
1253 | } | 1237 | } |
1254 | 1238 | ||
1255 | pContext->qwSuccessfulCacheProgress += qwBundleSize; | ||
1256 | |||
1257 | progress.type = BURN_CACHE_PROGRESS_TYPE_CONTAINER_OR_PAYLOAD_VERIFY; | 1239 | progress.type = BURN_CACHE_PROGRESS_TYPE_CONTAINER_OR_PAYLOAD_VERIFY; |
1258 | hr = CompleteCacheProgress(&progress, qwBundleSize); | 1240 | hr = CompleteCacheProgress(&progress, qwBundleSize); |
1259 | 1241 | ||
@@ -1306,8 +1288,6 @@ static HRESULT LayoutBundle( | |||
1306 | break; | 1288 | break; |
1307 | } | 1289 | } |
1308 | 1290 | ||
1309 | progress.type = BURN_CACHE_PROGRESS_TYPE_VERIFY; | ||
1310 | |||
1311 | do | 1291 | do |
1312 | { | 1292 | { |
1313 | fCanceledBegin = FALSE; | 1293 | fCanceledBegin = FALSE; |
@@ -1320,12 +1300,7 @@ static HRESULT LayoutBundle( | |||
1320 | } | 1300 | } |
1321 | else | 1301 | else |
1322 | { | 1302 | { |
1323 | hr = CacheLayoutBundle(wzExecutableName, pContext->wzLayoutDirectory, wzUnverifiedPath); | 1303 | hr = CacheLayoutBundle(wzExecutableName, pContext->wzLayoutDirectory, wzUnverifiedPath, qwBundleSize, CacheMessageHandler, CacheProgressRoutine, &progress); |
1324 | |||
1325 | if (SUCCEEDED(hr)) | ||
1326 | { | ||
1327 | hr = CompleteCacheProgress(&progress, qwBundleSize); | ||
1328 | } | ||
1329 | } | 1304 | } |
1330 | 1305 | ||
1331 | BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action = BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION_NONE; | 1306 | BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action = BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION_NONE; |
@@ -1346,7 +1321,7 @@ static HRESULT LayoutBundle( | |||
1346 | 1321 | ||
1347 | if (fRetry) | 1322 | if (fRetry) |
1348 | { | 1323 | { |
1349 | pContext->qwSuccessfulCacheProgress -= qwBundleSize; | 1324 | pContext->qwSuccessfulCacheProgress -= qwBundleSize; // Acquire |
1350 | } | 1325 | } |
1351 | } while (fRetry); | 1326 | } while (fRetry); |
1352 | LogExitOnFailure(hr, MSG_FAILED_LAYOUT_BUNDLE, "Failed to layout bundle: %ls to layout directory: %ls", sczBundlePath, pContext->wzLayoutDirectory); | 1327 | LogExitOnFailure(hr, MSG_FAILED_LAYOUT_BUNDLE, "Failed to layout bundle: %ls to layout directory: %ls", sczBundlePath, pContext->wzLayoutDirectory); |
@@ -1559,7 +1534,6 @@ static HRESULT LayoutOrCacheContainerOrPayload( | |||
1559 | 1534 | ||
1560 | *pfRetry = FALSE; | 1535 | *pfRetry = FALSE; |
1561 | progress.pCacheContext = pContext; | 1536 | progress.pCacheContext = pContext; |
1562 | progress.type = BURN_CACHE_PROGRESS_TYPE_VERIFY; | ||
1563 | progress.pContainer = pContainer; | 1537 | progress.pContainer = pContainer; |
1564 | progress.pPackage = pPackage; | 1538 | progress.pPackage = pPackage; |
1565 | progress.pPayloadGroupItem = pPayloadGroupItem; | 1539 | progress.pPayloadGroupItem = pPayloadGroupItem; |
@@ -1580,28 +1554,23 @@ static HRESULT LayoutOrCacheContainerOrPayload( | |||
1580 | { | 1554 | { |
1581 | if (pContainer) | 1555 | if (pContainer) |
1582 | { | 1556 | { |
1583 | hr = CacheLayoutContainer(pContainer, pContext->wzLayoutDirectory, wzUnverifiedPath, fMove); | 1557 | hr = CacheLayoutContainer(pContainer, pContext->wzLayoutDirectory, wzUnverifiedPath, fMove, CacheMessageHandler, CacheProgressRoutine, &progress); |
1584 | } | 1558 | } |
1585 | else | 1559 | else |
1586 | { | 1560 | { |
1587 | hr = CacheLayoutPayload(pPayload, pContext->wzLayoutDirectory, wzUnverifiedPath, fMove); | 1561 | hr = CacheLayoutPayload(pPayload, pContext->wzLayoutDirectory, wzUnverifiedPath, fMove, CacheMessageHandler, CacheProgressRoutine, &progress); |
1588 | } | 1562 | } |
1589 | } | 1563 | } |
1590 | else if (INVALID_HANDLE_VALUE != pContext->hPipe) // pass the decision off to the elevated process. | 1564 | else if (INVALID_HANDLE_VALUE != pContext->hPipe) // pass the decision off to the elevated process. |
1591 | { | 1565 | { |
1592 | hr = ElevationCacheCompletePayload(pContext->hPipe, pPackage, pPayload, wzUnverifiedPath, fMove); | 1566 | hr = ElevationCacheCompletePayload(pContext->hPipe, pPackage, pPayload, wzUnverifiedPath, fMove, CacheMessageHandler, CacheProgressRoutine, &progress); |
1593 | } | 1567 | } |
1594 | else // complete the payload. | 1568 | else // complete the payload. |
1595 | { | 1569 | { |
1596 | hr = CacheCompletePayload(pPackage->fPerMachine, pPayload, pPackage->sczCacheId, wzUnverifiedPath, fMove); | 1570 | hr = CacheCompletePayload(pPackage->fPerMachine, pPayload, pPackage->sczCacheId, wzUnverifiedPath, fMove, CacheMessageHandler, CacheProgressRoutine, &progress); |
1597 | } | 1571 | } |
1598 | } | 1572 | } |
1599 | 1573 | ||
1600 | if (SUCCEEDED(hr)) | ||
1601 | { | ||
1602 | hr = CompleteCacheProgress(&progress, pContainer ? pContainer->qwFileSize : pPayload->qwFileSize); | ||
1603 | } | ||
1604 | |||
1605 | if (SUCCEEDED(hr) && fCanAffectRegistration) | 1574 | if (SUCCEEDED(hr) && fCanAffectRegistration) |
1606 | { | 1575 | { |
1607 | pPackage->cacheRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_PRESENT; | 1576 | pPackage->cacheRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_PRESENT; |
@@ -1820,6 +1789,54 @@ LExit: | |||
1820 | return hr; | 1789 | return hr; |
1821 | } | 1790 | } |
1822 | 1791 | ||
1792 | static HRESULT CALLBACK CacheMessageHandler( | ||
1793 | __in BURN_CACHE_MESSAGE* pMessage, | ||
1794 | __in LPVOID pvContext | ||
1795 | ) | ||
1796 | { | ||
1797 | HRESULT hr = S_OK; | ||
1798 | BURN_CACHE_PROGRESS_CONTEXT* pProgress = static_cast<BURN_CACHE_PROGRESS_CONTEXT*>(pvContext); | ||
1799 | LPCWSTR wzPackageOrContainerId = pProgress->pContainer ? pProgress->pContainer->sczId : pProgress->pPackage ? pProgress->pPackage->sczId : NULL; | ||
1800 | LPCWSTR wzPayloadId = pProgress->pPayloadGroupItem ? pProgress->pPayloadGroupItem->pPayload->sczKey : pProgress->pPayload ? pProgress->pPayload->sczKey : NULL; | ||
1801 | |||
1802 | switch (pMessage->type) | ||
1803 | { | ||
1804 | case BURN_CACHE_MESSAGE_BEGIN: | ||
1805 | switch (pMessage->begin.cacheStep) | ||
1806 | { | ||
1807 | case BURN_CACHE_STEP_HASH_TO_SKIP_ACQUIRE: | ||
1808 | pProgress->type = BURN_CACHE_PROGRESS_TYPE_CONTAINER_OR_PAYLOAD_VERIFY; | ||
1809 | hr = UserExperienceOnCacheContainerOrPayloadVerifyBegin(pProgress->pCacheContext->pUX, wzPackageOrContainerId, wzPayloadId); | ||
1810 | break; | ||
1811 | case BURN_CACHE_STEP_HASH_TO_SKIP_VERIFY: | ||
1812 | pProgress->type = BURN_CACHE_PROGRESS_TYPE_PAYLOAD_VERIFY; | ||
1813 | break; | ||
1814 | case BURN_CACHE_STEP_STAGE: | ||
1815 | pProgress->type = BURN_CACHE_PROGRESS_TYPE_STAGE; | ||
1816 | break; | ||
1817 | case BURN_CACHE_STEP_HASH: | ||
1818 | pProgress->type = BURN_CACHE_PROGRESS_TYPE_HASH; | ||
1819 | break; | ||
1820 | case BURN_CACHE_STEP_FINALIZE: | ||
1821 | pProgress->type = BURN_CACHE_PROGRESS_TYPE_FINALIZE; | ||
1822 | break; | ||
1823 | } | ||
1824 | break; | ||
1825 | case BURN_CACHE_MESSAGE_SUCCESS: | ||
1826 | hr = CompleteCacheProgress(pProgress, pMessage->success.qwFileSize); | ||
1827 | break; | ||
1828 | case BURN_CACHE_MESSAGE_COMPLETE: | ||
1829 | switch (pProgress->type) | ||
1830 | { | ||
1831 | case BURN_CACHE_PROGRESS_TYPE_CONTAINER_OR_PAYLOAD_VERIFY: | ||
1832 | hr = UserExperienceOnCacheContainerOrPayloadVerifyComplete(pProgress->pCacheContext->pUX, wzPackageOrContainerId, wzPayloadId, hr); | ||
1833 | break; | ||
1834 | } | ||
1835 | } | ||
1836 | |||
1837 | return hr; | ||
1838 | } | ||
1839 | |||
1823 | static HRESULT CompleteCacheProgress( | 1840 | static HRESULT CompleteCacheProgress( |
1824 | __in BURN_CACHE_PROGRESS_CONTEXT* pContext, | 1841 | __in BURN_CACHE_PROGRESS_CONTEXT* pContext, |
1825 | __in DWORD64 qwFileSize | 1842 | __in DWORD64 qwFileSize |
@@ -1829,9 +1846,29 @@ static HRESULT CompleteCacheProgress( | |||
1829 | LARGE_INTEGER liContainerOrPayloadSize = { }; | 1846 | LARGE_INTEGER liContainerOrPayloadSize = { }; |
1830 | LARGE_INTEGER liZero = { }; | 1847 | LARGE_INTEGER liZero = { }; |
1831 | DWORD dwResult = 0; | 1848 | DWORD dwResult = 0; |
1849 | DWORD64 qwCommitSize = 0; | ||
1832 | 1850 | ||
1833 | liContainerOrPayloadSize.QuadPart = qwFileSize; | 1851 | liContainerOrPayloadSize.QuadPart = qwFileSize; |
1834 | 1852 | ||
1853 | // Need to commit the steps that were skipped. | ||
1854 | if (BURN_CACHE_PROGRESS_TYPE_CONTAINER_OR_PAYLOAD_VERIFY == pContext->type || BURN_CACHE_PROGRESS_TYPE_PAYLOAD_VERIFY == pContext->type) | ||
1855 | { | ||
1856 | Assert(!pContext->pPayload); | ||
1857 | |||
1858 | qwCommitSize = qwFileSize * (pContext->pCacheContext->wzLayoutDirectory ? 2 : 3); // Acquire (+ Stage) + Hash + Finalize - 1 (that's added later) | ||
1859 | |||
1860 | pContext->pCacheContext->qwSuccessfulCacheProgress += qwCommitSize; | ||
1861 | |||
1862 | if (pContext->pContainer) | ||
1863 | { | ||
1864 | pContext->pContainer->qwCommittedCacheProgress += qwCommitSize; | ||
1865 | } | ||
1866 | else if (pContext->pPayloadGroupItem) | ||
1867 | { | ||
1868 | pContext->pPayloadGroupItem->qwCommittedCacheProgress += qwCommitSize; | ||
1869 | } | ||
1870 | } | ||
1871 | |||
1835 | dwResult = CacheProgressRoutine(liContainerOrPayloadSize, liContainerOrPayloadSize, liZero, liZero, 0, 0, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, pContext); | 1872 | dwResult = CacheProgressRoutine(liContainerOrPayloadSize, liContainerOrPayloadSize, liZero, liZero, 0, 0, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, pContext); |
1836 | 1873 | ||
1837 | if (PROGRESS_CONTINUE == dwResult) | 1874 | if (PROGRESS_CONTINUE == dwResult) |
@@ -1851,7 +1888,7 @@ static HRESULT CompleteCacheProgress( | |||
1851 | pContext->pPayloadGroupItem->qwCommittedCacheProgress += qwFileSize; | 1888 | pContext->pPayloadGroupItem->qwCommittedCacheProgress += qwFileSize; |
1852 | } | 1889 | } |
1853 | 1890 | ||
1854 | if (BURN_CACHE_PROGRESS_TYPE_VERIFY == pContext->type && pContext->pCacheContext->sczLastUsedFolderCandidate) | 1891 | if (BURN_CACHE_PROGRESS_TYPE_FINALIZE == pContext->type && pContext->pCacheContext->sczLastUsedFolderCandidate) |
1855 | { | 1892 | { |
1856 | // We successfully copied from a source location, set that as the last used source. | 1893 | // We successfully copied from a source location, set that as the last used source. |
1857 | CacheSetLastUsedSource(pContext->pCacheContext->pVariables, pContext->pCacheContext->sczLastUsedFolderCandidate, pContext->pContainer ? pContext->pContainer->sczFilePath : pContext->pPayloadGroupItem->pPayload->sczFilePath); | 1894 | CacheSetLastUsedSource(pContext->pCacheContext->pVariables, pContext->pCacheContext->sczLastUsedFolderCandidate, pContext->pContainer ? pContext->pContainer->sczFilePath : pContext->pPayloadGroupItem->pPayload->sczFilePath); |
@@ -1867,6 +1904,20 @@ static HRESULT CompleteCacheProgress( | |||
1867 | { | 1904 | { |
1868 | hr = pContext->hrError; | 1905 | hr = pContext->hrError; |
1869 | } | 1906 | } |
1907 | |||
1908 | if (qwCommitSize) | ||
1909 | { | ||
1910 | pContext->pCacheContext->qwSuccessfulCacheProgress -= qwCommitSize; | ||
1911 | |||
1912 | if (pContext->pContainer) | ||
1913 | { | ||
1914 | pContext->pContainer->qwCommittedCacheProgress -= qwCommitSize; | ||
1915 | } | ||
1916 | else if (pContext->pPayloadGroupItem) | ||
1917 | { | ||
1918 | pContext->pPayloadGroupItem->qwCommittedCacheProgress -= qwCommitSize; | ||
1919 | } | ||
1920 | } | ||
1870 | } | 1921 | } |
1871 | 1922 | ||
1872 | return hr; | 1923 | return hr; |
@@ -1903,9 +1954,21 @@ static DWORD CALLBACK CacheProgressRoutine( | |||
1903 | hr = UserExperienceOnCacheAcquireProgress(pProgress->pCacheContext->pUX, wzPackageOrContainerId, wzPayloadId, TotalBytesTransferred.QuadPart, TotalFileSize.QuadPart, dwOverallPercentage); | 1954 | hr = UserExperienceOnCacheAcquireProgress(pProgress->pCacheContext->pUX, wzPackageOrContainerId, wzPayloadId, TotalBytesTransferred.QuadPart, TotalFileSize.QuadPart, dwOverallPercentage); |
1904 | ExitOnRootFailure(hr, "BA aborted acquire of %hs: %ls", pProgress->pContainer ? "container" : "payload", pProgress->pContainer ? wzPackageOrContainerId : wzPayloadId); | 1955 | ExitOnRootFailure(hr, "BA aborted acquire of %hs: %ls", pProgress->pContainer ? "container" : "payload", pProgress->pContainer ? wzPackageOrContainerId : wzPayloadId); |
1905 | break; | 1956 | break; |
1906 | case BURN_CACHE_PROGRESS_TYPE_VERIFY: | 1957 | case BURN_CACHE_PROGRESS_TYPE_PAYLOAD_VERIFY: |
1907 | hr = UserExperienceOnCacheVerifyProgress(pProgress->pCacheContext->pUX, wzPackageOrContainerId, wzPayloadId, TotalBytesTransferred.QuadPart, TotalFileSize.QuadPart, dwOverallPercentage); | 1958 | hr = UserExperienceOnCacheVerifyProgress(pProgress->pCacheContext->pUX, wzPackageOrContainerId, wzPayloadId, TotalBytesTransferred.QuadPart, TotalFileSize.QuadPart, dwOverallPercentage, BOOTSTRAPPER_CACHE_VERIFY_STEP_HASH); |
1908 | ExitOnRootFailure(hr, "BA aborted verify of %hs: %ls", pProgress->pContainer ? "container" : "payload", pProgress->pContainer ? wzPackageOrContainerId : wzPayloadId); | 1959 | ExitOnRootFailure(hr, "BA aborted payload verify step during verify of %hs: %ls", pProgress->pContainer ? "container" : "payload", pProgress->pContainer ? wzPackageOrContainerId : wzPayloadId); |
1960 | break; | ||
1961 | case BURN_CACHE_PROGRESS_TYPE_STAGE: | ||
1962 | hr = UserExperienceOnCacheVerifyProgress(pProgress->pCacheContext->pUX, wzPackageOrContainerId, wzPayloadId, TotalBytesTransferred.QuadPart, TotalFileSize.QuadPart, dwOverallPercentage, BOOTSTRAPPER_CACHE_VERIFY_STEP_STAGE); | ||
1963 | ExitOnRootFailure(hr, "BA aborted stage step during verify of %hs: %ls", pProgress->pContainer ? "container" : "payload", pProgress->pContainer ? wzPackageOrContainerId : wzPayloadId); | ||
1964 | break; | ||
1965 | case BURN_CACHE_PROGRESS_TYPE_HASH: | ||
1966 | hr = UserExperienceOnCacheVerifyProgress(pProgress->pCacheContext->pUX, wzPackageOrContainerId, wzPayloadId, TotalBytesTransferred.QuadPart, TotalFileSize.QuadPart, dwOverallPercentage, BOOTSTRAPPER_CACHE_VERIFY_STEP_HASH); | ||
1967 | ExitOnRootFailure(hr, "BA aborted hash step during verify of %hs: %ls", pProgress->pContainer ? "container" : "payload", pProgress->pContainer ? wzPackageOrContainerId : wzPayloadId); | ||
1968 | break; | ||
1969 | case BURN_CACHE_PROGRESS_TYPE_FINALIZE: | ||
1970 | hr = UserExperienceOnCacheVerifyProgress(pProgress->pCacheContext->pUX, wzPackageOrContainerId, wzPayloadId, TotalBytesTransferred.QuadPart, TotalFileSize.QuadPart, dwOverallPercentage, BOOTSTRAPPER_CACHE_VERIFY_STEP_FINALIZE); | ||
1971 | ExitOnRootFailure(hr, "BA aborted finalize step during verify of %hs: %ls", pProgress->pContainer ? "container" : "payload", pProgress->pContainer ? wzPackageOrContainerId : wzPayloadId); | ||
1909 | break; | 1972 | break; |
1910 | case BURN_CACHE_PROGRESS_TYPE_CONTAINER_OR_PAYLOAD_VERIFY: | 1973 | case BURN_CACHE_PROGRESS_TYPE_CONTAINER_OR_PAYLOAD_VERIFY: |
1911 | hr = UserExperienceOnCacheContainerOrPayloadVerifyProgress(pProgress->pCacheContext->pUX, wzPackageOrContainerId, wzPayloadId, TotalBytesTransferred.QuadPart, TotalFileSize.QuadPart, dwOverallPercentage); | 1974 | hr = UserExperienceOnCacheContainerOrPayloadVerifyProgress(pProgress->pCacheContext->pUX, wzPackageOrContainerId, wzPayloadId, TotalBytesTransferred.QuadPart, TotalFileSize.QuadPart, dwOverallPercentage); |