Commit Graph

542 Commits

Author SHA1 Message Date
aa89ab0517 CI: Partially sync workflows and actions with 3.x branch
Stick to `ubuntu:20.04` runners for now, as porting to newer ones implies
fixing a number of compilation warnings which may not be worth the trouble
for an EOL branch.
2024-11-08 14:01:16 +01:00
74d569b99e Fix various Clang -Wunused-but-set-variable warnings 2024-11-06 13:13:09 +01:00
67d2013e67 macOS: Fix sprintf deprecation warning
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
(cherry picked from commit a297a69ac8)
2024-11-06 11:24:14 +01:00
925d7d66a4 Fix crash on macOS (AS) when dualshock4 is removed
(cherry picked from commit 283e31a3e2)
2022-07-03 03:51:18 +02:00
165775e689 [macOS, Mono] Automatically enable JIT entitlements for the Mono exports.
(cherry picked from commit f37981b83f)
2021-09-16 13:29:53 +02:00
62df64fe58 Fix Xbox controllers in Bluetooth mode on macOS
This prevents the D-pad up arrow from being registered as pressed
when it isn't, and pressing any direction from activating the next
arrow clockwise of it.

Co-authored-by: Scott Wadden <scott.wadden@gmail.com>
(cherry picked from commit f95035b80b)
2021-08-18 23:26:28 +02:00
2eb8875b77 Add partial support for Android scoped storage.
This is done by providing API access to app specific directories which don't have any limitations and allows us to bump the target sdk version to 30.
In addition, we're also bumping the min sdk version to 19 as version 18 is no longer supported by Google Play Services and only account of 0.3% of Android devices.

(cherry picked from commit c88d1608ab)
2021-08-16 09:56:32 +02:00
5b3f6a6d34 Point at software OpenGL when OpenGL fails to initialize on X11
(cherry picked from commit 8fbdcb6fea)
2021-08-13 10:36:57 +02:00
e5265a9bc3 [macOS] Fix custom mouse cursor not set after mouse mode change.
(cherry picked from commit f7797bf1b3)
2021-06-29 14:02:55 +02:00
2c520fb732 [macOS] Allow "on top" windows to enter full-screen mode.
(cherry picked from commit 31be8ae8e9)
2021-05-24 12:59:36 +02:00
7447c3b76c [macOS] Enable code signing by default, use ad-hoc signature if no identity specified.
(cherry picked from commit 09c8e69232)
2021-03-29 14:29:54 +02:00
6b6324441f Allow to not optimize release build
(cherry picked from commit 0b298d201e)
2021-03-20 23:05:13 +01:00
15ff752737 Add "Replace existing signature" to the macOS export (enabled by default).
(cherry picked from commit 9e18fce943)
2021-03-18 22:31:09 +01:00
4d06a5c2b0 Mono/macOS: Separate data dir into frameworks and resources for codesigning
Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
(cherry picked from commit 42eb09ddcc)
2021-03-04 12:21:17 +01:00
ced5f5398a add msan sanitizer option for linus/bsd, lsan option for osx
(cherry picked from commit da35cd2f00)
2021-03-04 11:33:35 +01:00
1c27d4a73d [macOS] Add entitlements config and export template dylib signing to the export. 2021-03-03 12:40:44 +02:00
8f6a636ae7 Modernize Semaphore
- Based on C++11's `mutex` and `condition_variable`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
2021-02-18 11:58:08 +01:00
b450036120 Modernize RWLock
- Based on C++14's `shared_time_mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
2021-02-18 11:41:07 +01:00
bc04bbbe2a [macOS] Ignore mouse move event caused by mouse mode switch. 2021-02-15 00:19:47 +02:00
42d3d9c345 SCons: Fix debug_symbols tests after switch to BoolVariable
Bug introduced in #45679.

Fixes part of #45816.

(cherry picked from commit 849c090343)

Also removes useless `debug_symbols=full` mode.
2021-02-08 22:36:32 +01:00
f3c030aa47 SCons: Add production=yes option to use production defaults
This is meant for users making custom builds to match the options used on
optimized, official builds.

This enables, on the platforms which support them:
- `use_static_cpp=yes` (portable binaries for Linux and Windows)
- `use_lto=yes` (link time optimizations - note: requires a lot of RAM!)
- `debug_symbols=no` (no debug symbols, smaller binaries)

Also abort when using MSVC with `production=yes`, as:
- It cannot optimize the GDScript VM like GCC or Clang do, leading to
  significant performance drops.
- Its LTO support is unreliable, at least used to trigger crashes last
  we tried it extensively.

All options can still be overridden if specified, and the `dev=yes` option
was changed to also support overrides.

(cherry picked from commit db26871210)
2021-02-05 09:26:09 +01:00
49646383f1 Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
d6fecf7686 Main: Create user data dir in setup()
Custom backport of #39563 with preliminary change to make
`OS::ensure_user_data_dir()` public as done in f8a79a9.

Fixes #32488.
2021-01-08 10:24:48 +01:00
60959b085d SCons: Add only selected platform's opts to env
Otherwise we can get situations where platform-specific opts with the same name
can override each other depending on the order at which platforms are parsed,
as was the case with `use_static_cpp` in Linux/Windows.

Fixes #44304.

This also has the added benefit that the `scons --help` output will now only
include the options which are relevant for the selected (or detected) platform.

