diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2018-04-04 19:28:10 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2018-04-06 17:24:46 -0700 |
| commit | 23c2b82535d24a8ef343ce2ca36e5a63d111dcd8 (patch) | |
| tree | fdb33fecdd37e068006187f2ccf1a255f0ad4660 | |
| parent | e3099b458b5c11742c1b88c27847801090870f2d (diff) | |
| download | vcpkg-23c2b82535d24a8ef343ce2ca36e5a63d111dcd8.tar.gz vcpkg-23c2b82535d24a8ef343ce2ca36e5a63d111dcd8.zip | |
[vcpkgTools.xml] Add os="windows" to relevant entries
| -rw-r--r-- | scripts/vcpkgTools.xml | 16 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg/commands.fetch.cpp | 9 |
2 files changed, 10 insertions, 15 deletions
diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 810818998..fbd6aabd6 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <tools version="1"> - <tool name="cmake"> + <tool name="cmake" os="windows"> <requiredVersion>3.10.2</requiredVersion> <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> @@ -21,47 +21,47 @@ <sha256>7a82b46c35f4e68a0807e8dc04e779dee3f36cd42c6387fd13b5c29fe62a69ea</sha256> <archiveRelativePath>cmake-3.10.2-Linux-x86_64.tar.gz</archiveRelativePath> </tool> - <tool name="git"> + <tool name="git" os="windows"> <requiredVersion>2.16.2</requiredVersion> <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> <sha256>322c727e482aa97522c64a5ac68bdda3780111e8670bcfb532beac8e11ece5da</sha256> <archiveRelativePath>MinGit-2.16.2-32-bit.zip</archiveRelativePath> </tool> - <tool name="vswhere"> + <tool name="vswhere" os="windows"> <requiredVersion>2.3.2</requiredVersion> <exeRelativePath>vswhere.exe</exeRelativePath> <url>https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe</url> <sha256>103f2784c4b2c8e70c7c1c03687abbf22bce052aae30639406e4e13ffa29ee04</sha256> </tool> - <tool name="nuget"> + <tool name="nuget" os="windows"> <requiredVersion>4.4.0</requiredVersion> <exeRelativePath>nuget.exe</exeRelativePath> <url>https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe</url> <sha256>2cf9b118937eef825464e548f0c44f7f64090047746de295d75ac3dcffa3e1f6</sha256> </tool> - <tool name="installerbase"> + <tool name="installerbase" os="windows"> <requiredVersion>3.1.81</requiredVersion> <exeRelativePath>QtInstallerFramework-win-x86\bin\installerbase.exe</exeRelativePath> <url>https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip</url> <sha256>f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8</sha256> <archiveRelativePath>QtInstallerFramework-win-x86.zip</archiveRelativePath> </tool> - <tool name="7zip"> + <tool name="7zip" os="windows"> <requiredVersion>18.01.0</requiredVersion> <exeRelativePath>7za.exe</exeRelativePath> <url>https://www.7-zip.org/a/7z1801-extra.7z</url> <sha256>9371df22bcd0e1aff9eaa52aa3292350eecd011f11494e709314ae3f3eb279e2</sha256> <archiveRelativePath>7z1801-extra.7z</archiveRelativePath> </tool> - <tool name="7zip920"> + <tool name="7zip920" os="windows"> <requiredVersion>9.20.0</requiredVersion> <exeRelativePath>7za.exe</exeRelativePath> <url>https://www.7-zip.org/a/7za920.zip</url> <sha256>2a3afe19c180f8373fa02ff00254d5394fec0349f5804e0ad2f6067854ff28ac</sha256> <archiveRelativePath>7za920.zip</archiveRelativePath> </tool> - <tool name="aria2"> + <tool name="aria2" os="windows"> <requiredVersion>18.01.0</requiredVersion> <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> diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 95c47e2db..cfb1b6c2a 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -78,16 +78,11 @@ namespace vcpkg::Commands::Fetch Strings::format(R"###(<archiveRelativePath>([\s\S]*?)</archiveRelativePath>)###")}; static const std::regex URL_REGEX{Strings::format(R"###(<url>([\s\S]*?)</url>)###")}; - std::regex tool_regex{ + const std::regex tool_regex{ Strings::format(R"###(<tool[\s]+name="%s"[\s]+os="%s">([\s\S]*?)<\/tool>)###", tool, OS_STRING)}; std::smatch match_tool; - bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); - if (!has_match_tool && OS_STRING == "windows") // Legacy support. Change introduced in vcpkg v0.0.107. - { - tool_regex = Strings::format(R"###(<tool[\s]+name="%s">([\s\S]*?)<\/tool>)###", tool); - has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); - } + const bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); Checks::check_exit(VCPKG_LINE_INFO, has_match_tool, "Could not find entry for tool [%s] in %s", |
