diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-04-16 10:56:24 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-04-19 23:12:55 -0500 |
| commit | c308746132f3ab89458b446f659f3d4073758da6 (patch) | |
| tree | f1b480ebdf491dde211c578ac03efc18e6ded374 /src/engine/apply.cpp | |
| parent | 70bb69c0e5f589fb55d3e36a5e81e9a7d0e56814 (diff) | |
| download | wix-c308746132f3ab89458b446f659f3d4073758da6.tar.gz wix-c308746132f3ab89458b446f659f3d4073758da6.tar.bz2 wix-c308746132f3ab89458b446f659f3d4073758da6.zip | |
When extracting a container use the uncompressed file size for progress
Remove the container's cache progress when reextracting
Skip extracting payloads that are already cached
Diffstat (limited to 'src/engine/apply.cpp')
| -rw-r--r-- | src/engine/apply.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/engine/apply.cpp b/src/engine/apply.cpp index 5402e55c..f80baf26 100644 --- a/src/engine/apply.cpp +++ b/src/engine/apply.cpp | |||
| @@ -869,6 +869,12 @@ static HRESULT ApplyExtractContainer( | |||
| 869 | { | 869 | { |
| 870 | HRESULT hr = S_OK; | 870 | HRESULT hr = S_OK; |
| 871 | 871 | ||
| 872 | if (pContainer->qwCommittedCacheProgress) | ||
| 873 | { | ||
| 874 | pContext->qwSuccessfulCacheProgress -= pContainer->qwCommittedCacheProgress; | ||
| 875 | pContainer->qwCommittedCacheProgress = 0; | ||
| 876 | } | ||
| 877 | |||
| 872 | if (!pContainer->fActuallyAttached) | 878 | if (!pContainer->fActuallyAttached) |
| 873 | { | 879 | { |
| 874 | hr = ApplyAcquireContainerOrPayload(pContext, pContainer, NULL, NULL); | 880 | hr = ApplyAcquireContainerOrPayload(pContext, pContainer, NULL, NULL); |
| @@ -884,7 +890,8 @@ static HRESULT ApplyExtractContainer( | |||
| 884 | CacheSetLastUsedSource(pContext->pVariables, pContext->sczLastUsedFolderCandidate, pContainer->sczFilePath); | 890 | CacheSetLastUsedSource(pContext->pVariables, pContext->sczLastUsedFolderCandidate, pContainer->sczFilePath); |
| 885 | } | 891 | } |
| 886 | 892 | ||
| 887 | pContext->qwSuccessfulCacheProgress += pContainer->qwFileSize; | 893 | pContext->qwSuccessfulCacheProgress += pContainer->qwExtractSizeTotal; |
| 894 | pContainer->qwCommittedCacheProgress += pContainer->qwExtractSizeTotal; | ||
| 888 | 895 | ||
| 889 | LExit: | 896 | LExit: |
| 890 | ReleaseNullStr(pContext->sczLastUsedFolderCandidate); | 897 | ReleaseNullStr(pContext->sczLastUsedFolderCandidate); |
| @@ -1110,7 +1117,7 @@ static HRESULT ExtractContainer( | |||
| 1110 | for (DWORD iExtract = 0; iExtract < pContext->pPayloads->cPayloads; ++iExtract) | 1117 | for (DWORD iExtract = 0; iExtract < pContext->pPayloads->cPayloads; ++iExtract) |
| 1111 | { | 1118 | { |
| 1112 | BURN_PAYLOAD* pExtract = pContext->pPayloads->rgPayloads + iExtract; | 1119 | BURN_PAYLOAD* pExtract = pContext->pPayloads->rgPayloads + iExtract; |
| 1113 | if (pExtract->sczUnverifiedPath && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczExtractPayloadId, -1, pExtract->sczSourcePath, -1)) | 1120 | if (pExtract->sczUnverifiedPath && pExtract->cRemainingInstances && CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczExtractPayloadId, -1, pExtract->sczSourcePath, -1)) |
| 1114 | { | 1121 | { |
| 1115 | hr = PreparePayloadDestinationPath(pExtract->sczUnverifiedPath); | 1122 | hr = PreparePayloadDestinationPath(pExtract->sczUnverifiedPath); |
| 1116 | ExitOnFailure(hr, "Failed to prepare payload destination path: %ls", pExtract->sczUnverifiedPath); | 1123 | ExitOnFailure(hr, "Failed to prepare payload destination path: %ls", pExtract->sczUnverifiedPath); |
| @@ -1747,7 +1754,11 @@ static HRESULT CompleteCacheProgress( | |||
| 1747 | if (PROGRESS_CONTINUE == dwResult) | 1754 | if (PROGRESS_CONTINUE == dwResult) |
| 1748 | { | 1755 | { |
| 1749 | pContext->pCacheContext->qwSuccessfulCacheProgress += qwFileSize; | 1756 | pContext->pCacheContext->qwSuccessfulCacheProgress += qwFileSize; |
| 1750 | if (pContext->pPayloadGroupItem) | 1757 | if (pContext->pContainer) |
| 1758 | { | ||
| 1759 | pContext->pContainer->qwCommittedCacheProgress += qwFileSize; | ||
| 1760 | } | ||
| 1761 | else if (pContext->pPayloadGroupItem) | ||
| 1751 | { | 1762 | { |
| 1752 | pContext->pPayloadGroupItem->qwCommittedCacheProgress += qwFileSize; | 1763 | pContext->pPayloadGroupItem->qwCommittedCacheProgress += qwFileSize; |
| 1753 | } | 1764 | } |
