diff options
Diffstat (limited to 'src/burn')
-rw-r--r-- | src/burn/engine/apply.cpp | 23 | ||||
-rw-r--r-- | src/burn/engine/detect.cpp | 11 | ||||
-rw-r--r-- | src/burn/engine/engine.mc | 2 | ||||
-rw-r--r-- | src/burn/engine/externalengine.cpp | 2 | ||||
-rw-r--r-- | src/burn/engine/splashscreen.cpp | 6 |
5 files changed, 37 insertions, 7 deletions
diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp index e67208b4..8fbaa76e 100644 --- a/src/burn/engine/apply.cpp +++ b/src/burn/engine/apply.cpp | |||
@@ -2547,6 +2547,11 @@ static HRESULT DoExecuteAction( | |||
2547 | } while (fRetry && *pRestart < BOOTSTRAPPER_APPLY_RESTART_INITIATED); | 2547 | } while (fRetry && *pRestart < BOOTSTRAPPER_APPLY_RESTART_INITIATED); |
2548 | 2548 | ||
2549 | LExit: | 2549 | LExit: |
2550 | if (*pRestart < restart) | ||
2551 | { | ||
2552 | *pRestart = restart; | ||
2553 | } | ||
2554 | |||
2550 | return hr; | 2555 | return hr; |
2551 | } | 2556 | } |
2552 | 2557 | ||
@@ -2561,6 +2566,7 @@ static HRESULT DoRollbackActions( | |||
2561 | DWORD iCheckpoint = 0; | 2566 | DWORD iCheckpoint = 0; |
2562 | BOOL fRetryIgnored = FALSE; | 2567 | BOOL fRetryIgnored = FALSE; |
2563 | BOOL fSuspendIgnored = FALSE; | 2568 | BOOL fSuspendIgnored = FALSE; |
2569 | BOOTSTRAPPER_APPLY_RESTART restart = BOOTSTRAPPER_APPLY_RESTART_NONE; | ||
2564 | 2570 | ||
2565 | pContext->fRollback = TRUE; | 2571 | pContext->fRollback = TRUE; |
2566 | 2572 | ||
@@ -2598,7 +2604,8 @@ static HRESULT DoRollbackActions( | |||
2598 | continue; | 2604 | continue; |
2599 | } | 2605 | } |
2600 | 2606 | ||
2601 | BOOTSTRAPPER_APPLY_RESTART restart = BOOTSTRAPPER_APPLY_RESTART_NONE; | 2607 | restart = BOOTSTRAPPER_APPLY_RESTART_NONE; |
2608 | |||
2602 | switch (pRollbackAction->type) | 2609 | switch (pRollbackAction->type) |
2603 | { | 2610 | { |
2604 | case BURN_EXECUTE_ACTION_TYPE_CHECKPOINT: | 2611 | case BURN_EXECUTE_ACTION_TYPE_CHECKPOINT: |
@@ -2674,6 +2681,11 @@ static HRESULT DoRollbackActions( | |||
2674 | } | 2681 | } |
2675 | 2682 | ||
2676 | LExit: | 2683 | LExit: |
2684 | if (*pRestart < restart) | ||
2685 | { | ||
2686 | *pRestart = restart; | ||
2687 | } | ||
2688 | |||
2677 | return hr; | 2689 | return hr; |
2678 | } | 2690 | } |
2679 | 2691 | ||
@@ -2791,6 +2803,7 @@ static HRESULT DoRestoreRelatedBundleActions( | |||
2791 | HRESULT hr = S_OK; | 2803 | HRESULT hr = S_OK; |
2792 | BOOL fRetryIgnored = FALSE; | 2804 | BOOL fRetryIgnored = FALSE; |
2793 | BOOL fSuspendIgnored = FALSE; | 2805 | BOOL fSuspendIgnored = FALSE; |
2806 | BOOTSTRAPPER_APPLY_RESTART restart = BOOTSTRAPPER_APPLY_RESTART_NONE; | ||
2794 | 2807 | ||
2795 | // execute restore related bundle actions | 2808 | // execute restore related bundle actions |
2796 | for (DWORD i = 0; i < pEngineState->plan.cRestoreRelatedBundleActions; ++i) | 2809 | for (DWORD i = 0; i < pEngineState->plan.cRestoreRelatedBundleActions; ++i) |
@@ -2804,7 +2817,8 @@ static HRESULT DoRestoreRelatedBundleActions( | |||
2804 | pContext->wzExecutingPackageId = NULL; | 2817 | pContext->wzExecutingPackageId = NULL; |
2805 | pContext->fAbandonedProcess = FALSE; | 2818 | pContext->fAbandonedProcess = FALSE; |
2806 | 2819 | ||
2807 | BOOTSTRAPPER_APPLY_RESTART restart = BOOTSTRAPPER_APPLY_RESTART_NONE; | 2820 | restart = BOOTSTRAPPER_APPLY_RESTART_NONE; |
2821 | |||
2808 | switch (pRestoreRelatedBundleAction->type) | 2822 | switch (pRestoreRelatedBundleAction->type) |
2809 | { | 2823 | { |
2810 | case BURN_EXECUTE_ACTION_TYPE_RELATED_BUNDLE: | 2824 | case BURN_EXECUTE_ACTION_TYPE_RELATED_BUNDLE: |
@@ -2824,6 +2838,11 @@ static HRESULT DoRestoreRelatedBundleActions( | |||
2824 | } | 2838 | } |
2825 | 2839 | ||
2826 | LExit: | 2840 | LExit: |
2841 | if (*pRestart < restart) | ||
2842 | { | ||
2843 | *pRestart = restart; | ||
2844 | } | ||
2845 | |||
2827 | return hr; | 2846 | return hr; |
2828 | } | 2847 | } |
2829 | 2848 | ||
diff --git a/src/burn/engine/detect.cpp b/src/burn/engine/detect.cpp index fcd1c966..f573e259 100644 --- a/src/burn/engine/detect.cpp +++ b/src/burn/engine/detect.cpp | |||
@@ -399,18 +399,23 @@ static HRESULT DetectAtomFeedUpdate( | |||
399 | { | 399 | { |
400 | APPLICATION_UPDATE_ENTRY* pAppUpdateEntry = &pApupChain->rgEntries[i]; | 400 | APPLICATION_UPDATE_ENTRY* pAppUpdateEntry = &pApupChain->rgEntries[i]; |
401 | APPLICATION_UPDATE_ENCLOSURE* pEnclosure = pAppUpdateEntry->rgEnclosures; | 401 | APPLICATION_UPDATE_ENCLOSURE* pEnclosure = pAppUpdateEntry->rgEnclosures; |
402 | LPCWSTR wzHash = L""; | ||
403 | BOOTSTRAPPER_UPDATE_HASH_TYPE hashType = BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE; | ||
402 | 404 | ||
403 | if (pEnclosure && pEnclosure->rgbDigest && *pEnclosure->rgbDigest) | 405 | if (pEnclosure && pEnclosure->rgbDigest && APUP_HASH_ALGORITHM_SHA512 == pEnclosure->digestAlgorithm) |
404 | { | 406 | { |
405 | hr = StrAllocHexEncode(pEnclosure->rgbDigest, pEnclosure->cbDigest, &sczHash); | 407 | hr = StrAllocHexEncode(pEnclosure->rgbDigest, pEnclosure->cbDigest, &sczHash); |
406 | ExitOnFailure(hr, "Failed to encode hash as string."); | 408 | ExitOnFailure(hr, "Failed to encode hash as string."); |
409 | |||
410 | wzHash = sczHash; | ||
411 | hashType = BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512; | ||
407 | } | 412 | } |
408 | 413 | ||
409 | hr = UserExperienceOnDetectUpdate(pUX, | 414 | hr = UserExperienceOnDetectUpdate(pUX, |
410 | pEnclosure ? pEnclosure->wzUrl : NULL, | 415 | pEnclosure ? pEnclosure->wzUrl : NULL, |
411 | pEnclosure ? pEnclosure->dw64Size : 0, | 416 | pEnclosure ? pEnclosure->dw64Size : 0, |
412 | sczHash ? sczHash : L"", | 417 | wzHash, |
413 | pEnclosure ? pEnclosure->digestAlgorithm == APUP_HASH_ALGORITHM_SHA512 ? BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512 : BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE : BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE, | 418 | hashType, |
414 | pAppUpdateEntry->pVersion, | 419 | pAppUpdateEntry->pVersion, |
415 | pAppUpdateEntry->wzTitle, | 420 | pAppUpdateEntry->wzTitle, |
416 | pAppUpdateEntry->wzSummary, | 421 | pAppUpdateEntry->wzSummary, |
diff --git a/src/burn/engine/engine.mc b/src/burn/engine/engine.mc index d965d4ad..cebd1325 100644 --- a/src/burn/engine/engine.mc +++ b/src/burn/engine/engine.mc | |||
@@ -1006,7 +1006,7 @@ MessageId=366 | |||
1006 | Severity=Success | 1006 | Severity=Success |
1007 | SymbolicName=MSG_EXECUTE_PACKAGE_PROCESS_EXITED | 1007 | SymbolicName=MSG_EXECUTE_PACKAGE_PROCESS_EXITED |
1008 | Language=English | 1008 | Language=English |
1009 | The process for package: %1!ls! exited with code: %2!u!. The exit code has been translated to type: %3!hs! and restart: %4!hs!. | 1009 | The process for package: %1!ls! exited with code: 0x%2!x!. The exit code has been translated to type: %3!hs! and restart: %4!hs!. |
1010 | . | 1010 | . |
1011 | 1011 | ||
1012 | MessageId=370 | 1012 | MessageId=370 |
diff --git a/src/burn/engine/externalengine.cpp b/src/burn/engine/externalengine.cpp index e18b9486..5e540c2a 100644 --- a/src/burn/engine/externalengine.cpp +++ b/src/burn/engine/externalengine.cpp | |||
@@ -296,7 +296,7 @@ HRESULT ExternalEngineSetUpdate( | |||
296 | { | 296 | { |
297 | ExitFunction1(hr = E_INVALIDARG); | 297 | ExitFunction1(hr = E_INVALIDARG); |
298 | } | 298 | } |
299 | else if (BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512 == hashType && (!wzHash || !*wzHash || SHA512_HASH_LEN != lstrlenW(wzHash))) | 299 | else if (BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512 == hashType && (!wzHash || !*wzHash || SHA512_HASH_LEN * 2 != lstrlenW(wzHash))) |
300 | { | 300 | { |
301 | ExitFunction1(hr = E_INVALIDARG); | 301 | ExitFunction1(hr = E_INVALIDARG); |
302 | } | 302 | } |
diff --git a/src/burn/engine/splashscreen.cpp b/src/burn/engine/splashscreen.cpp index d8618feb..b9dc9f55 100644 --- a/src/burn/engine/splashscreen.cpp +++ b/src/burn/engine/splashscreen.cpp | |||
@@ -221,6 +221,11 @@ LExit: | |||
221 | ::DeleteObject(splashScreenInfo.hBitmap); | 221 | ::DeleteObject(splashScreenInfo.hBitmap); |
222 | } | 222 | } |
223 | 223 | ||
224 | if (splashScreenInfo.hwndPrevious) | ||
225 | { | ||
226 | ::PostMessageW(splashScreenInfo.hwndPrevious, WM_CLOSE, 0, 0); | ||
227 | } | ||
228 | |||
224 | return hr; | 229 | return hr; |
225 | } | 230 | } |
226 | 231 | ||
@@ -261,6 +266,7 @@ static LRESULT CALLBACK WndProc( | |||
261 | return 1; | 266 | return 1; |
262 | 267 | ||
263 | case WM_ENTERIDLE: | 268 | case WM_ENTERIDLE: |
269 | case WM_MOVING: | ||
264 | lres = ::DefWindowProcW(hWnd, uMsg, wParam, lParam); | 270 | lres = ::DefWindowProcW(hWnd, uMsg, wParam, lParam); |
265 | 271 | ||
266 | // We had to create our own splash screen so that Windows would automatically transfer focus from the other process's splash screen. | 272 | // We had to create our own splash screen so that Windows would automatically transfer focus from the other process's splash screen. |