summaryrefslogtreecommitdiff
path: root/src/burn/test/BurnUnitTest/RegistrationTest.cpp
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2024-12-29 18:01:20 -0800
committerRob Mensching <rob@firegiant.com>2024-12-30 06:45:49 -0800
commit523c66a62a619e6aa9f30070173ea33edfb5e328 (patch)
tree04fa3146250b7eeaa6864b0f71e37905a2d77be1 /src/burn/test/BurnUnitTest/RegistrationTest.cpp
parent6edc5d1e2a289eac50c6d59a29e195353bb023cb (diff)
downloadwix-523c66a62a619e6aa9f30070173ea33edfb5e328.tar.gz
wix-523c66a62a619e6aa9f30070173ea33edfb5e328.tar.bz2
wix-523c66a62a619e6aa9f30070173ea33edfb5e328.zip
Rename "bundle id" concept to "bundle code"
The "bundle id" always had more in common with the PackageCode from the Windows Installer. With the introduction of an actual Id attribute on the Bundle element, there is potential for confusion, so there is finally real motivation to rename "bundle id" to "bundle code".
Diffstat (limited to 'src/burn/test/BurnUnitTest/RegistrationTest.cpp')
-rw-r--r--src/burn/test/BurnUnitTest/RegistrationTest.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/burn/test/BurnUnitTest/RegistrationTest.cpp b/src/burn/test/BurnUnitTest/RegistrationTest.cpp
index 2d6515ef..3068eb6a 100644
--- a/src/burn/test/BurnUnitTest/RegistrationTest.cpp
+++ b/src/burn/test/BurnUnitTest/RegistrationTest.cpp
@@ -73,7 +73,7 @@ namespace Bootstrapper
73 L" <UX PrimaryPayloadId='ux.exe'>" 73 L" <UX PrimaryPayloadId='ux.exe'>"
74 L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" 74 L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />"
75 L" </UX>" 75 L" </UX>"
76 L" <Registration Id='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" 76 L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>"
77 L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />" 77 L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />"
78 L" </Registration>" 78 L" </Registration>"
79 L"</Bundle>"; 79 L"</Bundle>";
@@ -173,7 +173,7 @@ namespace Bootstrapper
173 L" <UX PrimaryPayloadId='ux.exe'>" 173 L" <UX PrimaryPayloadId='ux.exe'>"
174 L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" 174 L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />"
175 L" </UX>" 175 L" </UX>"
176 L" <Registration Id='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" 176 L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>"
177 L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='Product1' InProgressDisplayName='Product1 Installation' DisplayVersion='1.0.0.0' />" 177 L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='Product1' InProgressDisplayName='Product1 Installation' DisplayVersion='1.0.0.0' />"
178 L" </Registration>" 178 L" </Registration>"
179 L"</Bundle>"; 179 L"</Bundle>";
@@ -294,7 +294,7 @@ namespace Bootstrapper
294 L" <UX PrimaryPayloadId='ux.exe'>" 294 L" <UX PrimaryPayloadId='ux.exe'>"
295 L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" 295 L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />"
296 L" </UX>" 296 L" </UX>"
297 L" <Registration Id='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='bar' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" 297 L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='bar' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>"
298 L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='Product1' DisplayVersion='1.0.0.0' />" 298 L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='Product1' DisplayVersion='1.0.0.0' />"
299 L" </Registration>" 299 L" </Registration>"
300 L"</Bundle>"; 300 L"</Bundle>";
@@ -415,7 +415,7 @@ namespace Bootstrapper
415 L" <UX PrimaryPayloadId='ux.exe'>" 415 L" <UX PrimaryPayloadId='ux.exe'>"
416 L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" 416 L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />"
417 L" </UX>" 417 L" </UX>"
418 L" <Registration Id='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" 418 L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>"
419 L" <Arp Register='yes' DisplayName='DisplayName1' DisplayVersion='1.2.3.4' Publisher='Publisher1' HelpLink='http://www.microsoft.com/help'" 419 L" <Arp Register='yes' DisplayName='DisplayName1' DisplayVersion='1.2.3.4' Publisher='Publisher1' HelpLink='http://www.microsoft.com/help'"
420 L" HelpTelephone='555-555-5555' AboutUrl='http://www.microsoft.com/about' UpdateUrl='http://www.microsoft.com/update'" 420 L" HelpTelephone='555-555-5555' AboutUrl='http://www.microsoft.com/about' UpdateUrl='http://www.microsoft.com/update'"
421 L" Comments='Comments1' Contact='Contact1' DisableModify='yes' DisableRemove='yes' />" 421 L" Comments='Comments1' Contact='Contact1' DisableModify='yes' DisableRemove='yes' />"
@@ -525,7 +525,7 @@ namespace Bootstrapper
525 IXMLDOMElement* pixeBundle = NULL; 525 IXMLDOMElement* pixeBundle = NULL;
526 LPWSTR sczCurrentProcess = NULL; 526 LPWSTR sczCurrentProcess = NULL;
527 LPWSTR sczValue = NULL; 527 LPWSTR sczValue = NULL;
528 LPWSTR sczRelatedBundleId = NULL; 528 LPWSTR sczRelatedBundleCode = NULL;
529 DWORD dwRelatedBundleIndex = 0; 529 DWORD dwRelatedBundleIndex = 0;
530 BURN_VARIABLES variables = { }; 530 BURN_VARIABLES variables = { };
531 BURN_USER_EXPERIENCE userExperience = { }; 531 BURN_USER_EXPERIENCE userExperience = { };
@@ -553,8 +553,8 @@ namespace Bootstrapper
553 L" <UX PrimaryPayloadId='ux.exe'>" 553 L" <UX PrimaryPayloadId='ux.exe'>"
554 L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" 554 L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />"
555 L" </UX>" 555 L" </UX>"
556 L" <RelatedBundle Id='" TEST_BUNDLE_UPGRADE_CODE L"' Action='Upgrade' />" 556 L" <RelatedBundle Code='" TEST_BUNDLE_UPGRADE_CODE L"' Action='Upgrade' />"
557 L" <Registration Id='" TEST_BUNDLE_ID L"' Tag='foo' ProviderKey='" TEST_BUNDLE_ID L"' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" 557 L" <Registration Code='" TEST_BUNDLE_ID L"' Tag='foo' ProviderKey='" TEST_BUNDLE_ID L"' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>"
558 L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />" 558 L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />"
559 L" </Registration>" 559 L" </Registration>"
560 L" <Variable Id='MyBurnVariable1' Type='numeric' Value='0' Hidden='no' Persisted='yes' />" 560 L" <Variable Id='MyBurnVariable1' Type='numeric' Value='0' Hidden='no' Persisted='yes' />"
@@ -622,14 +622,14 @@ namespace Bootstrapper
622 this->ValidateVariableKey(L"MyBurnVariable5", gcnew String(L"vvv")); 622 this->ValidateVariableKey(L"MyBurnVariable5", gcnew String(L"vvv"));
623 this->ValidateVariableKeyEmpty(L"WixBundleForcedRestartPackage"); 623 this->ValidateVariableKeyEmpty(L"WixBundleForcedRestartPackage");
624 624
625 hr = StrAlloc(&sczRelatedBundleId, MAX_GUID_CHARS + 1); 625 hr = StrAlloc(&sczRelatedBundleCode, MAX_GUID_CHARS + 1);
626 NativeAssert::Succeeded(hr, "Failed to allocate buffer for related bundle id."); 626 NativeAssert::Succeeded(hr, "Failed to allocate buffer for related bundle code.");
627 627
628 // Verify we can find ourself via the UpgradeCode 628 // Verify we can find ourself via the UpgradeCode
629 hr = BundleEnumRelatedBundleFixed(TEST_BUNDLE_UPGRADE_CODE, BUNDLE_INSTALL_CONTEXT_USER, REG_KEY_DEFAULT, &dwRelatedBundleIndex, sczRelatedBundleId); 629 hr = BundleEnumRelatedBundleFixed(TEST_BUNDLE_UPGRADE_CODE, BUNDLE_INSTALL_CONTEXT_USER, REG_KEY_DEFAULT, &dwRelatedBundleIndex, sczRelatedBundleCode);
630 TestThrowOnFailure(hr, L"Failed to enumerate related bundle."); 630 TestThrowOnFailure(hr, L"Failed to enumerate related bundle.");
631 631
632 NativeAssert::StringEqual(TEST_BUNDLE_ID, sczRelatedBundleId); 632 NativeAssert::StringEqual(TEST_BUNDLE_ID, sczRelatedBundleCode);
633 633
634 // Verify we can read the bundle variables via the API 634 // Verify we can read the bundle variables via the API
635 hr = BundleGetBundleVariable(TEST_BUNDLE_ID, L"MyBurnVariable1", &sczValue); 635 hr = BundleGetBundleVariable(TEST_BUNDLE_ID, L"MyBurnVariable1", &sczValue);
@@ -643,7 +643,7 @@ namespace Bootstrapper
643 } 643 }
644 finally 644 finally
645 { 645 {
646 ReleaseStr(sczRelatedBundleId); 646 ReleaseStr(sczRelatedBundleCode);
647 ReleaseStr(sczCurrentProcess); 647 ReleaseStr(sczCurrentProcess);
648 ReleaseObject(pixeBundle); 648 ReleaseObject(pixeBundle);
649 BootstrapperApplicationUninitialize(&userExperience); 649 BootstrapperApplicationUninitialize(&userExperience);
@@ -694,7 +694,7 @@ namespace Bootstrapper
694 L" <UX PrimaryPayloadId='ux.exe'>" 694 L" <UX PrimaryPayloadId='ux.exe'>"
695 L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" 695 L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />"
696 L" </UX>" 696 L" </UX>"
697 L" <Registration Id='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" 697 L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>"
698 L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />" 698 L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />"
699 L" </Registration>" 699 L" </Registration>"
700 L" <Variable Id='MyBurnVariable1' Type='numeric' Value='0' Hidden='no' Persisted='yes' />" 700 L" <Variable Id='MyBurnVariable1' Type='numeric' Value='0' Hidden='no' Persisted='yes' />"