mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
[macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.
Co-authored-by: Riteo <riteo@posteo.net>
This commit is contained in:
parent
59139df16e
commit
1887a9df19
84 changed files with 7467 additions and 579 deletions
|
@ -179,6 +179,35 @@ Error EditorExportPlatformWindows::modify_template(const Ref<EditorExportPreset>
|
|||
}
|
||||
|
||||
Error EditorExportPlatformWindows::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
|
||||
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.windows")) == "opengl3_angle";
|
||||
} else if (export_angle == 1) {
|
||||
include_angle_libs = true;
|
||||
}
|
||||
|
||||
if (include_angle_libs) {
|
||||
String custom_debug = p_preset->get("custom_template/debug");
|
||||
String custom_release = p_preset->get("custom_template/release");
|
||||
String arch = p_preset->get("binary_format/architecture");
|
||||
|
||||
String template_path = p_debug ? custom_debug : custom_release;
|
||||
|
||||
template_path = template_path.strip_edges();
|
||||
|
||||
if (template_path.is_empty()) {
|
||||
template_path = find_export_template(get_template_file_name(p_debug ? "debug" : "release", arch));
|
||||
}
|
||||
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
||||
if (da->file_exists(template_path.get_base_dir().path_join("libEGL." + arch + ".dll"))) {
|
||||
da->copy(template_path.get_base_dir().path_join("libEGL." + arch + ".dll"), p_path.get_base_dir().path_join("libEGL.dll"), get_chmod_flags());
|
||||
}
|
||||
if (da->file_exists(template_path.get_base_dir().path_join("libGLESv2." + arch + ".dll"))) {
|
||||
da->copy(template_path.get_base_dir().path_join("libGLESv2." + arch + ".dll"), p_path.get_base_dir().path_join("libGLESv2.dll"), get_chmod_flags());
|
||||
}
|
||||
}
|
||||
|
||||
bool export_as_zip = p_path.ends_with("zip");
|
||||
bool embedded = p_preset->get("binary_format/embed_pck");
|
||||
|
||||
|
@ -311,7 +340,7 @@ bool EditorExportPlatformWindows::get_export_option_visibility(const EditorExpor
|
|||
|
||||
// Hide resources.
|
||||
bool mod_res = p_preset->get("application/modify_resources");
|
||||
if (!mod_res && p_option != "application/modify_resources" && p_option.begins_with("application/")) {
|
||||
if (!mod_res && p_option != "application/modify_resources" && p_option != "application/export_angle" && p_option.begins_with("application/")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -350,6 +379,7 @@ void EditorExportPlatformWindows::get_export_options(List<ExportOption> *r_optio
|
|||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/file_description"), ""));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/copyright"), ""));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/trademarks"), ""));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/export_angle", PROPERTY_HINT_ENUM, "Auto,Yes,No"), 0, true));
|
||||
|
||||
String run_script = "Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'\n"
|
||||
"$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue