Commit graph

2739 commits

Author SHA1 Message Date
Haoyu Qiu
0d8b3efeb7 Adds extra cursors for macOS
Before, plain arrow cursor or unsuitable ones were used.

(cherry picked from commit 8f881847c0)
2020-02-06 13:02:08 +01:00
Haoyu Qiu
3388b7f4c7 Adds sanitizer options for macOS
(cherry picked from commit df4ea84e03)
2020-02-06 13:02:08 +01:00
Hugo Locurcio
611cc11536 Only emit the JavaScript support code for Web when building for HTML5
Excluding other unused environments like Node.js makes the support code
about 4 KB smaller.

(cherry picked from commit e818b51f32)
2020-02-06 13:02:08 +01:00
D00T24
3317f7640e fixed godot not recognising 150x150 icon for uwp export
(cherry picked from commit 88bd3227ac)
2020-02-06 13:02:07 +01:00
Yuri Roubinsky
e8474435e5 Restores correct window position after fullscreen toggling off on Linux
(cherry picked from commit 90f00c0813)
2020-02-06 13:02:07 +01:00
Yuri Roubinsky
8c689f7d4a Fix restoring window from fullscreen to normal on Linux
(cherry picked from commit 8737269275)
2020-02-06 13:02:07 +01:00
PouleyKetchoupp
b2ac2b6201 Fixed LineEdit virtual keyboard inputs on Android
Changed the condition to add a length filter to make it consistent with the documentation (0 means no character limit). Otherwise the default value in LineEdit causes the virtual keyboard to be non-fonctional on Android.

(cherry picked from commit 196860508a)
2020-02-06 13:02:07 +01: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
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
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
Joe Sweeney
d66dcc86f9 Allow use of relative and speed properties for InputEventScreenDrag on WIndows 2019-10-26 15:55:46 -06:00
Yeongho Kim
c8c8f1b8a4 Specify MINGW_HAS_SECURE_API=1 2019-10-25 20:03:53 +09:00
Rémi Verschelde
86abf62e48
Merge pull request #32326 from starryalley/ios_get_model_name
ios: support get_model_name
2019-10-25 07:41:28 +02:00
Rémi Verschelde
68a54803c2
Merge pull request #33035 from bruvzg/macos_fix_warnings
Fix compilation warnings in macOS build, enable `warnings=extra werror=yes`
2019-10-24 20:57:38 +02:00
bruvzg
7b64340eb0
Fix compilation warnings in macOS build, enable warnings=extra werror=yes for macOS CI. 2019-10-24 20:37:56 +03:00
Fabio Alessandrelli
9d13a37b81 Remove ECMAScript 6 "arrow operator".
We don't need it, it's not well supported by compilers, and it was a
mistake in the first place.
2019-10-24 16:46:31 +02:00
Fabio Alessandrelli
ab1e809426 Implement HTTP server for HTML5 export
Since most browsers no longer allow making async requests from a page
loaded from `file://`, we now need a proper HTTP server to load the
exported HTML5 game.
This should also allow us to get the debugger to work over a WebSocket
connection.
2019-10-23 10:59:03 +02:00
Fabio Alessandrelli
53637e4b1c Improve EditorExportPlatform interface.
Convert all get_device* methods to get_option* and normalize their usage
as icon, label, tooltip.
2019-10-23 10:59:03 +02:00
Cagdas
0088385556 Add request permission automatically at android 2019-10-22 22:52:13 +03:00
Rémi Verschelde
a1c890a9e5
Merge pull request #32977 from bruvzg/mingw_clang
Add "llvm/thinlto" options to the MinGW build.
2019-10-22 19:45:41 +02:00
Rémi Verschelde
acd5c7e767
Merge pull request #32858 from m4gr3d/expand_singleton_base_api
Add `View SingletonBase#onMainCreateView(Activity activity)` api
2019-10-22 13:52:39 +02:00
bruvzg
ec30cf0d20
Add "llvm/thinlto" options to MinGW build. 2019-10-22 12:53:41 +03:00
Fredia Huya-Kouadio
4407350608 Add View onMainCreateView(Activity activity) api to the Godot.SingletonBase class.
The new api allows plugins to define and provide their views for inclusion in the Godot Android view hierarchy.
2019-10-18 10:05:53 -07:00
bruvzg
d8c2e6a31a
[macOS] Fix non-ASCII volume name listing, replace deprecated volume listing API. Remove hidden mount points from the volume list. 2019-10-18 15:36:29 +03:00
Robbie Cooper
37e6a8f901 Add connection information and serial number to device description
The description appears when hovering over the one-click-deploy button (top-right). This information helps the user distinguish between their devices if multiple are connected or if the same device is connected by both usb and tcpip (two entries in the list for the same device).
2019-10-15 16:58:26 -04:00
Robbie Cooper
f3fdfefa09 Detect adb connection type and debug over Wi-Fi if needed
Avoid using adb reverse if deploying with adb tcpip.

