-
Notifications
You must be signed in to change notification settings - Fork 7.2k
[vcpkg scripts] Use vcpkg fetch for available tools #43309
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
Draft
Neumann-A
wants to merge
6
commits into
microsoft:master
Choose a base branch
from
Neumann-A:ninja_from_vcpkg_fetch
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+28
−81
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c3b1e19
Use ninja from vcpkg fetch
Neumann-A d576cd0
Merge remote-tracking branch 'upstream/master' into ninja_from_vcpkg_…
Neumann-A 77abc3b
Introduce function z_use_vcpkg_fetch
Neumann-A f634f2d
Merge branch 'microsoft:master' into ninja_from_vcpkg_fetch
Neumann-A cbf8e93
use --x-stderr-status
Neumann-A b955502
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1 @@ | ||
| set(program_name 7z) | ||
| if(CMAKE_HOST_WIN32) | ||
| 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() | ||
| z_use_vcpkg_fetch(7Z FETCH_NAME 7zip) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1 @@ | ||
| set(program_name git) | ||
| if(CMAKE_HOST_WIN32) | ||
| set(base_version 2.32.0) | ||
| set(program_version 2.32.0.2) | ||
| set(tool_subdirectory "git-${program_version}-2-windows") | ||
| set(download_urls "https://github.com/git-for-windows/git/releases/download/v${base_version}.windows.2/PortableGit-${program_version}-32-bit.7z.exe") | ||
| set(download_filename "PortableGit-${program_version}-32-bit.7z.exe") | ||
| set(download_sha512 867d8534972cbaf7a4224e25a14d484f8d17ef186f8d79e9a758afb90cf69541375cb7615a39702311f4809cb8371ef85c2b1a15bfffe9e48f0e597ac011b348) | ||
| set(paths_to_search | ||
| "${DOWNLOADS}/tools/${tool_subdirectory}/mingw32/bin" | ||
| "${DOWNLOADS}/tools/git/${tool_subdirectory}/mingw32/bin") | ||
| else() | ||
| set(brew_package_name "git") | ||
| set(apt_package_name "git") | ||
| endif() | ||
| z_use_vcpkg_fetch(GIT) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,46 +1 @@ | ||
| set(program_name ninja) | ||
| set(program_version 1.12.1) | ||
| set(version_command --version) | ||
| if(CMAKE_HOST_WIN32) | ||
| if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) | ||
| set(build_arch $ENV{PROCESSOR_ARCHITEW6432}) | ||
| else() | ||
| set(build_arch $ENV{PROCESSOR_ARCHITECTURE}) | ||
| endif() | ||
| if(build_arch MATCHES "^(ARM|arm)64$") | ||
| set(download_filename "ninja-winarm64-${program_version}.zip") | ||
| set(tool_subdirectory "${program_version}-windows-arm64") | ||
| set(download_urls "https://github.com/ninja-build/ninja/releases/download/v${program_version}/ninja-winarm64.zip") | ||
| set(download_sha512 b1826c422a677f47f9f7e001672ce831791b092e4f1cd84ddf2ea067781c31aa8246f26e91dd66300c23ffa77a8ea29910c48ccf7e4235ff20bccc2d2b6e247b) | ||
| else() | ||
| set(download_filename "ninja-win-${program_version}.zip") | ||
| set(tool_subdirectory "${program_version}-windows") | ||
| set(download_urls "https://github.com/ninja-build/ninja/releases/download/v${program_version}/ninja-win.zip") | ||
| set(download_sha512 d6715c6458d798bcb809f410c0364dabd937b5b7a3ddb4cd5aba42f9fca45139b2a8a3e7fd9fbd88fd75d298ed99123220b33c7bdc8966a9d5f2a1c9c230955f) | ||
| endif() | ||
| elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") | ||
| set(download_filename "ninja-mac-${program_version}.zip") | ||
| set(download_urls "https://github.com/ninja-build/ninja/releases/download/v${program_version}/ninja-mac.zip") | ||
| set(tool_subdirectory "${program_version}-osx") | ||
| set(paths_to_search "${DOWNLOADS}/tools/ninja-${program_version}-osx") | ||
| set(download_sha512 4c11f477359c9d1dcda72529a503a59948ec20b368992132e545d6d4f6e3aabfd1d6b1d0f32cf932626037959b24a7bb375ef901e2d002eabadc83a265cbc351) | ||
| elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD") | ||
| set(paths_to_search "${DOWNLOADS}/tools/${tool_subdirectory}-freebsd") | ||
| else() | ||
| vcpkg_execute_in_download_mode(COMMAND "uname" "-m" OUTPUT_VARIABLE HOST_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
| if(HOST_ARCH MATCHES "x86_64|amd64|AMD64") | ||
| set(download_filename "ninja-linux-${program_version}.zip") | ||
| set(download_urls "https://github.com/ninja-build/ninja/releases/download/v${program_version}/ninja-linux.zip") | ||
| set(tool_subdirectory "${program_version}-linux") | ||
| set(paths_to_search "${DOWNLOADS}/tools/ninja-${program_version}-linux") | ||
| set(download_sha512 9c2ad534e7e72e67c608de7784cfbae601095bfca96713731a3f1eca268d66a6302f40c138a4ad97f7e8c902cd3fb05994a175e46fe922295dcc2d1334bf9014) | ||
| elseif(HOST_ARCH MATCHES "arm64|aarch64|ARM64|AARCH64") | ||
| set(download_filename "ninja-linux-aarch64-${program_version}.zip") | ||
| set(download_urls "https://github.com/ninja-build/ninja/releases/download/v${program_version}/ninja-linux-aarch64.zip") | ||
| set(tool_subdirectory "${program_version}-linux-aarch64") | ||
| set(paths_to_search "${DOWNLOADS}/tools/ninja-${program_version}-linux-aarch64") | ||
| set(download_sha512 22c46abb7e6d916e11713705f78d093e9b30029cb49cadc65755908ad9f44b3f2548105174cc615a5ef86c4672b366173f18bd04c2d71710a303d952c06db334) | ||
| else() | ||
| set(version_command "") # somewhat hacky way to skip version check and use system binary | ||
| endif() | ||
| endif() | ||
| z_use_vcpkg_fetch(NINJA) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1 @@ | ||
| set(program_name nuget) | ||
| set(brew_package_name "nuget") | ||
| if(CMAKE_HOST_WIN32) | ||
| set(download_urls "https://dist.nuget.org/win-x86-commandline/v6.11.1/nuget.exe") | ||
| set(download_filename "nuget.6.11.1.exe") | ||
| set(download_sha512 8E139D1C4A97F35625E261DF07AC5B3ECB6B931907D303E3B0FCCA26EC537FF667FF49CA15CB57909B30A262EA39EF678C4CBF33C99658162E58A6648D336D52) | ||
| set(tool_subdirectory "6.11.1") | ||
| set(paths_to_search "${DOWNLOADS}/tools/nuget-${tool_subdirectory}-windows") | ||
| set(raw_executable ON) | ||
| set(rename_binary_to "nuget.exe") | ||
| endif() | ||
| z_use_vcpkg_fetch(NUGET) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah this explains the funny NuGet behavior.
fetchneeds to be audited to send status messages to stderr.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/microsoft/vcpkg-tool/blob/5d180566dc8204de49a53e167d990e79c03ee7f3/src/vcpkg/commands.fetch.cpp#L14
Or at least pass --x-stderr-status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it is not enough:
still get:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Neumann-A @dg0yt Finally have what I hope is a fix for this out for review microsoft/vcpkg-tool#1842