Commit graph

3065 commits

Author SHA1 Message Date
Rémi Verschelde
c7c93355e3
Merge pull request #49436 from madmiraal/add-android-external-dir-3.x
[3.x] Add OS.get_external_data_dir() to get Android external directory
2021-06-10 18:24:21 +02:00
Marcel Admiraal
6d63ccba31 Add OS.get_external_data_dir() to get Android external directory 2021-06-10 16:48:37 +01:00
Rémi Verschelde
1147213c48
Merge pull request #49481 from madmiraal/fix-27725-3.x
[3.x] Remove unused AudioDriverAndroid from Android
2021-06-10 16:44:56 +02:00
Marcel Admiraal
cdba79ca72 Remove unused AudioDriverAndroid from Android 2021-06-10 08:31:23 +01:00
bruvzg
8790c07562
[iOS] Option to automatically generate icons and launch screens 2021-06-09 17:52:06 +02:00
Arthur Bikmullin
f3d931410b
Fixed missed IDHandler dependency in GodotFetch
(cherry picked from commit ee2bea7a86)
2021-06-08 10:20:35 +02:00
Marcel Admiraal
9cb878460f
Update Gradle archiveName and destinationDir properties
(cherry picked from commit 78e791045c)
2021-06-07 12:15:04 +02:00
Rémi Verschelde
80e1585a6e
Style: Cleanup uses of double spaces between words
Or after punctuation. Tried to leave third-party stuff alone, unless it has
been heavily modified for Godot.

(cherry picked from commit c1c76850cb)
2021-06-07 12:06:59 +02:00
Rémi Verschelde
87dfd6e6cb
Merge pull request #49276 from bruvzg/macos_export_notarization3
[3.x, macOS export] Add notarization support.
2021-06-03 13:25:13 +02:00
bruvzg
261b35d63c
[3.x, macOS export] Add notarization support. 2021-06-03 14:13:06 +03:00
Nathaniel Morihara
471c0ba700
Exporting: Android Debug Keystore Warnings
(cherry picked from commit 2cf19293ba)
2021-06-03 12:24:57 +02:00
bruvzg
683f96df35 Add separate simulator flag for iOS build, change main library to xcframework.
Build and export iOS Mono libs as `.xcframework`s, for Apple Silicon iOS simulator support.
2021-06-02 01:09:03 +02:00
Pedro J. Estébanez
0d7130f37c
Add iOS export option for device family
(cherry picked from commit 19ae8193ee)
2021-06-01 12:52:19 +02:00
Pedro J. Estébanez
857fd831c1
Set schemes' build config to debug/release in iOS Xcode export
(cherry picked from commit 1534b4e65e)
2021-06-01 12:52:19 +02:00
Rémi Verschelde
94b5a82e7d
Merge pull request #48943 from Calinou/screen-orientation-remove-ios-duplicate-3.x
Remove duplicate orientation settings in the iOS export preset
2021-05-26 00:24:17 +02:00
Hugo Locurcio
914b5dc525
Remove duplicate orientation settings in the iOS export preset
The screen orientation is now sourced from the Project Settings
like it is done for Android already.
2021-05-25 23:55:37 +02:00
Pedro J. Estébanez
76a4831cd3 Allow basic user data backup on Android 2021-05-25 17:47:19 +02:00
Rémi Verschelde
752ed768fa
Linux: Fix embree unbundling on aarch64
Embree supports aarch64 since version 3.13.0.
2021-05-24 21:10:43 +02:00
Rémi Verschelde
b94b09cd19
Merge pull request #46860 from bruvzg/symlinks_and_macos_gdn_framework_export 2021-05-24 15:15:10 +02:00
bruvzg
53f05c9167
Add GDNative Framework loading and export support. 2021-05-24 12:50:18 +03:00
bruvzg
31be8ae8e9
[macOS] Allow "on top" windows to enter full-screen mode. 2021-05-24 10:47:36 +03:00
bruvzg
df532ff45c
[UWP] Add missing get_scansym argument.
(cherry picked from commit 494c54b98c)
2021-05-22 18:35:16 +02:00
bruvzg
6aa8f7d85b
Add symlink API to the DirAccess (on macOS and Linux). 2021-05-22 17:36:16 +03:00
Rémi Verschelde
7cd5967e99
Merge pull request #48924 from akien-mga/3.x-cherrypicks
Cherry-picks for the 3.x branch (future 3.4) - 4th batch
2021-05-21 19:05:17 +02:00
Fabio Alessandrelli
bf078814cc [HTML5] Add easy to use download API.
New `JavaScript.download_buffer` method to create a prompt that let the
user download a file.
2021-05-21 16:03:38 +02:00
Hugo Locurcio
12236d2868
Only allow absolute paths in XDG environment variables
The XDG Base Directory specification does not allow using relative paths
(which broke things in Godot anyway). If a relative path is detected,
it should be ignored.

