Commit Graph

2219 Commits

Author SHA1 Message Date
Rémi Verschelde e16f264a7e
Windows: Fix build with SCons 4.2.0
(cherry picked from commit c191cfbddf)
2021-08-01 11:08:36 +02:00
Rémi Verschelde 8e50c00a13 Windows: Appease capricious MSVC versions with moody headers
Fixes #37799.
Fixes #37986.

(cherry picked from commit 4d3a18d9ff)
2020-05-25 17:56:15 +02:00
Rémi Verschelde cd205bfe69 Linux: Add Mesa 20 "Intel" to prime detection
Diff in `glxinfo` between Mesa 19.3.4 and 20.0.1:
```diff
-OpenGL vendor string: Intel Open Source Technology Center
-OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2)
-OpenGL core profile version string: 4.6 (Core Profile) Mesa 19.3.4
+OpenGL vendor string: Intel
+OpenGL renderer string: Mesa Intel(R) HD Graphics 630 (KBL GT2)
+OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.1
```

(cherry picked from commit db28e7ef69)
2020-05-25 17:55:07 +02:00
bruvzg 279ada89ab Replace IOHIDDeviceRegisterRemovalCallback with IOHIDManagerRegisterDeviceRemovalCallback to fix gamepad disconnection callback on macOS Catalina.
(cherry picked from commit 6b23e36dbc)
2020-03-06 11:39:37 +01:00
Relintai 58c58ec212 Fix startGame's logic in engine.js.
(cherry picked from commit cb29ce8a3b)
2020-02-14 16:10:49 +01:00
D00T24 273927273d fixed godot not recognising 150x150 icon for uwp export
(cherry picked from commit 88bd3227ac)
2020-02-06 12:47:04 +01:00
Rémi Verschelde 513bfe496c SCons: Add 'split_libmodules' option to workaround linker issue
The new 'split_libmodules=yes' option is useful to work around linker
command line size limitations when linking a huge number of objects.
We're currently over 64k chars when linking libmodules.a on Windows
with MinGW, which triggers issues as seen in #30892.

Even on Linux, we can also reach linker command line size limitations
by adding more custom modules.

We force this option to True for MinGW on Windows, which fixes #30892.

Additional changes to lib splitting:

- Fix linking of the split module libs with interdependent symbols,
  hacking our way into LINKCOM and SHLINKCOM to set the `--start-group`
  and `--end-group` flags.
- Fix Python 3 compatibility in `methods.split_lib()`.
- Drop seemingly obsolete condition for 'msys' on 'posix'.
- Drop the unnecessary 'split_drivers' as the drivers lib is no longer
  too big since we moved all thirdparty builds to modules.

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
(cherry picked from commit c320a82213)
2020-01-06 12:52:07 +01:00
Relintai 0587df4aa5 Fixed running the export templates with newer emscripten versions.
(cherry picked from commit 6f1d6cfc78)
2019-12-03 15:02:03 +01:00
Rémi Verschelde 89f26c9479 Emscripten: Re-add BINARYEN_TRAP_MODE='clamp' for fastcomp
The option is needed when using the 'fastcomp' backend (default before
1.39.0), and must not be defined when using 'upstream' (new default).
So we define it conditionally to support both backends.

Follow-up to #30751.

(cherry picked from commit 6d6280dfa3)
2019-12-03 15:01:43 +01:00
Rémi Verschelde eabf4bbd67 Emscripten: Do not define BINARYEN_TRAP_MODE='clamp'
It is not supported in Emscripten's `latest-upstream` LLVM backend,
and doesn't seem necessary in the `latest` backend either.
It was initially added in #22857 to solve a compilation error with the latter.

Part of #30270.

(cherry picked from commit 63544e6b02)
2019-11-29 16:10:18 +01:00
bruvzg 56f5502402 [macOS] Fix locale detection.
(cherry picked from commit c8bf0ee062)
2019-11-29 16:05:07 +01:00
Rémi Verschelde 8a13eac43d HTML5: Explicitly link idbfs.js for IDBFS support
Upstream Emscripten changed this in 1.39.1+, so IDBFS is no longer
included by default and has to be linked manually.

The explicit linking doesn't seem to be problematic on earlier
versions (tested `1.38.47-upstream`).

Fixes #33724.

(cherry picked from commit e5dfcb5edd)
2019-11-29 16:02:17 +01:00
Rémi Verschelde bf204bdc7c HTML5: Fix support for Emscripten 1.39.1+
A change in upstream Emscripten 1.39.1+ made our buildsystem error
out where it was previously only issuing a warning:
```
[  5%] Linking Static Library ==> main/libmain.javascript.opt.bc
shared:WARNING: Assuming object file output in the absence of `-c`, based on output filename. Please add with `-c` or `-r` to avoid this warning
Ranlib Library         ==> main/libmain.javascript.opt.bc
/opt/emsdk/upstream/bin/llvm-ranlib: error: unable to load 'main/libmain.javascript.opt.bc': file too small to be an archive
```

