mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 01:30:55 +08:00
vcpkg_extract_archive: use vcpkg.exe z-extract
This commit is contained in:
parent
96b5ced828
commit
0c4cf19224
@ -33,15 +33,9 @@ function(vcpkg_extract_archive)
|
||||
/qn "TARGETDIR=${destination_native_path}"
|
||||
WORKING_DIRECTORY "${archive_directory}"
|
||||
)
|
||||
elseif("${archive_extension}" MATCHES [[\.7z\.exe$]])
|
||||
vcpkg_find_acquire_program(7Z)
|
||||
elseif("${archive_extension}" MATCHES [[\.exe$]])
|
||||
vcpkg_execute_in_download_mode(
|
||||
COMMAND ${7Z} x
|
||||
"${arg_ARCHIVE}"
|
||||
"-o${arg_DESTINATION}"
|
||||
-y -bso0 -bsp0
|
||||
WORKING_DIRECTORY "${arg_DESTINATION}"
|
||||
)
|
||||
COMMAND "$ENV{VCPKG_COMMAND}" z-extract "${arg_ARCHIVE}" "${arg_DESTINATION}")
|
||||
else()
|
||||
vcpkg_execute_in_download_mode(
|
||||
COMMAND "${CMAKE_COMMAND}" -E tar xzf "${arg_ARCHIVE}"
|
||||
|
@ -1,8 +1,9 @@
|
||||
set(program_name 7z)
|
||||
if(CMAKE_HOST_WIN32)
|
||||
set(paths_to_search "${DOWNLOADS}/tools/7zip_msi-${tool_subdirectory}-windows/Files/7-Zip") # vcpkg fetch 7zip_msi path
|
||||
list(APPEND paths_to_search "${DOWNLOADS}/tools/7z/${tool_subdirectory}/Files/7-Zip")
|
||||
set(download_urls "https://github.com/ip7z/7zip/releases/download/24.09/7z2409.msi" "https://7-zip.org/a/7z2409.msi")
|
||||
set(download_filename "7z2409.msi")
|
||||
set(download_sha512 33448CC4EDB2550F1FE6C4BAC27C6F8D3E0D1985F7C6ABCF34AC83DFF650FB90B926F65A4553DA4E92868F507DE4DFAD87E5A38B3ED8C68668B983105BB39224)
|
||||
set(tool_subdirectory "24.09")
|
||||
set(paths_to_search "${DOWNLOADS}/tools/7z/${tool_subdirectory}/7z2409/SourceDir/Files/7-Zip")
|
||||
set(download_urls "https://github.com/ip7z/7zip/releases/download/24.09/7z2409.exe")
|
||||
set(download_filename "7z2409.7z.exe")
|
||||
set(search_names "7z.exe")
|
||||
set(download_sha512 a39a84b13b383ac5fca20eb6d92ec6b8bc85f1b6a545c441efdbe054d8d12c9ebe97d366235bdf1383bbdb2a9666d18d0145b10b6e589180502c0c2dfa26ef14)
|
||||
endif()
|
||||
|
@ -19,11 +19,11 @@ if(CMAKE_HOST_WIN32)
|
||||
|
||||
if(host_arch MATCHES "64")
|
||||
set(download_urls "https://github.com/llvm/llvm-project/releases/download/llvmorg-${program_version}/LLVM-${program_version}-win64.exe")
|
||||
set(download_filename "LLVM-${program_version}-win64.7z.exe")
|
||||
set(download_filename "LLVM-${program_version}-win64.exe")
|
||||
set(download_sha512 2dd6f3eea106f2b905e6658ea5ea12856d17285adbfba055edc2d6b6389c4c2f7aa001df5cb0d8fb84fa7fa47d5035a7fddf276523b472dd55f150ae25938768)
|
||||
else()
|
||||
set(download_urls "https://github.com/llvm/llvm-project/releases/download/llvmorg-${program_version}/LLVM-${program_version}-win32.exe")
|
||||
set(download_filename "LLVM-${program_version}-win32.7z.exe")
|
||||
set(download_filename "LLVM-${program_version}-win32.exe")
|
||||
set(download_sha512 90225D650EADB0E590A9912B479B46A575D41A19EB5F2DA03C4DC8B032DC0790222F0E3706DFE2A35C0E7747941972AC26CB47D3EB13730DB76168931F37E5F1)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -139,10 +139,10 @@
|
||||
</tool>
|
||||
<tool name="7zip" os="windows">
|
||||
<version>24.09</version>
|
||||
<exeRelativePath>7za.exe</exeRelativePath>
|
||||
<url>https://github.com/ip7z/7zip/releases/download/24.09/7z2409-extra.7z</url>
|
||||
<sha512>d17ef51ebe5e61761fa449c0d6106950e7e8dd9ef9bb9f129aed048f3d8d81662ba82a71e8264fff7c0f6764f410f2e8a4430d27e4ce915cf339e8d639905b3b</sha512>
|
||||
<archiveName>7z2409-extra.7z</archiveName>
|
||||
<exeRelativePath>7z.exe</exeRelativePath>
|
||||
<url>https://github.com/ip7z/7zip/releases/download/24.09/7z2409.exe</url>
|
||||
<sha512>a39a84b13b383ac5fca20eb6d92ec6b8bc85f1b6a545c441efdbe054d8d12c9ebe97d366235bdf1383bbdb2a9666d18d0145b10b6e589180502c0c2dfa26ef14</sha512>
|
||||
<archiveName>7z2409.7z.exe</archiveName>
|
||||
</tool>
|
||||
<tool name="7zr" os="windows">
|
||||
<version>24.09</version>
|
||||
|
Loading…
x
Reference in New Issue
Block a user