Commit Graph

5762 Commits

Author SHA1 Message Date
ACrazyTown
ed05aa2674 Fix getContextsDevice on Hashlink 2024-08-16 14:14:17 -07:00
player-03
31700a034c Merge pull request #1830 from player-03/old_thread_classes
Restore old `Future` and `BackgroundWorker` behavior.
2024-08-16 17:14:01 -04:00
Joseph Cloutier
6873ae1fd4 Future.ready() only works when threads are available. 2024-08-15 16:44:52 -04:00
Joseph Cloutier
2866d099a2 Remove external link.
While I put a lot of effort into that guide, we're changing several things suddenly, and I don't have time to make sure it's up to date.
2024-08-15 16:31:48 -04:00
Joseph Cloutier
52931a8dc7 Revert to Future's behavior from 8.1.3.
As with `BackgroundWorker`, we're postponing major changes to give us more time to consider.
2024-08-15 16:16:17 -04:00
Joseph Cloutier
d0cef427bc Revert BackgroundWorker to its 8.1.3 version.
It looks like we'll want to take `BackgroundWorker` in a different direction, so for the moment it's safest not to change anything about it. That way, there's only one historical version to maintain backwards compatibility with.
2024-08-15 15:39:07 -04:00
Joseph Cloutier
8f631fe3ad Optimize ThreadPool slightly.
`__activeThreads` and `__idleThreads` only need to be allocated for multi-threaded pools. Plus, there's no benefit to using a `List` here; we only add to and remove from the end.

