From edccb203c421d2bd820062024088c6698424d9ee Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Wed, 4 Feb 2026 20:47:04 -0500 Subject: Support dual-purpose packages in Burn. Fixes https://github.com/wixtoolset/issues/issues/8958 --- src/burn/test/BurnUnitTest/RegistrationTest.cpp | 56 +++++++++++++++++++------ 1 file changed, 43 insertions(+), 13 deletions(-) (limited to 'src/burn/test/BurnUnitTest/RegistrationTest.cpp') diff --git a/src/burn/test/BurnUnitTest/RegistrationTest.cpp b/src/burn/test/BurnUnitTest/RegistrationTest.cpp index 3068eb6a..1c43c442 100644 --- a/src/burn/test/BurnUnitTest/RegistrationTest.cpp +++ b/src/burn/test/BurnUnitTest/RegistrationTest.cpp @@ -9,11 +9,7 @@ #define TEST_BUNDLE_UPGRADE_CODE L"{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}" -namespace Microsoft -{ -namespace Tools -{ -namespace WindowsInstallerXml +namespace WixToolset { namespace Test { @@ -73,7 +69,7 @@ namespace Bootstrapper L" " L" " L" " - L" " + L" " L" " L" " L""; @@ -93,6 +89,12 @@ namespace Bootstrapper hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); TestThrowOnFailure(hr, L"Failed to parse registration from XML."); + hr = RegistrationSetPaths(®istration, &cache); + TestThrowOnFailure(hr, "Failed to set registration paths."); + + hr = RegistrationPlanInitialize(®istration); + TestThrowOnFailure(hr, "Failed to initialize registration for the plan."); + plan.action = BOOTSTRAPPER_ACTION_INSTALL; plan.pCommand = &command; plan.pInternalCommand = &internalCommand; @@ -173,7 +175,7 @@ namespace Bootstrapper L" " L" " L" " - L" " + L" " L" " L" " L""; @@ -193,6 +195,12 @@ namespace Bootstrapper hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); TestThrowOnFailure(hr, L"Failed to parse registration from XML."); + hr = RegistrationSetPaths(®istration, &cache); + TestThrowOnFailure(hr, "Failed to set registration paths."); + + hr = RegistrationPlanInitialize(®istration); + TestThrowOnFailure(hr, "Failed to initialize registration for the plan."); + plan.action = BOOTSTRAPPER_ACTION_INSTALL; plan.pCommand = &command; plan.pInternalCommand = &internalCommand; @@ -294,7 +302,7 @@ namespace Bootstrapper L" " L" " L" " - L" " + L" " L" " L" " L""; @@ -314,6 +322,12 @@ namespace Bootstrapper hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); TestThrowOnFailure(hr, L"Failed to parse registration from XML."); + hr = RegistrationSetPaths(®istration, &cache); + TestThrowOnFailure(hr, "Failed to set registration paths."); + + hr = RegistrationPlanInitialize(®istration); + TestThrowOnFailure(hr, "Failed to initialize registration for the plan."); + plan.action = BOOTSTRAPPER_ACTION_INSTALL; plan.pCommand = &command; plan.pInternalCommand = &internalCommand; @@ -415,7 +429,7 @@ namespace Bootstrapper L" " L" " L" " - L" " + L" " L" " @@ -437,6 +451,12 @@ namespace Bootstrapper hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); TestThrowOnFailure(hr, L"Failed to parse registration from XML."); + hr = RegistrationSetPaths(®istration, &cache); + TestThrowOnFailure(hr, "Failed to set registration paths."); + + hr = RegistrationPlanInitialize(®istration); + TestThrowOnFailure(hr, "Failed to initialize registration for the plan."); + plan.action = BOOTSTRAPPER_ACTION_INSTALL; plan.pCommand = &command; plan.pInternalCommand = &internalCommand; @@ -554,7 +574,7 @@ namespace Bootstrapper L" " L" " L" " - L" " + L" " L" " L" " L"