aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2020-04-29 10:16:40 -0700
committerGitHub <noreply@github.com>2020-04-29 10:16:40 -0700
commitce8b01a14bb6a61b4f0686674e4b51bd8ecfb83b (patch)
treea6c14567629529b9c18460d95698e8b1fc432e6f /toolsrc/include
parentbe2f81f9121e0213cd86351c5f98ec8976faa47c (diff)
downloadvcpkg-ce8b01a14bb6a61b4f0686674e4b51bd8ecfb83b.tar.gz
vcpkg-ce8b01a14bb6a61b4f0686674e4b51bd8ecfb83b.zip
[vcpkg] Add support for VCPKG_BINARY_SOURCES and --x-binarysource=<> (#10476)
* [vcpkg] Add support for VCPKG_BINARY_SOURCES and --binarysource=<> * [vcpkg] Rename --binarysource to --x-binarysource to denote internal/experimental * [vcpkg] Address review comments & add tests for BinaryConfigParser * [vcpkg] Replace do {} while(1); with for(;;) Avoids conditional expresion is constant warnings * [vcpkg] Invert if/else * [vcpkg] Fix warning in export.prefab.cpp * [vcpkg] Resolve merge regressions
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/base/system.h2
-rw-r--r--toolsrc/include/vcpkg/binarycaching.h6
-rw-r--r--toolsrc/include/vcpkg/build.h3
-rw-r--r--toolsrc/include/vcpkg/install.h1
-rw-r--r--toolsrc/include/vcpkg/vcpkgcmdarguments.h1
5 files changed, 11 insertions, 2 deletions
diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h
index 4172f0c50..f119dbdc4 100644
--- a/toolsrc/include/vcpkg/base/system.h
+++ b/toolsrc/include/vcpkg/base/system.h
@@ -9,6 +9,8 @@ namespace vcpkg::System
{
Optional<std::string> get_environment_variable(ZStringView varname) noexcept;
+ ExpectedS<std::string> get_home_dir() noexcept;
+
Optional<std::string> get_registry_string(void* base_hkey, StringView subkey, StringView valuename);
enum class CPUArchitecture
diff --git a/toolsrc/include/vcpkg/binarycaching.h b/toolsrc/include/vcpkg/binarycaching.h
index 199b01acc..69e3287d6 100644
--- a/toolsrc/include/vcpkg/binarycaching.h
+++ b/toolsrc/include/vcpkg/binarycaching.h
@@ -1,5 +1,6 @@
#pragma once
+#include <vcpkg/base/expected.h>
#include <vcpkg/base/files.h>
#include <vcpkg/packagespec.h>
#include <vcpkg/vcpkgpaths.h>
@@ -35,5 +36,8 @@ namespace vcpkg
bool purge_tombstones) = 0;
};
- std::unique_ptr<IBinaryProvider> create_archives_provider();
+ ExpectedS<std::unique_ptr<IBinaryProvider>> create_binary_provider_from_configs(const VcpkgPaths& paths,
+ View<std::string> args);
+ ExpectedS<std::unique_ptr<IBinaryProvider>> create_binary_provider_from_configs_pure(const std::string& env_string,
+ View<std::string> args);
}
diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h
index d8e87f131..560e856b9 100644
--- a/toolsrc/include/vcpkg/build.h
+++ b/toolsrc/include/vcpkg/build.h
@@ -34,6 +34,7 @@ namespace vcpkg::Build
void perform_and_exit_ex(const FullPackageSpec& full_spec,
const SourceControlFileLocation& scfl,
const PortFileProvider::PathsPortFileProvider& provider,
+ IBinaryProvider& binaryprovider,
const VcpkgPaths& paths);
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet);
@@ -209,7 +210,7 @@ namespace vcpkg::Build
ExtendedBuildResult build_package(const VcpkgPaths& paths,
const Dependencies::InstallPlanAction& config,
- IBinaryProvider* binaries_provider,
+ IBinaryProvider& binaries_provider,
const StatusParagraphs& status_db);
enum class BuildPolicy
diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h
index 1c42cc102..ad91bbb37 100644
--- a/toolsrc/include/vcpkg/install.h
+++ b/toolsrc/include/vcpkg/install.h
@@ -79,6 +79,7 @@ namespace vcpkg::Install
const KeepGoing keep_going,
const VcpkgPaths& paths,
StatusParagraphs& status_db,
+ IBinaryProvider& binaryprovider,
const CMakeVars::CMakeVarProvider& var_provider);
extern const CommandStructure COMMAND_STRUCTURE;
diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h
index e5b26c25a..92584fc6a 100644
--- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h
+++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h
@@ -91,6 +91,7 @@ namespace vcpkg
std::unique_ptr<std::string> triplet;
std::unique_ptr<std::vector<std::string>> overlay_ports;
std::unique_ptr<std::vector<std::string>> overlay_triplets;
+ std::vector<std::string> binarysources;
Optional<bool> debug = nullopt;
Optional<bool> sendmetrics = nullopt;
Optional<bool> printmetrics = nullopt;