aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-04-16 10:44:11 -0500
committerSean Hall <r.sean.hall@gmail.com>2021-04-19 23:12:55 -0500
commite09a129ee276457d02d19a6444657cf3a2c73905 (patch)
tree0c12325e67a5e60aadfcfee5e14cda66b9868abe
parentacf86637a6350d269e1ae1aa907e38f5138a0fa9 (diff)
downloadwix-e09a129ee276457d02d19a6444657cf3a2c73905.tar.gz
wix-e09a129ee276457d02d19a6444657cf3a2c73905.tar.bz2
wix-e09a129ee276457d02d19a6444657cf3a2c73905.zip
UX payloads are never external.
-rw-r--r--src/engine/apply.cpp2
-rw-r--r--src/engine/cache.cpp16
-rw-r--r--src/engine/cache.h1
-rw-r--r--src/engine/elevation.cpp6
-rw-r--r--src/engine/registration.cpp3
-rw-r--r--src/engine/registration.h1
-rw-r--r--src/test/BurnUnitTest/RegistrationTest.cpp14
7 files changed, 11 insertions, 32 deletions
diff --git a/src/engine/apply.cpp b/src/engine/apply.cpp
index 6d1743e2..5826f513 100644
--- a/src/engine/apply.cpp
+++ b/src/engine/apply.cpp
@@ -388,7 +388,7 @@ extern "C" HRESULT ApplyRegister(
388 } 388 }
389 else 389 else
390 { 390 {
391 hr = RegistrationSessionBegin(sczEngineWorkingPath, &pEngineState->registration, &pEngineState->variables, &pEngineState->userExperience, pEngineState->plan.dwRegistrationOperations, pEngineState->plan.dependencyRegistrationAction, pEngineState->plan.qwEstimatedSize); 391 hr = RegistrationSessionBegin(sczEngineWorkingPath, &pEngineState->registration, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, pEngineState->plan.dependencyRegistrationAction, pEngineState->plan.qwEstimatedSize);
392 ExitOnFailure(hr, "Failed to begin registration session."); 392 ExitOnFailure(hr, "Failed to begin registration session.");
393 } 393 }
394 } 394 }
diff --git a/src/engine/cache.cpp b/src/engine/cache.cpp
index 84b7f131..2299d26d 100644
--- a/src/engine/cache.cpp
+++ b/src/engine/cache.cpp
@@ -776,7 +776,6 @@ extern "C" HRESULT CacheCompleteBundle(
776 __in BOOL fPerMachine, 776 __in BOOL fPerMachine,
777 __in_z LPCWSTR wzExecutableName, 777 __in_z LPCWSTR wzExecutableName,
778 __in_z LPCWSTR wzBundleId, 778 __in_z LPCWSTR wzBundleId,
779 __in BURN_PAYLOADS* pUxPayloads,
780 __in_z LPCWSTR wzSourceBundlePath 779 __in_z LPCWSTR wzSourceBundlePath
781#ifdef DEBUG 780#ifdef DEBUG
782 , __in_z LPCWSTR wzExecutablePath 781 , __in_z LPCWSTR wzExecutablePath
@@ -824,21 +823,6 @@ extern "C" HRESULT CacheCompleteBundle(
824 hr = PathGetDirectory(wzSourceBundlePath, &sczSourceDirectory); 823 hr = PathGetDirectory(wzSourceBundlePath, &sczSourceDirectory);
825 ExitOnFailure(hr, "Failed to get directory from engine working path: %ls", wzSourceBundlePath); 824 ExitOnFailure(hr, "Failed to get directory from engine working path: %ls", wzSourceBundlePath);
826 825
827 // Cache external UX payloads to completed path.
828 for (DWORD i = 0; i < pUxPayloads->cPayloads; ++i)
829 {
830 BURN_PAYLOAD* pPayload = &pUxPayloads->rgPayloads[i];
831
832 if (BURN_PAYLOAD_PACKAGING_EXTERNAL == pPayload->packaging)
833 {
834 hr = PathConcat(sczSourceDirectory, pPayload->sczSourcePath, &sczPayloadSourcePath);
835 ExitOnFailure(hr, "Failed to build payload source path.");
836
837 hr = CacheCompletePayload(fPerMachine, pPayload, wzBundleId, sczPayloadSourcePath, FALSE);
838 ExitOnFailure(hr, "Failed to complete the cache of payload: %ls", pPayload->sczKey);
839 }
840 }
841
842LExit: 826LExit:
843 ReleaseStr(sczPayloadSourcePath); 827 ReleaseStr(sczPayloadSourcePath);
844 ReleaseStr(sczSourceDirectory); 828 ReleaseStr(sczSourceDirectory);
diff --git a/src/engine/cache.h b/src/engine/cache.h
index eb964f58..cf062a85 100644
--- a/src/engine/cache.h
+++ b/src/engine/cache.h
@@ -101,7 +101,6 @@ HRESULT CacheCompleteBundle(
101 __in BOOL fPerMachine, 101 __in BOOL fPerMachine,
102 __in_z LPCWSTR wzExecutableName, 102 __in_z LPCWSTR wzExecutableName,
103 __in_z LPCWSTR wzBundleId, 103 __in_z LPCWSTR wzBundleId,
104 __in BURN_PAYLOADS* pUxPayloads,
105 __in_z LPCWSTR wzSourceBundlePath 104 __in_z LPCWSTR wzSourceBundlePath
106#ifdef DEBUG 105#ifdef DEBUG
107 , __in_z LPCWSTR wzExecutablePath 106 , __in_z LPCWSTR wzExecutablePath
diff --git a/src/engine/elevation.cpp b/src/engine/elevation.cpp
index 82d5a9b1..d37907cf 100644
--- a/src/engine/elevation.cpp
+++ b/src/engine/elevation.cpp
@@ -143,7 +143,6 @@ static HRESULT OnApplyUninitialize(
143static HRESULT OnSessionBegin( 143static HRESULT OnSessionBegin(
144 __in BURN_REGISTRATION* pRegistration, 144 __in BURN_REGISTRATION* pRegistration,
145 __in BURN_VARIABLES* pVariables, 145 __in BURN_VARIABLES* pVariables,
146 __in BURN_USER_EXPERIENCE* pUserExperience,
147 __in BYTE* pbData, 146 __in BYTE* pbData,
148 __in DWORD cbData 147 __in DWORD cbData
149 ); 148 );
@@ -1643,7 +1642,7 @@ static HRESULT ProcessElevatedChildMessage(
1643 break; 1642 break;
1644 1643
1645 case BURN_ELEVATION_MESSAGE_TYPE_SESSION_BEGIN: 1644 case BURN_ELEVATION_MESSAGE_TYPE_SESSION_BEGIN:
1646 hrResult = OnSessionBegin(pContext->pRegistration, pContext->pVariables, pContext->pUserExperience, (BYTE*)pMsg->pvData, pMsg->cbData); 1645 hrResult = OnSessionBegin(pContext->pRegistration, pContext->pVariables, (BYTE*)pMsg->pvData, pMsg->cbData);
1647 break; 1646 break;
1648 1647
1649 case BURN_ELEVATION_MESSAGE_TYPE_SESSION_RESUME: 1648 case BURN_ELEVATION_MESSAGE_TYPE_SESSION_RESUME:
@@ -1895,7 +1894,6 @@ static HRESULT OnApplyUninitialize(
1895static HRESULT OnSessionBegin( 1894static HRESULT OnSessionBegin(
1896 __in BURN_REGISTRATION* pRegistration, 1895 __in BURN_REGISTRATION* pRegistration,
1897 __in BURN_VARIABLES* pVariables, 1896 __in BURN_VARIABLES* pVariables,
1898 __in BURN_USER_EXPERIENCE* pUserExperience,
1899 __in BYTE* pbData, 1897 __in BYTE* pbData,
1900 __in DWORD cbData 1898 __in DWORD cbData
1901 ) 1899 )
@@ -1930,7 +1928,7 @@ static HRESULT OnSessionBegin(
1930 ExitOnFailure(hr, "Failed to read variables."); 1928 ExitOnFailure(hr, "Failed to read variables.");
1931 1929
1932 // Begin session in per-machine process. 1930 // Begin session in per-machine process.
1933 hr = RegistrationSessionBegin(sczEngineWorkingPath, pRegistration, pVariables, pUserExperience, dwRegistrationOperations, (BURN_DEPENDENCY_REGISTRATION_ACTION)dwDependencyRegistrationAction, qwEstimatedSize); 1931 hr = RegistrationSessionBegin(sczEngineWorkingPath, pRegistration, pVariables, dwRegistrationOperations, (BURN_DEPENDENCY_REGISTRATION_ACTION)dwDependencyRegistrationAction, qwEstimatedSize);
1934 ExitOnFailure(hr, "Failed to begin registration session."); 1932 ExitOnFailure(hr, "Failed to begin registration session.");
1935 1933
1936LExit: 1934LExit:
diff --git a/src/engine/registration.cpp b/src/engine/registration.cpp
index 7435f292..19da543c 100644
--- a/src/engine/registration.cpp
+++ b/src/engine/registration.cpp
@@ -593,7 +593,6 @@ extern "C" HRESULT RegistrationSessionBegin(
593 __in_z LPCWSTR wzEngineWorkingPath, 593 __in_z LPCWSTR wzEngineWorkingPath,
594 __in BURN_REGISTRATION* pRegistration, 594 __in BURN_REGISTRATION* pRegistration,
595 __in BURN_VARIABLES* pVariables, 595 __in BURN_VARIABLES* pVariables,
596 __in BURN_USER_EXPERIENCE* pUserExperience,
597 __in DWORD dwRegistrationOptions, 596 __in DWORD dwRegistrationOptions,
598 __in BURN_DEPENDENCY_REGISTRATION_ACTION dependencyRegistrationAction, 597 __in BURN_DEPENDENCY_REGISTRATION_ACTION dependencyRegistrationAction,
599 __in DWORD64 qwEstimatedSize 598 __in DWORD64 qwEstimatedSize
@@ -609,7 +608,7 @@ extern "C" HRESULT RegistrationSessionBegin(
609 // Cache bundle executable. 608 // Cache bundle executable.
610 if (dwRegistrationOptions & BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE) 609 if (dwRegistrationOptions & BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE)
611 { 610 {
612 hr = CacheCompleteBundle(pRegistration->fPerMachine, pRegistration->sczExecutableName, pRegistration->sczId, &pUserExperience->payloads, wzEngineWorkingPath 611 hr = CacheCompleteBundle(pRegistration->fPerMachine, pRegistration->sczExecutableName, pRegistration->sczId, wzEngineWorkingPath
613#ifdef DEBUG 612#ifdef DEBUG
614 , pRegistration->sczCacheExecutablePath 613 , pRegistration->sczCacheExecutablePath
615#endif 614#endif
diff --git a/src/engine/registration.h b/src/engine/registration.h
index af1b42e4..6d8a6d2a 100644
--- a/src/engine/registration.h
+++ b/src/engine/registration.h
@@ -188,7 +188,6 @@ HRESULT RegistrationSessionBegin(
188 __in_z LPCWSTR wzEngineWorkingPath, 188 __in_z LPCWSTR wzEngineWorkingPath,
189 __in BURN_REGISTRATION* pRegistration, 189 __in BURN_REGISTRATION* pRegistration,
190 __in BURN_VARIABLES* pVariables, 190 __in BURN_VARIABLES* pVariables,
191 __in BURN_USER_EXPERIENCE* pUserExperience,
192 __in DWORD dwRegistrationOptions, 191 __in DWORD dwRegistrationOptions,
193 __in BURN_DEPENDENCY_REGISTRATION_ACTION dependencyRegistrationAction, 192 __in BURN_DEPENDENCY_REGISTRATION_ACTION dependencyRegistrationAction,
194 __in DWORD64 qwEstimatedSize 193 __in DWORD64 qwEstimatedSize
diff --git a/src/test/BurnUnitTest/RegistrationTest.cpp b/src/test/BurnUnitTest/RegistrationTest.cpp
index 2cb66c3f..7b126f61 100644
--- a/src/test/BurnUnitTest/RegistrationTest.cpp
+++ b/src/test/BurnUnitTest/RegistrationTest.cpp
@@ -112,7 +112,7 @@ namespace Bootstrapper
112 TestThrowOnFailure(hr, L"Failed to get current process path."); 112 TestThrowOnFailure(hr, L"Failed to get current process path.");
113 113
114 // write registration 114 // write registration
115 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, &userExperience, BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_REGISTER, 0); 115 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE | BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_REGISTER, 0);
116 TestThrowOnFailure(hr, L"Failed to register bundle."); 116 TestThrowOnFailure(hr, L"Failed to register bundle.");
117 117
118 // verify that registration was created 118 // verify that registration was created
@@ -205,7 +205,7 @@ namespace Bootstrapper
205 // 205 //
206 206
207 // write registration 207 // write registration
208 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, &userExperience, BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_REGISTER, 0); 208 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_REGISTER, 0);
209 TestThrowOnFailure(hr, L"Failed to register bundle."); 209 TestThrowOnFailure(hr, L"Failed to register bundle.");
210 210
211 // verify that registration was created 211 // verify that registration was created
@@ -226,7 +226,7 @@ namespace Bootstrapper
226 // 226 //
227 227
228 // write registration 228 // write registration
229 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, &userExperience, BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_UNREGISTER, 0); 229 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_UNREGISTER, 0);
230 TestThrowOnFailure(hr, L"Failed to register bundle."); 230 TestThrowOnFailure(hr, L"Failed to register bundle.");
231 231
232 // verify that registration was updated 232 // verify that registration was updated
@@ -316,7 +316,7 @@ namespace Bootstrapper
316 // 316 //
317 317
318 // write registration 318 // write registration
319 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, &userExperience, BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_REGISTER, 0); 319 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_REGISTER, 0);
320 TestThrowOnFailure(hr, L"Failed to register bundle."); 320 TestThrowOnFailure(hr, L"Failed to register bundle.");
321 321
322 // verify that registration was created 322 // verify that registration was created
@@ -427,7 +427,7 @@ namespace Bootstrapper
427 // 427 //
428 428
429 // write registration 429 // write registration
430 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, &userExperience, BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_REGISTER, 0); 430 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_REGISTER, 0);
431 TestThrowOnFailure(hr, L"Failed to register bundle."); 431 TestThrowOnFailure(hr, L"Failed to register bundle.");
432 432
433 // verify that registration was created 433 // verify that registration was created
@@ -460,7 +460,7 @@ namespace Bootstrapper
460 // 460 //
461 461
462 // write registration 462 // write registration
463 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, &userExperience, BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_UNREGISTER, 0); 463 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_UNREGISTER, 0);
464 TestThrowOnFailure(hr, L"Failed to register bundle."); 464 TestThrowOnFailure(hr, L"Failed to register bundle.");
465 465
466 // verify that registration was updated 466 // verify that registration was updated
@@ -560,7 +560,7 @@ namespace Bootstrapper
560 Assert::Equal((int)BOOTSTRAPPER_RESUME_TYPE_NONE, (int)resumeType); 560 Assert::Equal((int)BOOTSTRAPPER_RESUME_TYPE_NONE, (int)resumeType);
561 561
562 // begin session 562 // begin session
563 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, &userExperience, BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_REGISTER, 0); 563 hr = RegistrationSessionBegin(sczCurrentProcess, &registration, &variables, BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_REGISTRATION, BURN_DEPENDENCY_REGISTRATION_ACTION_REGISTER, 0);
564 TestThrowOnFailure(hr, L"Failed to register bundle."); 564 TestThrowOnFailure(hr, L"Failed to register bundle.");
565 565
566 hr = RegistrationSaveState(&registration, rgbData, sizeof(rgbData)); 566 hr = RegistrationSaveState(&registration, rgbData, sizeof(rgbData));