mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
Update vcpkg-tool to 2024-11-12 and simplify vcpkg_download_distfile.
This commit is contained in:
commit
772f784ba8
@ -28,30 +28,6 @@ function(z_vcpkg_download_distfile_test_hash file_path kind error_advice sha512
|
|||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(z_vcpkg_download_distfile_show_proxy_and_fail error_code)
|
|
||||||
message(FATAL_ERROR
|
|
||||||
" \n"
|
|
||||||
" Failed to download file with error: ${error_code}\n"
|
|
||||||
" If you are using a proxy, please check your proxy setting. Possible causes are:\n"
|
|
||||||
" \n"
|
|
||||||
" 1. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable\n"
|
|
||||||
" to `https://address:port`. This is not correct, because `https://` prefix\n"
|
|
||||||
" claims the proxy is an HTTPS proxy, while your proxy (v2ray, shadowsocksr\n"
|
|
||||||
" , etc..) is an HTTP proxy. Try setting `http://address:port` to both\n"
|
|
||||||
" HTTP_PROXY and HTTPS_PROXY instead.\n"
|
|
||||||
" \n"
|
|
||||||
" 2. If you are using Windows, vcpkg will automatically use your Windows IE Proxy Settings\n"
|
|
||||||
" set by your proxy software. See https://github.com/microsoft/vcpkg-tool/pull/77\n"
|
|
||||||
" The value set by your proxy might be wrong, or have same `https://` prefix issue.\n"
|
|
||||||
" \n"
|
|
||||||
" 3. Your proxy's remote server is out of service.\n"
|
|
||||||
" \n"
|
|
||||||
" If you've tried directly download the link, and believe this is not a temporary\n"
|
|
||||||
" download server failure, please submit an issue at https://github.com/Microsoft/vcpkg/issues\n"
|
|
||||||
" to report this upstream download server failure.\n"
|
|
||||||
" \n")
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(z_vcpkg_download_distfile_via_aria)
|
function(z_vcpkg_download_distfile_via_aria)
|
||||||
cmake_parse_arguments(PARSE_ARGV 1 arg
|
cmake_parse_arguments(PARSE_ARGV 1 arg
|
||||||
"SKIP_SHA512"
|
"SKIP_SHA512"
|
||||||
@ -196,13 +172,7 @@ If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.")
|
|||||||
"${arg_SHA512}"
|
"${arg_SHA512}"
|
||||||
"${arg_SKIP_SHA512}"
|
"${arg_SKIP_SHA512}"
|
||||||
)
|
)
|
||||||
|
message(STATUS "Using cached ${arg_FILENAME}.")
|
||||||
if(NOT vcpkg_download_distfile_QUIET)
|
|
||||||
message(STATUS "Using cached ${arg_FILENAME}.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Suppress the "Downloading ${arg_URLS} -> ${arg_FILENAME}..." message
|
|
||||||
set(vcpkg_download_distfile_QUIET TRUE)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# vcpkg_download_distfile_ALWAYS_REDOWNLOAD only triggers when NOT _VCPKG_NO_DOWNLOADS
|
# vcpkg_download_distfile_ALWAYS_REDOWNLOAD only triggers when NOT _VCPKG_NO_DOWNLOADS
|
||||||
@ -235,9 +205,6 @@ If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.")
|
|||||||
foreach(url IN LISTS arg_URLS)
|
foreach(url IN LISTS arg_URLS)
|
||||||
vcpkg_list(APPEND urls_param "--url=${url}")
|
vcpkg_list(APPEND urls_param "--url=${url}")
|
||||||
endforeach()
|
endforeach()
|
||||||
if(NOT vcpkg_download_distfile_QUIET)
|
|
||||||
message(STATUS "Downloading ${arg_URLS} -> ${arg_FILENAME}...")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
vcpkg_list(SET headers_param)
|
vcpkg_list(SET headers_param)
|
||||||
foreach(header IN LISTS arg_HEADERS)
|
foreach(header IN LISTS arg_HEADERS)
|
||||||
@ -257,17 +224,11 @@ If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.")
|
|||||||
${sha512_param}
|
${sha512_param}
|
||||||
${urls_param}
|
${urls_param}
|
||||||
${headers_param}
|
${headers_param}
|
||||||
--debug
|
|
||||||
--feature-flags=-manifests # there's a bug in vcpkg x-download when it finds a manifest-root
|
|
||||||
OUTPUT_VARIABLE output
|
|
||||||
ERROR_VARIABLE output
|
|
||||||
RESULT_VARIABLE error_code
|
RESULT_VARIABLE error_code
|
||||||
WORKING_DIRECTORY "${DOWNLOADS}"
|
WORKING_DIRECTORY "${DOWNLOADS}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT "${error_code}" EQUAL "0")
|
if(NOT "${error_code}" EQUAL "0")
|
||||||
message("${output}")
|
message(FATAL_ERROR "Download failed, halting portfile.")
|
||||||
z_vcpkg_download_distfile_show_proxy_and_fail("${error_code}")
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
VCPKG_TOOL_RELEASE_TAG=2024-10-18
|
VCPKG_TOOL_RELEASE_TAG=2024-11-12
|
||||||
VCPKG_MACOS_SHA=50f41ed37fb1772da4f9d4ddf05875b6bf53eb3fbc56f47060cb9dcedacfe9628f1c87d0df49f8cc204c546e07fd89b0f7efe89511e61232503e63684631304f
|
VCPKG_MACOS_SHA=09f0c1dcb8d86adc34531816928c8bc2f83f6584cefd65b606dce991ee868d86386bbb5e7054fe8b62972f02b7f05636dd06e8691449e80957e7cd20f8139cc7
|
||||||
VCPKG_MUSLC_SHA=008a0263d3e128c50eb682d33f0d337e590c1e6cc5e0f9788d5c534848359e80d1515304f7bc5e15fdf9699b0692fa0e1cf3bfb295f1d011ce0bc380fb4f147a
|
VCPKG_MUSLC_SHA=615f5688faa77b99968c6c55890a93eda9eb5fbc4005556f7b3ef358e17ac1ab194ec3177ffbd60d703e4940ce7334eafa948e4cb3ee1b0117685da40177aefa
|
||||||
VCPKG_GLIBC_SHA=47536d30e8ba854bc283776d5be67401e230aca55054ce439f712c2e7b21f5d05b86aa64438252e91390601eefe26710bfc83c5fb154d6737940f334c6c932a0
|
VCPKG_GLIBC_SHA=c0484b64a70b146206e0273e92767e7a611e0d9540495602b73f01c25e63f1d07f971e2661f29b62a0c92641c24739189642baec91545ed864123bc019db86ff
|
||||||
VCPKG_TOOL_SOURCE_SHA=35bb6b95746a9c567fb5a5ad6d8d0c637093745c2487f3def6f84b1d3a7ae4753d7e41efde44fd34bc4f9c72e9bbecf1d042cda9542f734728f3f8d94d4f35e7
|
VCPKG_TOOL_SOURCE_SHA=da376da67ece521e3197be9e1f7b637405f1ca314fad6937ae7ee08baaebb6cebb1336e16d43667bd9ce329a613c6a65f6d0fa2d22940261bb975a3258f2c8d0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user