summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-01-13 15:08:31 +0100
committerGitHub <noreply@github.com>2020-01-13 15:08:31 +0100
commit1cf387ed9dcce39afb9c06b3a50b725d8b6f0461 (patch)
treed3b7ad93de9a712d24f8599dce7c72f000ffa908 /main
parent087ffc8b5aafafba8fbb17d0689c0ceb88baa27a (diff)
parentd88103172c4209f9adb98a1341133df5ba016ed5 (diff)
Merge pull request #35079 from akien-mga/managers-dont-build-solutions
Ignore command line --build-solutions when not editing project
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 7015902e19..2f92451844 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -292,7 +292,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" --export-pack <preset> <path> Same as --export, but only export the game pack for the given preset. The <path> extension determines whether it will be in PCK or ZIP format.\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 Build the scripting solutions (e.g. for C# projects).\n");
+ OS::get_singleton()->print(" --build-solutions Build the scripting solutions (e.g. for C# projects). Implies --editor and requires a valid project to edit.\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
@@ -2112,8 +2112,12 @@ bool Main::iteration() {
#ifdef TOOLS_ENABLED
if (auto_build_solutions) {
auto_build_solutions = false;
+ // Only relevant when running the editor.
+ if (!editor) {
+ ERR_FAIL_V_MSG(true, "Command line option --build-solutions was passed, but no project is being edited. Aborting.");
+ }
if (!EditorNode::get_singleton()->call_build()) {
- ERR_FAIL_V(true);
+ ERR_FAIL_V_MSG(true, "Command line option --build-solutions was passed, but the build callback failed. Aborting.");
}
}
#endif