Commit Graph

655 Commits

Author SHA1 Message Date
Josh Tynjala
9f9a5b9f31 Merge branch 'develop' into 8.3.0-Dev 2025-03-03 13:19:35 -08:00
MAJigsaw77
df3f816f9b Add copyrightYears to MetaData. 2025-02-11 13:59:39 +02:00
MAJigsaw77
dcbee9d54a Initial support for windows resource file. 2025-02-10 23:36:19 +02:00
Tobiasz Laskowski
99ca58d06f Add workaround for hxcpp compiler cache bug
See: https://github.com/HaxeFoundation/hxcpp/issues/1180
2025-02-10 09:24:47 -08:00
Tobiasz Laskowski
ade8ca77a0 Fix options path for BuildHxcppMbedtls.xml
See: https://github.com/HaxeFoundation/hxcpp/issues/1178
2025-02-10 09:24:47 -08:00
Tobiasz Laskowski
00edf47529 Add support for linking mbedtls on latest hxcpp
The latest hxcpp makes it easier to link against the internal mbedtls,
however we still need backwards compatibility.

https://github.com/HaxeFoundation/hxcpp/pull/1133
2025-02-10 09:24:47 -08:00
Tobiasz Laskowski
6bfbe12df3 Link static hxcpp_mbedtls library for ios/tvos 2025-02-10 09:24:47 -08:00
Tobiasz Laskowski
3208c8772c Use hxcpp -Ddestination flag to copy ios/tvos lib
This requires explicitly running the 'haxe' target, as the 'default'
target does not output a file.

It was added in hxcpp 3.2:
3ff97332d1
2025-02-10 09:24:47 -08:00
Tobiasz Laskowski
d87a849ab0 Use generic make rule for ios/tvos build targets 2025-02-10 09:24:47 -08:00
Tobiasz Laskowski
d375d74459 Make minor ios/tvos makefile adjustments
The targets do not create a file with the target name, so they should be
marked as .PHONY

We are not using implicit rules either, so we can disable them by
making .SUFFIXES empty

Group targets together

Also remove LIB_BASE variable, it has been unused since:
f7ab6ab36b
2025-02-10 09:24:47 -08:00
Tobiasz Laskowski
22fb016d95 Link against hxcpp's mbedtls in static builds
This avoids lime's mbedtls overwriting hxcpp's, which has caused issues
in the past.
2025-02-10 09:24:47 -08:00
Tobiasz Laskowski
d1db9e88af Fix static debug windows build 2025-02-10 08:59:02 -08:00
Tobiasz Laskowski
f5ccc3d2aa Add missing crypt32.lib for static windows build 2025-02-10 08:59:02 -08:00
Josh Tynjala
09040f443d Android: new Java template files for SDL 2.30.12 2025-02-07 09:59:36 -08:00
Josh Tynjala
41ac2fc8b6 add <config:android layoutInDisplayCutoutMode/>
Options are default, always, never, and shortEdges. Defaults to default.

What default means depends on which Android SDK version is used.

According to the Android docs, starting with Android SDK 35, most options will be forced to act the same as always. However, for SDK 34 (which is the current minimum on Google Play) this should remain configurable.

https://developer.android.com/develop/ui/views/layout/display-cutout
2025-02-07 09:23:29 -08:00
Josh Tynjala
af2299670f Display: add safeArea property
display.safeArea is a subset of display.bounds that accounts for notches, holes, or other display cutouts.
2025-01-30 15:56:27 -08:00
Josh Tynjala
8f0b8f356e Application: onDisplayOrientation and onDeviceOrientation events for iOS and Android
Device orientation is the orientation of the phone/tablet.

Display orientation is the orientation of what is rendered on the display.

