Commit graph

2586 commits

Author SHA1 Message Date
Alexander Holland
d2a5b7367b Fix double tap pressed event regression 2020-01-29 16:24:40 +01:00
Haoyu Qiu
df4ea84e03 Adds sanitizer options for macOS 2020-01-29 13:12:38 +08:00
Rémi Verschelde
68eae6b6e9 Fix some URLs to use HTTPS when available 2020-01-29 02:48:10 +01:00
Rémi Verschelde
096bf873bc
Merge pull request #35632 from godotengine/revert-32854-fix-wireless-adb-debugging
Revert "Fix Android deploy with Remote Debug or Network FS over Wi-Fi"
2020-01-27 21:13:37 +01:00
Rémi Verschelde
c317ac89bf
Revert "Fix Android deploy with Remote Debug or Network FS over Wi-Fi" 2020-01-27 19:59:24 +01:00
fhuya
9bd841b86d Address crash caused by missing dependency. 2020-01-27 10:45:25 -08:00
fhuya
e41caac7db Address crash caused by missing dependency. 2020-01-27 10:26:01 -08:00
Mark Wynn Garcia
141230192c Check if can export before exporting; show error message if can't export. 2020-01-26 11:45:17 +08:00
Rémi Verschelde
c2e07db071
Merge pull request #35438 from MadEqua/virtual-keyboard-line-edit
Android virtual keyboard respecting LineEdit max length.
2020-01-23 08:20:24 +01:00
Rémi Verschelde
c9cf6b102f
Merge pull request #35454 from Calinou/os-execute-default-blocking
Make `OS.execute()` blocking by default if not specified
2020-01-23 08:19:09 +01:00
Rémi Verschelde
05fc26de1c
Merge pull request #35444 from RandomShaper/fix_link_bsd
Fix error with linkers other than GNU ld
2020-01-23 07:57:02 +01:00
Bruno Lourenço
a3bcdbeb78 Android virtual keyboard respecting LineEdit max length. 2020-01-23 01:52:49 +00:00
Hugo Locurcio
90a1f8d8a7
Make OS.execute() blocking by default if not specified
This makes `OS.execute()` calls quicker to set up when calling programs
in a blocking fashion.
2020-01-23 01:26:32 +01:00
Pedro J. Estébanez
35dd36ca35 Fix error with linkers other than GNU ld 2020-01-22 22:38:08 +01:00
Eric Rybicki
67261b1e87 Remove buggy check if key was already released for accumulated input
Fixes #27104
2020-01-22 17:03:33 +01:00
Rémi Verschelde
b711c09bc8 Revert "Fix audio capture naming in Javascript"
This reverts commit 69f7263cd8.

Follow-up to #35359.
2020-01-20 21:35:19 +01:00
Rémi Verschelde
837adb30fd Revert "Exposes capture methods to AudioServer + documentation" #30468
Reverts the following commits:

- c81ec6f26d:
  "Exposes capture methods to AudioServer, variable renames for
  consistency, added documentation."
- 47c558b98a:
  "Expose audio callbacks as signals."
- dabaa11b3c:
  "Fix to make sure the capture buffers are deallocated at shutdown.
  Silences warnings."

Some documentation improvements were kept for pre-existing methods.

See rationale for reverting these changes in #30468.
2020-01-20 13:18:01 +01:00
Rémi Verschelde
adb6734b49 doc: Sync classref with current source 2020-01-19 23:19:29 +01:00
Ignacio Etcheverry
a6105c8ea0 Fix ClassDB API portability with some android and editor classes
- `EditorNavigationMeshGenerator` was being registered as part of the Core API,
even after d3f48f88bb. We must make sure to
set Editor as the current ClassDB API type before creating an instance.

- The `VisualScriptEngineSingleton.constant` property has a property hint string
that's different between tools and non-tools builds. This commit makes the
hint string to no longer be set in `_bind_methods`, and to instead set it in
`_validate_property`. This way it's ignored when calculating the API hash.

- `JavaClassWrapper` is now registered in ClassDB on all platforms,
using a dummy implementation on platforms other than Android.
This fixes API portability between Android and other platforms.

- Updated `--class-db-json` command to ignore non-virtual methods that start
with an underscore (see: 4be87c6016).
2020-01-19 20:15:13 +01:00
Hugo Locurcio
580b8cc012
Improve the console error logging appearance
This makes secondary information less visually prominent
to improve overall readability.

