mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-24 03:27:12 +01:00
[vcpkgTools.xml] requiredVersion -> version
This commit is contained in:
parent
2fa16cda18
commit
408cd5ccb8
@ -25,7 +25,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool)
|
||||
throw "Unkown tool $tool"
|
||||
}
|
||||
|
||||
$toolPath="$downloadsDir\tools\$tool-$($toolData.requiredVersion)-windows"
|
||||
$toolPath="$downloadsDir\tools\$tool-$($toolData.version)-windows"
|
||||
$exePath = "$toolPath\$($toolData.exeRelativePath)"
|
||||
|
||||
if (Test-Path $exePath)
|
||||
|
@ -1,82 +1,82 @@
|
||||
<?xml version="1.0"?>
|
||||
<tools version="1">
|
||||
<tool name="cmake" os="windows">
|
||||
<requiredVersion>3.10.2</requiredVersion>
|
||||
<version>3.10.2</version>
|
||||
<exeRelativePath>cmake-3.10.2-win32-x86\bin\cmake.exe</exeRelativePath>
|
||||
<url>https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip</url>
|
||||
<sha512>9c16861a2ac09c7011b84f38459ecfec2829a9f825b254acbbde46d98f12f8ca0d4db3a6764758cb671507ee7c0327576d87658b81d7ddf1e8280b37569eb16d</sha512>
|
||||
<archiveName>cmake-3.10.2-win32-x86.zip</archiveName>
|
||||
</tool>
|
||||
<tool name="cmake" os="osx">
|
||||
<requiredVersion>3.10.2</requiredVersion>
|
||||
<version>3.10.2</version>
|
||||
<exeRelativePath>cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake</exeRelativePath>
|
||||
<url>https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz</url>
|
||||
<sha512>cb7d76e11c892eb786da5804282c4141564390c3552e08c506c7abb93015eb5f619c55255459872b219399ce8114ac321fe92df7f82a7e42bbc874eec240571e</sha512>
|
||||
<archiveName>cmake-3.10.2-Darwin-x86_64.tar.gz</archiveName>
|
||||
</tool>
|
||||
<tool name="cmake" os="linux">
|
||||
<requiredVersion>3.10.2</requiredVersion>
|
||||
<version>3.10.2</version>
|
||||
<exeRelativePath>cmake-3.10.2-Linux-x86_64/bin/cmake</exeRelativePath>
|
||||
<url>https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz</url>
|
||||
<sha512>54389b5cb3f3cb9d182d35e0b1eaf7b301695899930da0d26e9df1dc25056213a077646d23ea609a93daa81d30687757d9cf0dc263339fa3d73dbeb1284bc1a9</sha512>
|
||||
<archiveName>cmake-3.10.2-Linux-x86_64.tar.gz</archiveName>
|
||||
</tool>
|
||||
<tool name="git" os="windows">
|
||||
<requiredVersion>2.16.2</requiredVersion>
|
||||
<version>2.16.2</version>
|
||||
<exeRelativePath>cmd\git.exe</exeRelativePath>
|
||||
<url>https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip</url>
|
||||
<sha512>004e1dc1904f2e2d5c3534d0a56f58bf030b1146f5b263d6d191e60f72cd35455977c588604708125a1e93268ee8f7a5ab32ed6115adc028257b12d5926f350a</sha512>
|
||||
<archiveName>MinGit-2.16.2-32-bit.zip</archiveName>
|
||||
</tool>
|
||||
<tool name="vswhere" os="windows">
|
||||
<requiredVersion>2.3.2</requiredVersion>
|
||||
<version>2.3.2</version>
|
||||
<exeRelativePath>vswhere.exe</exeRelativePath>
|
||||
<url>https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe</url>
|
||||
<sha512>42f8a8ffd0b156b2e30b2ec7bf7d19582b3ce38a2046ff62bd7fd82f12a8d66ed601e74865957864cef0a376e33a7d07cad746f03c57d1b95a7929a1f8f119ed</sha512>
|
||||
</tool>
|
||||
<tool name="nuget" os="windows">
|
||||
<requiredVersion>4.4.0</requiredVersion>
|
||||
<version>4.4.0</version>
|
||||
<exeRelativePath>nuget.exe</exeRelativePath>
|
||||
<url>https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe</url>
|
||||
<sha512>fb0903665d2a64ce1da3f40961eb19e46c152a631b2441750aa8b30b20acd2a5e78d7f1058e79e83e37959b3ce9a090a60f081895fdba9998715e3a64437c3e5</sha512>
|
||||
</tool>
|
||||
<tool name="installerbase" os="windows">
|
||||
<requiredVersion>3.1.81</requiredVersion>
|
||||
<version>3.1.81</version>
|
||||
<exeRelativePath>QtInstallerFramework-win-x86\bin\installerbase.exe</exeRelativePath>
|
||||
<url>https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip</url>
|
||||
<sha512>1f3e593270d7c2a4e271fdb49c637a2de462351310ef66bba298d30f6ca23365ec6aecf2e57799a00c873267cd3f92060ecac03eb291d42903d0e0869cd17c73</sha512>
|
||||
<archiveName>QtInstallerFramework-win-x86.zip</archiveName>
|
||||
</tool>
|
||||
<tool name="7zip" os="windows">
|
||||
<requiredVersion>18.01.0</requiredVersion>
|
||||
<version>18.01.0</version>
|
||||
<exeRelativePath>7za.exe</exeRelativePath>
|
||||
<url>https://www.7-zip.org/a/7z1801-extra.7z</url>
|
||||
<sha512>9133fc551d76515e37fdd4dd8c1e28d464aea493548246b44565a42bba46715764f41f9cfa14d470d298c3a6e9829d200f8be5168cb67cf8f23d8042fca833bc</sha512>
|
||||
<archiveName>7z1801-extra.7z</archiveName>
|
||||
</tool>
|
||||
<tool name="7zip920" os="windows">
|
||||
<requiredVersion>9.20.0</requiredVersion>
|
||||
<version>9.20.0</version>
|
||||
<exeRelativePath>7za.exe</exeRelativePath>
|
||||
<url>https://www.7-zip.org/a/7za920.zip</url>
|
||||
<sha512>84e830c91a0e8ae499cc4814080da6569d8a6acbddc585c8b62abc86c809793aeb669b0a741063a379fd281ade85f120bc27efeb67d63bf961be893eec8bc3b3</sha512>
|
||||
<archiveName>7za920.zip</archiveName>
|
||||
</tool>
|
||||
<tool name="aria2" os="windows">
|
||||
<requiredVersion>18.01.0</requiredVersion>
|
||||
<version>18.01.0</version>
|
||||
<exeRelativePath>aria2-1.33.1-win-32bit-build1\aria2c.exe</exeRelativePath>
|
||||
<url>https://github.com/aria2/aria2/releases/download/release-1.33.1/aria2-1.33.1-win-32bit-build1.zip</url>
|
||||
<sha512>2456176ba3d506a07cf0cc4f61f080e1ff8cb4106426d66f354c5bb67a9a8720b5ddb26904275e61b1f623c932355f7dcde4cd17556cc895f11293c23c3a9bf3</sha512>
|
||||
<archiveName>aria2-1.33.1-win-32bit-build1.zip</archiveName>
|
||||
</tool>
|
||||
<tool name="ninja" os="linux">
|
||||
<requiredVersion>1.8.2</requiredVersion>
|
||||
<version>1.8.2</version>
|
||||
<exeRelativePath>ninja</exeRelativePath>
|
||||
<url>https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip</url>
|
||||
<sha512>38fcb68e745c1f15b4b50f20069ffe686b1ef5baf93b74958e132ea5d30d155cf6970d6dc1b095aafd421ebd8bcc63acf4f64e305c496266b5182f99b815cca5</sha512>
|
||||
<archiveName>ninja-linux.zip</archiveName>
|
||||
</tool>
|
||||
<tool name="ninja" os="osx">
|
||||
<requiredVersion>1.8.2</requiredVersion>
|
||||
<version>1.8.2</version>
|
||||
<exeRelativePath>ninja</exeRelativePath>
|
||||
<url>https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip</url>
|
||||
<sha512>acadfb286eb7d93676629701917fa0c3c39f36daa068c169e4a098c29f97380d1ea95abfd42b04798ff118fd9dc93fdb250fcda36086bac20bc5506354214fc3</sha512>
|
||||
|
@ -15,7 +15,7 @@ namespace vcpkg::Commands::Fetch
|
||||
|
||||
struct ToolData
|
||||
{
|
||||
std::array<int, 3> required_version;
|
||||
std::array<int, 3> version;
|
||||
fs::path exe_path;
|
||||
std::string url;
|
||||
fs::path downloaded_path;
|
||||
@ -73,7 +73,7 @@ namespace vcpkg::Commands::Fetch
|
||||
|
||||
static const std::regex XML_VERSION_REGEX{R"###(<tools[\s]+version="([^"]+)">)###"};
|
||||
static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO);
|
||||
static const std::regex VERSION_REGEX{R"###(<requiredVersion>([\s\S]*?)</requiredVersion>)###"};
|
||||
static const std::regex VERSION_REGEX{R"###(<version>([\s\S]*?)</version>)###"};
|
||||
static const std::regex EXE_RELATIVE_PATH_REGEX{
|
||||
Strings::format(R"###(<exeRelativePath>([\s\S]*?)</exeRelativePath>)###")};
|
||||
static const std::regex ARCHIVE_NAME_REGEX{Strings::format(R"###(<archiveName>([\s\S]*?)</archiveName>)###")};
|
||||
@ -104,7 +104,7 @@ namespace vcpkg::Commands::Fetch
|
||||
const std::string tool_data_as_string = get_string_inside_tags(XML, tool_regex, tool);
|
||||
|
||||
const std::string required_version_as_string =
|
||||
get_string_inside_tags(tool_data_as_string, VERSION_REGEX, "requiredVersion");
|
||||
get_string_inside_tags(tool_data_as_string, VERSION_REGEX, "version");
|
||||
|
||||
const std::string url = get_string_inside_tags(tool_data_as_string, URL_REGEX, "url");
|
||||
|
||||
@ -220,7 +220,7 @@ namespace vcpkg::Commands::Fetch
|
||||
{
|
||||
const auto& fs = paths.get_filesystem();
|
||||
const fs::path& scripts_folder = paths.scripts;
|
||||
const std::array<int, 3>& version = tool_data.required_version;
|
||||
const std::array<int, 3>& version = tool_data.version;
|
||||
|
||||
const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]);
|
||||
System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...",
|
||||
@ -289,7 +289,7 @@ namespace vcpkg::Commands::Fetch
|
||||
if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe");
|
||||
|
||||
const Optional<fs::path> path =
|
||||
find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version);
|
||||
find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version);
|
||||
if (const auto p = path.get())
|
||||
{
|
||||
return *p;
|
||||
@ -321,7 +321,7 @@ namespace vcpkg::Commands::Fetch
|
||||
const std::vector<fs::path> from_path = Files::find_from_PATH("ninja");
|
||||
candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend());
|
||||
|
||||
auto path = find_if_has_equal_or_greater_version(candidate_paths, "--version", TOOL_DATA.required_version);
|
||||
auto path = find_if_has_equal_or_greater_version(candidate_paths, "--version", TOOL_DATA.version);
|
||||
if (const auto p = path.get())
|
||||
{
|
||||
return *p;
|
||||
@ -339,7 +339,7 @@ namespace vcpkg::Commands::Fetch
|
||||
const std::vector<fs::path> from_path = Files::find_from_PATH("nuget");
|
||||
candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend());
|
||||
|
||||
auto path = find_if_has_equal_or_greater_version(candidate_paths, "", TOOL_DATA.required_version);
|
||||
auto path = find_if_has_equal_or_greater_version(candidate_paths, "", TOOL_DATA.version);
|
||||
if (const auto p = path.get())
|
||||
{
|
||||
return *p;
|
||||
@ -370,7 +370,7 @@ namespace vcpkg::Commands::Fetch
|
||||
if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe");
|
||||
|
||||
const Optional<fs::path> path =
|
||||
find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version);
|
||||
find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version);
|
||||
if (const auto p = path.get())
|
||||
{
|
||||
return *p;
|
||||
@ -396,7 +396,7 @@ namespace vcpkg::Commands::Fetch
|
||||
// "QtIFW-3.1.0" / "bin" / "installerbase.exe");
|
||||
|
||||
const Optional<fs::path> path =
|
||||
find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version);
|
||||
find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version);
|
||||
if (const auto p = path.get())
|
||||
{
|
||||
return *p;
|
||||
|
Loading…
x
Reference in New Issue
Block a user