(cherry picked from commit 0f84d8dc49)
2020-12-29 16:02:00 +01:00
36a6a713b4 [3.2] Fix file drag-drop on M1 Macs. 2020-12-23 18:01:02 +02:00
b33fd415da OSX: Remove tmp .app folder instead of moving to trash
Fixes #42232.

And fixes memory leak with use of DirAccess, and harmonize the use of
the sanitized pkg name.

(cherry picked from commits 707a62783b
and 02d228554b)
2020-12-09 11:22:04 +01:00
eafb021015 SCons: Remove unnecessary $LINK overrides
As of SCons 4.0.1, the default value for $LINK is $SMARTLINK, which itself
is a function that will use $CXX as linker for C++:

https://github.com/SCons/scons/blob/4.0.1/SCons/Tool/link.py#L327-L328
https://github.com/SCons/scons/blob/4.0.1/SCons/Tool/link.py#L54-L76

So we don't need to manually specify the same value as $CXX for $LINK.

(cherry picked from commit 2e4bff1cfe)
2020-11-26 09:38:45 +01:00
0b38c50311 SCons: Do not define TYPED_METHOD_BIND on Linux/OSX with clang
Port of #43862.
2020-11-25 21:17:48 +01:00
387597a4a4 OSX: Fix linking with osxcross for arm64
For some reason the `-target` option on the `LINKFLAGS` was causing a weird
issue where osxcross' clang wrapper would attempt using the system `/bin/ld`
instead of the osxcross version (which is Apple's `ld64`).

The error message would be:
```
/bin/ld: unrecognized option '-dynamic'
```

Also removed from `CCFLAGS` for consistency, it seems to work fine with only
`-mmacosx-version-min`.

(cherry picked from commit dbbbb53927)
2020-11-19 17:15:27 +01:00
bc25b80c0f [macOS / ARM64] Remove "-msse2" flag from ARM64 release export template build.
(cherry picked from commit 09f301029a)
2020-11-19 17:14:56 +01:00
336506a273 OSX: Fix compiling for arm64 with OSXCross
(cherry picked from commit 08b0fd4330)
2020-11-19 17:14:52 +01:00
718ff146e0 Fix focus loss on macOS. 2020-11-19 11:55:25 +02:00
4907911bf8 Remove debug_symbols=full in favor of debug_symbols=yes
`debug_symbols=yes` will now behave like `debug_symbols=full` did
before. The difference in compressed file sizes is not that large,
which means there isn't much point in having two different values.

This helps make the buildsystem easier to understand.

(cherry picked from commit ff1f0d2cb5)
2020-11-11 15:12:01 +01:00
3ec62c82a3 Implement no-window mode for X11 and MacOS
Bonus: Homogeinize and improve OS::alert() for no-window mode
2020-11-09 20:56:12 +01:00
6ea9ee563a [macOS, 3.2] Suppress momentum scrolling after key press or modifier change to prevent unexpected change of action. 2020-10-13 19:05:05 +03:00
610728c9f1 [3.2] Fix get_screen_dpi on macOS for non fractional display scales and update documentation. 2020-10-01 22:55:54 +03:00
4ad74609ce Merge pull request #40205 from bruvzg/click-through-3
[3.2] Add mouse event pass-through support for window.
2020-10-01 13:58:24 +02:00
0c3e0ab194 Merge pull request #40994 from qarmin/sanitization32
[3.2] Added Linux sanitizer with xvfb to github workspace
2020-10-01 13:56:09 +02:00
7840a550b5 Hides special folders in FileDialog for macOS
(cherry picked from commit 1998f78679)
2020-09-29 13:57:58 +02:00
df5499fedf [macOS, 3.2] Fix mouse position in captured mode. 2020-09-25 08:54:30 +03:00
e51fed9d1b [3.2] Add window click-through support. 2020-09-17 12:36:01 +03:00
c1a5e9f513 fixed linker being slow on OSX
(cherry picked from commit 788c521ce8)
2020-08-17 11:05:53 +02:00
2b1cfad591 [macOS] Fix "on top" not set on init, and reseting on window update. 2020-08-15 18:05:59 +03:00
abd7c1833e Added Linux sanitizer with xvfb to github workspace 2020-08-14 12:15:58 +02:00
f19bab5165 platform: Update metadata for export platforms
Updates the logos of for macOS, Android, and iOS.

Addresses https://github.com/godotengine/godot-proposals/issues/1161

(cherry picked from commit 41d8c0c818)
2020-08-14 00:32:05 +02:00
a2f034d3ab [macOS] Refocus last key window after DisplayServer::alert is closed.
(cherry picked from commit a05776e20d)
2020-07-28 00:45:06 +02:00
b40f3f9740 Style: Sync other changes from new fix_style.sh and clang_format.sh 2020-07-24 10:39:18 +02:00
f1cdb91f34 SCons: Remove unused DEBUG_MEMORY_ENABLED define
Its last use was removed in Godot 3.0, so it no longer makes sense to define.

Also removed `D3D_DEBUG_INFO` for Windows as it's likely a left over from a
long time ago pre-opensourcing when Godot had some form of Direct3D 9 support?

(cherry picked from commit dcf902df85)
2020-07-24 10:31:57 +02:00
26a825aac3 [macOS, 3.2] Fix window size on macOS Big Sur (title bar height is no longer same as menu height), use top-left corner as resize origin instead of bottom-left. 2020-07-14 17:38:16 +03:00
e9ab41b71d [macOS, 3.2] Implement seamless display scaling. 2020-07-07 22:54:33 +03:00