As advised on emscripten-core/emscripten#9806, we should be using
`emar` here to create the static library and not `emcc`.
This was apparently done to workaround Emscripten issues in the past,
but evidently this is no longer necessary.

The rest of the `env` redefinitions should probably be re-assessed
against the current state of Emscripten.

Fixes #33374.

(cherry picked from commit e9e2a4b044)
2019-11-29 15:58:41 +01:00
Rémi Verschelde c3aefbd1d2 Android: Bump gradle version to 5.1.1
Matching changes made in #31521 and #31547 but only in the Jetbrains
IDE config.

(cherry picked from commit 1afd77e375)
2019-11-12 13:09:36 +01:00
fogine 6a4653f41c iOS>=11 platform - when handling gestures on screen edges, godot apps should have priority over OS
Solves an issue where iOS would steal InputEventTouch events when near
screen edges in order to handle system wide gestures.
Fixes #31503

(cherry picked from commit e0df9de0cb)
2019-11-12 13:09:36 +01:00
Hugo Locurcio 41d0e46f2d Always use lists for `LIBS` in SCons
This closes #31288.

(cherry picked from commit 05daf5c78b)
2019-11-12 13:09:36 +01:00
Leonardo Giovanni Scur 19f132b368 Fix pointer position in hidpi-corrected resolutions on web
(cherry picked from commit 31cc1bdb58)
2019-11-12 13:09:35 +01:00
bruvzg 9e2f76f17d [X11] Add window borderless state detection, fix borderless state restoration after exiting fullscreen.
(cherry picked from commit 2a950f3a7c)
2019-11-12 13:09:35 +01:00
qarmin cb394082ef Fix memory leak after closing files
(cherry picked from commit 53c0a29fb0)
2019-11-12 13:09:35 +01:00
Michele Valente 4f09d433d8 fix builds made with Clang on some Linux distros
This is the same as #23542 (Fix binaries incorrectly detected as shared
libraries on some linux distros) but for Clang. It should be fine with
Clang 4 or higher.

(cherry picked from commit c0fcd55f96)
2019-11-12 11:13:10 +01:00
Guilherme Felipe 8ef5052967 Add Input::get_current_cursor_shape
[Clean up] Removed unused/unnecessary methods.

(cherry picked from commit 1bae73d7d0)
2019-11-12 11:10:53 +01:00
Rémi Verschelde 716f7c3d32 X11: Fix memory leak in handle_key_event
Extracted from #27189.

(cherry picked from commit d191ffb47d)
2019-11-12 08:41:42 +01:00
Rémi Verschelde 76db2b4dcb Android: Fix another regression with Secure.ANDROID_ID
Regression from #24145, which was missed in #28146.

(cherry picked from commit 071ebb1e48)
2019-11-12 08:13:22 +01:00
Rémi Verschelde 4133ee5e85 Android: Remove unusable android_stl=no option
As of 3.1 and later, we have too many thirdparty C++ dependencies
and some internal uses of `new` and `delete` too for it to make
sense to build without the STL on Android.

The option has been broken since 3.0, and the "System STL" that we
relied on for basic support of `new` and `delete` is likely to be
dropped from the NDK:
https://android.googlesource.com/platform/ndk/+/ndk-release-r20/docs/BuildSystemMaintainers.md#System-STL

(cherry picked from commit 2da1614beb)
2019-11-08 15:48:19 +01:00
Rémi Verschelde f1fc6feca4 SCons: Keep exceptions and rtti on Android, iOS and HTML5 tools build
Those were disable to keep size small, and on Android avoid the dependency on the STL,
but for tools build (editor) this is not really a concern.

Note: as of today it's not possible to build tools=yes for those platforms, but this
change is one of the necessary steps to enable it.

Fixes #25262.

(cherry picked from commit 4b20959d99)
2019-11-08 15:48:19 +01:00
Carl Drougge cd538d23cc OS_X11::set_window_maximized gives up after 0.5s
Spinning forever is clearly worse, especially since this happens on at
least FVWM even though the window actually is maximized.

(cherry picked from commit deb73001ab)
2019-11-08 15:48:19 +01:00
fhuya 0d401e11b1 Shut down Godot processes on app exit.
(cherry picked from commit f35b1f3b91)
2019-11-08 15:48:18 +01:00
Max ee4d1e49ca Fix crash on exit or resume on iOS 13
Fixes #7966.

(cherry picked from commit 29bde8cd74)
2019-11-08 15:48:18 +01:00
Rémi Verschelde 02c4c7a693 Android one-click deploy: Don't clear by default
This makes iteration faster as you don't need to monitor your phone
to allow the installation each time.

Fixes #32183.

