Browse Source

Merge pull request #20506 from akien-mga/check-only-paired

Main: Fix --check-only option implemented as paired
Rémi Verschelde 7 years ago
parent
commit
ea0abedaf7
2 changed files with 9 additions and 6 deletions
  1. 3 3
      main/main.cpp
  2. 6 3
      misc/dist/linux/godot.6

+ 3 - 3
main/main.cpp

@@ -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("  -s, --script <script>            Run a script.\n");
 	OS::get_singleton()->print("  --check-only                     Only parse for errors and quit (use with --script).\n");
 	OS::get_singleton()->print("  --check-only                     Only parse for errors and quit (use with --script).\n");
 #ifdef TOOLS_ENABLED
 #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("  --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("  --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("  --no-docbase                     Disallow dumping the base types (used with --doctool).\n");
@@ -1257,14 +1257,14 @@ bool Main::start() {
 #endif
 #endif
 		} else if (args[i].length() && args[i][0] != '-' && game_path == "") {
 		} else if (args[i].length() && args[i][0] != '-' && game_path == "") {
 			game_path = args[i];
 			game_path = args[i];
+		} else if (args[i] == "--check-only") {
+			check_only = true;
 		}
 		}
 		//parameters that have an argument to the right
 		//parameters that have an argument to the right
 		else if (i < (args.size() - 1)) {
 		else if (i < (args.size() - 1)) {
 			bool parsed_pair = true;
 			bool parsed_pair = true;
 			if (args[i] == "-s" || args[i] == "--script") {
 			if (args[i] == "-s" || args[i] == "--script") {
 				script = args[i + 1];
 				script = args[i + 1];
-			} else if (args[i] == "--check-only") {
-				check_only = true;
 			} else if (args[i] == "--test") {
 			} else if (args[i] == "--test") {
 				test = args[i + 1];
 				test = args[i + 1];
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED

+ 6 - 3
misc/dist/linux/godot.6

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