Commit graph

2865 commits

Author SHA1 Message Date
Fredia Huya-Kouadio 170752c5a5 Update the logic to sign prebuilt Godot Android apks.
The previously used tool, `jarsigner` has been deprecated in favor of `apksigner` which is bundled with the Android SDK.
The logic is refactored accordingly and a few editor settings have been deprecated in the process as they're no longer necessary.

Note: As a side effect, specifying the Android SDK path is now required. The docs will be updated to reflect that change.
2021-01-01 13:27:27 -08:00
Rémi Verschelde 95b3feb675
Merge pull request #44639 from m4gr3d/export_format_util_method_3_2
[3.2] Hardcode the export format for the editor 'run' feature
2020-12-30 09:12:00 +01:00
Fredia Huya-Kouadio 3ba1a8ccb3 Add utility method to export the project using a preset format and sign parameter. 2020-12-29 09:01:21 -08:00
Fredia Huya-Kouadio c27c436785
Fix invalid invocation of get_class_loader.
The call was made on a `Godot` instance instead of an `Activity` instance.

(cherry picked from commit 2d492ff8ba)
2020-12-29 16:02:02 +01:00
Rémi Verschelde 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
Rémi Verschelde 7ef143faaf
Merge pull request #44620 from bruvzg/m1_dragdrop_3
[3.2] Fix file drag-drop on M1 Macs.
2020-12-23 18:24:17 +01:00
bruvzg 36a6a713b4
[3.2] Fix file drag-drop on M1 Macs. 2020-12-23 18:01:02 +02:00
Sergey Minakov 8b6357cf28 iOS: fix keyboard display 2020-12-16 05:05:38 +03:00
Rémi Verschelde fd6b3060c1
Merge pull request #44316 from madmiraal/fix-handles-baseexception-3.2
[3.2] Don't handle BaseException in build scripts
2020-12-12 12:44:17 +01:00
Marcel Admiraal e21adf2bc6 Don't handle BaseException in build scripts 2020-12-12 10:10:23 +00:00
Rémi Verschelde 8bd5fa9556
HTML5: Code style cleanup for export code
(cherry picked from commit 8020515717)
2020-12-10 17:57:13 +01:00
Fabio Alessandrelli 0a67b23913 [HTML5] Fix errors when Mic is not allowed. 2020-12-10 09:27:53 +01:00
Fabio Alessandrelli a7126e7153 [HTML5] Improve platform buildsystem.
Check emcc version requirements when building GDNative.
Add more build options (sanitizers, initial memory).
2020-12-10 09:27:53 +01:00
Fabio Alessandrelli 6936ac9d5d [HTML5] Add logo and favicon to editor html. 2020-12-09 18:09:30 +01:00
Fabio Alessandrelli 299be786a1
Remove unused FileAccessJAndroid.
(cherry picked from commit 09a9712a6a)
2020-12-09 12:00:50 +01:00
Fabio Alessandrelli f73c9e555f
Remove now unused FileAccessBuffered.
(cherry picked from commit 781efc26e0)
2020-12-09 11:36:58 +01:00
Fabio Alessandrelli 87e9fbc8a0
[HTML5] Use regular unix FileAccess implementation.
(cherry picked from commit 1396c74734)
2020-12-09 11:35:21 +01:00
Bastiaan Olij 94fff8abb9
Added driving joystick type to windows joystick handling
(cherry picked from commit cf5737acbe)
2020-12-09 11:22:05 +01:00
Rémi Verschelde 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
Lyubomir Vasilev d6a65fb13a
Add 'use_static_cpp' option for MinGW and MSVC builds
(cherry picked from commit e52c9c26fc)
2020-12-09 11:22:04 +01:00
Rémi Verschelde 2beb36fbad
Merge pull request #44170 from Faless/js/3.x_gdnative
[3.2] [HTML5] Optional GDNative Support
2020-12-07 18:15:13 +01:00
Fabio Alessandrelli 79a1418e7d [HTML5] Make GDNative support feature-based.
This is suboptimal as it requires adding an extra flag, but rewriting
how feature tags work is beyond the scope of this work.
2020-12-05 01:14:03 +01:00
Fabio Alessandrelli 2cbfe1afd4 [HTML5] Allow selecting the export type.
Available types:
- Regular
- GDNative (support dynamic linking and thus GDNative WASM files)
- Threads (uses WebAssembly Threads)
2020-12-05 01:00:32 +01:00
Fabio Alessandrelli 4ad95cc039 [HTML5] EditorRunNative works with GDNative.
This "breaks" our loading bar logic (libraries are not counted).
Fixing it is non trivial and probably deserves investigating a different
strategy.
2020-12-05 01:00:29 +01:00
Fabio Alessandrelli 4d1ebaad0f [HTML5] GDNative support via SIDE_MODULE.
Working, with emscripten > 2.0.9
Yes, the unreleased version. 2.0.9 works, but throws and error due to a
bug in emscripten with the thirdparty ENet library.
The issue is fixed upstream so newer releases will work.
2020-12-05 01:00:02 +01:00
Fabio Alessandrelli 8ebb52fad6 [HTML5] Add function signatures to JS libraries. 2020-12-04 23:37:41 +01:00
Rémi Verschelde 185520c5b0
Merge pull request #43907 from alan-w-255/fix_android_wrong_multitouch_pointerid
fix android wrong multi-touch pointerid
2020-12-03 14:49:30 +01:00
Rémi Verschelde 8633cbc825
X11: Include limits.h for LONG_MAX
Fixes #44030.

