summaryrefslogtreecommitdiff
path: root/platform/linuxbsd
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r--platform/linuxbsd/SCsub2
-rw-r--r--platform/linuxbsd/crash_handler_linuxbsd.cpp2
-rw-r--r--platform/linuxbsd/detect.py6
-rw-r--r--platform/linuxbsd/detect_prime_x11.cpp4
-rw-r--r--platform/linuxbsd/display_server_x11.cpp4
-rw-r--r--platform/linuxbsd/display_server_x11.h2
-rw-r--r--platform/linuxbsd/os_linuxbsd.cpp33
7 files changed, 35 insertions, 18 deletions
diff --git a/platform/linuxbsd/SCsub b/platform/linuxbsd/SCsub
index ae75a75830..6e43ffcedb 100644
--- a/platform/linuxbsd/SCsub
+++ b/platform/linuxbsd/SCsub
@@ -18,5 +18,5 @@ common_x11 = [
prog = env.add_program("#bin/godot", ["godot_linuxbsd.cpp"] + common_x11)
-if (env["debug_symbols"] == "full" or env["debug_symbols"] == "yes") and env["separate_debug_symbols"]:
+if env["debug_symbols"] == "yes" and env["separate_debug_symbols"]:
env.AddPostAction(prog, run_in_subprocess(platform_linuxbsd_builders.make_debug_linuxbsd))
diff --git a/platform/linuxbsd/crash_handler_linuxbsd.cpp b/platform/linuxbsd/crash_handler_linuxbsd.cpp
index e2b88b7704..36c304b7f9 100644
--- a/platform/linuxbsd/crash_handler_linuxbsd.cpp
+++ b/platform/linuxbsd/crash_handler_linuxbsd.cpp
@@ -30,8 +30,8 @@
#include "crash_handler_linuxbsd.h"
+#include "core/config/project_settings.h"
#include "core/os/os.h"
-#include "core/project_settings.h"
#include "main/main.h"
#ifdef DEBUG_ENABLED
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index f5e2c72bbc..ea101e24dd 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -73,7 +73,7 @@ def get_opts():
BoolVariable("use_tsan", "Use LLVM/GCC compiler thread sanitizer (TSAN))", False),
BoolVariable("pulseaudio", "Detect and use PulseAudio", True),
BoolVariable("udev", "Use udev for gamepad connection callbacks", False),
- EnumVariable("debug_symbols", "Add debugging symbols to release builds", "yes", ("yes", "no", "full")),
+ EnumVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", "yes", ("yes", "no")),
BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False),
BoolVariable("touch", "Enable touch events", True),
BoolVariable("execinfo", "Use libexecinfo on systems where glibc is not available", False),
@@ -96,8 +96,6 @@ def configure(env):
env.Prepend(CCFLAGS=["-Os"])
if env["debug_symbols"] == "yes":
- env.Prepend(CCFLAGS=["-g1"])
- if env["debug_symbols"] == "full":
env.Prepend(CCFLAGS=["-g2"])
elif env["target"] == "release_debug":
@@ -108,8 +106,6 @@ def configure(env):
env.Prepend(CPPDEFINES=["DEBUG_ENABLED"])
if env["debug_symbols"] == "yes":
- env.Prepend(CCFLAGS=["-g1"])
- if env["debug_symbols"] == "full":
env.Prepend(CCFLAGS=["-g2"])
elif env["target"] == "debug":
diff --git a/platform/linuxbsd/detect_prime_x11.cpp b/platform/linuxbsd/detect_prime_x11.cpp
index 1e46d3222d..e5a9bb4737 100644
--- a/platform/linuxbsd/detect_prime_x11.cpp
+++ b/platform/linuxbsd/detect_prime_x11.cpp
@@ -33,8 +33,8 @@
#include "detect_prime.h"
-#include "core/print_string.h"
-#include "core/ustring.h"
+#include "core/string/print_string.h"
+#include "core/string/ustring.h"
#include <stdlib.h>
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index 176878bc12..35418116b4 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -32,8 +32,8 @@
#ifdef X11_ENABLED
-#include "core/print_string.h"
-#include "core/project_settings.h"
+#include "core/config/project_settings.h"
+#include "core/string/print_string.h"
#include "detect_prime_x11.h"
#include "key_mapping_x11.h"
#include "main/main.h"
diff --git a/platform/linuxbsd/display_server_x11.h b/platform/linuxbsd/display_server_x11.h
index 740bf81fd9..9ff28b9ed2 100644
--- a/platform/linuxbsd/display_server_x11.h
+++ b/platform/linuxbsd/display_server_x11.h
@@ -36,7 +36,7 @@
#include "servers/display_server.h"
#include "core/input/input.h"
-#include "core/local_vector.h"
+#include "core/templates/local_vector.h"
#include "drivers/alsa/audio_driver_alsa.h"
#include "drivers/alsamidi/midi_driver_alsamidi.h"
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
diff --git a/platform/linuxbsd/os_linuxbsd.cpp b/platform/linuxbsd/os_linuxbsd.cpp
index e00a32e3ba..e569aa03d7 100644
--- a/platform/linuxbsd/os_linuxbsd.cpp
+++ b/platform/linuxbsd/os_linuxbsd.cpp
@@ -123,18 +123,39 @@ String OS_LinuxBSD::get_name() const {
Error OS_LinuxBSD::shell_open(String p_uri) {
Error ok;
+ int err_code;
List<String> args;
args.push_back(p_uri);
- ok = execute("xdg-open", args, false);
- if (ok == OK) {
+
+ // Agnostic
+ ok = execute("xdg-open", args, true, nullptr, nullptr, &err_code);
+ if (ok == OK && !err_code) {
+ return OK;
+ } else if (err_code == 2) {
+ return ERR_FILE_NOT_FOUND;
+ }
+ // GNOME
+ args.push_front("open"); // The command is `gio open`, so we need to add it to args
+ ok = execute("gio", args, true, nullptr, nullptr, &err_code);
+ if (ok == OK && !err_code) {
+ return OK;
+ } else if (err_code == 2) {
+ return ERR_FILE_NOT_FOUND;
+ }
+ args.pop_front();
+ ok = execute("gvfs-open", args, true, nullptr, nullptr, &err_code);
+ if (ok == OK && !err_code) {
return OK;
+ } else if (err_code == 2) {
+ return ERR_FILE_NOT_FOUND;
}
- ok = execute("gnome-open", args, false);
- if (ok == OK) {
+ // KDE
+ ok = execute("kde-open5", args, true, nullptr, nullptr, &err_code);
+ if (ok == OK && !err_code) {
return OK;
}
- ok = execute("kde-open", args, false);
- return ok;
+ ok = execute("kde-open", args, true, nullptr, nullptr, &err_code);
+ return !err_code ? ok : FAILED;
}
bool OS_LinuxBSD::_check_internal_feature_support(const String &p_feature) {