diff options
| author | Alexander Saprykin <xelfium@gmail.com> | 2018-05-26 13:27:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-26 13:27:14 +0200 |
| commit | 4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5 (patch) | |
| tree | d95c9490352eb73f078d34a33bc4bb44ac9fa48b /toolsrc/src/commands_create.cpp | |
| parent | fb689bd13dd6ba563a885d71fff1dd2b32a615db (diff) | |
| parent | 2ac7527b40b1dbeb7856b9f763362c1e139e2ca9 (diff) | |
| download | vcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.tar.gz vcpkg-4ce5f064282c3a8d8d710aa82af7aa346b0c6dd5.zip | |
Merge pull request #1 from Microsoft/master
Update vcpkg from upstream
Diffstat (limited to 'toolsrc/src/commands_create.cpp')
| -rw-r--r-- | toolsrc/src/commands_create.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/commands_create.cpp deleted file mode 100644 index 7f85b776a..000000000 --- a/toolsrc/src/commands_create.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Commands.h" -#include "vcpkg_Files.h" -#include "vcpkg_Input.h" -#include "vcpkg_System.h" -#include "vcpkglib.h" - -namespace vcpkg::Commands::Create -{ - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - static const std::string example = Commands::Help::create_example_string( - R"###(create zlib2 http://zlib.net/zlib1211.zip "zlib1211-2.zip")###"); - args.check_max_arg_count(3, example); - args.check_min_arg_count(2, example); - args.check_and_get_optional_command_arguments({}); - const std::string port_name = args.command_arguments.at(0); - const std::string url = args.command_arguments.at(1); - - const fs::path& cmake_exe = paths.get_cmake_exe(); - - std::vector<CMakeVariable> cmake_args{{L"CMD", L"CREATE"}, {L"PORT", port_name}, {L"URL", url}}; - - if (args.command_arguments.size() >= 3) - { - const std::string& zip_file_name = args.command_arguments.at(2); - Checks::check_exit(VCPKG_LINE_INFO, - !Files::has_invalid_chars_for_filesystem(zip_file_name), - R"(Filename cannot contain invalid chars %s, but was %s)", - Files::FILESYSTEM_INVALID_CHARACTERS, - zip_file_name); - cmake_args.push_back({L"FILENAME", zip_file_name}); - } - - const std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args); - Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute_clean(cmd_launch_cmake)); - } -} |
