diff options
| author | nicole mazzuca <mazzucan@outlook.com> | 2020-07-31 11:53:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-31 11:53:42 -0700 |
| commit | 56fffbe49dfb4dd8fae0940f272c5fd2b86be991 (patch) | |
| tree | 089a1e7d10c178d5f5aa916bd7127304b6aa9378 | |
| parent | 37f7d69757d7e52e21a391710fdbd3ef17f2540a (diff) | |
| download | vcpkg-56fffbe49dfb4dd8fae0940f272c5fd2b86be991.tar.gz vcpkg-56fffbe49dfb4dd8fae0940f272c5fd2b86be991.zip | |
[vcpkg] Refactor Commands: Part 1 (#12585)
* Rename commands.exportifw.cpp -> export.ifw.cpp
* move DryRun from commands.h -> commands.interface.h
* move vcpkgcmdarguments and vcpkgpaths over to commands.interface.h
* move vcpkg::Commands::BuildExternal -> commands.buildexternal.h
* add commands.*.h for the commands.*.cpp
* move vcpkg::Commands::* to commands.*.h
* move vcpkg::Commands::{Hash,Fetch} to their own files
* change include commands.h -> commands.*.h in commands.*.cpp
* remove commands.*.h from commands.h
* join vcpkg::Commands::* into one namespace line
* fix vcxproj build
59 files changed, 513 insertions, 284 deletions
diff --git a/toolsrc/include/vcpkg/commands.autocomplete.h b/toolsrc/include/vcpkg/commands.autocomplete.h new file mode 100644 index 000000000..52998b110 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.autocomplete.h @@ -0,0 +1,8 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Autocomplete +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.buildexternal.h b/toolsrc/include/vcpkg/commands.buildexternal.h new file mode 100644 index 000000000..1e3da99db --- /dev/null +++ b/toolsrc/include/vcpkg/commands.buildexternal.h @@ -0,0 +1,8 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::BuildExternal +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); +} diff --git a/toolsrc/include/vcpkg/commands.cache.h b/toolsrc/include/vcpkg/commands.cache.h new file mode 100644 index 000000000..0f48c4eb7 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.cache.h @@ -0,0 +1,8 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Cache +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.ci.h b/toolsrc/include/vcpkg/commands.ci.h new file mode 100644 index 000000000..e153c1fde --- /dev/null +++ b/toolsrc/include/vcpkg/commands.ci.h @@ -0,0 +1,9 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::CI +{ + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); +} diff --git a/toolsrc/include/vcpkg/commands.ciclean.h b/toolsrc/include/vcpkg/commands.ciclean.h new file mode 100644 index 000000000..bf5c3a736 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.ciclean.h @@ -0,0 +1,8 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::CIClean +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.contact.h b/toolsrc/include/vcpkg/commands.contact.h new file mode 100644 index 000000000..079d68626 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.contact.h @@ -0,0 +1,10 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Contact +{ + extern const CommandStructure COMMAND_STRUCTURE; + const std::string& email(); + void perform_and_exit(const VcpkgCmdArguments& args, Files::Filesystem& fs); +} diff --git a/toolsrc/include/vcpkg/commands.create.h b/toolsrc/include/vcpkg/commands.create.h new file mode 100644 index 000000000..5a6a70889 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.create.h @@ -0,0 +1,10 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Create +{ + extern const CommandStructure COMMAND_STRUCTURE; + int perform(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.dependinfo.h b/toolsrc/include/vcpkg/commands.dependinfo.h new file mode 100644 index 000000000..573cf297a --- /dev/null +++ b/toolsrc/include/vcpkg/commands.dependinfo.h @@ -0,0 +1,9 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::DependInfo +{ + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); +} diff --git a/toolsrc/include/vcpkg/commands.edit.h b/toolsrc/include/vcpkg/commands.edit.h new file mode 100644 index 000000000..f1a2109cf --- /dev/null +++ b/toolsrc/include/vcpkg/commands.edit.h @@ -0,0 +1,9 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Edit +{ + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.env.h b/toolsrc/include/vcpkg/commands.env.h new file mode 100644 index 000000000..69ff543d2 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.env.h @@ -0,0 +1,9 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Env +{ + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); +} diff --git a/toolsrc/include/vcpkg/commands.fetch.h b/toolsrc/include/vcpkg/commands.fetch.h new file mode 100644 index 000000000..08d4f4351 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.fetch.h @@ -0,0 +1,8 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Fetch +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.format-manifest.h b/toolsrc/include/vcpkg/commands.format-manifest.h new file mode 100644 index 000000000..20e126846 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.format-manifest.h @@ -0,0 +1,9 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::FormatManifest +{ + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index cec9237f5..3a682b091 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -1,10 +1,9 @@ #pragma once #include <vcpkg/build.h> +#include <vcpkg/commands.interface.h> #include <vcpkg/dependencies.h> #include <vcpkg/statusparagraphs.h> -#include <vcpkg/vcpkgcmdarguments.h> -#include <vcpkg/vcpkgpaths.h> #include <array> #include <map> @@ -16,158 +15,6 @@ namespace vcpkg::Commands using CommandTypeB = void (*)(const VcpkgCmdArguments& args, const VcpkgPaths& paths); using CommandTypeC = void (*)(const VcpkgCmdArguments& args, Files::Filesystem& fs); - enum class DryRun : bool - { - No, - Yes, - }; - - namespace BuildExternal - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); - } - - namespace CI - { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); - } - - namespace CIClean - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Env - { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); - } - - namespace Create - { - extern const CommandStructure COMMAND_STRUCTURE; - int perform(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Upgrade - { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); - } - - namespace Edit - { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace DependInfo - { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); - } - - namespace Search - { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace List - { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Owns - { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Cache - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Integrate - { - extern const CommandStructure COMMAND_STRUCTURE; - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - void append_helpstring(HelpTableFormatter& table); - std::string get_helpstring(); - } - - namespace PortsDiff - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace PortHistory - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Autocomplete - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Version - { - const char* base_version(); - const std::string& version(); - void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths); - void perform_and_exit(const VcpkgCmdArguments& args, Files::Filesystem& fs); - } - - namespace Contact - { - extern const CommandStructure COMMAND_STRUCTURE; - const std::string& email(); - void perform_and_exit(const VcpkgCmdArguments& args, Files::Filesystem& fs); - } - - namespace X_VSInstances - { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Hash - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Fetch - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace FormatManifest - { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace SetInstalled - { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit_ex(const VcpkgCmdArguments& args, - const VcpkgPaths& paths, - const PortFileProvider::PathsPortFileProvider& provider, - IBinaryProvider& binary_provider, - const CMakeVars::CMakeVarProvider& cmake_vars, - const std::vector<FullPackageSpec>& specs, - const Build::BuildPackageOptions& install_plan_options, - DryRun dry_run, - const Optional<fs::path>& pkgsconfig_path); - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); - } - template<class T> struct PackageNameAndFunction { diff --git a/toolsrc/include/vcpkg/commands.hash.h b/toolsrc/include/vcpkg/commands.hash.h new file mode 100644 index 000000000..8cb42ff30 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.hash.h @@ -0,0 +1,8 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Hash +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.integrate.h b/toolsrc/include/vcpkg/commands.integrate.h new file mode 100644 index 000000000..a8ca5026b --- /dev/null +++ b/toolsrc/include/vcpkg/commands.integrate.h @@ -0,0 +1,12 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Integrate +{ + extern const CommandStructure COMMAND_STRUCTURE; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + void append_helpstring(HelpTableFormatter& table); + std::string get_helpstring(); +} diff --git a/toolsrc/include/vcpkg/commands.interface.h b/toolsrc/include/vcpkg/commands.interface.h new file mode 100644 index 000000000..96745a2fb --- /dev/null +++ b/toolsrc/include/vcpkg/commands.interface.h @@ -0,0 +1,13 @@ +#pragma once + +#include <vcpkg/vcpkgcmdarguments.h> +#include <vcpkg/vcpkgpaths.h> + +namespace vcpkg::Commands +{ + enum class DryRun : bool + { + No, + Yes, + }; +} diff --git a/toolsrc/include/vcpkg/commands.list.h b/toolsrc/include/vcpkg/commands.list.h new file mode 100644 index 000000000..65c22ef9e --- /dev/null +++ b/toolsrc/include/vcpkg/commands.list.h @@ -0,0 +1,9 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::List +{ + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.owns.h b/toolsrc/include/vcpkg/commands.owns.h new file mode 100644 index 000000000..a46e2bd4e --- /dev/null +++ b/toolsrc/include/vcpkg/commands.owns.h @@ -0,0 +1,9 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Owns +{ + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.porthistory.h b/toolsrc/include/vcpkg/commands.porthistory.h new file mode 100644 index 000000000..ee03be206 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.porthistory.h @@ -0,0 +1,8 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::PortHistory +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.portsdiff.h b/toolsrc/include/vcpkg/commands.portsdiff.h new file mode 100644 index 000000000..efa387710 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.portsdiff.h @@ -0,0 +1,8 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::PortsDiff +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.search.h b/toolsrc/include/vcpkg/commands.search.h new file mode 100644 index 000000000..81c039856 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.search.h @@ -0,0 +1,9 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Search +{ + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/commands.setinstalled.h b/toolsrc/include/vcpkg/commands.setinstalled.h new file mode 100644 index 000000000..88065be1c --- /dev/null +++ b/toolsrc/include/vcpkg/commands.setinstalled.h @@ -0,0 +1,20 @@ +#pragma once + +#include <vcpkg/cmakevars.h> +#include <vcpkg/commands.interface.h> +#include <vcpkg/portfileprovider.h> + +namespace vcpkg::Commands::SetInstalled +{ + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit_ex(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + const PortFileProvider::PathsPortFileProvider& provider, + IBinaryProvider& binary_provider, + const CMakeVars::CMakeVarProvider& cmake_vars, + const std::vector<FullPackageSpec>& specs, + const Build::BuildPackageOptions& install_plan_options, + DryRun dry_run, + const Optional<fs::path>& pkgsconfig_path); + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); +} diff --git a/toolsrc/include/vcpkg/commands.upgrade.h b/toolsrc/include/vcpkg/commands.upgrade.h new file mode 100644 index 000000000..5e6047c13 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.upgrade.h @@ -0,0 +1,9 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Upgrade +{ + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet default_triplet); +} diff --git a/toolsrc/include/vcpkg/commands.version.h b/toolsrc/include/vcpkg/commands.version.h new file mode 100644 index 000000000..1af134b04 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.version.h @@ -0,0 +1,11 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands::Version +{ + const char* base_version(); + const std::string& version(); + void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths); + void perform_and_exit(const VcpkgCmdArguments& args, Files::Filesystem& fs); +} diff --git a/toolsrc/include/vcpkg/commands.xvsinstances.h b/toolsrc/include/vcpkg/commands.xvsinstances.h new file mode 100644 index 000000000..0ffa67a50 --- /dev/null +++ b/toolsrc/include/vcpkg/commands.xvsinstances.h @@ -0,0 +1,12 @@ +#pragma once + +#include <vcpkg/commands.interface.h> + +namespace vcpkg::Commands +{ + namespace X_VSInstances + { + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } +} diff --git a/toolsrc/src/vcpkg-test/commands.create.cpp b/toolsrc/src/vcpkg-test/commands.create.cpp index 4d8b2fd50..0cc93bd57 100644 --- a/toolsrc/src/vcpkg-test/commands.create.cpp +++ b/toolsrc/src/vcpkg-test/commands.create.cpp @@ -2,7 +2,7 @@ #include <vcpkg/base/files.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.create.h> #include <vcpkg/vcpkgcmdarguments.h> #include <vcpkg/vcpkgpaths.h> diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 40ccb1668..2bfa3f508 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -8,7 +8,9 @@ #include <vcpkg/base/system.print.h> #include <vcpkg/base/system.process.h> +#include <vcpkg/commands.contact.h> #include <vcpkg/commands.h> +#include <vcpkg/commands.version.h> #include <vcpkg/globalstate.h> #include <vcpkg/help.h> #include <vcpkg/input.h> diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index bcd0a7f89..83d596473 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -16,6 +16,7 @@ #include <vcpkg/build.h> #include <vcpkg/buildenvironment.h> #include <vcpkg/commands.h> +#include <vcpkg/commands.version.h> #include <vcpkg/dependencies.h> #include <vcpkg/globalstate.h> #include <vcpkg/help.h> diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index 17d38f395..05499988d 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -2,7 +2,10 @@ #include <vcpkg/base/system.print.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.autocomplete.h> +#include <vcpkg/commands.edit.h> +#include <vcpkg/commands.integrate.h> +#include <vcpkg/commands.upgrade.h> #include <vcpkg/install.h> #include <vcpkg/metrics.h> #include <vcpkg/paragraphs.h> diff --git a/toolsrc/src/vcpkg/commands.buildexternal.cpp b/toolsrc/src/vcpkg/commands.buildexternal.cpp index 79a8dd3c4..ccd477a07 100644 --- a/toolsrc/src/vcpkg/commands.buildexternal.cpp +++ b/toolsrc/src/vcpkg/commands.buildexternal.cpp @@ -3,7 +3,7 @@ #include <vcpkg/binarycaching.h> #include <vcpkg/build.h> #include <vcpkg/cmakevars.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.buildexternal.h> #include <vcpkg/help.h> #include <vcpkg/input.h> diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index e7802498c..70d88bcd3 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -4,7 +4,7 @@ #include <vcpkg/base/system.print.h> #include <vcpkg/binaryparagraph.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.cache.h> #include <vcpkg/help.h> #include <vcpkg/paragraphs.h> diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 50336a4c1..92f25c806 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -9,7 +9,7 @@ #include <vcpkg/binarycaching.h> #include <vcpkg/build.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.ci.h> #include <vcpkg/dependencies.h> #include <vcpkg/globalstate.h> #include <vcpkg/help.h> diff --git a/toolsrc/src/vcpkg/commands.ciclean.cpp b/toolsrc/src/vcpkg/commands.ciclean.cpp index 980e17da8..3152be7d9 100644 --- a/toolsrc/src/vcpkg/commands.ciclean.cpp +++ b/toolsrc/src/vcpkg/commands.ciclean.cpp @@ -4,7 +4,7 @@ #include <vcpkg/base/files.h> #include <vcpkg/base/system.print.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.ciclean.h> #include <vcpkg/vcpkgcmdarguments.h> using namespace vcpkg; diff --git a/toolsrc/src/vcpkg/commands.contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp index ce83fab80..14e78c92b 100644 --- a/toolsrc/src/vcpkg/commands.contact.cpp +++ b/toolsrc/src/vcpkg/commands.contact.cpp @@ -4,7 +4,7 @@ #include <vcpkg/base/system.print.h> #include <vcpkg/base/system.process.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.contact.h> #include <vcpkg/help.h> #include <vcpkg/userconfig.h> diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index be6d55304..f8b67de74 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -1,10 +1,32 @@ #include "pch.h" -#include <vcpkg/base/hash.h> #include <vcpkg/base/system.print.h> #include <vcpkg/build.h> +#include <vcpkg/commands.autocomplete.h> +#include <vcpkg/commands.buildexternal.h> +#include <vcpkg/commands.cache.h> +#include <vcpkg/commands.ci.h> +#include <vcpkg/commands.ciclean.h> +#include <vcpkg/commands.contact.h> +#include <vcpkg/commands.create.h> +#include <vcpkg/commands.dependinfo.h> +#include <vcpkg/commands.edit.h> +#include <vcpkg/commands.env.h> +#include <vcpkg/commands.fetch.h> +#include <vcpkg/commands.format-manifest.h> #include <vcpkg/commands.h> +#include <vcpkg/commands.hash.h> +#include <vcpkg/commands.integrate.h> +#include <vcpkg/commands.list.h> +#include <vcpkg/commands.owns.h> +#include <vcpkg/commands.porthistory.h> +#include <vcpkg/commands.portsdiff.h> +#include <vcpkg/commands.search.h> +#include <vcpkg/commands.setinstalled.h> +#include <vcpkg/commands.upgrade.h> +#include <vcpkg/commands.version.h> +#include <vcpkg/commands.xvsinstances.h> #include <vcpkg/export.h> #include <vcpkg/help.h> #include <vcpkg/install.h> @@ -64,53 +86,3 @@ namespace vcpkg::Commands return t; } } - -namespace vcpkg::Commands::Fetch -{ - const CommandStructure COMMAND_STRUCTURE = { - Strings::format("The argument should be tool name\n%s", create_example_string("fetch cmake")), - 1, - 1, - {}, - nullptr, - }; - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); - - const std::string tool = args.command_arguments[0]; - const fs::path tool_path = paths.get_tool_exe(tool); - System::print2(tool_path.u8string(), '\n'); - Checks::exit_success(VCPKG_LINE_INFO); - } -} - -namespace vcpkg::Commands::Hash -{ - const CommandStructure COMMAND_STRUCTURE = { - Strings::format("The argument should be a file path\n%s", create_example_string("hash boost_1_62_0.tar.bz2")), - 1, - 2, - {}, - nullptr, - }; - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); - - const fs::path file_to_hash = args.command_arguments[0]; - - auto algorithm = vcpkg::Hash::Algorithm::Sha512; - if (args.command_arguments.size() == 2) - { - algorithm = vcpkg::Hash::algorithm_from_string(args.command_arguments[1]).value_or_exit(VCPKG_LINE_INFO); - } - - const std::string hash = - vcpkg::Hash::get_file_hash(VCPKG_LINE_INFO, paths.get_filesystem(), file_to_hash, algorithm); - System::print2(hash, '\n'); - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index 83d2e109d..9ea265f29 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -4,7 +4,7 @@ #include <vcpkg/base/files.h> #include <vcpkg/buildenvironment.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.create.h> #include <vcpkg/help.h> namespace vcpkg::Commands::Create diff --git a/toolsrc/src/vcpkg/commands.dependinfo.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp index ba6da1aa3..e1cf0643f 100644 --- a/toolsrc/src/vcpkg/commands.dependinfo.cpp +++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp @@ -4,7 +4,7 @@ #include <vcpkg/base/system.print.h> #include <vcpkg/base/util.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.dependinfo.h> #include <vcpkg/dependencies.h> #include <vcpkg/help.h> #include <vcpkg/input.h> diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index a433af8ec..32d0723b1 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -4,7 +4,7 @@ #include <vcpkg/base/system.print.h> #include <vcpkg/base/system.process.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.edit.h> #include <vcpkg/help.h> #include <vcpkg/paragraphs.h> diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index bcde99166..204bbd622 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -5,7 +5,7 @@ #include <vcpkg/build.h> #include <vcpkg/cmakevars.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.env.h> #include <vcpkg/help.h> namespace vcpkg::Commands::Env diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp new file mode 100644 index 000000000..d20db7aac --- /dev/null +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -0,0 +1,24 @@ +#include "pch.h" + +#include <vcpkg/commands.fetch.h> + +namespace vcpkg::Commands::Fetch +{ + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("The argument should be tool name\n%s", create_example_string("fetch cmake")), + 1, + 1, + {}, + nullptr, + }; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + + const std::string tool = args.command_arguments[0]; + const fs::path tool_path = paths.get_tool_exe(tool); + System::print2(tool_path.u8string(), '\n'); + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.format-manifest.cpp b/toolsrc/src/vcpkg/commands.format-manifest.cpp index f23472245..4cbe964d6 100644 --- a/toolsrc/src/vcpkg/commands.format-manifest.cpp +++ b/toolsrc/src/vcpkg/commands.format-manifest.cpp @@ -5,7 +5,7 @@ #include <vcpkg/base/json.h> #include <vcpkg/base/system.debug.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.format-manifest.h> #include <vcpkg/portfileprovider.h> namespace vcpkg::Commands::FormatManifest diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp new file mode 100644 index 000000000..c43c5a6b4 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -0,0 +1,34 @@ +#include "pch.h" + +#include <vcpkg/base/hash.h> + +#include <vcpkg/commands.hash.h> + +namespace vcpkg::Commands::Hash +{ + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("The argument should be a file path\n%s", create_example_string("hash boost_1_62_0.tar.bz2")), + 1, + 2, + {}, + nullptr, + }; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + + const fs::path file_to_hash = args.command_arguments[0]; + + auto algorithm = vcpkg::Hash::Algorithm::Sha512; + if (args.command_arguments.size() == 2) + { + algorithm = vcpkg::Hash::algorithm_from_string(args.command_arguments[1]).value_or_exit(VCPKG_LINE_INFO); + } + + const std::string hash = + vcpkg::Hash::get_file_hash(VCPKG_LINE_INFO, paths.get_filesystem(), file_to_hash, algorithm); + System::print2(hash, '\n'); + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index a7ef5a012..5a9b4b594 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -7,7 +7,7 @@ #include <vcpkg/base/system.process.h> #include <vcpkg/base/util.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.integrate.h> #include <vcpkg/metrics.h> #include <vcpkg/userconfig.h> @@ -16,10 +16,10 @@ namespace vcpkg::Commands::Integrate #if defined(_WIN32) static std::string create_appdata_shortcut(const std::string& target_path) noexcept { - return Strings::format(R"###( -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Condition="Exists('%s') and '$(VCPkgLocalAppDataDisabled)' == ''" Project="%s" /> -</Project> + return Strings::format(R"###(
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Condition="Exists('%s') and '$(VCPkgLocalAppDataDisabled)' == ''" Project="%s" />
+</Project>
)###", target_path, target_path); @@ -29,15 +29,15 @@ namespace vcpkg::Commands::Integrate #if defined(_WIN32) static std::string create_system_targets_shortcut() noexcept { - return R"###( -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <!-- version 1 --> - <PropertyGroup> - <VCLibPackagePath Condition="'$(VCLibPackagePath)' == ''">$(LOCALAPPDATA)\vcpkg\vcpkg.user</VCLibPackagePath> - </PropertyGroup> - <Import Condition="'$(VCLibPackagePath)' != '' and Exists('$(VCLibPackagePath).props')" Project="$(VCLibPackagePath).props" /> - <Import Condition="'$(VCLibPackagePath)' != '' and Exists('$(VCLibPackagePath).targets')" Project="$(VCLibPackagePath).targets" /> -</Project> + return R"###(
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <!-- version 1 -->
+ <PropertyGroup>
+ <VCLibPackagePath Condition="'$(VCLibPackagePath)' == ''">$(LOCALAPPDATA)\vcpkg\vcpkg.user</VCLibPackagePath>
+ </PropertyGroup>
+ <Import Condition="'$(VCLibPackagePath)' != '' and Exists('$(VCLibPackagePath).props')" Project="$(VCLibPackagePath).props" />
+ <Import Condition="'$(VCLibPackagePath)' != '' and Exists('$(VCLibPackagePath).targets')" Project="$(VCLibPackagePath).targets" />
+</Project>
)###"; } #endif @@ -47,13 +47,13 @@ namespace vcpkg::Commands::Integrate { const std::string as_string = msbuild_vcpkg_targets_file.string(); - return Strings::format(R"###( -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="%s" Condition="Exists('%s')" /> - <Target Name="CheckValidPlatform" BeforeTargets="Build"> - <Error Text="Unsupported architecture combination. Remove the 'vcpkg' nuget package." Condition="'$(VCPkgEnabled)' != 'true' and '$(VCPkgDisableError)' == ''"/> - </Target> -</Project> + return Strings::format(R"###(
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="%s" Condition="Exists('%s')" />
+ <Target Name="CheckValidPlatform" BeforeTargets="Build">
+ <Error Text="Unsupported architecture combination. Remove the 'vcpkg' nuget package." Condition="'$(VCPkgEnabled)' != 'true' and '$(VCPkgDisableError)' == ''"/>
+ </Target>
+</Project>
)###", as_string, as_string); @@ -63,12 +63,12 @@ namespace vcpkg::Commands::Integrate #if defined(_WIN32) static std::string create_nuget_props_file_contents() noexcept { - return R"###( -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <VCPkgLocalAppDataDisabled>true</VCPkgLocalAppDataDisabled> - </PropertyGroup> -</Project> + return R"###(
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <VCPkgLocalAppDataDisabled>true</VCPkgLocalAppDataDisabled>
+ </PropertyGroup>
+</Project>
)###"; } #endif @@ -93,21 +93,21 @@ namespace vcpkg::Commands::Integrate const std::string& nuget_id, const std::string& nupkg_version) { - static constexpr auto CONTENT_TEMPLATE = R"( -<package> - <metadata> - <id>@NUGET_ID@</id> - <version>@VERSION@</version> - <authors>vcpkg</authors> - <description> - This package imports all libraries currently installed in @VCPKG_DIR@. This package does not contain any libraries and instead refers to the folder directly (like a symlink). - </description> - </metadata> - <files> - <file src="vcpkg.nuget.props" target="build\native\@NUGET_ID@.props" /> - <file src="vcpkg.nuget.targets" target="build\native\@NUGET_ID@.targets" /> - </files> -</package> + static constexpr auto CONTENT_TEMPLATE = R"(
+<package>
+ <metadata>
+ <id>@NUGET_ID@</id>
+ <version>@VERSION@</version>
+ <authors>vcpkg</authors>
+ <description>
+ This package imports all libraries currently installed in @VCPKG_DIR@. This package does not contain any libraries and instead refers to the folder directly (like a symlink).
+ </description>
+ </metadata>
+ <files>
+ <file src="vcpkg.nuget.props" target="build\native\@NUGET_ID@.props" />
+ <file src="vcpkg.nuget.targets" target="build\native\@NUGET_ID@.targets" />
+ </files>
+</package>
)"; std::string content = Strings::replace_all(CONTENT_TEMPLATE, "@NUGET_ID@", nuget_id); @@ -301,18 +301,18 @@ namespace vcpkg::Commands::Integrate const fs::path cmake_toolchain = paths.buildsystems / "vcpkg.cmake"; #if defined(_WIN32) System::printf( - R"( -All MSBuild C++ projects can now #include any installed libraries. -Linking will be handled automatically. -Installing new libraries will make them instantly available. - -CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s" + R"(
+All MSBuild C++ projects can now #include any installed libraries.
+Linking will be handled automatically.
+Installing new libraries will make them instantly available.
+
+CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s"
)", cmake_toolchain.generic_u8string()); #else System::printf( - R"( -CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s" + R"(
+CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s"
)", cmake_toolchain.generic_u8string()); #endif @@ -394,10 +394,10 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s" auto source_path = buildsystems_dir.u8string(); source_path = Strings::replace_all(std::move(source_path), "`", "``"); - System::printf(R"( -With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: - Install-Package %s -Source "%s" - + System::printf(R"(
+With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste:
+ Install-Package %s -Source "%s"
+
)", nuget_id, source_path); diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index f65ba9497..006dfb040 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -2,7 +2,7 @@ #include <vcpkg/base/system.print.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.list.h> #include <vcpkg/help.h> #include <vcpkg/vcpkglib.h> #include <vcpkg/versiont.h> diff --git a/toolsrc/src/vcpkg/commands.owns.cpp b/toolsrc/src/vcpkg/commands.owns.cpp index a71a56ed3..839298eb8 100644 --- a/toolsrc/src/vcpkg/commands.owns.cpp +++ b/toolsrc/src/vcpkg/commands.owns.cpp @@ -2,7 +2,7 @@ #include <vcpkg/base/system.print.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.owns.h> #include <vcpkg/help.h> #include <vcpkg/vcpkglib.h> diff --git a/toolsrc/src/vcpkg/commands.porthistory.cpp b/toolsrc/src/vcpkg/commands.porthistory.cpp index b1bf29f5f..1fdbc8287 100644 --- a/toolsrc/src/vcpkg/commands.porthistory.cpp +++ b/toolsrc/src/vcpkg/commands.porthistory.cpp @@ -4,7 +4,7 @@ #include <vcpkg/base/system.process.h> #include <vcpkg/base/util.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.porthistory.h> #include <vcpkg/help.h> namespace vcpkg::Commands::PortHistory diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index 94c6e490b..a4547323e 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -5,7 +5,7 @@ #include <vcpkg/base/system.process.h> #include <vcpkg/base/util.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.portsdiff.h> #include <vcpkg/help.h> #include <vcpkg/paragraphs.h> #include <vcpkg/versiont.h> diff --git a/toolsrc/src/vcpkg/commands.search.cpp b/toolsrc/src/vcpkg/commands.search.cpp index b78420b4d..5c9070ca4 100644 --- a/toolsrc/src/vcpkg/commands.search.cpp +++ b/toolsrc/src/vcpkg/commands.search.cpp @@ -2,7 +2,7 @@ #include <vcpkg/base/system.print.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.search.h> #include <vcpkg/dependencies.h> #include <vcpkg/globalstate.h> #include <vcpkg/help.h> diff --git a/toolsrc/src/vcpkg/commands.setinstalled.cpp b/toolsrc/src/vcpkg/commands.setinstalled.cpp index 82e1c763f..2c42ff6a3 100644 --- a/toolsrc/src/vcpkg/commands.setinstalled.cpp +++ b/toolsrc/src/vcpkg/commands.setinstalled.cpp @@ -3,7 +3,7 @@ #include <vcpkg/base/system.print.h> #include <vcpkg/binarycaching.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.setinstalled.h> #include <vcpkg/globalstate.h> #include <vcpkg/help.h> #include <vcpkg/input.h> diff --git a/toolsrc/src/vcpkg/commands.upgrade.cpp b/toolsrc/src/vcpkg/commands.upgrade.cpp index 25fb0de98..3092f0bba 100644 --- a/toolsrc/src/vcpkg/commands.upgrade.cpp +++ b/toolsrc/src/vcpkg/commands.upgrade.cpp @@ -4,7 +4,7 @@ #include <vcpkg/base/util.h> #include <vcpkg/binarycaching.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.upgrade.h> #include <vcpkg/dependencies.h> #include <vcpkg/globalstate.h> #include <vcpkg/help.h> diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp index 273b4f10a..fab43e116 100644 --- a/toolsrc/src/vcpkg/commands.version.cpp +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -2,7 +2,7 @@ #include <vcpkg/base/system.print.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.version.h> #include <vcpkg/help.h> #include <vcpkg/metrics.h> diff --git a/toolsrc/src/vcpkg/commands.xvsinstances.cpp b/toolsrc/src/vcpkg/commands.xvsinstances.cpp index 718c73ec0..279f59674 100644 --- a/toolsrc/src/vcpkg/commands.xvsinstances.cpp +++ b/toolsrc/src/vcpkg/commands.xvsinstances.cpp @@ -2,7 +2,7 @@ #include <vcpkg/base/system.print.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.xvsinstances.h> #include <vcpkg/help.h> #include <vcpkg/visualstudio.h> diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/export.ifw.cpp index 8356313cf..8356313cf 100644 --- a/toolsrc/src/vcpkg/commands.exportifw.cpp +++ b/toolsrc/src/vcpkg/export.ifw.cpp diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index d341b32ab..87436e01c 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -3,7 +3,14 @@ #include <vcpkg/base/system.print.h> #include <vcpkg/binarycaching.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.create.h> +#include <vcpkg/commands.dependinfo.h> +#include <vcpkg/commands.edit.h> +#include <vcpkg/commands.env.h> +#include <vcpkg/commands.integrate.h> +#include <vcpkg/commands.list.h> +#include <vcpkg/commands.owns.h> +#include <vcpkg/commands.search.h> #include <vcpkg/export.h> #include <vcpkg/help.h> #include <vcpkg/install.h> diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index da4248c39..51682e18b 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -8,7 +8,7 @@ #include <vcpkg/binarycaching.h> #include <vcpkg/build.h> #include <vcpkg/cmakevars.h> -#include <vcpkg/commands.h> +#include <vcpkg/commands.setinstalled.h> #include <vcpkg/dependencies.h> #include <vcpkg/globalstate.h> #include <vcpkg/help.h> diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index f348e32c0..7ce4646e2 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -8,6 +8,7 @@ #include <vcpkg/base/system.process.h> #include <vcpkg/commands.h> +#include <vcpkg/commands.version.h> #include <vcpkg/metrics.h> #if defined(_WIN32) diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 280faae0d..40782cc61 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -4,6 +4,7 @@ #include <vcpkg/base/system.print.h> #include <vcpkg/commands.h> +#include <vcpkg/commands.integrate.h> #include <vcpkg/globalstate.h> #include <vcpkg/metrics.h> #include <vcpkg/vcpkgcmdarguments.h> diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index b955e4357..c0adbd3a0 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -180,6 +180,30 @@ <ClInclude Include="..\include\vcpkg\buildenvironment.h" />
<ClInclude Include="..\include\vcpkg\cmakevars.h" />
<ClInclude Include="..\include\vcpkg\commands.h" />
+ <ClInclude Include="..\include\vcpkg\commands.autocomplete.h" />
+ <ClInclude Include="..\include\vcpkg\commands.buildexternal.h" />
+ <ClInclude Include="..\include\vcpkg\commands.cache.h" />
+ <ClInclude Include="..\include\vcpkg\commands.ci.h" />
+ <ClInclude Include="..\include\vcpkg\commands.ciclean.h" />
+ <ClInclude Include="..\include\vcpkg\commands.contact.h" />
+ <ClInclude Include="..\include\vcpkg\commands.create.h" />
+ <ClInclude Include="..\include\vcpkg\commands.dependinfo.h" />
+ <ClInclude Include="..\include\vcpkg\commands.edit.h" />
+ <ClInclude Include="..\include\vcpkg\commands.env.h" />
+ <ClInclude Include="..\include\vcpkg\commands.fetch.h" />
+ <ClInclude Include="..\include\vcpkg\commands.format-manifest.h" />
+ <ClInclude Include="..\include\vcpkg\commands.hash.h" />
+ <ClInclude Include="..\include\vcpkg\commands.integrate.h" />
+ <ClInclude Include="..\include\vcpkg\commands.interface.h" />
+ <ClInclude Include="..\include\vcpkg\commands.list.h" />
+ <ClInclude Include="..\include\vcpkg\commands.owns.h" />
+ <ClInclude Include="..\include\vcpkg\commands.porthistory.h" />
+ <ClInclude Include="..\include\vcpkg\commands.portsdiff.h" />
+ <ClInclude Include="..\include\vcpkg\commands.search.h" />
+ <ClInclude Include="..\include\vcpkg\commands.setinstalled.h" />
+ <ClInclude Include="..\include\vcpkg\commands.upgrade.h" />
+ <ClInclude Include="..\include\vcpkg\commands.version.h" />
+ <ClInclude Include="..\include\vcpkg\commands.xvsinstances.h" />
<ClInclude Include="..\include\vcpkg\dependencies.h" />
<ClInclude Include="..\include\vcpkg\export.chocolatey.h" />
<ClInclude Include="..\include\vcpkg\export.h" />
@@ -253,8 +277,9 @@ <ClCompile Include="..\src\vcpkg\commands.dependinfo.cpp" />
<ClCompile Include="..\src\vcpkg\commands.edit.cpp" />
<ClCompile Include="..\src\vcpkg\commands.env.cpp" />
- <ClCompile Include="..\src\vcpkg\commands.exportifw.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.fetch.cpp" />
<ClCompile Include="..\src\vcpkg\commands.format-manifest.cpp" />
+ <ClCompile Include="..\src\vcpkg\commands.hash.cpp" />
<ClCompile Include="..\src\vcpkg\commands.integrate.cpp" />
<ClCompile Include="..\src\vcpkg\commands.list.cpp" />
<ClCompile Include="..\src\vcpkg\commands.owns.cpp" />
@@ -268,6 +293,7 @@ <ClCompile Include="..\src\vcpkg\dependencies.cpp" />
<ClCompile Include="..\src\vcpkg\export.cpp" />
<ClCompile Include="..\src\vcpkg\export.chocolatey.cpp" />
+ <ClCompile Include="..\src\vcpkg\export.ifw.cpp" />
<ClCompile Include="..\src\vcpkg\export.prefab.cpp" />
<ClCompile Include="..\src\vcpkg\globalstate.cpp" />
<ClCompile Include="..\src\vcpkg\help.cpp" />
diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 5c5beb540..f13461b6b 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -69,12 +69,15 @@ <ClCompile Include="..\src\vcpkg\commands.env.cpp">
<Filter>Source Files\vcpkg</Filter>
</ClCompile>
- <ClCompile Include="..\src\vcpkg\commands.exportifw.cpp">
+ <ClCompile Include="..\src\vcpkg\commands.fetch.cpp">
<Filter>Source Files\vcpkg</Filter>
</ClCompile>
<ClCompile Include="..\src\vcpkg\commands.format-manifest.cpp">
<Filter>Source Files\vcpkg</Filter>
</ClCompile>
+ <ClCompile Include="..\src\vcpkg\commands.hash.cpp">
+ <Filter>Source Files\vcpkg</Filter>
+ </ClCompile>
<ClCompile Include="..\src\vcpkg\commands.integrate.cpp">
<Filter>Source Files\vcpkg</Filter>
</ClCompile>
@@ -105,6 +108,9 @@ <ClCompile Include="..\src\vcpkg\export.chocolatey.cpp">
<Filter>Source Files\vcpkg</Filter>
</ClCompile>
+ <ClCompile Include="..\src\vcpkg\export.ifw.cpp">
+ <Filter>Source Files\vcpkg</Filter>
+ </ClCompile>
<ClCompile Include="..\src\vcpkg\globalstate.cpp">
<Filter>Source Files\vcpkg</Filter>
</ClCompile>
@@ -311,6 +317,78 @@ <ClInclude Include="..\include\vcpkg\commands.h">
<Filter>Header Files\vcpkg</Filter>
</ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.autocomplete.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.buildexternal.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.cache.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.ci.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.ciclean.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.contact.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.create.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.dependinfo.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.edit.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.env.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.fetch.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.format-manifest.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.hash.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.integrate.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.interface.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.list.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.owns.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.porthistory.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.portsdiff.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.search.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.setinstalled.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.upgrade.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.version.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\vcpkg\commands.xvsinstances.h">
+ <Filter>Header Files\vcpkg</Filter>
+ </ClInclude>
<ClInclude Include="..\include\vcpkg\dependencies.h">
<Filter>Header Files\vcpkg</Filter>
</ClInclude>
|