This still can fail if the user is attempting to debug over usb and has connected their device over BOTH usb and tcpip. I'm not sure how we would detect that problem in advance though.
2019-10-15 16:47:14 -04:00
Rémi Verschelde
1fed266bf5
Merge pull request #32809 from bruvzg/macos_1015_non_hidpi_fix
Fix non-HiDPI mode on HiDPI displays on macOS Catalina.
2019-10-13 22:48:05 +02:00
bruvzg
509afcea92
Fix non-HiDPI mode on HiDPI displays on macOS Catalina. 2019-10-13 23:15:20 +03:00
Hugo Locurcio
c8a8be6dd1
Optimize images losslessly using oxipng -o6 --strip all --zopfli 2019-10-12 23:23:33 +02:00
bruvzg
2a76fba1f6
Fix X11 modifier keys. 2019-10-12 00:09:14 +03:00
fhuya
d0f8ef7646 Cleanup fix for the meta-data parsing crashing bug. 2019-10-11 11:12:53 -07:00
Rémi Verschelde
82141729d2 Android: Work around crash in _fix_manifest
Works around #32553, not fixing the underlying cause but
preventing the crash.
2019-10-11 09:03:21 +02:00
Marcel Admiraal
a8836ba28d Remove dependency on the editor directory being in the build's include path.
- Add or remove the necessary subdirectorires to the includes to remove
dependency on the editor directory being in the build's include path.
- Ensure includes in modified files conform to style guideline.
- Remove editor from the build include path.
2019-10-10 08:57:00 +02:00
Rémi Verschelde
abd81dcb73
Merge pull request #32556 from bruvzg/win_codesign
Code signing support for Windows exports
2019-10-08 16:17:24 +02:00
Alexander Holland
db582a2c8c Adds Pen support for Android 2019-10-04 23:57:01 +02:00
bruvzg
1c592e5f1f
Add code signing support for Windows exports (using "signtool" on Windows and "osslsigncode" on the other platforms) 2019-10-04 22:33:03 +03:00
Rémi Verschelde
9a115ccaf3
Merge pull request #32518 from nekomatata/fix-revert-cursor
Properly revert cursor when using set_custom_mouse_cursor with null
2019-10-03 13:39:25 +02:00
PouleyKetchoupp
5bfe32eaa4 Properly revert cursor when using set_custom_mouse_cursor with null
Fixes #32486
2019-10-03 13:02:11 +02:00
Rémi Verschelde
77b1214a9a
Merge pull request #32514 from akien-mga/android-one-click-dont-uninstall
Android one-click deploy: Don't clear by default
2019-10-03 12:33:51 +02:00
Rémi Verschelde
0c7b3fff44 Android: Fix manifest parsing and APK names in export code
A better fix would be to make Godot's export code properly parse the
tag over multiple lines (and maybe even use XMLParser instead of doing
it ad-hoc?).

As for the APK names, we could alternatively pick the first .apk found
in the `debug` and `release` folders without expecting a specific name.

