2016-09-19 11:50:08 +08:00
|
|
|
#pragma once
|
2016-11-08 09:54:23 +08:00
|
|
|
#include "BinaryParagraph.h"
|
2017-04-04 05:23:05 +08:00
|
|
|
#include "Lazy.h"
|
2017-04-28 08:56:06 +08:00
|
|
|
#include "PackageSpec.h"
|
|
|
|
#include "filesystem_fs.h"
|
2017-04-09 07:26:26 +08:00
|
|
|
#include "vcpkg_Files.h"
|
2017-04-28 08:56:06 +08:00
|
|
|
#include "vcpkg_expected.h"
|
2016-09-19 11:50:08 +08:00
|
|
|
|
|
|
|
namespace vcpkg
|
|
|
|
{
|
2017-04-04 07:28:18 +08:00
|
|
|
struct Toolset
|
2017-04-01 08:40:08 +08:00
|
|
|
{
|
2017-04-01 17:08:48 +08:00
|
|
|
fs::path dumpbin;
|
|
|
|
fs::path vcvarsall;
|
2017-04-04 05:21:51 +08:00
|
|
|
CWStringView version;
|
2017-04-01 08:40:08 +08:00
|
|
|
};
|
|
|
|
|
2017-04-04 07:29:11 +08:00
|
|
|
struct VcpkgPaths
|
2016-09-19 11:50:08 +08:00
|
|
|
{
|
2017-04-04 07:29:11 +08:00
|
|
|
static Expected<VcpkgPaths> create(const fs::path& vcpkg_root_dir);
|
2016-09-19 11:50:08 +08:00
|
|
|
|
2017-04-04 05:45:00 +08:00
|
|
|
fs::path package_dir(const PackageSpec& spec) const;
|
|
|
|
fs::path port_dir(const PackageSpec& spec) const;
|
|
|
|
fs::path build_info_file_path(const PackageSpec& spec) const;
|
2016-11-08 09:54:23 +08:00
|
|
|
fs::path listfile_path(const BinaryParagraph& pgh) const;
|
2016-11-09 06:12:49 +08:00
|
|
|
|
2017-04-04 06:02:45 +08:00
|
|
|
bool is_valid_triplet(const Triplet& t) const;
|
2016-09-24 05:25:17 +08:00
|
|
|
|
2016-10-01 07:34:55 +08:00
|
|
|
fs::path root;
|
|
|
|
fs::path packages;
|
|
|
|
fs::path buildtrees;
|
|
|
|
fs::path downloads;
|
|
|
|
fs::path ports;
|
|
|
|
fs::path installed;
|
|
|
|
fs::path triplets;
|
2017-01-24 07:12:43 +08:00
|
|
|
fs::path scripts;
|
2016-09-19 11:50:08 +08:00
|
|
|
|
2016-10-01 07:34:55 +08:00
|
|
|
fs::path buildsystems;
|
|
|
|
fs::path buildsystems_msbuild_targets;
|
2016-09-19 11:50:08 +08:00
|
|
|
|
2016-10-01 07:34:55 +08:00
|
|
|
fs::path vcpkg_dir;
|
|
|
|
fs::path vcpkg_dir_status_file;
|
|
|
|
fs::path vcpkg_dir_info;
|
|
|
|
fs::path vcpkg_dir_updates;
|
2016-09-19 11:50:08 +08:00
|
|
|
|
2016-10-01 07:34:55 +08:00
|
|
|
fs::path ports_cmake;
|
2017-03-11 08:30:44 +08:00
|
|
|
|
|
|
|
const fs::path& get_cmake_exe() const;
|
|
|
|
const fs::path& get_git_exe() const;
|
|
|
|
const fs::path& get_nuget_exe() const;
|
2017-06-03 00:13:12 +08:00
|
|
|
|
2017-06-06 13:01:41 +08:00
|
|
|
/// <summary>Retrieve a toolset matching a VS version</summary>
|
|
|
|
/// <remarks>
|
|
|
|
/// Valid version strings are "v140", "v141", and "". Empty string gets the latest.
|
|
|
|
/// </remarks>
|
2017-06-03 00:13:12 +08:00
|
|
|
const Toolset& get_toolset(const std::string& toolset_version) const;
|
2017-03-11 08:30:44 +08:00
|
|
|
|
2017-04-09 07:26:26 +08:00
|
|
|
Files::Filesystem& get_filesystem() const;
|
|
|
|
|
2017-03-11 08:30:44 +08:00
|
|
|
private:
|
2017-04-04 05:23:05 +08:00
|
|
|
Lazy<fs::path> cmake_exe;
|
|
|
|
Lazy<fs::path> git_exe;
|
|
|
|
Lazy<fs::path> nuget_exe;
|
2017-06-03 00:13:12 +08:00
|
|
|
Lazy<std::vector<Toolset>> toolsets;
|
2016-09-19 11:50:08 +08:00
|
|
|
};
|
|
|
|
}
|