Various loggers were also tweaked for consistency.
2020-01-19 00:24:17 +01:00
Rémi Verschelde
b154bc8333
Merge pull request #35265 from zxcvdev/fix_crash_iphone_ios13
Fix iOS Crash on Application Exit
2020-01-18 15:23:38 +01:00
Rémi Verschelde
bc4ce44d77
Merge pull request #35256 from Faless/js/callback_target_fix
HTML5 callbacks rework.
2020-01-18 11:38:26 +01:00
zxcvdev
9a90ea1425 Fix crash when closing app on iphone 2020-01-18 09:54:07 +01:00
Fabio Alessandrelli
4a50f5ff65 HTML5 callbacks rework.
Fixes compatibility with emscripten 1.39.5+ .
Most input callbacks now require a target and no longer support NULL
defaults.

This commit changes all required null targets to the expected default in
the binding phase.
Since for canvas-related callbacks there is no default, the "#canvas"
selector is used instead.
Additionally, since canvasX and canvasY event properties are no longer
supported, event positions are computed from "clientX" and "clientY" and
the "#canvas" bounding client rect.
2020-01-17 21:42:36 +01:00
Rémi Verschelde
94a9cdb3b0
Merge pull request #35235 from akien-mga/android-launcher-icons-properties
Android: Improve name of icon export properties
2020-01-17 19:57:24 +01:00
Rémi Verschelde
435f86cf87 HTML5: Address removal of 'timestamp' in Emscripten 1.39.5
It was removed as noted in the changelog:
https://github.com/emscripten-core/emscripten/blob/1.39.5/ChangeLog.md#v1395-12202019

> Removed `timestamp` field from mouse, wheel, devicemotion and
> deviceorientation events. The presence of a `timestamp` on these
> events was slightly arbitrary, and populating this field caused
> a small profileable overhead that all users might not care about.
> It is easy to get a timestamp of an event by calling
> `emscripten_get_now()` or `emscripten_performance_now()` inside
> the event handler function of any event.

Fixes #34648.
2020-01-17 14:10:52 +01:00
Rémi Verschelde
7c97bd87d5 Android: Improve name of icon export properties
This seems more readable and still includes the required dimensions.
2020-01-17 13:06:32 +01:00
Rémi Verschelde
6b64c60b0e
Merge pull request #35209 from RandomShaper/fix_pck_embed_linux
Fix error exporting to X11 with embedded PCK
2020-01-16 18:45:20 +01:00
Pedro J. Estébanez
4eeae59293 Fix error exporting to X11 with embedded PCK
Fixes #32513.
2020-01-16 17:47:37 +01:00
Rémi Verschelde
e33914e0c1 MinGW: Avoid GCC -Wcast-function-type warnings on GetProcAddress
Using the same method as GNUlib and various other projects.
https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00109.html

The warning is valid, but there's no way around it since the issue
comes from the Windows SDK. It's also harmless in this case.

Part of #29801.
2020-01-16 12:10:25 +01:00
hoontee
c08d8feead
Fix Vsync Via Compositor causing halved refresh rate when vsync is forced by the graphics driver
Add check to prevent compositor sync if the graphics driver is forcing vsync.

Fixes #35038.