Fixes #32414.
2019-10-03 12:13:45 +02:00
Rémi Verschelde
9d96f04138 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.
2019-10-03 10:43:59 +02:00
bruvzg
5dca2e4f38
macOS code signing improvements (timestamp and hardened runtime options, entitlements property hint, remove excessive codesign calls, suppress "file not found" error on first export) 2019-10-02 21:00:16 +03:00
Relintai
6f1d6cfc78 Fixed running the export templates with newer emscripten versions. 2019-10-01 15:41:19 +02:00
Rémi Verschelde
dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Mark Kuo
bba9d9123c ios: support get_model_name 2019-09-25 12:35:45 +10:00
Rémi Verschelde
2b628e5d5b
Merge pull request #32269 from m4gr3d/improve_build_time
Update the Godot gradle build tasks to provide additional flexibility
2019-09-24 16:29:34 +02:00
fhuya
ef143447ad Updates the Godot gradle tasks to enable manual runs of the scons command.
Example: To generate for the `release` build target and for the `armv7`, `arm64v8` and `x86` architectures, run the commands:
```
cd godot
scons -j4 platform=android target=release android_arch=armv7
scons -j4 platform=android target=release android_arch=arm64v8
scons -j4 platform=android target=release android_arch=x86
cd platform/android/java
./gradlew generateGodotTemplates
```

Notes:
- The generated build templates will be located in the `godot/bin` directory (i.e: `android_debug.apk`, `android_release.apk`, `android_source.zip`).
- The gradle command will only generate templates for the target(s) with available native shared libraries. For example, running the commands above will only generate the `android_release.apk` and `android_source.zip` files.

To delete the generated artifacts, the following commands can be used:
```
cd platform/android/java
./gradlew cleanGodotTemplates
```
2019-09-24 06:18:21 -07:00
Rémi Verschelde
823c3def72 Fix copyright headers and style issues 2019-09-24 11:52:06 +02:00
Rémi Verschelde
1ecdd5b5cc
Merge pull request #32194 from AlexRixhardson/fix-7945
Fixes crash described in issue 7945 (Duplicated [self drawView] in iphone gl_view)
2019-09-24 09:17:54 +02:00
Rémi Verschelde
ce384f885c
Merge pull request #32250 from lawnjelly/android-keyboard2
Fix Android keyboard crash with left cursor
2019-09-23 22:09:09 +02:00
lawnjelly
ad5d0cca4d Fix Android keyboard crash with left cursor
Fixes #32168.
Previously we were returning all key up and key down messages as unhandled to the OS. This was resulting in crashes on certain keypresses (left cursor), for undetermined reason.

This PR defaults all key up and keydown messages to be returned as handled by Godot, except those explicitly coded as exceptions (currently volume keys only).
2019-09-23 18:08:41 +01:00
Rémi Verschelde
393a0152ea
Merge pull request #32055 from qarmin/some_code_fixes
Changed some code found by Clang Tidy and Coverity
2019-09-23 10:00:31 +02:00
qarmin
50be65bf43 Changed some code found by Clang Tidy and Coverity 2019-09-22 18:45:08 +02:00
Cagdas
ef5d1ebc95 Fix starting intent problem 2019-09-22 15:02:10 +03:00
Rémi Verschelde
2e065d8ad0
Merge pull request #32064 from m4gr3d/propagate_gl_surface_events
Notify for app pause and resume events on Android
2019-09-20 23:18:40 +02:00
Rémi Verschelde
42af54ff75
Merge pull request #32087 from karroffel/x11-pid
[X11] set PID as window attribute
2019-09-20 23:18:17 +02:00
Rémi Verschelde
25a1bfed5c
Merge pull request #32210 from Calinou/editor-log-distinguish-messages
Distinguish editor-originating messages in the editor log
2019-09-20 20:22:43 +02:00
Rémi Verschelde
fdc2463a1b
Merge pull request #32150 from luzpaz/typos
Fix misc. source comment typos
2019-09-20 17:09:05 +02:00
Hugo Locurcio
ba566dff2e
Distinguish editor-originating messages in the editor log
This fades out messages originating from the editor to make messages
printed by the project stand out more.

