diff options
| author | Rémi Verschelde | 2017-08-02 10:02:11 +0200 |
|---|---|---|
| committer | GitHub | 2017-08-02 10:02:11 +0200 |
| commit | d1463554b4c0b07b11bf8b72c610d08ebc1a569e (patch) | |
| tree | a2c35bf75aebdc0c7120e5d29bde50c3a83bd4c9 /editor | |
| parent | 7dfbc31e0747166dab48310a203300f604cae6e3 (diff) | |
| parent | b9a799794568a13e2f8b0761e36d5af45cea458e (diff) | |
| download | godot-d1463554b4c0b07b11bf8b72c610d08ebc1a569e.tar.gz godot-d1463554b4c0b07b11bf8b72c610d08ebc1a569e.tar.zst godot-d1463554b4c0b07b11bf8b72c610d08ebc1a569e.zip | |
Merge pull request #10014 from Calinou/tweak-command-line-arguments
Tweak command-line arguments to make them more UNIX-like
Diffstat (limited to 'editor')
| -rw-r--r-- | editor/editor_node.cpp | 4 | ||||
| -rw-r--r-- | editor/editor_run.cpp | 22 | ||||
| -rw-r--r-- | editor/project_manager.cpp | 6 |
3 files changed, 16 insertions, 16 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 0cdb98130..4e2687449 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2803,9 +2803,9 @@ void EditorNode::_discard_changes(const String &p_str) { String exec = OS::get_singleton()->get_executable_path(); List<String> args; - args.push_back("-path"); + args.push_back("--path"); args.push_back(exec.get_base_dir()); - args.push_back("-pm"); + args.push_back("--project-manager"); OS::ProcessID pid = 0; Error err = OS::get_singleton()->execute(exec, args, false, &pid); diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp index aa97dd237..fee2d0ba4 100644 --- a/editor/editor_run.cpp +++ b/editor/editor_run.cpp @@ -45,24 +45,24 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port"); if (resource_path != "") { - args.push_back("-path"); + args.push_back("--path"); args.push_back(resource_path.replace(" ", "%20")); } if (true) { - args.push_back("-rdebug"); + args.push_back("--remote-debug"); args.push_back(remote_host + ":" + String::num(remote_port)); } - args.push_back("-epid"); + args.push_back("--editor-pid"); args.push_back(String::num(OS::get_singleton()->get_process_ID())); if (debug_collisions) { - args.push_back("-debugcol"); + args.push_back("--debug-collision"); } if (debug_navigation) { - args.push_back("-debugnav"); + args.push_back("--debug-navigation"); } int screen = EditorSettings::get_singleton()->get("run/window_placement/screen"); @@ -101,33 +101,33 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li case 1: { // centered Vector2 pos = screen_rect.position + ((screen_rect.size - desired_size) / 2).floor(); args.push_back("-p"); - args.push_back(itos(pos.x) + "x" + itos(pos.y)); + args.push_back(itos(pos.x) + "," + itos(pos.y)); } break; case 2: { // custom pos Vector2 pos = EditorSettings::get_singleton()->get("run/window_placement/rect_custom_position"); pos += screen_rect.position; args.push_back("-p"); - args.push_back(itos(pos.x) + "x" + itos(pos.y)); + args.push_back(itos(pos.x) + "," + itos(pos.y)); } break; case 3: { // force maximized Vector2 pos = screen_rect.position; args.push_back("-p"); - args.push_back(itos(pos.x) + "x" + itos(pos.y)); - args.push_back("-mx"); + args.push_back(itos(pos.x) + "," + itos(pos.y)); + args.push_back("-m"); } break; case 4: { // force fullscreen Vector2 pos = screen_rect.position; args.push_back("-p"); - args.push_back(itos(pos.x) + "x" + itos(pos.y)); + args.push_back(itos(pos.x) + "," + itos(pos.y)); args.push_back("-f"); } break; } if (p_breakpoints.size()) { - args.push_back("-bp"); + args.push_back("-b"); String bpoints; for (const List<String>::Element *E = p_breakpoints.front(); E; E = E->next()) { diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 82f17b80d..87340b1fe 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -935,10 +935,10 @@ void ProjectManager::_open_project_confirm() { List<String> args; - args.push_back("-path"); + args.push_back("--path"); args.push_back(path); - args.push_back("-editor"); + args.push_back("--editor"); String exec = OS::get_singleton()->get_executable_path(); @@ -977,7 +977,7 @@ void ProjectManager::_run_project_confirm() { List<String> args; - args.push_back("-path"); + args.push_back("--path"); args.push_back(path); String exec = OS::get_singleton()->get_executable_path(); |