(cherry picked from commits 011a99316a
and 0e1d45b210)
2021-05-21 12:53:11 +02:00
Rémi Verschelde
f0fa8a103b
Merge pull request #48691 from Faless/js/3.x_interfaces
[HTML5] [3.x] Implement Godot <-> JavaScript interface.
2021-05-20 17:13:12 +02:00
Fabio Alessandrelli
730a894bcf [HTML5] Implement Godot <-> JavaScript interface. 2021-05-20 14:33:00 +02:00
Rémi Verschelde
eb78f80f03
Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2021-05-20 12:56:56 +02:00
Rémi Verschelde
be12a3dd96
Android: Remove -fno-integrated-as, it can break arm64v8 build
We found that this flag causes this error on PR #48812 which does not add any
fancy inline assembly:
```
/tmp/tile_set-ce236a.s: Assembler messages:
/tmp/tile_set-ce236a.s:34676: Error: selected processor does not support `bfc x0,#32,#32'
clang++: error: assembler command failed with exit code 1 (use -v to see invocation)
```

That flag is mentioned in various errors related to assembler failures on
arm64v8 with Clang from the Android NDK.

It was added in Godot in #6958 when migrating from GCC to Clang, and is indeed
referenced in the NDK's Clang migration guide:
https://android.googlesource.com/platform/ndk/+/master/docs/ClangMigration.md

> Especially for ARM and ARM64, Clang is much stricter about assembler rules
> than GCC/GAS. Use `-fno-integrated-as` if Clang reports errors in inline
> assembly or assembly files that you don't wish to modernize.

We don't get those errors nowadays so it seems the flag is no longer needed.

(cherry picked from commit 23f7c75126)
2021-05-19 19:48:36 +02:00
Fabio Alessandrelli
7d9d795af8
[HTML5] Fix GDNative compilation with emcc 2.0.19+
Add `WARN_ON_UNDEFINED_SYMBOLS=0` for the main module (which defines
`godot_js_main` as extern coming from the "side" module, i.e. the main
Godot binary).

(cherry picked from commit 14c057eab6)
2021-05-19 15:21:41 +02:00
Pedro J. Estébanez
817ffc01e1
Make all file access 64-bit (uint64_t)
This changes the types of a big number of variables.

General rules:
- Using `uint64_t` in general. We also considered `int64_t` but eventually
  settled on keeping it unsigned, which is also closer to what one would expect
  with `size_t`/`off_t`.
- We only keep `int64_t` for `seek_end` (takes a negative offset from the end)
  and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means
  we only need to guard against passing negative values in `core_bind.cpp`.
- Using `uint32_t` integers for concepts not needing such a huge range, like
  pages, blocks, etc.

In addition:
- Improve usage of integer types in some related places; namely, `DirAccess`,
  core binds.

Note:
- On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with
  version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for
  big files on 32-bit Windows builds made with that toolchain. We might add a
  workaround.

Fixes #44363.
Fixes godotengine/godot-proposals#400.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-05-16 17:52:31 +02:00
Rémi Verschelde
cb438028ee
CI: Update JavaScript linter deps with known security vulnerabilities
jsdoc has no new release so I'm tracking this PR:
https://github.com/jsdoc/jsdoc/pull/1906

(cherry picked from commit e743b6b24c)
2021-05-13 23:21:37 +02:00
Fabio Alessandrelli
6c1c2ed414
[HTML5] Fix target_fps when window loses focus.
We don't get updates when the window is unfocused/minimized, so we must
detect the situation where the counted ticks start drifting away
resulting in more frames drawn than needed.
This commit adds a check to ensure that the target ticks do not drift
away more than one second.

(cherry picked from commit a1fe6d6899)
2021-05-09 17:14:36 +02:00
Fabio Alessandrelli
23ef985bb8
[HTML5] Use 64KiB chunk size in JS HTTPClient.
For consistency with the native one, and the documentation.

(cherry picked from commit 6243835619)
2021-05-09 17:14:35 +02:00
Rémi Verschelde
e96f0ea1d7
Android: Remove non-functional native video OS methods
Those methods are only properly implemented for iOS.

Supersedes #43811.
2021-05-07 16:42:17 +02:00
Fabio Alessandrelli
8740e95f15
[HTML5] Add support for physical_keycode.
This uses the `event.code` value to retrieve the physical code, while
still using the extra logic to map the unicode value to our keylist,
when computing the `scancode` (supporting ASCII and Latin-1).
2021-05-06 23:19:46 +03:00
bruvzg
dab4cf3ed6
Add physical_scancode (keyboard layout independent keycodes) to InputEventKey and InputMap.
Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2021-05-06 23:19:45 +03:00
Rémi Verschelde
140350d767
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
Rémi Verschelde
a828398655
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
Rémi Verschelde
b5e1e05ef2
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
Rémi Verschelde
64a63e0861
Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde
3d15f04668
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde
6e600cb3f0
Style: Set clang-format Standard to c++14 2021-05-04 14:45:15 +02:00
Rémi Verschelde
7e61be3cb0
Style: Remove executable bit from non-runnable files 2021-05-04 14:45:07 +02:00
Sergey Minakov
f9535554fa
[iOS] Nonnegative start index for virtual keyboard range
(cherry picked from commit 275772818d)
2021-04-30 12:15:24 +02:00
Fabio Alessandrelli
b0f6dec02e [HTML5] Fix build for recent emscripten versions.
Library suffix should be `.a`, the `EXTRA_` in
`EXTRA_EXPORTED_RUNTIME_METHODS` is deprecated.
2021-04-30 08:02:21 +02:00
Rémi Verschelde
3f5c106e64
Merge pull request #48276 from thebestnom/cherrypick/allow-build-android-with-symbols 2021-04-29 21:15:42 +02:00
Rémi Verschelde
e94161dada
SCons: Add explicit dependencies on thirdparty code in cloned env
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.

So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).

This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.

(cherry picked from commit c7b53c03ae)
2021-04-29 16:57:00 +02:00
Rémi Verschelde
70ae90e0e8
Core: Drop custom copymem/zeromem defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.

Backport of #48239.
2021-04-29 12:34:11 +02:00