This also tweaks wording in some editor messages for consistency.
2019-09-20 01:59:02 +02:00
fhuya
a7712cc9e4 Add new events and accompanying logic to notify when the app is paused and resumed on Android devices. 2019-09-19 13:29:49 -07:00
luz.paz
91ecd7b6a6 Fix misc. source comment typos
Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
2019-09-19 14:36:52 -04:00
AlexRixhardson
973a4fe50f Fix crash on iOS devices during rotate 2019-09-18 22:50:16 +02:00
thomas.herzog
4553935f27 [X11] set PID as window attribute
This allows other programs to find out the PID of a Godot instance just
by the X11 window ID.
2019-09-11 10:13:48 +02:00
fhuya
7fabfd402f Split the Android platform java logic into an Android library module (lib) and an application module (app).
The application module `app` serves double duties of providing the prebuilt Godot binaries ('android_debug.apk', 'android_release.apk') and the Godot custom build template ('android_source.zip').
2019-09-04 16:20:22 -07:00
Rémi Verschelde
b1f294b3ac Android: Improve dialogs about custom build template
The language didn't make it clear that it's installing a *source* template
to the project folder, for later use when compiling custom APKs.

Fixes #28736.
2019-08-29 13:22:20 +02:00
Rémi Verschelde
b948b38840 SCons: Generate android_source.zip during build
This is now needed after #27781, as this android_source.zip template
is used for custom Android builds from the editor.
2019-08-29 13:22:17 +02:00
bruvzg
bd63d3e1ec
Fix modifier keys causing key-code mismatch on Linux/X11. 2019-08-28 13:27:13 +03:00
Rémi Verschelde
f38c64e8b1
Merge pull request #31709 from akien-mga/android-fix-thirdparty
Android: Fix another regression with Secure.ANDROID_ID, and fix formatting and documentation of thirdparty code
2019-08-27 20:16:08 +02:00
Rémi Verschelde
b7c46ed929
Merge pull request #31713 from volzhs/fix-vibrate
Suppress MissingPermission warning for Android vibration
2019-08-27 17:42:32 +02:00
Rémi Verschelde
eb8d181cb2 Android: Sync Google billing library with upstream, unmodified
Synced with 7a94c6905a.
2019-08-27 15:15:37 +02:00
volzhs
8cda898fbb 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:01:45 +09:00
Rémi Verschelde
472d10a0ad Android: Reapply custom changes to Google expansion.downloader lib
I don't know why they're needed, but readding for now to keep things
working as they were.
2019-08-27 14:30:14 +02:00
Rémi Verschelde
ee5898f58a Android: Resync Google expansion.downloader library with upstream, unmodified
Synced with 9ecf54e5ce.
2019-08-27 14:10:31 +02:00
Rémi Verschelde
ce60217894 Android: Reapply changes to Google licensing lib from #24145
But document them better this time.
2019-08-27 14:10:30 +02:00
Rémi Verschelde
6f0367052a Android: Resync Google licensing lib with upstream, unmodified
It had been synced with style changes (spaces -> tabs), not sure why
I accepted to merge it this way back then...

Synced with eb57657f66,
same as before.