And finally, checking `event.job == null` instead of `isOfType()` is faster and avoids an issue in HTML5. Sadly it is less safe, so we might need to revisit it eventually.
2024-08-11 21:40:00 -04:00
Joseph Cloutier
0b83b7d45e Fix typo. 2024-08-11 16:11:19 -04:00
Joseph Cloutier
bf4711a01d Avoid sending JobData back to the main thread.
The main thread can easily look these up by ID, and in HTML5, sending the full `JobData` can cause errors.
2024-08-09 16:43:51 -04:00
Joseph Cloutier
dae33c0c1a Bug fix: new job could be ignored if it arrived with precise timing. 2024-08-09 15:11:50 -04:00
Josh Tynjala
95baa58eff Merge branch 'develop' into 8.2.0-Dev 2024-07-22 10:01:46 -07:00
Josh Tynjala
9f369b7637 release date 8.1.3 2024-07-22 08:33:26 -07:00
Josh Tynjala
b866632a6f tools: allow -x86_64 and -x86_32 as command line flags to select those architectures instead of defaults (closes #1819)
Still supports -32 and -64, though, for backwards compatibility. We could consider removing those in Lime 9.
2024-07-19 14:46:47 -07:00
Josh Tynjala
f4ce198c8e prepare for Lime 8.1.3 2024-07-19 09:39:12 -07:00
Josh Tynjala
745c178908 MacPlatform: find lime.hdll in Mac64 on ARM64 Mac because HashLink doesn't support x86_64 yet 2024-07-18 12:23:32 -07:00
Josh Tynjala
b95dac4da3 MacPlatform: always build HashLink for Intel on macOS for now 2024-07-18 12:14:07 -07:00
tobil4sk
4fa31a0d34 [tools] Cross compile to x86 from arm64 on mac (#1813) 2024-07-14 12:08:01 +01:00
Chris Speciale
ca52db81ef Merge pull request #1817 from tobil4sk/fix/mac-curl-static-link
Fix curl static linking on mac
2024-07-12 07:50:05 -04: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
656c761cb0 Fix broken JPEG decoding (tested on Windows) 2024-07-09 13:27:54 -07: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
Josh Tynjala
84d7f39605 Revert "MacPlatform: use install_name_tool to add /usr/local/lib and /opt/hombrew/lib to rpath of lime.ndll"
This reverts commit 47936494ac.

Didn't work with Haxe/Neko installed from Apple Silicon Homebrew because Lime tools couldn't link to Neko.
2024-07-08 14:27:15 -07:00
tobil4sk
0ef949f865 Merge pull request #1472 from nixbody/cffi-unicode-fixes
UNICODE fixes (clipboard, window title, file dialogs, paths, font glyphs, ...)
2024-07-07 23:10:43 +01: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
player-03
3a61390cb6 Merge pull request #1811 from tobil4sk/ci-mac-arm64-ndll
[ci] Add mac arm64 ndll to lime package
2024-07-07 12:39:29 -04:00
Tobiasz Laskowski
d5b3294b20 [ci] Use updated hxcpp to build mac arm64 ndll 2024-07-06 14:39:44 +01:00
Tobiasz Laskowski
da9be4acc0 [ci] Build and include arm64 mac ndll 2024-07-06 14:04:52 +01:00
Tobiasz Laskowski
5eafeb047d [tools] Support cross compiling arm64 ndll on mac 2024-07-06 14:04:29 +01:00
player-03
b99eff85c1 Merge pull request #1794 from player-03/environment-variable-conflicts
Ignore system environment variables with the same name as common targets.
2024-07-02 15:56:31 -04:00
Josh Tynjala
e257b7ebe4 Merge branch 'develop' into 8.2.0-Dev 2024-07-01 08:53:48 -07:00
Joseph Cloutier
d27aaebc01 Copy SDL's list of configChanges on Android.
On Android, Lime apps are SDL apps, so it makes sense to defer to them on this.

https://github.com/libsdl-org/SDL/blob/main/android-project/app/src/main/AndroidManifest.xml
2024-06-26 20:36:02 -04: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
Josh Tynjala
47936494ac MacPlatform: use install_name_tool to add /usr/local/lib and /opt/hombrew/lib to rpath of lime.ndll
Previously, we added these rpaths to lime.ndll when it was built in commits c70ec9f and 333d093, but it's actually necessary only for Neko, so now I made it happen specfically after calling `nekotools boot` to create the Neko executable.

I've tested cpp and hl, and I've confirmed that the executables still launch successfully when these rpaths are omitted. It's better for their security to use fewer rpaths.

As noted commit c70ec9f, adding these rpaths is necessary due to a change in Xcode 15 where /usr/local/lib used to be available on the rpath automatically, but now it isn't, which affects the executable's ability to find the libneko dylib.
2024-06-19 14:39:17 -07:00
Josh Tynjala
c8501b17e5 AndroidPlatform: fix @android:style/Theme.NoTitleBarnull in AndroidManifest.xml
Replace (project.window.fullscreen ? ".Fullscreen" : null) with (project.window.fullscreen ? ".Fullscreen" : "")
2024-06-17 15:47:20 -07: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
593f4fa52c Rename web-workerallow-web-workers for clarity.
The former was unclear about how the dependency would relate to web workers. Would it only be available to workers? Would it automatically spin up a worker?

`allow-web-workers` isn't 100% perfect, but it implies the correct answers to the questions above (no and no) and isn't too long.
2024-06-15 22:13:05 -04:00
Josh Tynjala
44852467f4 AndroidHelper: report errors for missing adb and emulator executables when they are used only, instead of immediately in AndroidHelper.initialize()
It turns out that adb isn't included GitHub Actions unless you install it specifically. However, you can technically build Android apps with Lime without adb, so we shouldn't report the error in initialize(). Most important is install(), where both adb and emulator are commonly used.

Followup to eed47e7132
2024-06-14 10:55:49 -07:00
Josh Tynjala
eed47e7132 AndroidHelper: Fix Android -emulator flag by preferring newer executable paths from Android SDK
The 'SDK Tools' package located in /tools/ is officially considered 'obsolete', so we should not use it by default.

We now prefer /platform-tools/adb over /tools/adb

We now prefer /emulator/emulator over /tools/emulator

If the newer replacement executables are missing, we still try to fall back to /tools/. This should allow older Android SDKs to continue to work properly.

Additionally, if neither version can be found, we report an error. For adb, we always need it, so we always report an error if it is missing. For emulator, we report an error only if we're actually going to use an emulator.

/tools/android doesn't have a newer alternative. We were running 'android list avds' to get a list of all available AVDs. However, both '/emulator/emulator -list-avds' and '/tools/emulator -list-avds' provide a simple list of AVDs separated by line breaks. So it seems that we never actually needed /tools/android. Plus, it outputs a better format that doesn't require searching every line of the output string for 'Name:', and we can just split and trim. So I completely removed /tools/android and we now use either '/emulator/emulator -list-avds' or '/tools/emulator -list-avds'.
2024-06-14 10:04:11 -07:00