You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[Export] Use project settings overrides with the target preset features instead of current platform features.
This commit is contained in:
committed by
Pāvels Nadtočajevs
parent
4248411baf
commit
c6739f64df
@@ -821,7 +821,7 @@ void EditorExportPlatformMacOS::_fix_plist(const Ref<EditorExportPreset> &p_pres
|
||||
if (lines[i].contains("$binary")) {
|
||||
strnew += lines[i].replace("$binary", p_binary) + "\n";
|
||||
} else if (lines[i].contains("$name")) {
|
||||
strnew += lines[i].replace("$name", GLOBAL_GET("application/config/name")) + "\n";
|
||||
strnew += lines[i].replace("$name", get_project_setting(p_preset, "application/config/name")) + "\n";
|
||||
} else if (lines[i].contains("$bundle_identifier")) {
|
||||
strnew += lines[i].replace("$bundle_identifier", p_preset->get("application/bundle_identifier")) + "\n";
|
||||
} else if (lines[i].contains("$short_version")) {
|
||||
@@ -1564,8 +1564,8 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
||||
String binary_to_use = "godot_macos_" + String(p_debug ? "debug" : "release") + "." + architecture;
|
||||
|
||||
String pkg_name;
|
||||
if (String(GLOBAL_GET("application/config/name")) != "") {
|
||||
pkg_name = String(GLOBAL_GET("application/config/name"));
|
||||
if (String(get_project_setting(p_preset, "application/config/name")) != "") {
|
||||
pkg_name = String(get_project_setting(p_preset, "application/config/name"));
|
||||
} else {
|
||||
pkg_name = "Unnamed";
|
||||
}
|
||||
@@ -1658,7 +1658,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary appnames = GLOBAL_GET("application/config/name_localized");
|
||||
Dictionary appnames = get_project_setting(p_preset, "application/config/name_localized");
|
||||
Dictionary microphone_usage_descriptions = p_preset->get("privacy/microphone_usage_description_localized");
|
||||
Dictionary camera_usage_descriptions = p_preset->get("privacy/camera_usage_description_localized");
|
||||
Dictionary location_usage_descriptions = p_preset->get("privacy/location_usage_description_localized");
|
||||
@@ -1672,7 +1672,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
||||
Dictionary removable_volumes_usage_descriptions = p_preset->get("privacy/removable_volumes_usage_description_localized");
|
||||
Dictionary copyrights = p_preset->get("application/copyright_localized");
|
||||
|
||||
Vector<String> translations = GLOBAL_GET("internationalization/locale/translations");
|
||||
Vector<String> translations = get_project_setting(p_preset, "internationalization/locale/translations");
|
||||
if (translations.size() > 0) {
|
||||
{
|
||||
String fname = tmp_app_path_name + "/Contents/Resources/en.lproj";
|
||||
@@ -1680,7 +1680,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
||||
Ref<FileAccess> f = FileAccess::open(fname + "/InfoPlist.strings", FileAccess::WRITE);
|
||||
f->store_line("/* Localized versions of Info.plist keys */");
|
||||
f->store_line("");
|
||||
f->store_line("CFBundleDisplayName = \"" + GLOBAL_GET("application/config/name").operator String() + "\";");
|
||||
f->store_line("CFBundleDisplayName = \"" + get_project_setting(p_preset, "application/config/name").operator String() + "\";");
|
||||
if (!((String)p_preset->get("privacy/microphone_usage_description")).is_empty()) {
|
||||
f->store_line("NSMicrophoneUsageDescription = \"" + p_preset->get("privacy/microphone_usage_description").operator String() + "\";");
|
||||
}
|
||||
@@ -1779,7 +1779,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
||||
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";
|
||||
include_angle_libs = String(get_project_setting(p_preset, "rendering/gl_compatibility/driver.macos")) == "opengl3_angle";
|
||||
} else if (export_angle == 1) {
|
||||
include_angle_libs = true;
|
||||
}
|
||||
@@ -1867,10 +1867,10 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
|
||||
String icon_path;
|
||||
if (p_preset->get("application/icon") != "") {
|
||||
icon_path = p_preset->get("application/icon");
|
||||
} else if (GLOBAL_GET("application/config/macos_native_icon") != "") {
|
||||
icon_path = GLOBAL_GET("application/config/macos_native_icon");
|
||||
} else if (get_project_setting(p_preset, "application/config/macos_native_icon") != "") {
|
||||
icon_path = get_project_setting(p_preset, "application/config/macos_native_icon");
|
||||
} else {
|
||||
icon_path = GLOBAL_GET("application/config/icon");
|
||||
icon_path = get_project_setting(p_preset, "application/config/icon");
|
||||
}
|
||||
|
||||
if (!icon_path.is_empty()) {
|
||||
@@ -2568,8 +2568,8 @@ Error EditorExportPlatformMacOS::run(const Ref<EditorExportPreset> &p_preset, in
|
||||
}
|
||||
|
||||
String pkg_name;
|
||||
if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") {
|
||||
pkg_name = String(ProjectSettings::get_singleton()->get("application/config/name"));
|
||||
if (String(get_project_setting(p_preset, "application/config/name")) != "") {
|
||||
pkg_name = String(get_project_setting(p_preset, "application/config/name"));
|
||||
} else {
|
||||
pkg_name = "Unnamed";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user