Custom-changes will be reapplied in the next commit, if relevant.
2019-08-27 13:44:16 +02:00
Rémi Verschelde
071ebb1e48 Android: Fix another regression with Secure.ANDROID_ID
Regression from #24145, which was missed in #28146.
2019-08-27 13:44:07 +02:00
Rémi Verschelde
04ac6a43a4 Android: Style fixes to manifest and build.gradle 2019-08-27 11:16:55 +02:00
Rémi Verschelde
1afd77e375 Android: Bump gradle version to 5.1.1
Matching changes made in #31521 and #31547 but only in the Jetbrains
IDE config.
2019-08-27 10:22:05 +02:00
Rémi Verschelde
91cfe7a227
Merge pull request #31691 from m4gr3d/fix_oculus_mobile_input_mapping
Update the fallback input mapping for the Oculus mobile devices.
2019-08-27 08:16:19 +02:00
fhuya
5eaaabceaf Update the fallback input mapping for the Oculus mobile devices. 2019-08-26 18:48:54 -07:00
bruvzg
db6d4352ea
[macOS] Add methods to modify global and dock menus. Add ability to open multiple editor/project manager instances, recent/favourite project list to project manager dock menu and opened scene list to editor dock menu. 2019-08-26 16:45:49 +03:00
fogine
e0df9de0cb 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
2019-08-21 22:22:18 +02:00
Rémi Verschelde
1a4dbd9ee2
Merge pull request #31437 from volzhs/vibrate-mobile
Support vibration for Android and iOS
2019-08-21 21:10:22 +02:00
Rémi Verschelde
99980d856b
Merge pull request #29871 from Faless/crypto/initial_pr
More Crypto, SSL server, crt/key as Resource, HashingContext
2019-08-21 18:03:03 +02:00
volzhs
4061e5bb75 Support vibration for Android and iOS 2019-08-21 23:38:53 +09:00
fhuya
f35b1f3b91 Shut down Godot processes on app exit. 2019-08-20 22:35:46 -07:00
Fabio Alessandrelli
c19871af6d Move CryptoCore to it's own folder.
Crypto classes will be placed in core/crypto.
2019-08-19 16:31:05 +02:00
Rémi Verschelde
6c607c3564
Merge pull request #31266 from IAmActuallyCthulhu/pr/remove-redundant-author-comments
Remove redundant author doc comments
2019-08-14 13:45:54 +02:00
Rémi Verschelde
5f1dce4354
Merge pull request #31336 from Calinou/scons-libs-use-lists
Always use lists for `LIBS` in SCons
2019-08-13 12:32:57 +02:00
Hugo Locurcio
05daf5c78b
Always use lists for LIBS in SCons
This closes #31288.
2019-08-12 22:31:55 +02:00
mellondill
3c176827d6 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
2019-08-12 21:59:27 +03:00
Rémi Verschelde
37a16fee05 Export: Remove temp files from cache after export
So far we left most temporary files lying around, so this attempts to
fix that.

I added a helper method to DirAccess to factor out the boilerplate of
creating a DirAccess, checking if the file exists, remove it or print
an error on failure.
2019-08-12 13:31:59 +02:00
IAmActuallyCthulhu
82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
Carl Drougge
deb73001ab 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.
2019-08-10 21:29:45 +02:00
Saracen
69f7263cd8 Fix audio capture naming in Javascript 2019-08-09 23:22:30 +01:00
Robin Hübner
7d0c8a9041 fix usage of old macro when new variant intended 2019-08-09 13:10:06 +02:00
Robin Hübner
6ab118c464 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories. 2019-08-09 11:13:24 +02:00
Cameron Reikes
62ed44d75f Add feature tag for hmd devices based on DOF
- Necessary according to https://developers.google.com/vr/develop/android/3dof-to-6dof
2019-08-07 16:41:49 -07:00
Rémi Verschelde
af935af38d
Merge pull request #30468 from SaracenOne/expose_audio_capture
Exposes capture methods to AudioServer + documentation
2019-08-07 13:27:25 +02:00
Rémi Verschelde
1f2bcb8f02
Merge pull request #31174 from qarmin/thread_sanitizer
Added Thread Sanitizer
2019-08-07 13:21:33 +02:00
qarmin
14c16d6851 Added Thread Sanitizer 2019-08-07 12:01:14 +02:00
Tan Wang Leng
b12240a199 Fix wrong mouse wheel position for MOUSE_MODE_CAPTURED on Windows
WM_MOUSEWHEEL and WM_MOUSEHWHEEL report mouse coordinates relative to
the screen (see lParam in [1]), rather than to the window like the rest
of the mouse events.

The current code already makes adjustments to take that into account.

However, it only makes the adjustments if the mouse is not captured, and
the coordinates are always relative to the screen regardless of whether
the mouse is captured or not, so let's fix the code to always
consistently apply the adjustments.

This fixes #29559.

