diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 51603adb28f..da14f5374c7 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -983,7 +983,7 @@ void EditorNode::_fs_changed() { } else { // Normal project export. String config_error; bool missing_templates; - if (!platform->can_export(export_preset, config_error, missing_templates)) { + if (!platform->can_export(export_preset, config_error, missing_templates, export_defer.debug)) { ERR_PRINT(vformat("Cannot export project with preset \"%s\" due to configuration errors:\n%s", preset_name, config_error)); err = missing_templates ? ERR_FILE_NOT_FOUND : ERR_UNCONFIGURED; } else { diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp index 65ffa45b383..00fbd851660 100644 --- a/editor/export/editor_export_platform.cpp +++ b/editor/export/editor_export_platform.cpp @@ -1788,11 +1788,12 @@ void EditorExportPlatform::gen_export_flags(Vector &r_flags, int p_flags } } -bool EditorExportPlatform::can_export(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatform::can_export(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const { bool valid = true; + #ifndef ANDROID_ENABLED String templates_error; - valid = valid && has_valid_export_configuration(p_preset, templates_error, r_missing_templates); + valid = valid && has_valid_export_configuration(p_preset, templates_error, r_missing_templates, p_debug); if (!templates_error.is_empty()) { r_error += templates_error; diff --git a/editor/export/editor_export_platform.h b/editor/export/editor_export_platform.h index 3b9663ebdf3..121e00ccaee 100644 --- a/editor/export/editor_export_platform.h +++ b/editor/export/editor_export_platform.h @@ -238,8 +238,8 @@ public: String test_etc2() const; String test_bc() const; - bool can_export(const Ref &p_preset, String &r_error, bool &r_missing_templates) const; - virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const = 0; + bool can_export(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const; + virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const = 0; virtual bool has_valid_project_configuration(const Ref &p_preset, String &r_error) const = 0; virtual List get_binary_extensions(const Ref &p_preset) const = 0; diff --git a/editor/export/editor_export_platform_pc.cpp b/editor/export/editor_export_platform_pc.cpp index 35f5542f233..df1026d0edb 100644 --- a/editor/export/editor_export_platform_pc.cpp +++ b/editor/export/editor_export_platform_pc.cpp @@ -77,7 +77,7 @@ Ref EditorExportPlatformPC::get_logo() const { return logo; } -bool EditorExportPlatformPC::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformPC::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const { String err; bool valid = false; diff --git a/editor/export/editor_export_platform_pc.h b/editor/export/editor_export_platform_pc.h index b49aa09e079..53574c23331 100644 --- a/editor/export/editor_export_platform_pc.h +++ b/editor/export/editor_export_platform_pc.h @@ -52,7 +52,7 @@ public: virtual String get_os_name() const override; virtual Ref get_logo() const override; - virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const override; virtual bool has_valid_project_configuration(const Ref &p_preset, String &r_error) const override; virtual Error export_project(const Ref &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; virtual Error sign_shared_object(const Ref &p_preset, bool p_debug, const String &p_path); diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 60302396958..cb82091073e 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -2227,7 +2227,7 @@ String EditorExportPlatformAndroid::get_apksigner_path(int p_target_sdk, bool p_ return apksigner_path; } -bool EditorExportPlatformAndroid::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformAndroid::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const { String err; bool valid = false; const bool gradle_build_enabled = p_preset->get("gradle_build/use_gradle_build"); @@ -2286,7 +2286,8 @@ bool EditorExportPlatformAndroid::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const override; virtual bool has_valid_project_configuration(const Ref &p_preset, String &r_error) const override; virtual List get_binary_extensions(const Ref &p_preset) const override; diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp index ae0d1205132..9962a482504 100644 --- a/platform/ios/export/export_plugin.cpp +++ b/platform/ios/export/export_plugin.cpp @@ -1899,7 +1899,7 @@ Error EditorExportPlatformIOS::export_project(const Ref &p_p return OK; } -bool EditorExportPlatformIOS::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformIOS::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const { String err; bool valid = false; diff --git a/platform/ios/export/export_plugin.h b/platform/ios/export/export_plugin.h index 2e461c8ed65..6616bbd7148 100644 --- a/platform/ios/export/export_plugin.h +++ b/platform/ios/export/export_plugin.h @@ -208,7 +208,7 @@ public: } virtual Error export_project(const Ref &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; - virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const override; virtual bool has_valid_project_configuration(const Ref &p_preset, String &r_error) const override; virtual void get_platform_features(List *r_features) const override { diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp index 802c8d42c3a..0b5f2b12668 100644 --- a/platform/macos/export/export_plugin.cpp +++ b/platform/macos/export/export_plugin.cpp @@ -2081,7 +2081,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref &p return err; } -bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const { String err; bool valid = false; diff --git a/platform/macos/export/export_plugin.h b/platform/macos/export/export_plugin.h index 0477a8c0cc0..0764b63e8ce 100644 --- a/platform/macos/export/export_plugin.h +++ b/platform/macos/export/export_plugin.h @@ -148,7 +148,7 @@ public: virtual List get_binary_extensions(const Ref &p_preset) const override; virtual Error export_project(const Ref &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; - virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const override; virtual bool has_valid_project_configuration(const Ref &p_preset, String &r_error) const override; virtual void get_platform_features(List *r_features) const override { diff --git a/platform/uwp/export/export_plugin.cpp b/platform/uwp/export/export_plugin.cpp index 69de383efcf..a0a91a1cf1b 100644 --- a/platform/uwp/export/export_plugin.cpp +++ b/platform/uwp/export/export_plugin.cpp @@ -128,7 +128,7 @@ void EditorExportPlatformUWP::get_export_options(List *r_options) } } -bool EditorExportPlatformUWP::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformUWP::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const { #ifndef DEV_ENABLED // We don't provide export templates for the UWP platform currently as it // has not been ported for Godot 4.0. This is skipped in DEV_ENABLED so that diff --git a/platform/uwp/export/export_plugin.h b/platform/uwp/export/export_plugin.h index 999d54cb807..cc86bdb2807 100644 --- a/platform/uwp/export/export_plugin.h +++ b/platform/uwp/export/export_plugin.h @@ -434,7 +434,7 @@ public: virtual void get_export_options(List *r_options) const override; - virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const override; virtual bool has_valid_project_configuration(const Ref &p_preset, String &r_error) const override; virtual Error export_project(const Ref &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; diff --git a/platform/web/export/export_plugin.cpp b/platform/web/export/export_plugin.cpp index a398593f903..e3cdd6a60d7 100644 --- a/platform/web/export/export_plugin.cpp +++ b/platform/web/export/export_plugin.cpp @@ -358,7 +358,7 @@ Ref EditorExportPlatformWeb::get_logo() const { return logo; } -bool EditorExportPlatformWeb::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformWeb::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const { String err; bool valid = false; bool extensions = (bool)p_preset->get("variant/extensions_support"); diff --git a/platform/web/export/export_plugin.h b/platform/web/export/export_plugin.h index a1d3fed2f34..2de4a4c1537 100644 --- a/platform/web/export/export_plugin.h +++ b/platform/web/export/export_plugin.h @@ -106,7 +106,7 @@ public: virtual String get_os_name() const override; virtual Ref get_logo() const override; - virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const override; virtual bool has_valid_project_configuration(const Ref &p_preset, String &r_error) const override; virtual List get_binary_extensions(const Ref &p_preset) const override; virtual Error export_project(const Ref &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp index 7371e4daf77..367b4711966 100644 --- a/platform/windows/export/export_plugin.cpp +++ b/platform/windows/export/export_plugin.cpp @@ -674,9 +674,9 @@ Error EditorExportPlatformWindows::_code_sign(const Ref &p_p return OK; } -bool EditorExportPlatformWindows::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformWindows::has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const { String err = ""; - bool valid = EditorExportPlatformPC::has_valid_export_configuration(p_preset, err, r_missing_templates); + bool valid = EditorExportPlatformPC::has_valid_export_configuration(p_preset, err, r_missing_templates, p_debug); String rcedit_path = EDITOR_GET("export/windows/rcedit"); if (p_preset->get("application/modify_resources") && rcedit_path.is_empty()) { diff --git a/platform/windows/export/export_plugin.h b/platform/windows/export/export_plugin.h index 184b2f96f8c..c644b1f9e1a 100644 --- a/platform/windows/export/export_plugin.h +++ b/platform/windows/export/export_plugin.h @@ -79,7 +79,7 @@ public: virtual Error sign_shared_object(const Ref &p_preset, bool p_debug, const String &p_path) override; virtual List get_binary_extensions(const Ref &p_preset) const override; virtual void get_export_options(List *r_options) const override; - virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref &p_preset, String &r_error, bool &r_missing_templates, bool p_debug = false) const override; virtual bool has_valid_project_configuration(const Ref &p_preset, String &r_error) const override; virtual bool get_export_option_visibility(const EditorExportPreset *p_preset, const String &p_option) const override; virtual String get_export_option_warning(const EditorExportPreset *p_preset, const StringName &p_name) const override;