Merge remote-tracking branch 'origin/master'

This commit is contained in:
Alexander Karatarakis 2018-03-22 16:47:03 -07:00
commit c7664d1538
21 changed files with 200 additions and 47 deletions

View File

@ -1,4 +1,4 @@
# Vcpkg <a href="#">![](https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5261/badge)</a>
# Vcpkg <a href="#">![](https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/8476/badge)</a>
## Overview
Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are currently in a preview state; your involvement is vital to its success.

View File

@ -1,4 +1,4 @@
Source: caf
Version: 0.15.6
Version: 0.15.7
Build-Depends: openssl
Description: an open source C++11 actor model implementation featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more.

View File

@ -8,8 +8,8 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO actor-framework/actor-framework
REF 0.15.6
SHA512 180ef1149fcbbe4532452cbe4509c177ecc3ae3971453505f6600b715be38b3c891ae7f83b8d368fcb20af037e4d6e94f7f750f477bd499d48316fe33fca511e
REF 0.15.7
SHA512 ff0fa205ad71677b84fa09a2e6ce6bb6d1bc9b790bbbc3ac51505467402ff61a218528004212efa2063c798cc512972d318a2c9423067ee51cef719de2b6b186
HEAD_REF master
)

View File

@ -23,6 +23,9 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
# Rename exported target files into something vcpkg_fixup_cmake_targets expects
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion)
endif()
if(NOT VCPKG_USE_HEAD_VERSION)
if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
@ -51,10 +54,6 @@ if(NOT VCPKG_USE_HEAD_VERSION)
vcpkg_fixup_cmake_targets(CONFIG_PATH CMake)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
else()
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion)
endif()
endif()
vcpkg_copy_pdbs()

View File

@ -1,4 +1,4 @@
Source: gdcm2
Version: 2.8.4
Version: 2.8.5
Description: Grassroots DICOM library
Build-Depends: zlib, expat

View File

