diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-09-22 00:02:09 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-09-22 00:02:09 -0700 |
| commit | 1339080a90a7a7344ae1da7003a380919d828ff0 (patch) | |
| tree | 51d0818a975223f336b32088647ed5496b8895c8 /toolsrc/src/commands_other.cpp | |
| parent | e3a9d3524b33c75b6a97081fc2b71b3e84e249b5 (diff) | |
| download | vcpkg-1339080a90a7a7344ae1da7003a380919d828ff0.tar.gz vcpkg-1339080a90a7a7344ae1da7003a380919d828ff0.zip | |
Place command_create() in a separate cpp file
Diffstat (limited to 'toolsrc/src/commands_other.cpp')
| -rw-r--r-- | toolsrc/src/commands_other.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp index 444eff1c0..2cafd5453 100644 --- a/toolsrc/src/commands_other.cpp +++ b/toolsrc/src/commands_other.cpp @@ -1,6 +1,5 @@ #include "vcpkg_Commands.h" #include <iostream> -#include "vcpkg_Environment.h" #include "vcpkg.h" #include "vcpkg_System.h" #include "vcpkg_Files.h" @@ -50,35 +49,6 @@ namespace vcpkg " vcpkg " << command_and_arguments << "\n"; } - void create_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet) - { - args.check_max_args(3); - package_spec spec = args.parse_all_arguments_as_package_specs(default_target_triplet).at(0); - if (args.command_arguments.size() < 2) - { - System::println(System::color::error, "Error: create requires the archive's URL as the second argument."); - print_usage(); - exit(EXIT_FAILURE); - } - Environment::ensure_utilities_on_path(paths); - - // Space OR define the FILENAME with proper spacing - std::wstring custom_filename = L" "; - if (args.command_arguments.size() >= 3) - { - custom_filename = Strings::format(L" -DFILENAME=%s ", Strings::utf8_to_utf16(args.command_arguments.at(2))); - } - - const std::wstring cmdline = Strings::format(LR"(cmake -DCMD=SCAFFOLD -DPORT=%s -DTARGET_TRIPLET=%s -DURL=%s%s-P "%s")", - Strings::utf8_to_utf16(spec.name), - Strings::utf8_to_utf16(spec.target_triplet.value), - Strings::utf8_to_utf16(args.command_arguments.at(1)), - custom_filename, - paths.ports_cmake.generic_wstring()); - - exit(System::cmd_execute(cmdline)); - } - void import_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { if (args.command_arguments.size() != 3) |