(cherry picked from commit 9d96f04138)
2019-11-08 14:01:08 +01:00
Rémi Verschelde 34d4c2ed81
Merge pull request #33063 from yeonghoey/mingw-secure-api-31
Specify MINGW_HAS_SECURE_API=1
2019-10-25 21:59:42 +02:00
bruvzg 8033270852 Fix non-HiDPI mode on HiDPI displays on macOS Catalina.
(cherry picked from commit 509afcea92)
2019-10-25 16:28:38 +02:00
Yeongho Kim d2fbe4db07 Specify MINGW_HAS_SECURE_API=1 2019-10-25 21:33:26 +09:00
MJacred f1fdaf32f3 Fix application window not listed in taskbar (X11)
* for executable
* for editor and exported executable (on older Cinnamon versions)

(cherry picked from commit 1d86929dcb)
2019-09-26 14:45:39 +02:00
Kenneth Lee aa36c0c56c Fixes build for Windows cross-compilation
Fixes #28299

(cherry picked from commit 5c5c3a590a)
2019-09-24 09:00:45 +02:00
KLee1248 2e5fa9f043 Use SHGetKnownFolderPath instead of SHGetFolderPathW.
When getting system directories for Windows, we currently use
SHGetFolderPathW. This is a deprecated function and doesn't support
"Downloads" folders.

As a replacement, this commit uses the newer SHGetKnownFolderPath
function, which is supported since Windows Vista. Godot 3.0 only
supports Windows 7+, so we don't need to use SHGetFolderPathW for
backwards compatibility.

Fixes #26876

(cherry picked from commit 3d908f57d8)
2019-09-24 09:00:45 +02:00
hbina085 8c2e10c393 Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended.
(cherry picked from commit 9f0c6a6009)
2019-09-24 09:00:45 +02:00
qarmin 3b703d6707 Small fixes, mostly dupicated code
(cherry picked from commit 856a8226a5)
2019-09-24 09:00:45 +02:00
mellondill 3078f723a8 https://github.com/godotengine/godot/issues/31297 - HTML5: this.rtenv.callMain is not a function when using latest-upstream backend
Added needed changed for normal compiling with emscripten 1.38.41 and later

(cherry picked from commit 3c176827d6)
2019-09-24 09:00:44 +02:00
volzhs 3178dee53c Suppress MissingPermission warning for Android vibration
It does check its permission every `vibrate_handheld()` calls.
Vibrate permission is added by checking it on export settings.

And there are some changes for deprecated method.
2019-08-27 22:02:22 +09:00
volzhs 081751172a Support vibration for Android and iOS 2019-08-22 00:05:11 +09:00
Ibrahn Sahir 465056b6eb Check project settings live before lookup in crash handler
In x11, windows and osx crash handlers, check project settings exists
before looking up the crash handler message setting.
Avoids crashing the crash handler when handling a crash outside project
settings lifetime. Instead omitting the configurable message and
continuing with trace dump.

(cherry picked from commit 63068e2ccd)
2019-07-03 16:31:01 +02:00
KLee1248 e3b1f3c1ad Re-maps KEY_BRACELEFT/RIGHT for OSX users
Should fix #28098.

(cherry picked from commit 8cbfc0365b)
2019-07-03 16:21:30 +02:00
bruvzg c6e49cc0d9 [macOS] Allow using user provided `.icns` files for exported app icons.
(cherry picked from commit 22ee26849e)
2019-07-03 13:19:40 +02:00
Rémi Verschelde 06123fac30 SCons: Default to builtin libpng/freetype on Linux
The rationale for keeping those shared by default is that they're typical
dependencies found on any Linux system, and it saves compilation time and
binary size to link their dynamically.

But since official builds default to all-builtin, and Debian/Ubuntu still
don't have libpng16 (which we now require) readily available on all their
supported releases, it's simpler to bundle all the things.

This does not change the fact that those dependencies *can* be unbundled
on Linux, it's only the default option changing.

(cherry picked from commit 1769cbc0e2)
2019-07-02 14:59:49 +02:00
Bastiaan Olij edba82b940 Add camera permissions to android
(cherry picked from commit fab84c7dff)
2019-04-20 22:48:34 +02:00
bruvzg d9aa43e793 [macOS] Allow non-resizeable windows to enter fullscreen mode.
(cherry picked from commit 7c7182483f)
2019-04-20 22:23:25 +02:00
volzhs 3c635b4bdf Fix get_unique_id() on Android
(cherry picked from commit 5a4b2087a0)
2019-04-20 20:29:03 +02:00
Fabio Alessandrelli 7434760380 Fix jump over uninitialized value in OS Unix/X11
(cherry picked from commit 0bcf0314f7)
2019-04-20 20:18:01 +02:00
Hendrikto 456eb53439 Remove unused imports
(cherry picked from commit 49a81308c0)
2019-04-20 20:15:44 +02:00
Rémi Verschelde 782a6dcdde SCons: add `methods.using_clang` to check used compiler
Also rename `use_gcc` to `using_gcc` to make it clear that it returns
a config but does not alter it.

(cherry picked from commit e4a96164b6)
2019-04-20 20:14:43 +02:00