From d521d366b278e9e963c18d34a7c5f41f42ea9ec7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 13 Sep 2017 17:23:04 -0700 Subject: 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: ) --- toolsrc/include/vcpkg_Commands.h | 24 ++++++++++++++++++++++++ toolsrc/include/vcpkg_Dependencies.h | 2 ++ 2 files changed, 26 insertions(+) (limited to 'toolsrc/include') 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& 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 install_plan; Optional remove_plan; + + const PackageSpec& spec() const; }; enum class ExportPlanType -- cgit v1.2.3