aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-09-13 17:23:04 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-09-13 17:23:04 -0700
commitd521d366b278e9e963c18d34a7c5f41f42ea9ec7 (patch)
tree4371a87741dd3a82810b7c70d227f0324954f3da /toolsrc/include
parent32a01e68516d51b998ec80878eb20c000f6c95ba (diff)
downloadvcpkg-d521d366b278e9e963c18d34a7c5f41f42ea9ec7.tar.gz
vcpkg-d521d366b278e9e963c18d34a7c5f41f42ea9ec7.zip
Rework vcpkg install (and vcpkg ci)
- Refactor install-plan-execution code to reduce duplication - Add `vcpkg install --keep-going` option - Add elapsed time to each invidial package and total time - Add a counter to the install (e.g. Starting package 3/12: <name>)
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg_Commands.h24
-rw-r--r--toolsrc/include/vcpkg_Dependencies.h2
2 files changed, 26 insertions, 0 deletions
diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h
index 079388587..070a8ec49 100644
--- a/toolsrc/include/vcpkg_Commands.h
+++ b/toolsrc/include/vcpkg_Commands.h
@@ -33,6 +33,22 @@ namespace vcpkg::Commands
namespace Install
{
+ enum class KeepGoing
+ {
+ NO = 0,
+ YES
+ };
+
+ inline KeepGoing to_keep_going(const bool value) { return value ? KeepGoing::YES : KeepGoing::NO; }
+
+ enum class PrintSummary
+ {
+ NO = 0,
+ YES
+ };
+
+ inline PrintSummary to_print_summary(const bool value) { return value ? PrintSummary::YES : PrintSummary::NO; }
+
struct InstallDir
{
static InstallDir from_destination_root(const fs::path& destination_root,
@@ -67,6 +83,14 @@ namespace vcpkg::Commands
InstallResult install_package(const VcpkgPaths& paths,
const BinaryControlFile& binary_paragraph,
StatusParagraphs* status_db);
+
+ void perform_and_exit(const std::vector<Dependencies::AnyAction>& action_plan,
+ const Build::BuildPackageOptions& install_plan_options,
+ const KeepGoing keep_going,
+ const PrintSummary print_summary,
+ const VcpkgPaths& paths,
+ StatusParagraphs& status_db);
+
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
}
diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h
index 235abb839..d67122e48 100644
--- a/toolsrc/include/vcpkg_Dependencies.h
+++ b/toolsrc/include/vcpkg_Dependencies.h
@@ -89,6 +89,8 @@ namespace vcpkg::Dependencies
Optional<InstallPlanAction> install_plan;
Optional<RemovePlanAction> remove_plan;
+
+ const PackageSpec& spec() const;
};
enum class ExportPlanType