diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 9150e6a9bbb..adf6d8e06fa 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2824,9 +2824,9 @@ void EditorNode::_discard_changes(const String &p_str) { String exec = OS::get_singleton()->get_executable_path(); List 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 08f119aff8f..979aa351e1b 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("-allow_focus_steal_pid"); + args.push_back("--allow_focus_steal_pid"); args.push_back(itos(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::Element *E = p_breakpoints.front(); E; E = E->next()) { diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 68dfe7e9679..608dc9d31a7 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -929,10 +929,10 @@ void ProjectManager::_open_project_confirm() { List 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(); @@ -982,7 +982,7 @@ void ProjectManager::_run_project_confirm() { List args; - args.push_back("-path"); + args.push_back("--path"); args.push_back(path); String exec = OS::get_singleton()->get_executable_path(); diff --git a/main/main.cpp b/main/main.cpp index 562388af88f..a09fd694737 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -129,62 +129,62 @@ static String unescape_cmdline(const String &p_str) { void Main::print_help(const char *p_binary) { OS::get_singleton()->print(VERSION_FULL_NAME " (c) 2008-2017 Juan Linietsky, Ariel Manzur.\n"); - OS::get_singleton()->print("Usage: %s [options] [scene]\n", p_binary); + OS::get_singleton()->print("Usage: %s [options] [path to scene or 'project.godot' file]\n", p_binary); OS::get_singleton()->print("Options:\n"); - OS::get_singleton()->print("\t-path [dir] : Path to a game, containing project.godot\n"); + OS::get_singleton()->print(" -h, --help Display this help message.\n"); + OS::get_singleton()->print(" --path Path to the project ( must contain a 'project.godot' file).\n"); #ifdef TOOLS_ENABLED - OS::get_singleton()->print("\t-e,-editor : Bring up the editor instead of running the scene.\n"); + OS::get_singleton()->print(" -e, --editor Bring up the editor instead of running the scene.\n"); #endif - OS::get_singleton()->print("\t-test [test] : Run a test.\n"); - OS::get_singleton()->print("\t\t("); + OS::get_singleton()->print(" --test Run a test ("); const char **test_names = tests_get_names(); const char *coma = ""; while (*test_names) { - OS::get_singleton()->print("%s%s", coma, *test_names); + OS::get_singleton()->print("%s'%s'", coma, *test_names); test_names++; coma = ", "; } - OS::get_singleton()->print(")\n"); + OS::get_singleton()->print(").\n"); - OS::get_singleton()->print("\t-r WIDTHxHEIGHT\t : Request Window Resolution\n"); - OS::get_singleton()->print("\t-p XxY\t : Request Window Position\n"); - OS::get_singleton()->print("\t-f\t\t : Request Fullscreen\n"); - OS::get_singleton()->print("\t-mx\t\t Request Maximized\n"); - OS::get_singleton()->print("\t-w\t\t Request Windowed\n"); - OS::get_singleton()->print("\t-vd DRIVER\t : Video Driver ("); + OS::get_singleton()->print(" -r, --resolution x Request window resolution.\n"); + OS::get_singleton()->print(" -p, --position , Request window position.\n"); + OS::get_singleton()->print(" -f, --fullscreen Request fullscreen mode.\n"); + OS::get_singleton()->print(" -m, --maximized Request a maximized window.\n"); + OS::get_singleton()->print(" -w, --windowed Request windowed mode.\n"); + OS::get_singleton()->print(" --video-driver Video driver ("); for (int i = 0; i < OS::get_singleton()->get_video_driver_count(); i++) { if (i != 0) OS::get_singleton()->print(", "); - OS::get_singleton()->print("%s", OS::get_singleton()->get_video_driver_name(i)); + OS::get_singleton()->print("'%s'", OS::get_singleton()->get_video_driver_name(i)); } - OS::get_singleton()->print(")\n"); - OS::get_singleton()->print("\t-ldpi\t : Force low-dpi mode (OSX Only)\n"); + OS::get_singleton()->print(").\n"); + OS::get_singleton()->print(" --low-dpi Force low-DPI mode (macOS only).\n"); - OS::get_singleton()->print("\t-ad DRIVER\t : Audio Driver ("); + OS::get_singleton()->print(" --audio-driver Audio driver ("); for (int i = 0; i < OS::get_singleton()->get_audio_driver_count(); i++) { if (i != 0) OS::get_singleton()->print(", "); - OS::get_singleton()->print("%s", OS::get_singleton()->get_audio_driver_name(i)); + OS::get_singleton()->print("'%s'", OS::get_singleton()->get_audio_driver_name(i)); } - OS::get_singleton()->print(")\n"); - OS::get_singleton()->print("\t-rthread \t : Render Thread Mode ('unsafe', 'safe', 'separate').\n"); - OS::get_singleton()->print("\t-s,-script [script] : Run a script.\n"); - OS::get_singleton()->print("\t-d,-debug : Debug (local stdout debugger).\n"); - OS::get_singleton()->print("\t-rdebug ADDRESS : Remote debug (: host address).\n"); - OS::get_singleton()->print("\t-fdelay [msec]: Simulate high CPU load (delay each frame by [msec]).\n"); - OS::get_singleton()->print("\t-timescale [msec]: Simulate high CPU load (delay each frame by [msec]).\n"); - OS::get_singleton()->print("\t-bp : breakpoint list as source::line comma separated pairs, no spaces (%%20,%%2C,etc instead).\n"); - OS::get_singleton()->print("\t-v : Verbose stdout mode\n"); - OS::get_singleton()->print("\t-lang [locale]: Use a specific locale\n"); - OS::get_singleton()->print("\t-rfs [:] : Remote FileSystem.\n"); - OS::get_singleton()->print("\t-rfs_pass : Password for Remote FileSystem.\n"); + OS::get_singleton()->print(").\n"); + OS::get_singleton()->print(" --render-thread Render thread mode ('unsafe', 'safe', 'separate').\n"); + OS::get_singleton()->print(" -s, --script