From 88ef687ebdad49eaacf729a554c894181ce23ac9 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 11 Mar 2021 20:18:06 -0600 Subject: Integrate ForwardCompatible and RelatedBundle changes. --- src/Samples/bafunctions/bafunctions.vcxproj | 8 +++--- src/Samples/bafunctions/packages.config | 4 +-- src/dnchost/dnchost.vcxproj | 8 +++--- src/dnchost/packages.config | 4 +-- src/mbahost/mbahost.vcxproj | 8 +++--- src/mbahost/packages.config | 4 +-- .../examples/TestEngine/Example.TestEngine.vcxproj | 8 +++--- src/test/examples/TestEngine/packages.config | 4 +-- .../WixStandardBootstrapperApplication.cpp | 33 +++++++++++++++------- src/wixstdba/packages.config | 4 +-- src/wixstdba/wixstdba.mc | 4 +-- src/wixstdba/wixstdba.vcxproj | 8 +++--- 12 files changed, 55 insertions(+), 42 deletions(-) (limited to 'src') diff --git a/src/Samples/bafunctions/bafunctions.vcxproj b/src/Samples/bafunctions/bafunctions.vcxproj index 4883080a..06ad6be9 100644 --- a/src/Samples/bafunctions/bafunctions.vcxproj +++ b/src/Samples/bafunctions/bafunctions.vcxproj @@ -2,8 +2,8 @@ - - + + @@ -73,8 +73,8 @@ 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}. - - + + diff --git a/src/Samples/bafunctions/packages.config b/src/Samples/bafunctions/packages.config index 57590429..767ba41a 100644 --- a/src/Samples/bafunctions/packages.config +++ b/src/Samples/bafunctions/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/src/dnchost/dnchost.vcxproj b/src/dnchost/dnchost.vcxproj index 3e996869..7a6d3dfc 100644 --- a/src/dnchost/dnchost.vcxproj +++ b/src/dnchost/dnchost.vcxproj @@ -4,8 +4,8 @@ - - + + @@ -99,8 +99,8 @@ - - + + \ No newline at end of file diff --git a/src/dnchost/packages.config b/src/dnchost/packages.config index 3e670980..fe8bccf7 100644 --- a/src/dnchost/packages.config +++ b/src/dnchost/packages.config @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/src/mbahost/mbahost.vcxproj b/src/mbahost/mbahost.vcxproj index 82c60f33..efe85148 100644 --- a/src/mbahost/mbahost.vcxproj +++ b/src/mbahost/mbahost.vcxproj @@ -5,8 +5,8 @@ - - + + @@ -99,8 +99,8 @@ - - + + \ No newline at end of file diff --git a/src/mbahost/packages.config b/src/mbahost/packages.config index 9e3d1dd3..2e2ba66e 100644 --- a/src/mbahost/packages.config +++ b/src/mbahost/packages.config @@ -4,7 +4,7 @@ - - + + \ No newline at end of file diff --git a/src/test/examples/TestEngine/Example.TestEngine.vcxproj b/src/test/examples/TestEngine/Example.TestEngine.vcxproj index 67ebe094..ca7d0434 100644 --- a/src/test/examples/TestEngine/Example.TestEngine.vcxproj +++ b/src/test/examples/TestEngine/Example.TestEngine.vcxproj @@ -1,8 +1,8 @@ - - + + @@ -76,8 +76,8 @@ 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}. - - + + \ No newline at end of file diff --git a/src/test/examples/TestEngine/packages.config b/src/test/examples/TestEngine/packages.config index 57590429..767ba41a 100644 --- a/src/test/examples/TestEngine/packages.config +++ b/src/test/examples/TestEngine/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/src/wixstdba/WixStandardBootstrapperApplication.cpp b/src/wixstdba/WixStandardBootstrapperApplication.cpp index 9c882dfa..0fcf3a21 100644 --- a/src/wixstdba/WixStandardBootstrapperApplication.cpp +++ b/src/wixstdba/WixStandardBootstrapperApplication.cpp @@ -266,22 +266,27 @@ public: // IBootstrapperApplication __in BOOL fPerMachine, __in LPCWSTR wzVersion, __in BOOTSTRAPPER_RELATED_OPERATION operation, + __in BOOL fMissingFromCache, __inout BOOL* pfCancel ) { BAL_INFO_PACKAGE* pPackage = NULL; - if (SUCCEEDED(BalInfoAddRelatedBundleAsPackage(&m_Bundle.packages, wzBundleId, relationType, fPerMachine, &pPackage))) - { - InitializePackageInfoForPackage(pPackage); - } - // If we're not doing a prerequisite install, remember when our bundle would cause a downgrade. - if (!m_fPrereq && BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE == operation) + if (!fMissingFromCache) { - m_fDowngrading = TRUE; + if (SUCCEEDED(BalInfoAddRelatedBundleAsPackage(&m_Bundle.packages, wzBundleId, relationType, fPerMachine, &pPackage))) + { + InitializePackageInfoForPackage(pPackage); + } + + // If we're not doing a prerequisite install, remember when our bundle would cause a downgrade. + if (!m_fPrereq && BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE == operation) + { + m_fDowngrading = TRUE; + } } - return CBalBaseBootstrapperApplication::OnDetectRelatedBundle(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, operation, pfCancel); + return CBalBaseBootstrapperApplication::OnDetectRelatedBundle(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, operation, fMissingFromCache, pfCancel); } @@ -1346,9 +1351,7 @@ private: // privates __inout BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults ) { - BOOL fIgnoreBundle = pResults->fIgnoreBundle; m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, pArgs, pResults, m_pvBAFunctionsProcContext); - BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_DETECTED_FORWARD_COMPATIBLE_BUNDLE, m_hModule, pArgs->wzBundleId, fIgnoreBundle ? "ignore" : "enable", pResults->fIgnoreBundle ? "ignore" : "enable"); } void OnDetectUpdateBeginFallback( @@ -1811,6 +1814,16 @@ private: // privates m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext); } + void OnPlanForwardCompatibleBundleFallback( + __in BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs, + __inout BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults + ) + { + BOOL fIgnoreBundle = pResults->fIgnoreBundle; + m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE, pArgs, pResults, m_pvBAFunctionsProcContext); + BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_FORWARD_COMPATIBLE_BUNDLE, m_hModule, pArgs->wzBundleId, fIgnoreBundle ? "ignore" : "enable", pResults->fIgnoreBundle ? "ignore" : "enable"); + } + // // UiThreadProc - entrypoint for UI thread. // diff --git a/src/wixstdba/packages.config b/src/wixstdba/packages.config index 9e3d1dd3..2e2ba66e 100644 --- a/src/wixstdba/packages.config +++ b/src/wixstdba/packages.config @@ -4,7 +4,7 @@ - - + + \ No newline at end of file diff --git a/src/wixstdba/wixstdba.mc b/src/wixstdba/wixstdba.mc index b420af39..688b1da1 100644 --- a/src/wixstdba/wixstdba.mc +++ b/src/wixstdba/wixstdba.mc @@ -31,9 +31,9 @@ LanguageNames=(English=0x409:MSG00409) MessageId=1 Severity=Success -SymbolicName=MSG_WIXSTDBA_DETECTED_FORWARD_COMPATIBLE_BUNDLE +SymbolicName=MSG_WIXSTDBA_PLANNED_FORWARD_COMPATIBLE_BUNDLE Language=English -WIXSTDBA: Detected forward compatible bundle: %1!ls!, wixstdba requested: %2!hs!, bafunctions requested: %3!hs! +WIXSTDBA: Planned forward compatible bundle: %1!ls!, wixstdba requested: %2!hs!, bafunctions requested: %3!hs! . MessageId=2 diff --git a/src/wixstdba/wixstdba.vcxproj b/src/wixstdba/wixstdba.vcxproj index 8b887195..76333fa4 100644 --- a/src/wixstdba/wixstdba.vcxproj +++ b/src/wixstdba/wixstdba.vcxproj @@ -5,8 +5,8 @@ - - + + @@ -94,8 +94,8 @@ rc.exe -fo "$(OutDir)wixstdba.res" "$(IntDir)wixstdba.messages.rc" - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb