Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcpkg_extract_archive: Use vcpkg.exe z-extract #42370

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions scripts/cmake/vcpkg_extract_archive.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
11 changes: 6 additions & 5 deletions scripts/cmake/vcpkg_find_acquire_program(7Z).cmake
Original file line number Diff line number Diff line change
@@ -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()
4 changes: 2 additions & 2 deletions scripts/cmake/vcpkg_find_acquire_program(CLANG).cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions scripts/vcpkgTools.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Loading