Main: Fix --check-only option implemented as paired

Fixes #20503.

Also added the option to the Linux manpage.
This commit is contained in:
Rémi Verschelde 2018-07-27 08:36:04 +02:00
parent 6cf5eb8e37
commit 2d4a4a245d
2 changed files with 9 additions and 6 deletions

View file

@ -265,7 +265,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" -s, --script <script> Run a script.\n");
OS::get_singleton()->print(" --check-only Only parse for errors and quit (use with --script).\n");
#ifdef TOOLS_ENABLED
OS::get_singleton()->print(" --export <target> Export the project using the given export target. Export only main pack if path ends with .pck or .zip'.\n");
OS::get_singleton()->print(" --export <target> Export the project using the given export target. Export only main pack if path ends with .pck or .zip.\n");
OS::get_singleton()->print(" --export-debug <target> Like --export, but use debug 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");
@ -1257,14 +1257,14 @@ bool Main::start() {
#endif
} else if (args[i].length() && args[i][0] != '-' && game_path == "") {
game_path = args[i];
} else if (args[i] == "--check-only") {
check_only = true;
}
//parameters that have an argument to the right
else if (i < (args.size() - 1)) {
bool parsed_pair = true;
if (args[i] == "-s" || args[i] == "--script") {
script = args[i + 1];
} else if (args[i] == "--check-only") {
check_only = true;
} else if (args[i] == "--test") {
test = args[i + 1];
#ifdef TOOLS_ENABLED

View file

@ -1,4 +1,4 @@
.TH GODOT "6" "February 2018" "godot 3.1" "Games"
.TH GODOT "6" "Februaryot 2018" "godot 3.1" "Games"
.SH NAME
godot \- multi\-platform 2D and 3D game engine with a feature\-rich editor
.SH SYNOPSIS
@ -127,6 +127,9 @@ Print the frames per second to the stdout.
\fB\-s\fR, \fB\-\-script\fR <script>
Run a script.
.TP
\fB\-\-check\-only\fR
Only parse for errors and quit (use with --script).
.TP
\fB\-\-export\fR <target>
Export the project using the given export target. Export only main pack if path ends with .pck or .zip.
.TP
@ -146,7 +149,7 @@ Build the scripting solutions (e.g. for C# projects).
Generate JSON dump of the Godot API for GDNative bindings.
.TP
\fB\-\-test\fR <test>
Run a unit test ('string', 'containers', 'math', 'render', 'multimesh', 'gui', 'io', 'shaderlang', 'physics', 'oa_hash_map').
Run a unit test ('string', 'math', 'physics', 'physics_2d', 'render', 'oa_hash_map', 'gui', 'io', 'shaderlang', 'gd_tokenizer', 'gd_parser', 'gd_compiler', 'gd_bytecode', 'image', 'ordered_hash_map').
.SH FILES
XDG_DATA_CONFIG/godot/ or ~/.config/godot/
.RS
@ -156,7 +159,7 @@ XDG_DATA_HOME/godot/ or ~/.local/share/godot/
.RS
Contains the default configuration and user data folders for Godot\-made games (\fIuser://\fR path), as well as export templates.
.RE
XDG_DATA_CACHE/godot or ~/.cache/godot/
XDG_DATA_CACHE/godot/ or ~/.cache/godot/
.RS
Cache folder for generated thumbnails and scene previews, as well as temporary location for downloads.
.RE