You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
Refactor the export checking logic to improve separation of concerns
This commit is contained in:
@@ -1656,7 +1656,7 @@ Ref<Texture> EditorExportPlatformPC::get_logo() const {
|
||||
return logo;
|
||||
}
|
||||
|
||||
bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
|
||||
bool EditorExportPlatformPC::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
|
||||
String err;
|
||||
bool valid = false;
|
||||
|
||||
@@ -1688,6 +1688,28 @@ bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset,
|
||||
return valid;
|
||||
}
|
||||
|
||||
bool EditorExportPlatformPC::has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EditorExportPlatform::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
|
||||
String templates_error;
|
||||
bool valid_export_configuration = has_valid_export_configuration(p_preset, templates_error, r_missing_templates);
|
||||
|
||||
String project_configuration_error;
|
||||
bool valid_project_configuration = has_valid_project_configuration(p_preset, project_configuration_error);
|
||||
|
||||
if (!templates_error.empty()) {
|
||||
r_error += templates_error;
|
||||
}
|
||||
|
||||
if (!project_configuration_error.empty()) {
|
||||
r_error += project_configuration_error;
|
||||
}
|
||||
|
||||
return valid_export_configuration && valid_project_configuration;
|
||||
}
|
||||
|
||||
List<String> EditorExportPlatformPC::get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const {
|
||||
List<String> list;
|
||||
for (Map<String, String>::Element *E = extensions.front(); E; E = E->next()) {
|
||||
|
||||
Reference in New Issue
Block a user