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.
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).
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.
- 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.
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.
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
```
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).
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.
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').
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.
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.
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.
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.
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
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
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.
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.