@ -14,8 +14,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO malaterre/GDCM
REF v2.8.4
SHA512 d58854507bcc477bcf7944c82014ceac4c603bf8f0e75ddda2371052f4972f1535cb782b47d0822a8929131b804ea5c16b9236b414d70cbf96a494741391c534
REF v2.8.5
SHA512 644a7ad04746ffb36b7923796b967cc11fd3b71baede7722093d5785eaf869280c67a968f6b32aeb43cc7c88927fba78459e4846e058996a1634311311745510
)
vcpkg_apply_patches(

3
ports/nvml/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: nvml
Version: 1.3-0
Description: Non-Volatile Memory Library

74
ports/nvml/portfile.cmake Normal file
View File

@ -0,0 +1,74 @@
set(NVML_VERSION 1.3)
set(NVML_HASH 59fb552c693d5279ec86eff8eb1c36832c9c5beb6492a64b54b21c09d90ed52cba22d57912a304cf1ec17c4633da641200fd50dbe4a38355f43c674842f991bd)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${NVML_VERSION})
include(vcpkg_common_functions)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
message(STATUS "WARNING: Static building not supported. Building dynamic.")
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
if (TRIPLET_SYSTEM_ARCH MATCHES "arm")
message(FATAL_ERROR "ARM is currently not supported")
elseif (TRIPLET_SYSTEM_ARCH MATCHES "x86")
message(FATAL_ERROR "x86 is not supported. Please use nvml:x64-windows or set environment variable VCPKG_DEFAULT_TRIPLET to 'x64-windows'")
else ()
set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH})
endif()
# Download source
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO pmem/nvml
REF ${NVML_VERSION}
SHA512 ${NVML_HASH}
HEAD_REF master
)
# Build only the selected projects
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/src/NVML.sln
PLATFORM x64
TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmempool,Solution Items\\libvmem,Solution Items\\Tools\\pmempool"
OPTIONS /p:SRCVERSION=${NVML_VERSION}
)
set(DEBUG_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Debug)
set(RELEASE_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Release)
# Install header files
file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/*.h)
file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/libpmemobj/*.h)
file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libpmemobj)
file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/libpmemobj++/*.hpp)
file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libpmemobj++)
# Remove unneeded header files
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libvmmalloc.h)
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/librpmem.h)
# Install libraries (debug)
file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.lib ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.exp)
file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libpmemcommon.lib)
file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.dll)
file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
# Install libraries (release)
file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.lib ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.exp)
file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libpmemcommon.lib)
file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.dll)
file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
# Install tools (release only)
file(INSTALL ${RELEASE_ARTIFACTS_PATH}/pmempool.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/nvml)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/nvml)
vcpkg_copy_pdbs()
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nvml)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/nvml/LICENSE ${CURRENT_PACKAGES_DIR}/share/nvml/copyright)

View File

@ -4,20 +4,25 @@ if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic")
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET})
find_program(NMAKE nmake)
vcpkg_download_distfile(ARCHIVE
URLS "http://downloads.sourceforge.net/project/pdcurses/pdcurses/3.4/pdcurs34.zip"
FILENAME "pdcurs34.zip"
SHA512 0b916bfe37517abb80df7313608cc4e1ed7659a41ce82763000dfdfa5b8311ffd439193c74fc84a591f343147212bf1caf89e7db71f1f7e4fa70f534834cb039
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO wmcbrine/PDCurses
REF PDCurses_3_4
SHA512 a05065c2e43771bf769f25f229b6058c4dc6add65d993f2e304e98bded8a8af88e674638c7385383451fddc45cf3bd8c9a95febffc7abcbcce0e6384e4f397b3
HEAD_REF master
)
if(EXISTS ${CURRENT_BUILDTREES_DIR}/src)
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src)
endif()
file(REMOVE_RECURSE
${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}
)
vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH})
file(GLOB SOURCES ${SOURCE_PATH}/*)
file(COPY ${SOURCES} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
file(READ ${SOURCE_PATH}/win32/vcwin32.mak PDC_MAK_ORIG)
string(REPLACE " -pdb:none" "" PDC_MAK_ORIG ${PDC_MAK_ORIG})

View File

@ -1,4 +1,4 @@
Source: sciter
Version: 4.1.3
Version: 4.1.4
Description: Sciter is an embeddable HTML/CSS/scripting engine.
Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com

View File

@ -12,8 +12,8 @@ include(vcpkg_common_functions)
# header-only library
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
set(SCITER_REVISION 9ba9e27690e9ef4e97f415822fb738e0f36c574e)
set(SCITER_SHA d4e7d204b67e454ba753524fb1d61887fcaeae256abb81297afc0aa7795f1acb21754ef368700dfa919717f23ca1bbb16498de1ad84c94ac7c2fc295f67f91c8)
set(SCITER_REVISION eb0d385af8f426788870cc75522379f67854799c)
set(SCITER_SHA b785f370b27f759e0bec370f413c85b21d82a7cb76b3cbaa50c885b713453a325ff7ace042e263fafec7695c50370bb589597a9877816716bae9a4b4479f54fe)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
set(SCITER_ARCH 64)

View File

@ -17,7 +17,12 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH CMake)
if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake)
vcpkg_fixup_cmake_targets(CONFIG_PATH CMake)
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/yaml-cpp)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/yaml-cpp)
endif()
# Adjust paths and remove hardcoded ones from the config files
file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-config.cmake YAML_CONFIG)

View File

@ -31,7 +31,12 @@ vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH CMake)
if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake)
vcpkg_fixup_cmake_targets(CONFIG_PATH CMake)
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/ZeroMQ)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ)
endif()
file(READ ${CURRENT_PACKAGES_DIR}/share/zeromq/ZeroMQConfig.cmake _contents)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")

View File

@ -32,7 +32,7 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
foreach(HEADER zdict.h zstd.h zstd_errors.h)

View File

@ -180,6 +180,8 @@ function(vcpkg_configure_cmake)
"-DVCPKG_C_FLAGS_DEBUG=${VCPKG_C_FLAGS_DEBUG}"
"-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}"
"-DVCPKG_LINKER_FLAGS=${VCPKG_LINKER_FLAGS}"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_BINDIR=bin"
)
if(DEFINED ARCH)

View File

@ -25,7 +25,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool)
throw "Unkown tool $tool"
}
$exePath = "$downloadsDir\$($toolData.exeRelativePath)"
$exePath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])"
if (Test-Path $exePath)
{
@ -35,14 +35,14 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool)
$isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath"
if ($isArchive)
{
$downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)"
$downloadPath = "$downloadsDir\$(@($toolData.archiveRelativePath)[0])"
}
else
{
$downloadPath = "$downloadsDir\$($toolData.exeRelativePath)"
$downloadPath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])"
}
$url = $toolData.url
[String]$url = @($toolData.url)[0]
if (!(Test-Path $downloadPath))
{
Write-Host "Downloading $tool..."
@ -50,7 +50,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool)
Write-Host "Downloading $tool has completed successfully."
}
$expectedDownloadedFileHash = $toolData.sha256
$expectedDownloadedFileHash = @($toolData.sha256)[0]
$downloadedFileHash = vcpkgGetSHA256 $downloadPath
vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash

View File

@ -6,6 +6,12 @@
<url>https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip</url>
<sha256>f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6</sha256>
<archiveRelativePath>cmake-3.10.2-win32-x86.zip</archiveRelativePath>
<exeRelativePath os="osx">cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake</exeRelativePath>
<url os="osx">https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz</url>
<archiveRelativePath os="osx">cmake-3.10.2-Darwin-x86_64.tar.gz</archiveRelativePath>
<exeRelativePath os="linux">cmake-3.10.2-Linux-x86_64/bin/cmake</exeRelativePath>
<url os="linux">https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz</url>
<archiveRelativePath os="linux">cmake-3.10.2-Linux-x86_64.tar.gz</archiveRelativePath>
</tool>
<tool name="git">
<requiredVersion>2.16.2</requiredVersion>

View File

@ -209,6 +209,11 @@ namespace vcpkg::Build
{
std::string key;
std::string value;
bool operator<(const AbiEntry& other) const
{
return key < other.key || (key == other.key && value < other.value);
}
};
struct AbiTagAndFile

View File

@ -285,14 +285,14 @@ namespace vcpkg::System
fflush(nullptr);
// Basically we are wrapping it in quotes
const std::string& actual_cmd_line = Strings::format(R"###("%s")###", cmd_line);
#if defined(_WIN32)
const std::string& actual_cmd_line = Strings::format(R"###("%s")###", cmd_line);
Debug::println("_wsystem(%s)", actual_cmd_line);
const int exit_code = _wsystem(Strings::to_utf16(actual_cmd_line).c_str());
Debug::println("_wsystem() returned %d", exit_code);
#else
Debug::println("_system(%s)", actual_cmd_line);
const int exit_code = system(actual_cmd_line.c_str());
Debug::println("_system(%s)", cmd_line);
const int exit_code = system(cmd_line.c_str());
Debug::println("_system() returned %d", exit_code);
#endif
return exit_code;

View File

@ -449,6 +449,8 @@ namespace vcpkg::Build
if (config.build_package_options.use_head_version == UseHeadVersion::YES)
abi_tag_entries.emplace_back(AbiEntry{"head", ""});
Util::sort(abi_tag_entries);
std::string full_abi_info =
Strings::join("", abi_tag_entries, [](const AbiEntry& p) { return p.key + " " + p.value + "\n"; });

View File

@ -19,6 +19,8 @@ namespace vcpkg
{
std::array<int, 3> required_version;
fs::path downloaded_exe_path;
std::string url;
fs::path downloaded_path;
};
static Optional<std::array<int, 3>> parse_version_string(const std::string& version_as_string)
@ -41,8 +43,24 @@ namespace vcpkg
static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool)
{
#if defined(_WIN32)
static constexpr StringLiteral OS_STRING = "";
#elif defined(__APPLE__)
static constexpr StringLiteral OS_STRING = " os=\"osx\"";
#else // assume linux
static constexpr StringLiteral OS_STRING = " os=\"linux\"";
#endif
static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml";
const auto maybe_get_string_inside_tags = [](const std::string& input,
const std::regex& regex) -> Optional<std::string> {
std::smatch match;
const bool has_match = std::regex_search(input.cbegin(), input.cend(), match, regex);
if (!has_match) return nullopt;
return match[1];
};
const auto get_string_inside_tags =
[](const std::string& input, const std::regex& regex, const std::string& tag_name) -> std::string {
std::smatch match;
@ -57,7 +75,10 @@ namespace vcpkg
static const std::regex VERSION_REGEX{
Strings::format(R"###(<requiredVersion>([\s\S]*?)</requiredVersion>)###", tool)};
static const std::regex EXE_RELATIVE_PATH_REGEX{
Strings::format(R"###(<exeRelativePath>([\s\S]*?)</exeRelativePath>)###", tool)};
Strings::format(R"###(<exeRelativePath%s>([\s\S]*?)</exeRelativePath>)###", OS_STRING)};
static const std::regex ARCHIVE_RELATIVE_PATH_REGEX{
Strings::format(R"###(<archiveRelativePath%s>([\s\S]*?)</archiveRelativePath>)###", OS_STRING)};
static const std::regex URL_REGEX{Strings::format(R"###(<url%s>([\s\S]*?)</url>)###", OS_STRING)};
const std::regex tool_regex{Strings::format(R"###(<tool[\s]+name="%s">([\s\S]*?)</tool>)###", tool)};
@ -74,9 +95,13 @@ namespace vcpkg
const std::string required_version_as_string =
get_string_inside_tags(tool_data_as_string, VERSION_REGEX, "requiredVersion");
const std::string url = get_string_inside_tags(tool_data_as_string, URL_REGEX, "url");
const std::string exe_relative_path =
get_string_inside_tags(tool_data_as_string, EXE_RELATIVE_PATH_REGEX, "exeRelativePath");
auto archive_relative_path = maybe_get_string_inside_tags(tool_data_as_string, ARCHIVE_RELATIVE_PATH_REGEX);
const Optional<std::array<int, 3>> required_version = parse_version_string(required_version_as_string);
Checks::check_exit(VCPKG_LINE_INFO,
required_version.has_value(),
@ -85,7 +110,10 @@ namespace vcpkg
required_version_as_string);
const fs::path exe_path = paths.downloads / exe_relative_path;
return ToolData{*required_version.get(), exe_path};
return ToolData{*required_version.get(),
exe_path,
url,
paths.downloads / archive_relative_path.value_or(exe_relative_path)};
}
static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd,
@ -144,8 +172,10 @@ namespace vcpkg
return data_lines;
}
static fs::path fetch_tool(const fs::path& scripts_folder, const std::string& tool_name, const ToolData& tool_data)
static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data)
{
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::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]);
@ -154,6 +184,7 @@ namespace vcpkg
version_as_string,
tool_name,
version_as_string);
#if defined(_WIN32)
const fs::path script = scripts_folder / "fetchtool.ps1";
const std::string title = Strings::format(
"Fetching %s version %s (No sufficient installed version was found)", tool_name, version_as_string);
@ -173,21 +204,37 @@ namespace vcpkg
expected_downloaded_path.u8string(),
actual_downloaded_path.u8string());
return actual_downloaded_path;
#else
if (!fs.exists(tool_data.downloaded_path))
{
auto code = System::cmd_execute(
Strings::format(R"(curl '%s' --create-dirs --output '%s')", tool_data.url, tool_data.downloaded_path));
Checks::check_exit(VCPKG_LINE_INFO, code == 0, "curl failed while downloading %s", tool_data.url);
}
auto code = System::cmd_execute(
Strings::format(R"(cd '%s' && tar xzf '%s')", paths.downloads, tool_data.downloaded_path));
Checks::check_exit(VCPKG_LINE_INFO, code == 0, "tar failed while extracting %s", tool_data.downloaded_path);
Checks::check_exit(VCPKG_LINE_INFO,
fs.exists(tool_data.downloaded_exe_path),
"Expected %s to exist after extracting",
tool_data.downloaded_exe_path);
return tool_data.downloaded_exe_path;
#endif
}
static fs::path get_cmake_path(const VcpkgPaths& paths)
{
#if defined(_WIN32)
std::vector<fs::path> candidate_paths;
#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__)
static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "cmake");
candidate_paths.push_back(TOOL_DATA.downloaded_exe_path);
#else
static const ToolData TOOL_DATA = ToolData{{3, 5, 1}, ""};
#endif
static const std::string VERSION_CHECK_ARGUMENTS = "--version";
std::vector<fs::path> candidate_paths;
#if defined(_WIN32)
candidate_paths.push_back(TOOL_DATA.downloaded_exe_path);
#endif
const std::vector<fs::path> from_path = Files::find_from_PATH("cmake");
candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend());
@ -203,7 +250,7 @@ namespace vcpkg
return *p;
}
return fetch_tool(paths.scripts, "cmake", TOOL_DATA);
return fetch_tool(paths, "cmake", TOOL_DATA);
}
static fs::path get_7za_path(const VcpkgPaths& paths)
@ -212,7 +259,7 @@ namespace vcpkg
static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "7zip");
if (!paths.get_filesystem().exists(TOOL_DATA.downloaded_exe_path))
{
return fetch_tool(paths.scripts, "7zip", TOOL_DATA);
return fetch_tool(paths, "7zip", TOOL_DATA);
}
return TOOL_DATA.downloaded_exe_path;
#else
@ -235,7 +282,7 @@ namespace vcpkg
return *p;
}
return fetch_tool(paths.scripts, "nuget", TOOL_DATA);
return fetch_tool(paths, "nuget", TOOL_DATA);
}
static fs::path get_git_path(const VcpkgPaths& paths)
@ -266,7 +313,7 @@ namespace vcpkg
return *p;
}
return fetch_tool(paths.scripts, "git", TOOL_DATA);
return fetch_tool(paths, "git", TOOL_DATA);
}
static fs::path get_ifw_installerbase_path(const VcpkgPaths& paths)
@ -292,7 +339,7 @@ namespace vcpkg
return *p;
}
return fetch_tool(paths.scripts, "installerbase", TOOL_DATA);
return fetch_tool(paths, "installerbase", TOOL_DATA);
}
Expected<VcpkgPaths> VcpkgPaths::create(const fs::path& vcpkg_root_dir, const std::string& default_vs_path)