summaryrefslogtreecommitdiff
path: root/platform/macos
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-10-18 16:43:37 +0200
committerkobewi <kobewi4e@gmail.com>2022-10-18 19:01:48 +0200
commite48c5daddfa70172c0eab57b8045a7087eec6e2c (patch)
tree249fa2203570136d3a2040ad612e6e86a516cd5f /platform/macos
parent28a4eec9a77bc797b7147be2453cdbe85cf47d7f (diff)
Unify usage of GLOBAL/EDITOR_GET
Diffstat (limited to 'platform/macos')
-rw-r--r--platform/macos/display_server_macos.mm2
-rw-r--r--platform/macos/export/export_plugin.cpp22
2 files changed, 12 insertions, 12 deletions
diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm
index f4692abc92..417de9162e 100644
--- a/platform/macos/display_server_macos.mm
+++ b/platform/macos/display_server_macos.mm
@@ -2179,7 +2179,7 @@ void DisplayServerMacOS::screen_set_keep_on(bool p_enable) {
}
if (p_enable) {
- String app_name_string = ProjectSettings::get_singleton()->get("application/config/name");
+ String app_name_string = GLOBAL_GET("application/config/name");
NSString *name = [NSString stringWithUTF8String:(app_name_string.is_empty() ? "Godot Engine" : app_name_string.utf8().get_data())];
NSString *reason = @"Godot Engine running with display/window/energy_saving/keep_screen_on = true";
IOPMAssertionCreateWithDescription(kIOPMAssertPreventUserIdleDisplaySleep, (__bridge CFStringRef)name, (__bridge CFStringRef)reason, (__bridge CFStringRef)reason, nullptr, 0, nullptr, &screen_keep_on_assertion);
diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp
index f5f64f9663..de6016cb9b 100644
--- a/platform/macos/export/export_plugin.cpp
+++ b/platform/macos/export/export_plugin.cpp
@@ -383,7 +383,7 @@ void EditorExportPlatformMacOS::_fix_plist(const Ref<EditorExportPreset> &p_pres
if (lines[i].find("$binary") != -1) {
strnew += lines[i].replace("$binary", p_binary) + "\n";
} else if (lines[i].find("$name") != -1) {
- strnew += lines[i].replace("$name", ProjectSettings::get_singleton()->get("application/config/name")) + "\n";
+ strnew += lines[i].replace("$name", GLOBAL_GET("application/config/name")) + "\n";
} else if (lines[i].find("$bundle_identifier") != -1) {
strnew += lines[i].replace("$bundle_identifier", p_preset->get("application/bundle_identifier")) + "\n";
} else if (lines[i].find("$short_version") != -1) {
@@ -473,7 +473,7 @@ Error EditorExportPlatformMacOS::_notarize(const Ref<EditorExportPreset> &p_pres
case 1: { // "rcodesign"
print_verbose("using rcodesign notarization...");
- String rcodesign = EditorSettings::get_singleton()->get("export/macos/rcodesign").operator String();
+ String rcodesign = EDITOR_GET("export/macos/rcodesign").operator String();
if (rcodesign.is_empty()) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Notarization"), TTR("rcodesign path is not set. Configure rcodesign path in the Editor Settings (Export > macOS > rcodesign)."));
return Error::FAILED;
@@ -636,7 +636,7 @@ Error EditorExportPlatformMacOS::_code_sign(const Ref<EditorExportPreset> &p_pre
case 2: { // "rcodesign"
print_verbose("using rcodesign codesign...");
- String rcodesign = EditorSettings::get_singleton()->get("export/macos/rcodesign").operator String();
+ String rcodesign = EDITOR_GET("export/macos/rcodesign").operator String();
if (rcodesign.is_empty()) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Code Signing"), TTR("Xrcodesign path is not set. Configure rcodesign path in the Editor Settings (Export > macOS > rcodesign)."));
return Error::FAILED;
@@ -982,8 +982,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(ProjectSettings::get_singleton()->get("application/config/name")) != "") {
- pkg_name = String(ProjectSettings::get_singleton()->get("application/config/name"));
+ if (String(GLOBAL_GET("application/config/name")) != "") {
+ pkg_name = String(GLOBAL_GET("application/config/name"));
} else {
pkg_name = "Unnamed";
}
@@ -1073,7 +1073,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
}
}
- Dictionary appnames = ProjectSettings::get_singleton()->get("application/config/name_localized");
+ Dictionary appnames = GLOBAL_GET("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");
@@ -1087,7 +1087,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 = ProjectSettings::get_singleton()->get("internationalization/locale/translations");
+ Vector<String> translations = GLOBAL_GET("internationalization/locale/translations");
if (translations.size() > 0) {
{
String fname = tmp_app_path_name + "/Contents/Resources/en.lproj";
@@ -1095,7 +1095,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 = \"" + ProjectSettings::get_singleton()->get("application/config/name").operator String() + "\";");
+ f->store_line("CFBundleDisplayName = \"" + GLOBAL_GET("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() + "\";");
}
@@ -1257,7 +1257,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
if (p_preset->get("application/icon") != "") {
iconpath = p_preset->get("application/icon");
} else {
- iconpath = ProjectSettings::get_singleton()->get("application/config/icon");
+ iconpath = GLOBAL_GET("application/config/icon");
}
if (!iconpath.is_empty()) {
@@ -1852,7 +1852,7 @@ bool EditorExportPlatformMacOS::has_valid_project_configuration(const Ref<Editor
valid = false;
}
- String rcodesign = EditorSettings::get_singleton()->get("export/macos/rcodesign").operator String();
+ String rcodesign = EDITOR_GET("export/macos/rcodesign").operator String();
if (rcodesign.is_empty()) {
err += TTR("Notarization: rcodesign path is not set. Configure rcodesign path in the Editor Settings (Export > macOS > rcodesign).") + "\n";
valid = false;
@@ -1875,7 +1875,7 @@ bool EditorExportPlatformMacOS::has_valid_project_configuration(const Ref<Editor
valid = false;
}
} else if (codesign_tool == 2) {
- String rcodesign = EditorSettings::get_singleton()->get("export/macos/rcodesign").operator String();
+ String rcodesign = EDITOR_GET("export/macos/rcodesign").operator String();
if (rcodesign.is_empty()) {
err += TTR("Code signing: rcodesign path is not set. Configure rcodesign path in the Editor Settings (Export > macOS > rcodesign).") + "\n";
valid = false;