From 5011afcb6ad6a7f7eb37a2cb74f28985e70cbc20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 7 Jan 2020 13:29:02 +0100 Subject: Export: Improve usability of command line interface I'm barely scratching the surface of the changes needed to make the --export command line interface easy to use, but this should already improve things somewhat. - Streamline `can_export()` templates check in all platforms, checking first for the presence of official templates, then of any defined custom template, and reporting on the absence of any. Shouldn't change the actual return value much which is still true if either release or debug is usable - we might want to change that eventually and better validate against the requested target. - Fix discrepancy between platforms using `custom_package/debug` and `custom_template/debug` (resp. `release`). All now use `custom_template`, which will break compatibility for `export_presets.cfg` with earlier projects (but is easy to fix). - Use `can_export()` when attempting a command line export and report the same errors that would be shown in the editor. - Improve error reporting after a failed export attempt, handling missing template and invalid path more gracefully. - Cleanup of unused stuff in EditorNode around the export workflow. - Improve --export documentation in --help a bit. Fixes #16949 (at least many of the misunderstandings listed there). Fixes #18470. --- editor/editor_node.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'editor/editor_node.h') diff --git a/editor/editor_node.h b/editor/editor_node.h index acff91790d..469ba76872 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -325,18 +325,13 @@ private: ExportTemplateManager *export_template_manager; EditorFeatureProfileManager *feature_profile_manager; EditorFileDialog *file_templates; - EditorFileDialog *file_export; EditorFileDialog *file_export_lib; EditorFileDialog *file_script; CheckBox *file_export_lib_merge; - LineEdit *file_export_password; String current_path; MenuButton *update_spinner; String defer_load_scene; - String defer_export; - String defer_export_platform; - bool defer_export_debug; Node *_last_instanced_scene; EditorLog *log; @@ -563,8 +558,6 @@ private: String preset; String path; bool debug; - String password; - } export_defer; bool disable_progress_dialog; @@ -786,7 +779,7 @@ public: void _copy_warning(const String &p_str); - Error export_preset(const String &p_preset, const String &p_path, bool p_debug, const String &p_password, bool p_quit_after = false); + Error export_preset(const String &p_preset, const String &p_path, bool p_debug); static void register_editor_types(); static void unregister_editor_types(); -- cgit v1.2.3