diff options
Diffstat (limited to 'src/engine/cache.cpp')
-rw-r--r-- | src/engine/cache.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/src/engine/cache.cpp b/src/engine/cache.cpp index 2a40010d..fcc7f72d 100644 --- a/src/engine/cache.cpp +++ b/src/engine/cache.cpp | |||
@@ -97,7 +97,6 @@ static HRESULT CopyEngineToWorkingFolder( | |||
97 | __in_z LPCWSTR wzSourcePath, | 97 | __in_z LPCWSTR wzSourcePath, |
98 | __in_z LPCWSTR wzWorkingFolderName, | 98 | __in_z LPCWSTR wzWorkingFolderName, |
99 | __in_z LPCWSTR wzExecutableName, | 99 | __in_z LPCWSTR wzExecutableName, |
100 | __in BURN_PAYLOADS* pUxPayloads, | ||
101 | __in BURN_SECTION* pSection, | 100 | __in BURN_SECTION* pSection, |
102 | __deref_out_z_opt LPWSTR* psczEngineWorkingPath | 101 | __deref_out_z_opt LPWSTR* psczEngineWorkingPath |
103 | ); | 102 | ); |
@@ -743,7 +742,6 @@ extern "C" BOOL CacheBundleRunningFromCache() | |||
743 | } | 742 | } |
744 | 743 | ||
745 | extern "C" HRESULT CacheBundleToCleanRoom( | 744 | extern "C" HRESULT CacheBundleToCleanRoom( |
746 | __in BURN_PAYLOADS* pUxPayloads, | ||
747 | __in BURN_SECTION* pSection, | 745 | __in BURN_SECTION* pSection, |
748 | __deref_out_z_opt LPWSTR* psczCleanRoomBundlePath | 746 | __deref_out_z_opt LPWSTR* psczCleanRoomBundlePath |
749 | ) | 747 | ) |
@@ -757,7 +755,7 @@ extern "C" HRESULT CacheBundleToCleanRoom( | |||
757 | 755 | ||
758 | wzExecutableName = PathFile(sczSourcePath); | 756 | wzExecutableName = PathFile(sczSourcePath); |
759 | 757 | ||
760 | hr = CopyEngineToWorkingFolder(sczSourcePath, BUNDLE_CLEAN_ROOM_WORKING_FOLDER_NAME, wzExecutableName, pUxPayloads, pSection, psczCleanRoomBundlePath); | 758 | hr = CopyEngineToWorkingFolder(sczSourcePath, BUNDLE_CLEAN_ROOM_WORKING_FOLDER_NAME, wzExecutableName, pSection, psczCleanRoomBundlePath); |
761 | ExitOnFailure(hr, "Failed to cache bundle to clean room."); | 759 | ExitOnFailure(hr, "Failed to cache bundle to clean room."); |
762 | 760 | ||
763 | LExit: | 761 | LExit: |
@@ -769,7 +767,6 @@ LExit: | |||
769 | extern "C" HRESULT CacheBundleToWorkingDirectory( | 767 | extern "C" HRESULT CacheBundleToWorkingDirectory( |
770 | __in_z LPCWSTR /*wzBundleId*/, | 768 | __in_z LPCWSTR /*wzBundleId*/, |
771 | __in_z LPCWSTR wzExecutableName, | 769 | __in_z LPCWSTR wzExecutableName, |
772 | __in BURN_PAYLOADS* pUxPayloads, | ||
773 | __in BURN_SECTION* pSection, | 770 | __in BURN_SECTION* pSection, |
774 | __deref_out_z_opt LPWSTR* psczEngineWorkingPath | 771 | __deref_out_z_opt LPWSTR* psczEngineWorkingPath |
775 | ) | 772 | ) |
@@ -792,7 +789,7 @@ extern "C" HRESULT CacheBundleToWorkingDirectory( | |||
792 | } | 789 | } |
793 | else // otherwise, carry on putting the bundle in the working folder. | 790 | else // otherwise, carry on putting the bundle in the working folder. |
794 | { | 791 | { |
795 | hr = CopyEngineToWorkingFolder(sczSourcePath, BUNDLE_WORKING_FOLDER_NAME, wzExecutableName, pUxPayloads, pSection, psczEngineWorkingPath); | 792 | hr = CopyEngineToWorkingFolder(sczSourcePath, BUNDLE_WORKING_FOLDER_NAME, wzExecutableName, pSection, psczEngineWorkingPath); |
796 | ExitOnFailure(hr, "Failed to copy engine to working folder."); | 793 | ExitOnFailure(hr, "Failed to copy engine to working folder."); |
797 | } | 794 | } |
798 | 795 | ||
@@ -1767,7 +1764,6 @@ static HRESULT CopyEngineToWorkingFolder( | |||
1767 | __in_z LPCWSTR wzSourcePath, | 1764 | __in_z LPCWSTR wzSourcePath, |
1768 | __in_z LPCWSTR wzWorkingFolderName, | 1765 | __in_z LPCWSTR wzWorkingFolderName, |
1769 | __in_z LPCWSTR wzExecutableName, | 1766 | __in_z LPCWSTR wzExecutableName, |
1770 | __in BURN_PAYLOADS* pUxPayloads, | ||
1771 | __in BURN_SECTION* pSection, | 1767 | __in BURN_SECTION* pSection, |
1772 | __deref_out_z_opt LPWSTR* psczEngineWorkingPath | 1768 | __deref_out_z_opt LPWSTR* psczEngineWorkingPath |
1773 | ) | 1769 | ) |
@@ -1796,30 +1792,6 @@ static HRESULT CopyEngineToWorkingFolder( | |||
1796 | hr = CopyEngineWithSignatureFixup(pSection->hEngineFile, wzSourcePath, sczTargetPath, pSection); | 1792 | hr = CopyEngineWithSignatureFixup(pSection->hEngineFile, wzSourcePath, sczTargetPath, pSection); |
1797 | ExitOnFailure(hr, "Failed to copy engine: '%ls' to working path: %ls", wzSourcePath, sczTargetPath); | 1793 | ExitOnFailure(hr, "Failed to copy engine: '%ls' to working path: %ls", wzSourcePath, sczTargetPath); |
1798 | 1794 | ||
1799 | // Copy external UX payloads to working path. | ||
1800 | for (DWORD i = 0; i < pUxPayloads->cPayloads; ++i) | ||
1801 | { | ||
1802 | BURN_PAYLOAD* pPayload = &pUxPayloads->rgPayloads[i]; | ||
1803 | |||
1804 | if (BURN_PAYLOAD_PACKAGING_EXTERNAL == pPayload->packaging) | ||
1805 | { | ||
1806 | if (!sczSourceDirectory) | ||
1807 | { | ||
1808 | hr = PathGetDirectory(wzSourcePath, &sczSourceDirectory); | ||
1809 | ExitOnFailure(hr, "Failed to get directory from engine path: %ls", wzSourcePath); | ||
1810 | } | ||
1811 | |||
1812 | hr = PathConcat(sczSourceDirectory, pPayload->sczSourcePath, &sczPayloadSourcePath); | ||
1813 | ExitOnFailure(hr, "Failed to build payload source path for working copy."); | ||
1814 | |||
1815 | hr = PathConcat(sczTargetDirectory, pPayload->sczFilePath, &sczPayloadTargetPath); | ||
1816 | ExitOnFailure(hr, "Failed to build payload target path for working copy."); | ||
1817 | |||
1818 | hr = FileEnsureCopyWithRetry(sczPayloadSourcePath, sczPayloadTargetPath, TRUE, FILE_OPERATION_RETRY_COUNT, FILE_OPERATION_RETRY_WAIT); | ||
1819 | ExitOnFailure(hr, "Failed to copy UX payload from: '%ls' to: '%ls'", sczPayloadSourcePath, sczPayloadTargetPath); | ||
1820 | } | ||
1821 | } | ||
1822 | |||
1823 | if (psczEngineWorkingPath) | 1795 | if (psczEngineWorkingPath) |
1824 | { | 1796 | { |
1825 | hr = StrAllocString(psczEngineWorkingPath, sczTargetPath, 0); | 1797 | hr = StrAllocString(psczEngineWorkingPath, sczTargetPath, 0); |