summaryrefslogtreecommitdiffstats
path: root/platform/macos/export
diff options
context:
space:
mode:
Diffstat (limited to 'platform/macos/export')
-rw-r--r--platform/macos/export/export_plugin.cpp35
1 files changed, 28 insertions, 7 deletions
diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp
index e788ff1eec..639a7699ee 100644
--- a/platform/macos/export/export_plugin.cpp
+++ b/platform/macos/export/export_plugin.cpp
@@ -41,6 +41,8 @@
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
#include "editor/editor_scale.h"
+#include "editor/editor_string_names.h"
+#include "editor/import/resource_importer_texture_settings.h"
#include "scene/resources/image_texture.h"
#include "modules/modules_enabled.gen.h" // For svg and regex.
@@ -382,6 +384,7 @@ void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/copyright"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::DICTIONARY, "application/copyright_localized", PROPERTY_HINT_LOCALIZABLE_STRING), Dictionary()));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/min_macos_version"), "10.12"));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/export_angle", PROPERTY_HINT_ENUM, "Auto,Yes,No"), 0, true));
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "display/high_res"), true));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "xcode/platform_build"), "14C18"));
@@ -1616,6 +1619,14 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
// Now process our template.
bool found_binary = false;
+ int export_angle = p_preset->get("application/export_angle");
+ bool include_angle_libs = false;
+ if (export_angle == 0) {
+ include_angle_libs = String(GLOBAL_GET("rendering/gl_compatibility/driver.macos")) == "opengl3_angle";
+ } else if (export_angle == 1) {
+ include_angle_libs = true;
+ }
+
while (ret == UNZ_OK && err == OK) {
// Get filename.
unz_file_info info;
@@ -1663,6 +1674,20 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
continue; // next
}
+ if (file == "Contents/Frameworks/libEGL.dylib") {
+ if (!include_angle_libs) {
+ ret = unzGoToNextFile(src_pkg_zip);
+ continue; // skip
+ }
+ }
+
+ if (file == "Contents/Frameworks/libGLESv2.dylib") {
+ if (!include_angle_libs) {
+ ret = unzGoToNextFile(src_pkg_zip);
+ continue; // skip
+ }
+ }
+
if (file == "Contents/Info.plist") {
_fix_plist(p_preset, data, pkg_name);
}
@@ -2124,16 +2149,12 @@ bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref<EditorE
// Check the texture formats, which vary depending on the target architecture.
String architecture = p_preset->get("binary_format/architecture");
if (architecture == "universal" || architecture == "x86_64") {
- const String bc_error = test_bc();
- if (!bc_error.is_empty()) {
+ if (!ResourceImporterTextureSettings::should_import_s3tc_bptc()) {
valid = false;
- err += bc_error;
}
} else if (architecture == "arm64") {
- const String etc_error = test_etc2();
- if (!etc_error.is_empty()) {
+ if (!ResourceImporterTextureSettings::should_import_etc2_astc()) {
valid = false;
- err += etc_error;
}
} else {
ERR_PRINT("Invalid architecture");
@@ -2463,7 +2484,7 @@ EditorExportPlatformMacOS::EditorExportPlatformMacOS() {
Ref<Theme> theme = EditorNode::get_singleton()->get_editor_theme();
if (theme.is_valid()) {
- stop_icon = theme->get_icon(SNAME("Stop"), SNAME("EditorIcons"));
+ stop_icon = theme->get_icon(SNAME("Stop"), EditorStringName(EditorIcons));
} else {
stop_icon.instantiate();
}