Add --quit option to help output and update manpage

(cherry picked from commit 95b8984d5f)
This commit is contained in:
Rémi Verschelde 2018-02-24 18:22:29 +01:00
parent d69d58deea
commit ad325be5a0
2 changed files with 10 additions and 3 deletions

View File

@ -205,6 +205,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" -e, --editor Start the editor instead of running the scene.\n");
OS::get_singleton()->print(" -p, --project-manager Start the project manager, even if a project is auto-detected.\n");
#endif
OS::get_singleton()->print(" -q, --quit Quit after the first iteration.\n");
OS::get_singleton()->print(" -l, --language <locale> Use a specific locale (<locale> being a two-letter code).\n");
OS::get_singleton()->print(" --path <directory> Path to a project (<directory> must contain a 'project.godot' file).\n");
OS::get_singleton()->print(" -u, --upwards Scan folders upwards for project.godot file.\n");
@ -261,7 +262,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" --export-debug Use together with --export, enables debug mode for the template.\n");
OS::get_singleton()->print(" --doctool <path> Dump the engine API reference to the given <path> in XML format, merging if existing files are found.\n");
OS::get_singleton()->print(" --no-docbase Disallow dumping the base types (used with --doctool).\n");
OS::get_singleton()->print(" --build-solutions Builds the scripting solutions (IE. C#).\n");
OS::get_singleton()->print(" --build-solutions Build the scripting solutions (e.g. for C# projects).\n");
#ifdef DEBUG_METHODS_ENABLED
OS::get_singleton()->print(" --gdnative-generate-json-api Generate JSON dump of the Godot API for GDNative bindings.\n");
#endif
@ -553,7 +554,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
} else if (I->get() == "-u" || I->get() == "--upwards") { // scan folders upwards
upwards = true;
} else if (I->get() == "--quit" || I->get() == "-q") { // Auto quit at the end of the first main loop iteration
} else if (I->get() == "-q" || I->get() == "--quit") { // Auto quit at the end of the first main loop iteration
auto_quit = true;
} else if (I->get().ends_with("project.godot")) {
String path;

View File

@ -1,4 +1,4 @@
.TH GODOT "6" "January 2018" "godot 3.0" "Games"
.TH GODOT "6" "February 2018" "godot 3.1" "Games"
.SH NAME
godot \- multi\-platform 2D and 3D game engine with a feature\-rich editor
.SH SYNOPSIS
@ -31,6 +31,9 @@ Start the editor instead of running the scene.
\fB\-p\fR, \fB\-\-project\-manager\fR
Start the project manager, even if a project is auto\-detected.
.TP
\fB\-q\fR, \fB\-\-quit\fR
Quit after the first iteration.
.TP
\fB\-l\fR, \fB\-\-language\fR <locale>
Use a specific locale (<locale> being a two\-letter code).
.TP
@ -130,6 +133,9 @@ Dump the engine API reference to the given <path> in XML format, merging if exis
\fB\-\-no\-docbase\fR
Disallow dumping the base types (used with \fB\-\-doctool\fR).
.TP
\fB\-\-build\-solutions\fR
Build the scripting solutions (e.g. for C# projects).
.TP
\fB\-\-gdnative\-generate\-json\-api\fR
Generate JSON dump of the Godot API for GDNative bindings.
.TP