mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Update export dialog to handle many architectures
This commit is contained in:
parent
a0072ba39f
commit
17c4cd6412
9 changed files with 50 additions and 88 deletions
|
@ -47,8 +47,7 @@ void EditorExportPlatformMacOS::get_preset_features(const Ref<EditorExportPreset
|
|||
if (p_preset->get("texture_format/etc2")) {
|
||||
r_features->push_back("etc2");
|
||||
}
|
||||
|
||||
r_features->push_back("64");
|
||||
r_features->push_back(p_preset->get("binary_format/architecture"));
|
||||
}
|
||||
|
||||
bool EditorExportPlatformMacOS::get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const {
|
||||
|
@ -69,6 +68,7 @@ bool EditorExportPlatformMacOS::get_export_option_visibility(const String &p_opt
|
|||
}
|
||||
|
||||
void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options) {
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "binary_format/architecture", PROPERTY_HINT_ENUM, "universal,x86_64,arm64", PROPERTY_USAGE_STORAGE), "universal"));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
|
||||
|
||||
|
@ -766,7 +766,8 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
|||
|
||||
int ret = unzGoToFirstFile(src_pkg_zip);
|
||||
|
||||
String binary_to_use = "godot_macos_" + String(p_debug ? "debug" : "release") + ".universal";
|
||||
String architecture = p_preset->get("binary_format/architecture");
|
||||
String binary_to_use = "godot_macos_" + String(p_debug ? "debug" : "release") + "." + architecture;
|
||||
|
||||
String pkg_name;
|
||||
if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") {
|
||||
|
@ -1064,19 +1065,19 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
|||
}
|
||||
|
||||
if (data.size() > 0) {
|
||||
if (file.find("/data.mono.macos.release_debug.universal/") != -1) {
|
||||
if (file.find("/data.mono.macos.release_debug." + architecture + "/") != -1) {
|
||||
if (!p_debug) {
|
||||
ret = unzGoToNextFile(src_pkg_zip);
|
||||
continue; // skip
|
||||
}
|
||||
file = file.replace("/data.mono.macos.release_debug.universal/", "/GodotSharp/");
|
||||
file = file.replace("/data.mono.macos.release_debug." + architecture + "/", "/GodotSharp/");
|
||||
}
|
||||
if (file.find("/data.mono.macos.release.universal/") != -1) {
|
||||
if (file.find("/data.mono.macos.release." + architecture + "/") != -1) {
|
||||
if (p_debug) {
|
||||
ret = unzGoToNextFile(src_pkg_zip);
|
||||
continue; // skip
|
||||
}
|
||||
file = file.replace("/data.mono.macos.release.universal/", "/GodotSharp/");
|
||||
file = file.replace("/data.mono.macos.release." + architecture + "/", "/GodotSharp/");
|
||||
}
|
||||
|
||||
if (file.ends_with(".dylib")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue