aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-05-22 20:18:40 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-06-06 15:48:26 -0700
commit69d5f50ce433750c422446b64b0a45b6b4ea738a (patch)
tree78f83b8abf630456ccbcd8bb12fac9bb749de0bb /toolsrc/include
parent576044e61268c8e40578a356cfcf229cd8340687 (diff)
downloadvcpkg-69d5f50ce433750c422446b64b0a45b6b4ea738a.tar.gz
vcpkg-69d5f50ce433750c422446b64b0a45b6b4ea738a.zip
Install continue
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg_Build.h43
-rw-r--r--toolsrc/include/vcpkg_Commands.h7
2 files changed, 45 insertions, 5 deletions
diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h
index e0a5ae1ce..bce1eeb3e 100644
--- a/toolsrc/include/vcpkg_Build.h
+++ b/toolsrc/include/vcpkg_Build.h
@@ -14,6 +14,38 @@
namespace vcpkg::Build
{
+ enum class UseHeadVersion
+ {
+ NO = 0,
+ YES
+ };
+
+ inline UseHeadVersion to_use_head_version(const bool value)
+ {
+ return value ? UseHeadVersion::YES : UseHeadVersion::NO;
+ }
+
+ inline bool to_bool(const UseHeadVersion value) { return value == UseHeadVersion::YES; }
+
+ enum class AllowDownloads
+ {
+ NO = 0,
+ YES
+ };
+
+ inline AllowDownloads to_allow_downloads(const bool value)
+ {
+ return value ? AllowDownloads::YES : AllowDownloads::NO;
+ }
+
+ inline bool to_bool(const AllowDownloads value) { return value == AllowDownloads::YES; }
+
+ struct BuildPackageOptions
+ {
+ UseHeadVersion use_head_version;
+ AllowDownloads allow_downloads;
+ };
+
enum class BuildResult
{
NULLVALUE = 0,
@@ -59,17 +91,18 @@ namespace vcpkg::Build
struct BuildPackageConfig
{
- BuildPackageConfig(const SourceParagraph& src, const Triplet& triplet, fs::path&& port_dir)
- : src(src), triplet(triplet), port_dir(std::move(port_dir)), use_head_version(false), no_downloads(false)
+ BuildPackageConfig(const SourceParagraph& src,
+ const Triplet& triplet,
+ fs::path&& port_dir,
+ const BuildPackageOptions& build_package_options)
+ : src(src), triplet(triplet), port_dir(std::move(port_dir)), build_package_options(build_package_options)
{
}
const SourceParagraph& src;
const Triplet& triplet;
fs::path port_dir;
-
- bool use_head_version;
- bool no_downloads;
+ const BuildPackageOptions& build_package_options;
};
ExtendedBuildResult build_package(const VcpkgPaths& paths,
diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h
index 14d468352..006971e47 100644
--- a/toolsrc/include/vcpkg_Commands.h
+++ b/toolsrc/include/vcpkg_Commands.h
@@ -4,6 +4,8 @@
#include "VcpkgCmdArguments.h"
#include "VcpkgPaths.h"
#include "VersionT.h"
+#include "vcpkg_Build.h"
+#include "vcpkg_Dependencies.h"
#include <array>
namespace vcpkg::Commands
@@ -48,6 +50,11 @@ namespace vcpkg::Commands
const fs::path& listfile() const;
};
+ Build::BuildResult perform_install_plan_action(const VcpkgPaths& paths,
+ const Dependencies::InstallPlanAction& action,
+ const Build::BuildPackageOptions& install_plan_options,
+ StatusParagraphs& status_db);
+
void install_files_and_write_listfile(Files::Filesystem& fs,
const fs::path& source_dir,
const InstallDir& dirs);