diff --git a/main/main.cpp b/main/main.cpp index 7015902e199..2f924518441 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 Same as --export, but only export the game pack for the given preset. The extension determines whether it will be in PCK or ZIP format.\n"); OS::get_singleton()->print(" --doctool Dump the engine API reference to the given 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