[1] - https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mousewheel
2019-08-05 22:10:30 +08:00
Rémi Verschelde
875075cd65
Merge pull request #30961 from Calinou/window-size-error
Turn `OS.set_min/max_window_size()` warnings into errors
2019-07-30 20:03:49 +02:00
Rémi Verschelde
2da1614beb 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
2019-07-30 18:53:38 +02:00
Rémi Verschelde
d6ef5daf48 Android: Drop support for NDK < r15
NDK r15c was released over two years ago (July 2017), and we
cannot build against r14b anyway as it seems to fail with our
setup to link the STL.
2019-07-30 15:49:31 +02:00
Hugo Locurcio
7de2c70e11
Turn OS.set_min/max_window_size() warnings into errors
Since invalid values will cause the setting to be discarded,
it makes more sense to display an error message instead of a
warning message.
2019-07-30 14:50:52 +02:00
Ibrahn Sahir
3502a85ba8 Fix strict-aliasing warning in OS_Windows::get_unix_time. 2019-07-29 23:52:59 +01:00
Guilherme Felipe
c3f69c6c76 Fix crash caused by a9a0d0fb15 2019-07-24 15:01:28 -03:00
Rémi Verschelde
4c943cca2c
Merge pull request #30716 from qarmin/fixed_static_analiser_code
Fix some code found by Coverity Scan and PVS Studio
2019-07-23 15:08:44 +02:00
qarmin
aab8da25ad Fix some code found by Coverity Scan and PVS Studio 2019-07-23 09:14:31 +02:00
Rémi Verschelde
77724fde60 Fix type mismatch in iOS interface orientation checks
Not sure why this error popped up when I enabled C++11 on the codebase,
but I guess this should fix it.
2019-07-22 20:31:15 +02:00
Rémi Verschelde
66d09a6b4c SCons: Fix uses of [].append instead of env.add_source_files()
Also added support for SCons project-absolute paths (starting with #) and
warning about duplicates in add_source_files(), and fixed
default_controller_mappings.gen.cpp being included twice after first build
due to *.cpp globbing.

Part of #30270.
2019-07-22 15:08:32 +02:00
Rémi Verschelde
63544e6b02 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.
2019-07-22 13:21:56 +02:00
Rémi Verschelde
d15cf7b672
Merge pull request #30576 from qarmin/lgtm_coverage
Changed some code reported by LGTM and Coverity
2019-07-20 12:00:13 +02:00
unknown
b0e44c9e5d Removed an unused commit 2019-07-20 14:40:09 +05:30
qarmin
6cbaf7662f Changed some code showed in LGTM and Coverage 2019-07-20 08:09:57 +02:00
Cameron Reikes
0584911f9f CameraServer is needed for editor node
- Editor asks ClassDB for docs
 - ClassDB asks CameraFeed for default parameters
 - In CameraFeed's constructor, polls CameraServer
2019-07-16 15:45:40 -07:00
Saracen
c81ec6f26d Exposes capture methods to AudioServer, variable renames for consistency,
added documentation.
2019-07-15 15:12:29 +01:00
Rémi Verschelde
3e40827050
Merge pull request #30465 from guilhermefelipecgs/cursor_blinking
Fix cursor blinking in integrated GPUs
2019-07-10 13:33:11 +02:00
Guilherme Felipe
a9a0d0fb15 Fix cursor blinking in integrated GPUs
Optimization for Input::set_custom_mouse_cursor when used inside
_process function. (Avoids cursor blinking in low end devices)
2019-07-09 19:38:25 -03:00
Fabio Alessandrelli
0c19674621 Better detect Emscripten toolchain.
Emscripten is apparently changing the variables in its config file,
causing potential breakage of our build system.

Binaries of the latest/latest-upstream releases are located in a
subfolder of BINARYEN_ROOT called emscripten.
Binaries of the other releases (e.g. sdk-1.38.31-64bit) are instead
placed under the EMSCRIPTEN_ROOT folder.

This PR checks if BINARYEN_ROOT has a subfolder called emscripten, if
that does not exists, it falls back to checking the EMSCRIPTEN_ROOT.

This way we give precedence to the new releases, given that activating
multiple releases sequentially might result in having mismatching
BINARYEN_ROOT and EMSCRIPTEN_ROOT.
2019-07-09 19:17:27 +02:00
Rémi Verschelde
dcc1ba3523
Merge pull request #30374 from BastiaanOlij/fix_ios_privileges
iOS Microphone and Camera privileges improvements
2019-07-08 08:28:31 +02:00
Rémi Verschelde
af80182016
Merge pull request #30407 from qarmin/small_fixess
Fixes minor issues found by static analyzer
2019-07-08 08:16:50 +02:00
qarmin
9a77d748c0 Fixes minor issues found by static analyzer 2019-07-07 23:08:51 +02:00
Ibrahn Sahir
4e4697b1c4 Added release function to PoolVector::Access.
For clarity, assign-to-release idiom for PoolVector::Read/Write
replaced with a function call.
Existing uses replaced (or removed if already handled by scope)
2019-07-06 12:04:27 +01:00
Bastiaan Olij
776dc93571 Add microphone privilege settings support back into export and add privilege exist check to camera server for iOS 2019-07-06 15:48:51 +10:00
Rémi Verschelde
a149e412f7
Merge pull request #24086 from RandomShaper/bundle-pck-to-executable
Enhance game export
2019-07-05 10:28:29 +02:00
Rémi Verschelde
44ea7ed583
Merge pull request #26674 from hunte922/master
Hide command prompt launched by OS.execute
2019-07-05 09:38:13 +02:00
hoontee
4a58c0487a Hide command prompt launched by OS.execute
Currently, the console appears when running OS.execute in an exported project,
but not in the editor. This change prevents it from appearing in either.

Only affects console applications.
2019-07-04 15:39:57 +02:00
Fabio Alessandrelli
aae6c075aa Remove libwebsocket. No longer used, yay! 2019-07-04 15:03:04 +02:00
Pedro J. Estébanez
40f4d3cf0f Add embedded PCK option to PC platforms
The basic point is as in 2.1 (appending the PCK into the executable), but this implementation also patches a dedicated section in the ELF/PE executable so that it matches the appended data perfectly.

The usage of integer types is simplified in existing code; namely, using plain `int` for small quantities.
2019-07-03 21:58:12 +02:00
Rémi Verschelde
b0d41847ed SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
It's the recommended way to set those, and is more portable
(automatically prepends -D for GCC/Clang and /D for MSVC).

We still use CPPFLAGS for some pre-processor flags which are not
defines.
2019-07-03 09:59:04 +02:00
Rémi Verschelde
da622682f7
Merge pull request #30258 from m4gr3d/make_metadata_settable
Make the AndroidManifest meta-data name attribute settable.
2019-07-03 06:51:32 +02:00
Rémi Verschelde
e0d610203c
Merge pull request #30254 from bojidar-bg/30224-docdata-generate
Fix various memory leaks and errors
2019-07-02 21:41:42 +02:00
fhuya
dea414abc8 Make the meta-data name attribute settable. This will facilitate reuse for ARCore integration. 2019-07-02 11:21:26 -07:00
Bojidar Marinov
f7dad789e9
Fix various memory leaks and errors 2019-07-02 17:23:54 +03:00
Rémi Verschelde
e9d624d7ce
Merge pull request #30239 from Faless/crypto/crypto_core
CryptoCore class to access to base crypto utils.
2019-07-02 14:52:43 +02:00
Fabio Alessandrelli
564d93ff10 CryptoCore class to access to base crypto utils.
Godot core needs MD5/SHA256/AES/Base64 which used to be provided by
separate libraries.
Since we bundle mbedtls in most cases, and we can easily only include
the needed sources if we so desire, let's use it.

To simplify library changes in the future, and better isolate header
dependencies all functions have been wrapped around inside a class in
`core/math/crypto_base.h`.

If the mbedtls module is disabled, we only bundle the needed source
files independently of the `builtin_mbedtls` option.
If the module is enabled, the `builtin_mbedtls` option works as usual.

Also remove some unused headers from StreamPeerMbedTLS which were
causing build issues.
2019-07-02 12:36:27 +02:00
Rémi Verschelde
d2c416ec62
Merge pull request #29824 from m4gr3d/add_ovr_export
Add XR mode selection to the Android export process.
2019-07-02 10:36:30 +02:00
fhuya
12e0dc1b65 Add XR mode selection to the Android export process. 2019-07-02 00:12:38 -07:00
Rémi Verschelde
771aa9a779
Merge pull request #29482 from Calinou/html5-fix-emscripten-root
Fix Emscripten root directory detection when building for HTML5
2019-07-01 13:52:22 +02:00
Rémi Verschelde
d17eac735c
Merge pull request #29815 from NilsIrl/plus_file_1
Replace ` + "/" + ` with `String::file_add()`
2019-07-01 12:06:35 +02:00
Rémi Verschelde
96d3270c34
Merge pull request #24227 from BastiaanOlij/arkit31
ARKit for Godot 3.2
2019-06-30 12:14:23 +02:00
BastiaanOlij
d9cefb34c1 ARKit for Godot 3.2
This PR introduces support for ARKit to the iOS version of Godot.
ARKit is Apples Augmented Reality platform.
This PR brings in support for ARKit 1.0 and implements a few ARKit 2.0 features.
It requires iOS 11 to run but should not prevent Godot from running on older versions as long as ARKit remains unused.
2019-06-30 18:54:48 +10:00
hbina085
9f0c6a6009 Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended. 2019-06-29 16:08:48 -04:00
Rémi Verschelde
eaaff9da31
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
2019-06-27 01:05:18 +02:00
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Nicholas Thompson
c48576f733 Allow '-' character in iOS reverse DNS identifiers dissallow underscores. 2019-06-25 11:46:43 +01:00
Rémi Verschelde
ab932bb675
Merge pull request #29948 from lawnjelly/androidkeyboard
Fix some keyboards not working with Android
2019-06-24 19:32:42 +02:00
Nils ANDRÉ-CHANG
d2833d4f4d Replace + "/" + with String::file_add() 2019-06-23 13:33:50 +01:00
Rémi Verschelde
1769cbc0e2 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.
2019-06-23 10:02:35 +02:00
lawnjelly
512f8ebb93 Fix some keyboards not working with Android
Fixes #17004

Currently the keydown and keyup messages are handled with method like this:

if ((source & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK
|| (source & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD
|| (source & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) {
// joystick input
}
else
{
// keyboard input
}

The constant for SOURCE_DPAD is 513
10 0000 0001

and the constant for SOURCE_KEYBOARD is 257
1 0000 0001

However, rather confusingly, for many keyboards the source sent by android is 769
11 0000 0001

Thus the keyboard is passing the check as being a DPAD and being processed as a joystick rather than keyboard. This PR handles the specific case of 769, allowing input from physical keyboards.
2019-06-21 12:57:33 +01:00
Luka Dornhecker
ad504b926f Add option to toggle console window on Windows
This is an editor setting and its value can also be toggled
using an entry in the Editor toolbar. The console will still
appear briefly when starting the project manager or editor,
as it's still compiled as console application.

Does not impact exported games, which will still run without
console in release and with console in debug mode.

A project setting or export option could be added to disable
it in debug mode if there's demand for it, but that would
greatly reduce the usefulness of debug builds if Windows users
can no longer report error and crash messages.

Fixes #17889.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2019-06-20 16:55:52 +02:00
Rémi Verschelde
e09cf96857
Merge pull request #29874 from ibrahn/rework-png-loadsave
PNG driver reworked to use libpng 1.6 simplified API
2019-06-20 11:10:02 +02:00
Rémi Verschelde
d61bce1b75
Merge pull request #29910 from m4gr3d/dev_deprecate_armv6
Deprecate support for Android armv6 architecture
2019-06-20 10:22:23 +02:00
Hugo Locurcio
e08fa103f2
Fix Emscripten root directory detection when building for HTML5
Recent Emscripten SDK versions seem to only include the
`BINARYEN_ROOT` variable in the Emscripten configuration file,
whereas the platform's `detect.py` only looked at `EMSCRIPTEN_ROOT`.
2019-06-19 22:23:58 +02:00