summaryrefslogtreecommitdiff
path: root/tools/editor/project_export.cpp
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-11-25 06:28:51 +0100
committerest31 <MTest31@outlook.com>2015-11-25 06:50:08 +0100
commit5dc9770febf18ec2716a897528927cefadd23ab6 (patch)
treeb25ca5501e6bd2daaee7a968ee51f4418b87dc34 /tools/editor/project_export.cpp
parent1ac7d4fc77e6157a8db78aa3c9f82342f72c5bb7 (diff)
Print errors to console when exporting
Now you the errors when exporting via godot server binary. When exporting via non-headless godot, it is useful to have the error on the console as well. Also exit and print a list of valid export platforms when the supplied platform was not found.
Diffstat (limited to 'tools/editor/project_export.cpp')
-rw-r--r--tools/editor/project_export.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp
index cd6dc06f75..3464b3c9bb 100644
--- a/tools/editor/project_export.cpp
+++ b/tools/editor/project_export.cpp
@@ -491,6 +491,18 @@ Error ProjectExportDialog::export_platform(const String& p_platform, const Strin
Ref<EditorExportPlatform> exporter = EditorImportExport::get_singleton()->get_export_platform(p_platform);
if (exporter.is_null()) {
ERR_PRINT("Invalid platform for export");
+
+ List<StringName> platforms;
+ EditorImportExport::get_singleton()->get_export_platforms(&platforms);
+ print_line("Valid export plaftorms are:");
+ for (List<StringName>::Element *E=platforms.front();E;E=E->next())
+ print_line(" \""+E->get()+"\"");
+
+ if (p_quit_after) {
+ OS::get_singleton()->set_exit_code(255);
+ get_tree()->quit();
+ }
+
return ERR_INVALID_PARAMETER;
}
Error err = exporter->export_project(p_path,p_debug);