UX payloads are never external, part 2.
This commit is contained in:
Родитель
666196071c
Коммит
abdde5b419
|
@ -97,7 +97,6 @@ static HRESULT CopyEngineToWorkingFolder(
|
|||
__in_z LPCWSTR wzSourcePath,
|
||||
__in_z LPCWSTR wzWorkingFolderName,
|
||||
__in_z LPCWSTR wzExecutableName,
|
||||
__in BURN_PAYLOADS* pUxPayloads,
|
||||
__in BURN_SECTION* pSection,
|
||||
__deref_out_z_opt LPWSTR* psczEngineWorkingPath
|
||||
);
|
||||
|
@ -743,7 +742,6 @@ extern "C" BOOL CacheBundleRunningFromCache()
|
|||
}
|
||||
|
||||
extern "C" HRESULT CacheBundleToCleanRoom(
|
||||
__in BURN_PAYLOADS* pUxPayloads,
|
||||
__in BURN_SECTION* pSection,
|
||||
__deref_out_z_opt LPWSTR* psczCleanRoomBundlePath
|
||||
)
|
||||
|
@ -757,7 +755,7 @@ extern "C" HRESULT CacheBundleToCleanRoom(
|
|||
|
||||
wzExecutableName = PathFile(sczSourcePath);
|
||||
|
||||
hr = CopyEngineToWorkingFolder(sczSourcePath, BUNDLE_CLEAN_ROOM_WORKING_FOLDER_NAME, wzExecutableName, pUxPayloads, pSection, psczCleanRoomBundlePath);
|
||||
hr = CopyEngineToWorkingFolder(sczSourcePath, BUNDLE_CLEAN_ROOM_WORKING_FOLDER_NAME, wzExecutableName, pSection, psczCleanRoomBundlePath);
|
||||
ExitOnFailure(hr, "Failed to cache bundle to clean room.");
|
||||
|
||||
LExit:
|
||||
|
@ -769,7 +767,6 @@ LExit:
|
|||
extern "C" HRESULT CacheBundleToWorkingDirectory(
|
||||
__in_z LPCWSTR /*wzBundleId*/,
|
||||
__in_z LPCWSTR wzExecutableName,
|
||||
__in BURN_PAYLOADS* pUxPayloads,
|
||||
__in BURN_SECTION* pSection,
|
||||
__deref_out_z_opt LPWSTR* psczEngineWorkingPath
|
||||
)
|
||||
|
@ -792,7 +789,7 @@ extern "C" HRESULT CacheBundleToWorkingDirectory(
|
|||
}
|
||||
else // otherwise, carry on putting the bundle in the working folder.
|
||||
{
|
||||
hr = CopyEngineToWorkingFolder(sczSourcePath, BUNDLE_WORKING_FOLDER_NAME, wzExecutableName, pUxPayloads, pSection, psczEngineWorkingPath);
|
||||
hr = CopyEngineToWorkingFolder(sczSourcePath, BUNDLE_WORKING_FOLDER_NAME, wzExecutableName, pSection, psczEngineWorkingPath);
|
||||
ExitOnFailure(hr, "Failed to copy engine to working folder.");
|
||||
}
|
||||
|
||||
|
@ -1767,7 +1764,6 @@ static HRESULT CopyEngineToWorkingFolder(
|
|||
__in_z LPCWSTR wzSourcePath,
|
||||
__in_z LPCWSTR wzWorkingFolderName,
|
||||
__in_z LPCWSTR wzExecutableName,
|
||||
__in BURN_PAYLOADS* pUxPayloads,
|
||||
__in BURN_SECTION* pSection,
|
||||
__deref_out_z_opt LPWSTR* psczEngineWorkingPath
|
||||
)
|
||||
|
@ -1796,30 +1792,6 @@ static HRESULT CopyEngineToWorkingFolder(
|
|||
hr = CopyEngineWithSignatureFixup(pSection->hEngineFile, wzSourcePath, sczTargetPath, pSection);
|
||||
ExitOnFailure(hr, "Failed to copy engine: '%ls' to working path: %ls", wzSourcePath, sczTargetPath);
|
||||
|
||||
// Copy external UX payloads to working path.
|
||||
for (DWORD i = 0; i < pUxPayloads->cPayloads; ++i)
|
||||
{
|
||||
BURN_PAYLOAD* pPayload = &pUxPayloads->rgPayloads[i];
|
||||
|
||||
if (BURN_PAYLOAD_PACKAGING_EXTERNAL == pPayload->packaging)
|
||||
{
|
||||
if (!sczSourceDirectory)
|
||||
{
|
||||
hr = PathGetDirectory(wzSourcePath, &sczSourceDirectory);
|
||||
ExitOnFailure(hr, "Failed to get directory from engine path: %ls", wzSourcePath);
|
||||
}
|
||||
|
||||
hr = PathConcat(sczSourceDirectory, pPayload->sczSourcePath, &sczPayloadSourcePath);
|
||||
ExitOnFailure(hr, "Failed to build payload source path for working copy.");
|
||||
|
||||
hr = PathConcat(sczTargetDirectory, pPayload->sczFilePath, &sczPayloadTargetPath);
|
||||
ExitOnFailure(hr, "Failed to build payload target path for working copy.");
|
||||
|
||||
hr = FileEnsureCopyWithRetry(sczPayloadSourcePath, sczPayloadTargetPath, TRUE, FILE_OPERATION_RETRY_COUNT, FILE_OPERATION_RETRY_WAIT);
|
||||
ExitOnFailure(hr, "Failed to copy UX payload from: '%ls' to: '%ls'", sczPayloadSourcePath, sczPayloadTargetPath);
|
||||
}
|
||||
}
|
||||
|
||||
if (psczEngineWorkingPath)
|
||||
{
|
||||
hr = StrAllocString(psczEngineWorkingPath, sczTargetPath, 0);
|
||||
|
|
|
@ -124,14 +124,12 @@ void CacheSendErrorCallback(
|
|||
);
|
||||
BOOL CacheBundleRunningFromCache();
|
||||
HRESULT CacheBundleToCleanRoom(
|
||||
__in BURN_PAYLOADS* pUxPayloads,
|
||||
__in BURN_SECTION* pSection,
|
||||
__deref_out_z_opt LPWSTR* psczCleanRoomBundlePath
|
||||
);
|
||||
HRESULT CacheBundleToWorkingDirectory(
|
||||
__in_z LPCWSTR wzBundleId,
|
||||
__in_z LPCWSTR wzExecutableName,
|
||||
__in BURN_PAYLOADS* pUxPayloads,
|
||||
__in BURN_SECTION* pSection,
|
||||
__deref_out_z_opt LPWSTR* psczEngineWorkingPath
|
||||
);
|
||||
|
|
|
@ -579,7 +579,7 @@ extern "C" HRESULT CoreElevate(
|
|||
// If the elevated companion pipe isn't created yet, let's make that happen.
|
||||
if (!pEngineState->sczBundleEngineWorkingPath)
|
||||
{
|
||||
hr = CacheBundleToWorkingDirectory(pEngineState->registration.sczId, pEngineState->registration.sczExecutableName, &pEngineState->userExperience.payloads, &pEngineState->section, &pEngineState->sczBundleEngineWorkingPath);
|
||||
hr = CacheBundleToWorkingDirectory(pEngineState->registration.sczId, pEngineState->registration.sczExecutableName, &pEngineState->section, &pEngineState->sczBundleEngineWorkingPath);
|
||||
ExitOnFailure(hr, "Failed to cache engine to working directory.");
|
||||
}
|
||||
|
||||
|
@ -678,7 +678,7 @@ extern "C" HRESULT CoreApply(
|
|||
// Ensure the engine is cached to the working path.
|
||||
if (!pEngineState->sczBundleEngineWorkingPath)
|
||||
{
|
||||
hr = CacheBundleToWorkingDirectory(pEngineState->registration.sczId, pEngineState->registration.sczExecutableName, &pEngineState->userExperience.payloads, &pEngineState->section, &pEngineState->sczBundleEngineWorkingPath);
|
||||
hr = CacheBundleToWorkingDirectory(pEngineState->registration.sczId, pEngineState->registration.sczExecutableName, &pEngineState->section, &pEngineState->sczBundleEngineWorkingPath);
|
||||
ExitOnFailure(hr, "Failed to cache engine to working directory.");
|
||||
}
|
||||
|
||||
|
|
|
@ -454,7 +454,7 @@ static HRESULT RunUntrusted(
|
|||
}
|
||||
else
|
||||
{
|
||||
hr = CacheBundleToCleanRoom(&pEngineState->userExperience.payloads, &pEngineState->section, &sczCachedCleanRoomBundlePath);
|
||||
hr = CacheBundleToCleanRoom(&pEngineState->section, &sczCachedCleanRoomBundlePath);
|
||||
ExitOnFailure(hr, "Failed to cache to clean room.");
|
||||
|
||||
wzCleanRoomBundlePath = sczCachedCleanRoomBundlePath;
|
||||
|
|
Загрузка…
Ссылка в новой задаче