#pragma once #include "BinaryParagraph.h" #include "Lazy.h" #include "PackageSpec.h" #include "filesystem_fs.h" #include "vcpkg_Files.h" #include "vcpkg_expected.h" namespace vcpkg { struct Toolset { fs::path dumpbin; fs::path vcvarsall; CWStringView version; }; struct VcpkgPaths { static Expected create(const fs::path& vcpkg_root_dir); fs::path package_dir(const PackageSpec& spec) const; fs::path port_dir(const PackageSpec& spec) const; fs::path port_dir(const std::string& name) const; fs::path build_info_file_path(const PackageSpec& spec) const; fs::path listfile_path(const BinaryParagraph& pgh) const; bool is_valid_triplet(const Triplet& t) const; fs::path root; fs::path packages; fs::path buildtrees; fs::path downloads; fs::path ports; fs::path installed; fs::path triplets; fs::path scripts; fs::path buildsystems; fs::path buildsystems_msbuild_targets; fs::path vcpkg_dir; fs::path vcpkg_dir_status_file; fs::path vcpkg_dir_info; fs::path vcpkg_dir_updates; fs::path ports_cmake; const fs::path& get_cmake_exe() const; const fs::path& get_git_exe() const; const fs::path& get_nuget_exe() const; /// Retrieve a toolset matching a VS version /// /// Valid version strings are "v140", "v141", and "". Empty string gets the latest. /// const Toolset& get_toolset(const std::string& toolset_version) const; Files::Filesystem& get_filesystem() const; private: Lazy cmake_exe; Lazy git_exe; Lazy nuget_exe; Lazy> toolsets; }; }