Skip to content

Commit 2964ea8

Browse files
JavierMatosDJavier Matos
andauthored
Remove msiexec dependency by adding using vcpkg.exe to unpack 7z.exe (microsoft#41604)
Co-authored-by: Javier Matos <[email protected]>
1 parent 335a153 commit 2964ea8

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

scripts/azure-pipelines/azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ parameters:
88
- name: vcpkgToolSha
99
displayName: 'Custom SHA of vcpkg-tool to use rather than bootstrap'
1010
type: string
11-
default: 'use default'
11+
default: 'use default'
1212
- name: tripletPattern
1313
displayName: 'Enable triplets which contain this substring'
1414
type: string

scripts/cmake/vcpkg_extract_archive.cmake

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,8 @@ function(vcpkg_extract_archive)
3434
WORKING_DIRECTORY "${archive_directory}"
3535
)
3636
elseif("${archive_extension}" MATCHES [[\.7z\.exe$]])
37-
vcpkg_find_acquire_program(7Z)
3837
vcpkg_execute_in_download_mode(
39-
COMMAND ${7Z} x
40-
"${arg_ARCHIVE}"
41-
"-o${arg_DESTINATION}"
42-
-y -bso0 -bsp0
38+
COMMAND "$ENV{VCPKG_COMMAND}" z-extract "${arg_ARCHIVE}" "${arg_DESTINATION}"
4339
WORKING_DIRECTORY "${arg_DESTINATION}"
4440
)
4541
else()
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
set(program_name 7z)
22
if(CMAKE_HOST_WIN32)
33
set(tool_subdirectory "24.08")
4-
set(paths_to_search "${DOWNLOADS}/tools/7zip_msi-${tool_subdirectory}-windows/Files/7-Zip") # vcpkg fetch 7zip_msi path
5-
list(APPEND paths_to_search "${DOWNLOADS}/tools/7z/${tool_subdirectory}/Files/7-Zip")
6-
set(download_urls "https://github.com/ip7z/7zip/releases/download/24.08/7z2408.msi" "https://7-zip.org/a/7z2408.msi")
7-
set(download_filename "7z2408.msi")
8-
set(download_sha512 0bc88c99ad921a6f828d9ed9b8391510d1d0c2f8ecb7ad2921838c97c20f215e2ab03198009d159e2d1859bb20f157010f492288ce61c86544df06742cebbc34)
4+
set(paths_to_search "${DOWNLOADS}/tools/7z/${tool_subdirectory}/7z2408/SourceDir/Files/7-Zip")
5+
set(download_urls "https://github.com/ip7z/7zip/releases/download/24.08/7z2408.exe")
6+
set(download_filename "7z2408.7z.exe")
7+
set(search_names "7z.exe")
8+
set(download_sha512 7f6c46c780fcb5fc10cc5405221179ddecbbb871c578ca3d9e3a74141271b383bd83e8f9d75c98d7e9d406e9b935d52a6b04913d654169e0b30f0719225e7dd9)
99
endif()

0 commit comments

Comments
 (0)