(Addendum: this PR does not negatively impact users unaffected by #35038.)
2020-01-15 16:04:23 -06:00
Fabio Alessandrelli
562bc1941d
Merge pull request #35126 from Faless/fix/ip_unix_warnings
Remove unused ip_unix member from OSX/server.
2020-01-14 19:07:55 +01:00
Rémi Verschelde
16860e90f1
Merge pull request #35124 from Faless/js/http_server_fix
Properly close files served by debug HTTP server.
2020-01-14 18:38:16 +01:00
Fabio Alessandrelli
417c54b871 Remove unused ip_unix member from OSX/server. 2020-01-14 17:33:49 +01:00
Bruno Lourenço
abe83a1c84 Add support for Android adaptive icons. 2020-01-14 16:11:07 +00:00
Fabio Alessandrelli
14a58560e1 Properly close files served by debug HTTP server. 2020-01-14 17:07:06 +01:00
Fabio Alessandrelli
1798496ea7 Add mime type to responses from debug HTTP server.
Get rid of warnings in firefox mentioning performance loss when no mime
type is given for wasm files.
2020-01-14 17:07:06 +01:00
Haoyu Qiu
bda9145aae Fixes IME input backspace on macOS 2020-01-14 19:41:42 +08:00
Rémi Verschelde
c7b701dfd2 Image: Include S3TC compression via Squish in non-tools build
We already build Squish in templates build for S3TC decompression,
so we can as well expose the compression feature.

Fixes #25640.
2020-01-13 15:58:49 +01:00
Alexander Holland
dd2fd4e853 fixes android double tap regression 2020-01-13 12:46:33 +01:00
Rémi Verschelde
656d88fac0
Merge pull request #34977 from m4gr3d/export_hand_tracking_option
Add support for generating a Oculus Mobile VR apk with hand tracking support
2020-01-10 23:54:55 +01:00
bruvzg
2d22b6e5c3
[macOS/Mono] Filter release/debug and rename Mono data folder on export. 2020-01-10 20:08:01 +02:00
fhuya
5b9631563c Add support for generating a Oculus Mobile VR apk with hand tracking support. 2020-01-10 09:51:14 -08:00
bruvzg
d07cdc594f
[macOS] Load PCK from the .app bundle resources, instead of changing working directory. 2020-01-10 18:02:29 +02:00
Rémi Verschelde
60289beecc
Merge pull request #33630 from AlexHolly/android-doubleTap
Fixes Android FileDialog
2020-01-10 15:46:20 +01:00
Alexander Holland
b1b308411a Fixes Android FileDialog
- Go up was not working, simplify was used one time too much
- Added GestureHandler
  - Added doubleTap to recognize open dir
  - Fixed scroll where sometimes the scroll jumped between start and end when pointer was outside or on the edge of the scroll area
2020-01-10 15:25:08 +01:00
Rémi Verschelde
3f8c93dffe Fix warning in Linux crash handler on 32-bit 2020-01-10 14:28:21 +01:00
bruvzg
9abde1626f
macOS DMG export: create folder structure for the files extracted from export template ZIP. 2020-01-10 12:28:32 +02:00
Bruno Lourenço
90b49e8888 Fix Android exporter manifest creation. 2020-01-09 20:46:06 +00:00
Rémi Verschelde
5011afcb6a Export: Improve usability of command line interface
I'm barely scratching the surface of the changes needed to make the
--export command line interface easy to use, but this should already
improve things somewhat.

- Streamline `can_export()` templates check in all platforms, checking
  first for the presence of official templates, then of any defined
  custom template, and reporting on the absence of any.
  Shouldn't change the actual return value much which is still true if
  either release or debug is usable - we might want to change that
  eventually and better validate against the requested target.

- Fix discrepancy between platforms using `custom_package/debug` and
  `custom_template/debug` (resp. `release`).
  All now use `custom_template`, which will break compatibility for
  `export_presets.cfg` with earlier projects (but is easy to fix).

- Use `can_export()` when attempting a command line export and report
  the same errors that would be shown in the editor.

- Improve error reporting after a failed export attempt, handling
  missing template and invalid path more gracefully.

- Cleanup of unused stuff in EditorNode around the export workflow.

- Improve --export documentation in --help a bit.

Fixes #16949 (at least many of the misunderstandings listed there).
Fixes #18470.
2020-01-07 14:25:56 +01:00
Joost Heitbrink
dc61323b2c PCK: Set VERSION_PATCH in header, factor out header magic
Unify pack file version and magic to avoid hardcoded literals.

`version.py` now always includes `patch` even for the first release in
a new stable branch (e.g. 3.2). The public name stays without the patch
number, but `Engine.get_version_info()` already included `patch == 0`,
and we can remove some extra handling of undefined `VERSION_PATCH` this
way.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-01-06 13:13:17 +01:00
Rémi Verschelde
8454804972
Merge pull request #33967 from Calinou/add-os-is-window-focused
Add an `OS.is_window_focused()` getter
2020-01-06 11:39:18 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
fhuya
50ab6decfe Replace the android.defaultConfig.applicationId in build.gradle with the package/unique_name. 2019-12-30 10:33:48 -05:00
Haoyu Qiu
078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Rémi Verschelde
8938577459 i18n: Sync translations with Weblate + update template
Also fix a few stray clang-format formatting errors that passed
through CI unnoticed.
2019-12-22 13:27:02 +01:00
Fabio Alessandrelli
ca19a3fe9a Fix crash on Android with no manifest permissions.
API allows for null array of permissions. It is now normalized with an
empty array.
2019-12-17 14:46:04 +01:00
Rémi Verschelde
d3a07d3550
Merge pull request #33910 from Faless/net/android_mlock
Acquire MulticastLock on Android when using broadcast/multicast
2019-12-14 21:53:08 +01:00
Fabio Alessandrelli
04c917899f Add Android NetSocket implementation.
Automatically acquire and release multicast lock when needed.
2019-12-14 18:10:36 +01:00
Fabio Alessandrelli
fafda80a4b Add GodotNetUtils Java class for Android.
Provides access to a MulticastLock.
As specified by the Android API, broadcast/multicast packets may be
filtered on some phones unless the application explicitly acquires
a "MulticastLock".
2019-12-14 18:10:36 +01:00
Rémi Verschelde
3a9284b562
Merge pull request #34338 from Catchawink/master
Fixed an issue with capturing audio from microphones in macOS.
2019-12-14 09:54:12 +01:00
Catchawink
5152afa70c Added microphone and camera usage descriptions to macOS builds. 2019-12-13 19:15:50 -05:00
Jonas Bernemann
41c3c77e80 Change bundle name rules on iOS to match Apple's requirements
Changed the bundle identifier verification to match the official
verficiation.
https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleidentifier

This help developers to migrate existing games to godot without
constantly having to change the bundle identifier in the generated
XCode project.
2019-12-14 00:03:30 +01:00
Rémi Verschelde
cf3a863fa9
Merge pull request #34229 from NoFr1ends/fix-home-indicator-ios
Allow to change the home indicator behaviour on iOS
2019-12-13 14:00:14 +01:00
Jonas Bernemann
4d61118f64 Add project setting to hide home indicator on iOS
On iOS devices without a physical home button iOS
shows a home indicator instead. This is often in the
way of the UI or the game.
Added a project setting to disable hidden home indicator.
The default value is to hide the home indicator
2019-12-13 11:00:18 +01:00
Rémi Verschelde
c320a82213 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>
2019-12-11 15:40:28 +01:00
bruvzg
29ba673fca
[macOS] Send resize event without actually resizing window on backing change.
Co-authored-by: Haoyu Qiu <timothyqiu32@gmail.com>
2019-12-08 18:29:31 +02:00
bruvzg
509064de0f
[iOS] Adds export options to automatically generate iOS icons and launch screens from the project icon and boot splash. 2019-12-06 12:30:52 +02:00
Rémi Verschelde
4a56b45f87 iOS: Disable armv7 as target arch by default
We no longer compile for armv7 and x86 in the official export templates,
as those architectures are no longer relevant for iOS.

If users really want to support armv7 (used on devices from before
September 2013, e.g. iPhone 5), they can still build their own templates
and toggle the option.

We might remove the option altogether in a later release to avoid the
confusion for users that might tick the checkbox without having compiled
their own templates.

Fixes #34135.
2019-12-06 09:16:42 +01:00
TerminalJack
e1dda5195c Added support for vertical syncing via the Windows OS compositor (DWM.) 2019-12-04 11:14:21 +01:00
Rémi Verschelde
65f5ef9a42
Merge pull request #34079 from KoBeWi/rcexport
Don't stop export if rcedit path is invalid
2019-12-03 17:23:25 +01:00
Tomasz Chabora
ef21d378f3 Don't stop export if rcedit path is invalid 2019-12-03 13:42:24 +01:00
Rémi Verschelde
6d6280dfa3 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.
2019-12-03 13:33:35 +01:00
bruvzg
ccf8778e86
[iOS] Add export options to control external access to user data. 2019-12-03 12:06:54 +02:00
bruvzg
2ef8c5fac5
iOS modular build and export implementation. 2019-12-01 21:57:18 +02:00
Hugo Locurcio
21a3923410
Add an OS.is_window_focused() getter
This makes it possible to know whether the window is focused
at a given time, without having to track the focus state manually
using `NOTIFICATION_WM_FOCUS_IN` and `NOTIFICATION_WM_FOCUS_OUT`.

This partially addresses #33928.
2019-11-28 16:42:51 +01:00
Rémi Verschelde
0e6e64c9e9
Merge pull request #32854 from cooperra/fix-wireless-adb-debugging
Fix Android deploy with Remote Debug or Network FS over Wi-Fi
2019-11-28 10:02:55 +01:00
Rémi Verschelde
e297b83b8e
Merge pull request #33883 from bruvzg/mac_locale
[macOS] Fix locale detection.
2019-11-25 16:09:12 +01:00
George Marques
5d7c13dcbb
Fix inverted value check in UWP export packager 2019-11-25 11:22:52 -03:00
bruvzg
c8bf0ee062
[macOS] Fix locale detection. 2019-11-25 15:55:17 +02:00
Rémi Verschelde
967cc2c014
Merge pull request #33862 from Faless/net/http_request_chunk_size
Add download_chunk_size property to HTTPRequest.
2019-11-25 14:29:59 +01:00
Fabio Alessandrelli
ed19b4076e Add download_chunk_size property to HTTPRequest.
This allows setting the `read_chunk_size` of the internal HTTPClient.
This is important to reduce the allocation overhead and number of file
writes when downloading large files, allowing for better download speed.
2019-11-24 19:32:20 +01:00
Rémi Verschelde
c41c24562d Style: Add missing copyright headers 2019-11-22 08:37:09 +01:00
Rémi Verschelde
ab3bccdb78 Fix typos with codespell
Using codespell 1.16.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
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
```
2019-11-22 08:35:03 +01:00
bruvzg
e423e1c663
[macOS] Remove CVDisplayLink v-sync hack. 2019-11-21 11:01:47 +02:00
Rémi Verschelde
02913f53d3 pcre2: Use scons option to disable JIT on some platforms
Third-party platforms (e.g. console ports) need to be able to
disable JIT support in the regex module too, so it can't be
hardcoded in the module SCsub. This is cleaner this way anyway.

Fixes #19316.
2019-11-20 08:54:52 +01:00
Rémi Verschelde
e5dfcb5edd 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.
2019-11-19 09:45:43 +01:00
Rémi Verschelde
e9e2a4b044 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.
2019-11-15 09:39:19 +01:00
Rémi Verschelde
8d7de9a9e9
Merge pull request #33536 from akien-mga/revert-25474-android-gestures
Revert "Android : implement InputEventMagnifyGesture and InputEventPanGesture"
2019-11-13 11:14:09 +01:00
Rémi Verschelde
d191ffb47d X11: Fix memory leak in handle_key_event
Extracted from #27189.
2019-11-12 07:51:51 +01:00
Rémi Verschelde
5c038acdc1
Merge pull request #33482 from piratesephiroth/master
Set ShellExecuteW's verb to NULL - fixes #33388
2019-11-11 13:27:09 +01:00
Rémi Verschelde
6cd3c921f1 Revert "Android : implement InputEventMagnifyGesture and InputEventPanGesture"
This reverts commit 9cc66495cf.

This caused regressions with the handling of screen drag events.

Fixes #33428.
Fixes #33459.
Fixes #33470.
2019-11-11 08:29:58 +01:00
piratesephiroth
a0fd450415 [UWP] [Export] added additional checks for blank values
`Short Name` and `Publisher Display Name` are mandatory.
You can't even sign the app package without them in the manifest.
2019-11-09 10:37:10 -03:00
piratesephiroth
778b421973
Set ShellExecuteW's verb to NULL - fixes #33388
from https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutew

>the default verb is used, if available. If not, the "open" verb is used. If neither verb is available, the system uses the first verb listed in the registry.

so "open" is redundant at best
2019-11-09 07:59:15 -03:00
bruvzg
1c8d3ab94f
Fix graphic tablet input coordinates on Windows. 2019-11-07 14:12:15 +02:00
Max
29bde8cd74 Fix crash on exit or resume on iOS 13
Fixes #7966.
2019-11-05 10:28:42 +01:00
Jérémy Zurcher
9cc66495cf Android : implement InputEventMagnifyGesture and InputEventPanGesture
sets threshold constants PAN_GESTURE_MIN_DELTA and MAGNIFY_GESTURE_MIN_FACTOR
2019-11-02 11:17:22 +01:00
bruvzg
f675621725
[macOS, Windows, X11] Add graphic tablet pen pressure and tilt support to InputEventMouseMotion event. 2019-10-30 14:42:21 +02:00
PouleyKetchoupp
2f511ff758 Update natvis file to display Node class correctly in Visual Studio debugger 2019-10-29 10:24:29 +01:00
Yuri Roubinsky
034625ed93 Fix invalid window border when toggled from fullscreen to windowed mode 2019-10-27 18:44:47 +03:00