@joebigelow / wix / commits / e09a129e

UX payloads are never external.

Sean Hall committed Apr 16, 2021 at 10:44 UTC e09a129ee276457d02d19a6444657cf3a2c73905
7 files changed +11 -32
src/engine/apply.cpp
+1 -1
@@ -388,7 +388,7 @@ extern "C" HRESULT ApplyRegister(
388 }
389 else
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.");
393 }
394 }
src/engine/cache.cpp
-16
@@ -776,7 +776,6 @@ extern "C" HRESULT CacheCompleteBundle(
776 __in BOOL fPerMachine,
777 __in_z LPCWSTR wzExecutableName,
778 __in_z LPCWSTR wzBundleId,
779 - __in BURN_PAYLOADS* pUxPayloads,
779 __in_z LPCWSTR wzSourceBundlePath
780 #ifdef DEBUG
781 , __in_z LPCWSTR wzExecutablePath
@@ -824,21 +823,6 @@ extern "C" HRESULT CacheCompleteBundle(
823 hr = PathGetDirectory(wzSourceBundlePath, &sczSourceDirectory);
824 ExitOnFailure(hr, "Failed to get directory from engine working path: %ls", wzSourceBundlePath);
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 -
826 LExit:
827 ReleaseStr(sczPayloadSourcePath);
828 ReleaseStr(sczSourceDirectory);
src/engine/cache.h
-1
@@ -101,7 +101,6 @@ HRESULT CacheCompleteBundle(
101 __in BOOL fPerMachine,
102 __in_z LPCWSTR wzExecutableName,
103 __in_z LPCWSTR wzBundleId,
104 - __in BURN_PAYLOADS* pUxPayloads,
104 __in_z LPCWSTR wzSourceBundlePath
105 #ifdef DEBUG
106 , __in_z LPCWSTR wzExecutablePath
src/engine/elevation.cpp
+2 -4
@@ -143,7 +143,6 @@ static HRESULT OnApplyUninitialize(
143 static HRESULT OnSessionBegin(
144 __in BURN_REGISTRATION* pRegistration,
145 __in BURN_VARIABLES* pVariables,
146 - __in BURN_USER_EXPERIENCE* pUserExperience,
146 __in BYTE* pbData,
147 __in DWORD cbData
148 );
@@ -1643,7 +1642,7 @@ static HRESULT ProcessElevatedChildMessage(
1642 break;
1643
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);
1646 break;
1647
1648 case BURN_ELEVATION_MESSAGE_TYPE_SESSION_RESUME:
@@ -1895,7 +1894,6 @@ static HRESULT OnApplyUninitialize(
1894 static HRESULT OnSessionBegin(
1895 __in BURN_REGISTRATION* pRegistration,
1896 __in BURN_VARIABLES* pVariables,
1898 - __in BURN_USER_EXPERIENCE* pUserExperience,
1897 __in BYTE* pbData,
1898 __in DWORD cbData
1899 )
@@ -1930,7 +1928,7 @@ static HRESULT OnSessionBegin(
1928 ExitOnFailure(hr, "Failed to read variables.");
1929
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);
1932 ExitOnFailure(hr, "Failed to begin registration session.");
1933
1934 LExit:
src/engine/registration.cpp
+1 -2
@@ -593,7 +593,6 @@ extern "C" HRESULT RegistrationSessionBegin(
593 __in_z LPCWSTR wzEngineWorkingPath,
594 __in BURN_REGISTRATION* pRegistration,
595 __in BURN_VARIABLES* pVariables,
596 - __in BURN_USER_EXPERIENCE* pUserExperience,
596 __in DWORD dwRegistrationOptions,
597 __in BURN_DEPENDENCY_REGISTRATION_ACTION dependencyRegistrationAction,
598 __in DWORD64 qwEstimatedSize
@@ -609,7 +608,7 @@ extern "C" HRESULT RegistrationSessionBegin(
608 // Cache bundle executable.
609 if (dwRegistrationOptions & BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE)
610 {
612 - hr = CacheCompleteBundle(pRegistration->fPerMachine, pRegistration->sczExecutableName, pRegistration->sczId, &pUserExperience->payloads, wzEngineWorkingPath
611 + hr = CacheCompleteBundle(pRegistration->fPerMachine, pRegistration->sczExecutableName, pRegistration->sczId, wzEngineWorkingPath
612 #ifdef DEBUG
613 , pRegistration->sczCacheExecutablePath
614 #endif
src/engine/registration.h
-1
@@ -188,7 +188,6 @@ HRESULT RegistrationSessionBegin(
188 __in_z LPCWSTR wzEngineWorkingPath,
189 __in BURN_REGISTRATION* pRegistration,
190 __in BURN_VARIABLES* pVariables,
191 - __in BURN_USER_EXPERIENCE* pUserExperience,
191 __in DWORD dwRegistrationOptions,
192 __in BURN_DEPENDENCY_REGISTRATION_ACTION dependencyRegistrationAction,
193 __in DWORD64 qwEstimatedSize
src/test/BurnUnitTest/RegistrationTest.cpp
+7 -7
@@ -112,7 +112,7 @@ namespace Bootstrapper
112 TestThrowOnFailure(hr, L"Failed to get current process path.");
113
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.");
117
118 // verify that registration was created
@@ -205,7 +205,7 @@ namespace Bootstrapper
205 //
206
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.");
210
211 // verify that registration was created
@@ -226,7 +226,7 @@ namespace Bootstrapper
226 //
227
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.");
231
232 // verify that registration was updated
@@ -316,7 +316,7 @@ namespace Bootstrapper
316 //
317
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.");
321
322 // verify that registration was created
@@ -427,7 +427,7 @@ namespace Bootstrapper
427 //
428
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.");
432
433 // verify that registration was created
@@ -460,7 +460,7 @@ namespace Bootstrapper
460 //
461
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.");
465
466 // verify that registration was updated
@@ -560,7 +560,7 @@ namespace Bootstrapper
560 Assert::Equal((int)BOOTSTRAPPER_RESUME_TYPE_NONE, (int)resumeType);
561
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.");
565
566 hr = RegistrationSaveState(&registration, rgbData, sizeof(rgbData));