Commit graph

297 commits

Author SHA1 Message Date
Rémi Verschelde
c8479c0d4d SCons: Refactor Linux linker options with linker=<bfd|gold|lld|mold>
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.
2022-07-22 01:00:35 +02:00
Riteo
a21f8b7c13 Improve linuxbsd headless building, cleanup build scripts
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.
2022-07-20 19:48:35 +02:00
Riteo
f035e7844f Remove -pipe from LINKFLAGS
For some reason this fixes the CI from going OOM.
2022-07-20 19:04:31 +02:00
bruvzg
7c005ba723
Improve DisplayServer.window_set_current_screen
Prevent unnecessary fullscreen toggle animation on macOS, when screen is not changed
Fix window position on Linux/X11
2022-07-19 12:26:11 +03:00
kobewi
d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
bruvzg
a194043ea8
Check if GL manager exist to prevent crash when using multithreaded renderer with Vulkan. 2022-07-06 09:56:47 +03:00
Rémi Verschelde
344b42703b
Merge pull request #62212 from hansemro/eraser-detect-4
Add inversion/eraser-end property for tablet pens
2022-07-04 21:48:19 +02:00
Hansem Ro
6dcc9d1131 [macOS, Windows, X11] Add stylus inverted/eraser support to
InputEventMouseMotion event
2022-07-04 10:36:53 -07:00
Jan Haller
d38d76d039 Fix exit code of --help and --version, and test them in CI
Corrects prior regression which caused ERROR output and exit code of 1.
2022-07-02 01:17:35 +02:00
Wilson E. Alvarez
aadf831a67 Properly check for fullscreen toggle made through the Window Manager
Fixes #40007.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-06-30 12:14:46 +02:00
gregcsokas
42e619c01e Adding function key support from F17 to F35
OSX supports everything by default,
Linux is also capable of supporting every function key,
Windows as I know support only up to F24
2022-06-16 19:38:21 +02:00
bruvzg
e00571b194
Add readable export errors. 2022-06-08 17:55:46 +03:00
bruvzg
40b3be7912
Remove mouse events that closed the popup from queue, to fix pop-up reopening. 2022-06-02 08:35:27 +03:00
Fabio Alessandrelli
9c2b5ae5ce [Editor] LinuxBSD export reports Linux as OS name.
This is in line with what's reported by the `OS` class on GNU/Linux, and
is required by the extension exporter to identify the correct library.

For BSD, we should either finish splitting the platform (into
platform/bsd) or register a separate exporter with OS name BSD and
proper templates detection.
2022-05-24 12:01:34 +02:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
clayjohn
652adcd5bf Basic 3D rendering 2022-05-12 10:37:27 -07:00
Rémi Verschelde
c366f8d2d4 Crash handler: Use print_error to include backtrace in logs 2022-05-05 12:22:56 +02:00
Marcel Admiraal
c893302ca1 Read and store joypad events in a separate thread on x11 platform 2022-05-05 07:51:54 +02:00
Hugo Locurcio
180e5d3028
Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Rémi Verschelde
c273ddc3ee Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
bruvzg
652f78785b
[Linux] Disable speech-dispatcher, pulse audio and udev wrapper builds, when library is not found. 2022-04-28 18:13:34 +03:00
bruvzg
6ab672d1ef Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows.
Implement TextServer word break method.
2022-04-28 14:35:41 +03:00
Rémi Verschelde
504708ae21
Merge pull request #56093 from bruvzg/pck_section_load
Improve embedded PCK loading and exporting.
2022-04-27 14:29:21 +02:00
Rémi Verschelde
8dfa12cae7
Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
Rémi Verschelde
a300fb6665
Merge pull request #60523 from akien-mga/linux-pkgconfig-nixos 2022-04-27 09:41:58 +02:00
Rémi Verschelde
e89fc52ec6
Merge pull request #58272 from bruvzg/x11_backup_screen_info 2022-04-27 09:34:25 +02:00
Rémi Verschelde
07ad066420 Linux: Use pkg-config for alsa, libudev and GL too
It's not needed on most distros as those are found in standard lib
and include paths, but on NixOS they're all in non-standard prefixes,
so we need to rely on information provided by pkg-config.

Fixes #59913.

Co-authored-by: David Lewis <davidalewis00@gmail.com>
2022-04-26 09:37:28 +02:00
bruvzg
c0cc41d6c1
Improve embedded PCK loading and exporting.
Windows export process:
  Limit size of executable with embedded PCK to 4 GB.
  Use "rcedit" before embedding PCK.
  Capture and process "rcedit" errors.

Windows, Linux:
  Add support for PCK loading from executable "pck" section.
2022-04-20 11:09:59 +03:00
bruvzg
de4c97758a
Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
bruvzg
8b0761d1fd
Fix sub-menu keyboard navigation. 2022-04-13 09:58:38 +03:00
bruvzg
4bf99f4af2 Narrow FileAccess scope to prevent deadlocks. 2022-04-12 10:54:39 +03:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
bruvzg
f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
Rémi Verschelde
b79721fede
Merge pull request #59908 from bruvzg/fix_popup_close_race
Fix a possible race condition on popup close, that might cause multiple deletions of the same list item.
2022-04-06 08:35:56 +02:00
Rémi Verschelde
77843355a0 CI: Update black formatter and apply changes 2022-04-05 17:43:12 +02:00
bruvzg
daa42e0e50
Fix a possible race condition on popup close, that might cause multiple deletions of the same list item. 2022-04-05 12:44:29 +03:00
Rémi Verschelde
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
bruvzg
ba0317be04
Add CI build with clang sanitizers, increase stack size to 30 MB for builds with sanitizers. 2022-04-01 13:15:35 +03:00
ConteZero
2eb36b8bdb Fix X11 is_window_maximized 2022-03-31 23:21:32 +02:00
Markus Sauermann
0494e024d8 Rename warp mouse functions to warp_mouse 2022-03-27 14:12:01 +02:00
Aaron Franke
13392a96e9
Generate export template file names instead of having a fixed set 2022-03-22 10:16:03 -05:00
Aaron Franke
ac3ecec58e
Change extension for Linux 32-bit x86 exports to x86_32 2022-03-21 14:56:27 -05:00
Aaron Franke
f301451fa3
Move extension logic to EditorExportPlatformLinuxBSD 2022-03-21 12:50:31 -05:00
Aaron Franke
e5e697564d
Move fixup_embedded_pck to EditorExportPlatform classes 2022-03-20 21:04:22 -05:00
bruvzg
f0315c28a8
[Export] Add "export console script" option for Linux, macOS, and Windows exports. 2022-03-14 17:19:18 +02:00
Rémi Verschelde
768f9422bc Convert uses of DirAccess * to DirAccessRef to prevent memleaks
`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-03-11 09:13:11 +01:00
Rémi Verschelde
7866c98479
Merge pull request #58335 from maiself/fix-directory-delete-linux 2022-03-10 21:29:40 +01:00
Rémi Verschelde
3d7f155586 Remove unused Bullet module and thirdparty code
It has been disabled in `master` since one year (#45852) and our plan
is for Bullet, and possibly other thirdparty physics engines, to be
implemented via GDExtension so that they can be selected by the users
who need them.
2022-03-09 21:45:47 +01:00
MmAaXx500
eda3180395
Add missing header for headless builds 2022-03-09 09:58:20 +01:00