summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_export.cpp39
-rw-r--r--editor/editor_export.h11
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp8
-rw-r--r--platform/linuxbsd/export/export.cpp4
-rw-r--r--platform/linuxbsd/export/export_plugin.cpp4
-rw-r--r--platform/linuxbsd/export/export_plugin.h1
-rw-r--r--platform/windows/export/export.cpp4
-rw-r--r--platform/windows/export/export_plugin.cpp4
-rw-r--r--platform/windows/export/export_plugin.h1
9 files changed, 21 insertions, 55 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index bbc104301d..a1081fcbfb 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1760,8 +1760,9 @@ void EditorExportPlatformPC::get_preset_features(const Ref<EditorExportPreset> &
}
void EditorExportPlatformPC::get_export_options(List<ExportOption> *r_options) {
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE), ""));
- r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE), ""));
+ String ext_filter = (get_os_name() == "Windows") ? "*.exe" : "";
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, ext_filter), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, ext_filter), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "debug/export_console_script", PROPERTY_HINT_ENUM, "No,Debug Only,Debug and Release"), 1));
@@ -1794,8 +1795,8 @@ bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset,
// Look for export templates (first official, and if defined custom templates).
bool use64 = p_preset->get("binary_format/64_bits");
- bool dvalid = exists_export_template(use64 ? debug_file_64 : debug_file_32, &err);
- bool rvalid = exists_export_template(use64 ? release_file_64 : release_file_32, &err);
+ bool dvalid = exists_export_template(get_template_file_name("debug", use64 ? "64" : "32"), &err);
+ bool rvalid = exists_export_template(get_template_file_name("release", use64 ? "64" : "32"), &err);
if (p_preset->get("custom_template/debug") != "") {
dvalid = FileAccess::exists(p_preset->get("custom_template/debug"));
@@ -1830,19 +1831,7 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr
template_path = template_path.strip_edges();
if (template_path.is_empty()) {
- if (p_preset->get("binary_format/64_bits")) {
- if (p_debug) {
- template_path = find_export_template(debug_file_64);
- } else {
- template_path = find_export_template(release_file_64);
- }
- } else {
- if (p_debug) {
- template_path = find_export_template(debug_file_32);
- } else {
- template_path = find_export_template(release_file_32);
- }
- }
+ template_path = find_export_template(get_template_file_name(p_debug ? "debug" : "release", p_preset->get("binary_format/64_bits") ? "64" : "32"));
}
if (!template_path.is_empty() && !FileAccess::exists(template_path)) {
@@ -1921,22 +1910,6 @@ void EditorExportPlatformPC::set_logo(const Ref<Texture2D> &p_logo) {
logo = p_logo;
}
-void EditorExportPlatformPC::set_release_64(const String &p_file) {
- release_file_64 = p_file;
-}
-
-void EditorExportPlatformPC::set_release_32(const String &p_file) {
- release_file_32 = p_file;
-}
-
-void EditorExportPlatformPC::set_debug_64(const String &p_file) {
- debug_file_64 = p_file;
-}
-
-void EditorExportPlatformPC::set_debug_32(const String &p_file) {
- debug_file_32 = p_file;
-}
-
void EditorExportPlatformPC::get_platform_features(List<String> *r_features) {
r_features->push_back("pc"); //all pcs support "pc"
r_features->push_back("s3tc"); //all pcs support "s3tc" compression
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 108abab29b..7c61e7cff6 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -426,11 +426,6 @@ private:
String name;
String os_name;
- String release_file_32;
- String release_file_64;
- String debug_file_32;
- String debug_file_64;
-
int chmod_flags = -1;
public:
@@ -445,17 +440,13 @@ public:
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override;
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override;
virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path);
+ virtual String get_template_file_name(const String &p_target, const String &p_arch) const = 0;
void set_name(const String &p_name);
void set_os_name(const String &p_name);
void set_logo(const Ref<Texture2D> &p_logo);
- void set_release_64(const String &p_file);
- void set_release_32(const String &p_file);
- void set_debug_64(const String &p_file);
- void set_debug_32(const String &p_file);
-
void add_platform_feature(const String &p_feature);
virtual void get_platform_features(List<String> *r_features) override;
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override;
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 1468d63daf..20bd145299 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -997,7 +997,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
hbc->add_theme_constant_override("separation", 5 * EDSCALE);
Button *first = memnew(Button);
- first->set_text(TTR("First"));
+ first->set_text(TTR("First", "Pagination"));
if (p_page != 0) {
first->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(0));
} else {
@@ -1007,7 +1007,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
hbc->add_child(first);
Button *prev = memnew(Button);
- prev->set_text(TTR("Previous"));
+ prev->set_text(TTR("Previous", "Pagination"));
if (p_page > 0) {
prev->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(p_page - 1));
} else {
@@ -1037,7 +1037,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
}
Button *next = memnew(Button);
- next->set_text(TTR("Next"));
+ next->set_text(TTR("Next", "Pagination"));
if (p_page < p_page_count - 1) {
next->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(p_page + 1));
} else {
@@ -1048,7 +1048,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
hbc->add_child(next);
Button *last = memnew(Button);
- last->set_text(TTR("Last"));
+ last->set_text(TTR("Last", "Pagination"));
if (p_page != p_page_count - 1) {
last->connect("pressed", callable_mp(this, &EditorAssetLibrary::_search), varray(p_page_count - 1));
} else {
diff --git a/platform/linuxbsd/export/export.cpp b/platform/linuxbsd/export/export.cpp
index 8aa6c47c15..ec83e52f09 100644
--- a/platform/linuxbsd/export/export.cpp
+++ b/platform/linuxbsd/export/export.cpp
@@ -44,10 +44,6 @@ void register_linuxbsd_exporter() {
platform->set_name("Linux/X11");
platform->set_extension("x86_32");
platform->set_extension("x86_64", "binary_format/64_bits");
- platform->set_release_32("linux_x11_32_release");
- platform->set_debug_32("linux_x11_32_debug");
- platform->set_release_64("linux_x11_64_release");
- platform->set_debug_64("linux_x11_64_debug");
platform->set_os_name("LinuxBSD");
platform->set_chmod_flags(0755);
diff --git a/platform/linuxbsd/export/export_plugin.cpp b/platform/linuxbsd/export/export_plugin.cpp
index 08fc9c0452..24906fa3fb 100644
--- a/platform/linuxbsd/export/export_plugin.cpp
+++ b/platform/linuxbsd/export/export_plugin.cpp
@@ -77,6 +77,10 @@ void EditorExportPlatformLinuxBSD::set_extension(const String &p_extension, cons
extensions[p_feature_key] = p_extension;
}
+String EditorExportPlatformLinuxBSD::get_template_file_name(const String &p_target, const String &p_arch) const {
+ return "linux_x11_" + p_arch + "_" + p_target;
+}
+
List<String> EditorExportPlatformLinuxBSD::get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const {
List<String> list;
for (const KeyValue<String, String> &E : extensions) {
diff --git a/platform/linuxbsd/export/export_plugin.h b/platform/linuxbsd/export/export_plugin.h
index 593916e586..f46fc68e1d 100644
--- a/platform/linuxbsd/export/export_plugin.h
+++ b/platform/linuxbsd/export/export_plugin.h
@@ -45,6 +45,7 @@ public:
void set_extension(const String &p_extension, const String &p_feature_key = "default");
virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const override;
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override;
+ virtual String get_template_file_name(const String &p_target, const String &p_arch) const override;
virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) const override;
};
diff --git a/platform/windows/export/export.cpp b/platform/windows/export/export.cpp
index 37fdf93ecf..0fa2913218 100644
--- a/platform/windows/export/export.cpp
+++ b/platform/windows/export/export.cpp
@@ -55,10 +55,6 @@ void register_windows_exporter() {
logo->create_from_image(img);
platform->set_logo(logo);
platform->set_name("Windows Desktop");
- platform->set_release_32("windows_32_release.exe");
- platform->set_debug_32("windows_32_debug.exe");
- platform->set_release_64("windows_64_release.exe");
- platform->set_debug_64("windows_64_debug.exe");
platform->set_os_name("Windows");
EditorExport::get_singleton()->add_export_platform(platform);
diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp
index f20cff90c1..e627253739 100644
--- a/platform/windows/export/export_plugin.cpp
+++ b/platform/windows/export/export_plugin.cpp
@@ -86,6 +86,10 @@ Error EditorExportPlatformWindows::export_project(const Ref<EditorExportPreset>
return err;
}
+String EditorExportPlatformWindows::get_template_file_name(const String &p_target, const String &p_arch) const {
+ return "windows_" + p_arch + "_" + p_target + ".exe";
+}
+
List<String> EditorExportPlatformWindows::get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const {
List<String> list;
list.push_back("exe");
diff --git a/platform/windows/export/export_plugin.h b/platform/windows/export/export_plugin.h
index 04707a5667..39d1cf4c77 100644
--- a/platform/windows/export/export_plugin.h
+++ b/platform/windows/export/export_plugin.h
@@ -49,6 +49,7 @@ public:
virtual void get_export_options(List<ExportOption> *r_options) override;
virtual bool get_export_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const override;
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override;
+ virtual String get_template_file_name(const String &p_target, const String &p_arch) const override;
virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) const override;
};