summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/detect.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #87464 from bruvzg/pck_sectionRémi Verschelde2024-02-081-18/+0
|\ | | | | | | [Linux] Add support for PCK embedding section with non GNU-ld linkers.
| * [Linux] Add support for PCK embedding section with non GNU-ld linkers.bruvzg2024-01-241-18/+0
| |
* | Silence wayland-scanner check in buildsystemHugo Locurcio2024-02-061-2/+2
| | | | | | | | | | | | | | This prevents a wayland-scanner message from appearing every build when `wayland=yes` is used (the default). The error message when wayland-scanner is still printed as it's not printed by wayland-scanner itself.
* | Wayland: disable backend at build-time if wayland-scanner is missingRiteo2024-01-311-2/+2
| | | | | | | | | | | | This allows previous X11-only setups to still build Godot with default settings. Note that compilation will still abort if wayland-scanner is present but not the various Wayland libraries.
* | Add Wayland supportRiteo2024-01-301-3/+41
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not everything is yet implemented, either for Godot or personal limitations (I don't have all hardware in the world). A brief list of the most important issues follows: - Single-window only: the `DisplayServer` API doesn't expose enough information for properly creating XDG shell windows. - Very dumb rendering loop: this is very complicated, just know that the low consumption mode is forced to 2000 Hz and some clever hacks are in place to overcome a specific Wayland limitation. This will be improved to the extent possible both downstream and upstream. - Features to implement yet: IME, touch input, native file dialog, drawing tablet (commented out due to a refactor), screen recording. - Mouse passthrough can't be implement through a poly API, we need a rect-based one. - The cursor doesn't yet support fractional scaling. - Auto scale is rounded up when using fractional scaling as we don't have a per-window scale query API (basically we need `DisplayServer::window_get_scale`). - Building with `x11=no wayland=yes opengl=yes openxr=yes` fails. This also adds a new project property and editor setting for selecting the default DisplayServer to start, to allow this backend to start first in exported projects (X11 is still the default for now). The editor setting always overrides the project setting. Special thanks to Drew Devault, toger5, Sebastian Krzyszkowiak, Leandro Benedet Garcia, Subhransu, Yury Zhuravlev and Mara Huldra.
* Add RD_ENABLED when VULKAN_ENABLED or D3D12_ENABLED is addedjsjtxietian2023-12-251-1/+1
|
* Linux: Remove hardcoded lib path for x86 cross-compilationRémi Verschelde2023-11-011-11/+10
| | | | | | | | | This breaks the build with our updated i686 Linux SDK which doesn't contain this path, and may not be needed at all. This might need further work to be robust, and there's an open PR already adding -march flags for all supported architectures, but for now we're playing it safe for 4.2.
* Updated compiler version detectionMario Liebisch2023-09-251-1/+1
| | | | | | | | | | | This fixes multiple issues/inconsistencies around `get_compiler_version()`: * With no shell allocated, launching the compiler could fail even with proper paths being set. * The return value was described as "an array of version numbers as ints", but the function actually returned a `Dictionary` (or `None`). * Not all calls were properly handling a `None` return value in case of errors. On Windows this broke compiling for me since #81869 with default settings. * Some calls defined inconsistent defaults/fallbacks (`0` or `-1`).
* SCons: Fix Python 3.12 SyntaxError with regex escape sequencesRémi Verschelde2023-09-251-1/+1
|
* Merge pull request #73443 from akien-mga/unbundle-openxrYuri Sizov2023-07-121-0/+3
|\ | | | | | | Allow unbundling OpenXR (for Linux distros)
| * Allow unbundling OpenXR (for Linux distros)Rémi Verschelde2023-06-161-0/+3
| | | | | | | | | | Copy XrMatrix4x4f_CreateProjectionFov to our OpenXRUtil, instead of relying on a private header.
* | Merge pull request #79105 from akien-mga/linux-libsquish-lacks-pkgconfigRémi Verschelde2023-07-081-1/+2
|\ \ | | | | | | | | | Linux: Link libsquish directly when unbundling, .pc file unreliable
| * | Linux: Link libsquish directly when unbundling, .pc file unreliableRémi Verschelde2023-07-061-1/+2
| | |
* | | Linux: Allow unbundling brotli to use system libraryRémi Verschelde2023-07-061-0/+3
|/ /
* / SCons: Move platform logo/run icon to `export` folderRémi Verschelde2023-06-201-4/+0
|/ | | | | | | | | | | | Follow-up to #75932. Since these icons are only used by the export plugin, it makes sense to move them and generate the headers there. The whole `detect.is_active()` logic seems to be a leftover from before times, as far back as 1.0-stable it already wasn't used for anything. So I'm removing it and moving the export icon generation to `platform_methods`, where it makes more sense.
* [OS] Implement and expose to scripting APIs `get_memory_info` method instead ↵bruvzg2023-04-241-0/+3
| | | | of old `get_free_static_memory`.
* [Export docs] Move docs to platform folders.bruvzg2023-04-201-0/+10
|
* Merge pull request #74666 from akien-mga/scons-linux-cleanup-pulseaudio-definesRémi Verschelde2023-03-101-2/+3
|\ | | | | | | SCons: Cleanup pulseaudio defines for Linux
| * SCons: Cleanup pulseaudio defines for LinuxRémi Verschelde2023-03-091-2/+3
| | | | | | | | | | | | No need to define _REENTRANT manually when using the system lib, it's part of the pkgconfig cflags. And we were then defining PULSEAUDIO_ENABLED twice.
* | change some sys.exit() to be fatalOmar Polo2023-03-091-2/+2
|/ | | | | - when not all freetype deps are builtin (or provided externally) - when attempting to build on an unsupported CPU architecture
* Linux: Don't try to link system embree3 on unsupported archsRémi Verschelde2023-03-031-2/+1
|
* Merge pull request #73441 from akien-mga/linux-unbundling-fixesRémi Verschelde2023-02-171-15/+22
|\ | | | | | | Fix includes of thirdparty libs which can be unbundled on Linux
| * Fix includes of thirdparty libs which can be unbundled on LinuxRémi Verschelde2023-02-161-15/+22
| | | | | | | | | | Changes `builtin_icu` and `builtin_recast` to match the folder names in `thirdparty`.
* | [Linux] Make SO wrapper usage optional.bruvzg2023-02-161-7/+99
|/
* Update PCK embedding SCons warning message to mention mold linkerHugo Locurcio2023-02-131-1/+1
| | | | mold is now part of the SCons `linker` option.
* [Linux/BSD] Include headers for dynamically loaded libraries to simplify ↵bruvzg2023-01-231-51/+12
| | | | build dependencies.
* Cleanup and unify keyboard input.bruvzg2023-01-231-0/+1
| | | | | | | | | | - Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes. - Unify IME behaviour, add inline composition string display on Windows and X11. - Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events. - Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS. - Add support for media key handling on macOS. Co-authored-by: Raul Santos <raulsntos@gmail.com>
* Convert en_GB spelling to en_US with codespellRémi Verschelde2023-01-231-1/+1
|
* Exclude atomic lib under FreeBSD using LLVMrobfram2023-01-201-2/+2
|
* Linux/BSD: Add LINUXBSD_ENABLED define for non X11-related checksRémi Verschelde2023-01-161-3/+8
|
* Allow building X11 without VulkanRiteo2022-12-271-3/+0
| | | | This limit was likely introduced when Vulkan was the only option.
* Load X11 dynamicallyRiteo2022-12-031-7/+8
| | | | | | | | | | | | | | | | The loaders have been generated through hpvb's dynload-wrapper, although they had to be heavily handpatched to workaround some already reported issues with it. I added a note to each generated file to account for that. As GLAD uses X11 stuff directly, I had to define the GLAD_GLX_NO_X11 macro to not let do it that, and handle myself the display loading and screen handling part myself, which wasn't that hard but it's still something worth saying. I plan to improve greatly the X11 backend (including this aspect) but, as the release isn't that far and I'm also working on the Wayland backend, this will do for now, I hope.
* Load GLX dynamically with GLADRiteo Siuga2022-11-151-1/+0
| | | | | | | This is accomplished through the addition of a GLAD GLX loader in the `thirdparty` directory. This is another step towards a nice Wayland/X11 interoperation.
* Actually set the execinfo flag on non-glibc systemsRiteo2022-10-111-0/+1
|
* Automatically use execinfo for crash handler on *BSD and musl-based LinuxHugo Locurcio2022-10-041-2/+4
| | | | Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* ci: add Python static analysis check via mypyJiri Suchan2022-09-301-1/+6
|
* SCons: Unify tools/target build type configurationRémi Verschelde2022-09-261-23/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements https://github.com/godotengine/godot-proposals/issues/3371. New `target` presets ==================== The `tools` option is removed and `target` changes to use three new presets, which match the builds users are familiar with. These targets control the default optimization level and enable editor-specific and debugging code: - `editor`: Replaces `tools=yes target=release_debug`. * Defines: `TOOLS_ENABLED`, `DEBUG_ENABLED`, `-O2`/`/O2` - `template_debug`: Replaces `tools=no target=release_debug`. * Defines: `DEBUG_ENABLED`, `-O2`/`/O2` - `template_release`: Replaces `tools=no target=release`. * Defines: `-O3`/`/O2` New `dev_build` option ====================== The previous `target=debug` is now replaced by a separate `dev_build=yes` option, which can be used in combination with either of the three targets, and changes the following: - `dev_build`: Defines `DEV_ENABLED`, disables optimization (`-O0`/`/0d`), enables generating debug symbols, does not define `NDEBUG` so `assert()` works in thirdparty libraries, adds a `.dev` suffix to the binary name. Note: Unlike previously, `dev_build` defaults to off so that users who compile Godot from source get an optimized and small build by default. Engine contributors should now set `dev_build=yes` in their build scripts or IDE configuration manually. Changed binary names ==================== The name of generated binaries and object files are changed too, to follow this format: `godot.<platform>.<target>[.dev][.double].<arch>[.<extra_suffix>][.<ext>]` For example: - `godot.linuxbsd.editor.dev.arm64` - `godot.windows.template_release.double.x86_64.mono.exe` Be sure to update your links/scripts/IDE config accordingly. More flexible `optimize` and `debug_symbols` options ==================================================== The optimization level and whether to generate debug symbols can be further specified with the `optimize` and `debug_symbols` options. So the default values listed above for the various `target` and `dev_build` combinations are indicative and can be replaced when compiling, e.g.: `scons p=linuxbsd target=template_debug dev_build=yes optimize=debug` will make a "debug" export template with dev-only code enabled, `-Og` optimization level for GCC/Clang, and debug symbols. Perfect for debugging complex crashes at runtime in an exported project.
* SCons: Refactor handling of `production` flag and per-platform LTO defaultsRémi Verschelde2022-09-191-0/+4
| | | | | | | Fixup to #63288. See #65583 for the bug report. Co-authored-by: Cyberrebell <chainsaw75@web.de>
* SCons: Refactor LTO options with `lto=<none|thin|full>`Rémi Verschelde2022-09-081-10/+6
| | | | | | | | | | | | | Adds support for LTO on macOS and Android. We don't have much experience with LTO on these platforms so for now we keep it disabled by default even when `production=yes` is set. Similarly for iOS where we ship object files for the user to link in Xcode so LTO makes builds extremely slow to link. `production=yes` defaults to full LTO. ThinLTO is much faster for LLVM-based compilers but seems to produce bigger binaries (at least for the Web platform).
* Add support for system dark mode (Linux)Raul Santos2022-09-021-1/+1
| | | | - Use `org.freedesktop.appearance color-scheme` to support system dark mode.
* Linux: Fix GNU ld detection for pck_embed linker scriptRémi Verschelde2022-08-261-1/+3
|
* Unify bits, arch, and android_arch into env["arch"]Aaron Franke2022-08-251-23/+19
| | | | | | Fully removes the `bits` option and adapts the code that relied on it. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* [Linux] Fix build with missing DBUS.bruvzg2022-07-291-0/+1
|
* [Linux] Load dbus libraries dynamically.bruvzg2022-07-291-1/+1
|
* Load fontconfig libraries dynamically.bruvzg2022-07-271-5/+8
|
* Implement support for loading system fonts on Linux, macOS / iOS and Windows.bruvzg2022-07-261-0/+6
|
* SCons: Refactor Linux linker options with `linker=<bfd|gold|lld|mold>`Rémi Verschelde2022-07-221-16/+33
| | | | | | | | | | | | | | | | | | | | | The new option is `linker` and lets the user specify the argument to the`-fuse_ld=` linker flag directly. The supported options are: - `default`: No change, typically uses GNU ld (bfd) unless the user or distro picked a different default `/usr/bin/ld`. - `bfd`: GNU ld from binutils - `gold`: GNU gold from binutils - `lld`: lld from LLVM - `mold`: mold, an extremely fast modern linker, not (yet) intended for use in production but great for development speed. Provided by distro `mold` package or needs to be compiled from source and installed to `/usr` otherwise. Removes the `use_lld=yes` option, and make lld actually usable with GCC too. Not all the above are compatible or recommend for LTO, we recommend using GNU ld with GCC LTO, or lld with LLVM ThinLTO.
* Improve `linuxbsd` headless building, cleanup build scriptsRiteo2022-07-201-47/+13
| | | | | | | | Now the `linuxbsd` platform can be built headlessly (e.g. without X11 development libraries). I also cleaned up some weird (old?) usages of the `env` variable which seem to make no difference and are used nowhere else.
* Remove `-pipe` from `LINKFLAGS`Riteo2022-07-201-1/+0
| | | | For some reason this fixes the CI from going OOM.
* [Linux] Disable speech-dispatcher, pulse audio and udev wrapper builds, when ↵bruvzg2022-04-281-0/+3
| | | | library is not found.