(cherry picked from commit f1a9de9c59)
2020-12-02 16:00:54 +01:00
Fabio Alessandrelli 0f40391924 [HTML5] Fix broken layout on load in HiDPI screens
This was caused by the devicePixelRatio being applied twice, once by the
HTML code, once by the OS code.
More specifically, OS.get_window_size() would return the canvas element
size, while OS.set_window_size() would set the element size to the
specified value times the devicePixelRatio.
Calling OS.set_window_size(OS.get_window_size()) would reapply the
devicePixelRatio every time.
This commit changes the behaviour so that OS.set_window_size() do not
apply the devicePixelRatio to the canvas element size, by it divides the
CSS size instead.
2020-11-30 11:29:35 +01:00
Fabio Alessandrelli 8d93c723f1 [HTML5] Remove file flags from writeFile in setup.
Flags where deprecated and partly in removed in emscripten 2.0.9.
2020-11-30 11:29:32 +01:00
alan-w-255 cbda02991f fix android wrong multi-touch pointerid 2020-11-27 16:46:21 +08:00
Sergey Minakov 067d015d38
iOS: fix native video
Fixed view not being displayed.
Fixed view orientation change.

(cherry picked from commit 6b2483c331)
2020-11-26 09:38:47 +01:00
Rémi Verschelde 4a1643114e
Export: Reorder options for consistency across platforms
(cherry picked from commit 504efc5f9b)
2020-11-26 09:38:46 +01:00
Rémi Verschelde 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
Rémi Verschelde 797850321b
Merge pull request #42685 from nekomatata/x11-clipboard-fixes-3.2
[3.2] Fix issues with Linux clipboard
2020-11-26 09:34:53 +01:00
Rémi Verschelde 0b38c50311
SCons: Do not define TYPED_METHOD_BIND on Linux/OSX with clang
Port of #43862.
2020-11-25 21:17:48 +01:00
Rémi Verschelde 633c9555dc
Merge pull request #43804 from m4gr3d/update_signing_and_zipalign_logic_3_2
[3.2] Update gradle build files to automatically perform signing and zipalign tasks for custom builds
2020-11-24 08:39:16 +01:00
Rémi Verschelde 7dfd4ced51
Merge pull request #43792 from Faless/js/3.x_lint
[3.2] [HTML5] Linting, fixes.
2020-11-23 14:44:58 +01:00
Fabio Alessandrelli f316a1719d [HTML5] Run eslint --fix.
Should I write a poem about this whole new world? ;)
2020-11-23 13:27:13 +01:00
Fabio Alessandrelli 0813008b8a [HTML5] Enforce JavaScript style with eslint.
Applies to javascript files inside the platform library folder, the
exposed Engine code, and any javascript files in modules.

Files ending with ".externs.js" will be ignored, you can create a
".eslintignore" file to specify extra files to be ignored.
2020-11-23 13:26:19 +01:00
Fredia Huya-Kouadio d13d29240c Update gradle build files to automatically perform signing and zipalign tasks for custom builds. 2020-11-22 17:54:12 -08:00
Fabio Alessandrelli e4cdae3624 [HTML5] Libraries refactor for linting.
Initial work to make liniting easier.

This includes:
- Rename http_request.js to library_godot_http_request.js.
- Rename externs.js to engine.externs.js.
- New library_godot_runtime.js (GodotRuntime) wraps around emscripten
  functions.
- Refactor of XMLHttpRequest handler in engine/preloader.js.
- Few fixes to bugs spotted by early stage linting.
2020-11-21 14:23:32 +01:00
Fredia Huya-Kouadio 16181a38eb
Fix zipalign command name on Windows machines.
(cherry picked from commit c4f2d87747)
2020-11-19 17:15:28 +01:00
Rémi Verschelde 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
bruvzg 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
PouleyKetchoupp 336506a273
OSX: Fix compiling for arm64 with OSXCross
(cherry picked from commit 08b0fd4330)
2020-11-19 17:14:52 +01:00
bruvzg 718ff146e0
Fix focus loss on macOS. 2020-11-19 11:55:25 +02:00
Pedro J. Estébanez 0642f3efeb Ignore query to maximize/minimize window on Windows and X11
This makes these platform behave as MacOS in that regard and also fixes the editor window appearing in some cases even when --no-window has been passed.
2020-11-18 00:33:39 +01:00
Marcel Admiraal e1b72e1943
Add missing javascript semi-colons.
(cherry picked from commit f42284ed07)
2020-11-17 22:25:32 +01:00
Marcus Brummer a822bb9844
Fixed exit code retrieval of spawned processes on Windows
Use GetExitCodeProcess() on Windows to retrieve the exit code of a process in
OS:excute()

(cherry picked from commit f0f4220b05)
2020-11-17 12:07:02 +01:00