By default, they should usually be the same. If orientation is locked, device orientation will update, but display orientation usually won't.
2025-01-29 09:38:00 -08:00
Josh Tynjala
2e578d3e56 Default to Android target-sdk-version 34, and support 35 (closes #1888)
34 is the minimum required version by Google Play, so it should be default.

Bumping to 34 and 35 requires updating both gradle-version and gradle-plugin-version.

The new versions now require an ndkVersion flag in build.gradle. This can be obtained by reading source.properties in the root of the NDK.

JDK 17 will be required for these updates. Previously required JDK 11.
2025-01-14 14:00:54 -08:00
Josh Tynjala
951d5510c2 GameActivity: check for VIBRATE permission on Android
While we add this permission by default, if a developer sets custom permissions, we want to avoid crashing when we try to access an API that we don't have permission to use
2025-01-07 12:47:30 -08:00
Josh Tynjala
c81ad95ae5 output.js: fix broken breakpoints in debug builds (closes #1872)
::SOURCE_FILE:: must appear on the first line so that the .js.map line numbers match with our generated .js file line numbers

Added a comment to explain why that part of the file isn't formatted nicely with line breaks like the rest of the file.

This partially reverts bbcb8bea07
2024-12-09 09:23:12 -08:00
Josh Tynjala
95baa58eff Merge branch 'develop' into 8.2.0-Dev 2024-07-22 10:01:46 -07:00
Tobiasz Laskowski
a5844a42df Fix curl static linking on mac
This was overlooked in #1682
2024-07-12 12:28:59 +01:00
Joshua Granick
88e21e6cc9 Fix JS, minor improvements to readability after generate 2024-07-09 10:53:53 -07:00
Josh Tynjala
8f3ea8d271 Merge branch 'develop' into 8.2.0-Dev 2024-07-08 14:31:23 -07:00
player-03
e295c8e758 Merge pull request #1804 from MAJigsaw77/vibration-deprecation-fix
Android vibration fixes.
2024-07-07 16:18:13 -04:00
player-03
c85c50c4bf Remove delay before vibration begins. 2024-07-07 16:17:05 -04:00
player-03
f0ae60d1ef Remove log message.
`GameActivity` doesn't print any other messages, so this seems out of place. Plus, it would happen every time even if there's no vibration ongoing.
2024-07-07 14:34:09 -04:00
player-03
1e6fdee508 Simplify and document vibration pattern logic. 2024-07-07 13:53:16 -04:00
player-03
99ff0afeab Reduce duplicate logic.
I'd rather duplicate the SDK version check, not the math.
2024-07-07 13:20:06 -04:00
Mihai Alexandru
24ac93a18a Alright 2024-07-07 20:18:11 +03:00
Josh Tynjala
e257b7ebe4 Merge branch 'develop' into 8.2.0-Dev 2024-07-01 08:53:48 -07:00
player-03
5f7e63425e Remove package from extension AndroidManifest.xml
Per https://developer.android.com/guide/topics/manifest/manifest-element#package
2024-06-26 20:13:10 -04:00
Mihai Alexandru
97e1af377a Use namespace for gradle projects to fix deprecation warnings. 2024-06-26 20:13:10 -04:00
Mihai Alexandru
b7d44342d1 Oops 2024-06-17 12:01:00 +03:00
Mihai Alexandru
165d478cb9 Oops 2024-06-17 10:22:28 +03:00
Mihai Alexandru
3d8ad8a0e3 Cancel the vibration when the app pauses or when is being destroyed. 2024-06-17 09:48:22 +03:00
Mihai Alexandru
0e0dd0b5a2 Support VIEW intents on Android. (#1799)
* Add Drop file event support for android.

* Updated MIME type configuration and intent filter generation.

* "supportedMimeTypes" => "mimeType"

* `mimeType` -> `accept-file-intent`
2024-06-16 19:29:25 -04:00
Mihai Alexandru
bd3bbc532e Maintain style 2024-06-16 10:53:20 +03:00
Mihai Alexandru
3f5d797cf0 Update GameActivity.java 2024-06-16 10:47:40 +03:00
Joseph Cloutier
2874ac9cab Use globalThis.
It's designed to solve exactly this problem, and has been universally available since 2020.

The most likely scenario for `globalThis` to fail is if the user is stuck with an old browser, in which case `self` will be available. `window` will be too, but `self` also works in web workers.
2024-06-10 14:26:46 -04:00
Joseph Cloutier
832ac358c1 Use === and !== in output.js. 2024-06-10 14:14:39 -04:00
Joseph Cloutier
bbcb8bea07 Format output.js for readability. 2024-06-10 14:12:19 -04:00
Joseph Cloutier
8066037cdd Bug fix: Node.js was being treated as a web worker context. 2024-06-10 14:07:22 -04:00
Josh Tynjala
c3170a0577 Merge branch '8.2.0-Dev' into feature/hlc 2024-01-30 09:16:34 -08:00
player-03
55dfc267bb Merge branch '8.2.0-Dev' into ConfigData 2024-01-13 23:41:14 -05:00
Joseph Cloutier
2f8da1d39d Remove excess whitespace from AndroidManifest.xml.
Grouping these blocks makes logical sense, and makes the output a bit prettier. Win-win.
2023-12-21 23:01:37 -05:00
Joseph Cloutier
f0a040727c Allow clearing attributes by passing "".
project.xml can't pass `null`, so this seems like the next best thing.
2023-12-21 22:46:13 -05:00
Joseph Cloutier
60064f55b3 Make AndroidManifest.xml more configurable.
Now if you need to add something to the `<application />` or `<activity />` tags, you can do it from project.xml. This will require new documentation, however.
2023-12-21 22:30:58 -05:00
Joseph Cloutier
b0c7025e45 Simplify permissions in AndroidManifest.xml.
`AndroidPlatform` provides a default value, so the array will never be null.
2023-12-21 22:12:14 -05:00
Josh Tynjala
f0ecccf5eb HL/C on macOS 2023-10-19 15:00:27 -07:00