Commit Graph

5698 Commits

Author SHA1 Message Date
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
player-03
7019abb9fc Don't try to load lzma_worker-min.js in web workers. 2024-06-11 16:22:10 -04: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
Joseph Cloutier
fc393eabd1 Restore "web-worker" attribute.
This was mistakenly removed while merging.
2024-06-10 13:28:23 -04:00
player-03
7a25f656d0 Ignore system environment variables with the same name as common targets.
If you have a `<section if="cpp">` tag in your project.xml, you don't want it to be active just because a system environment variable happens to be named "cpp". You only want it active if actually targeting C++.
2024-06-04 23:11:55 -04:00
player-03
6a23b6eee3 Merge pull request #1790 from player-03/stale_assets
Automatically delete stale assets and dependency files.
2024-06-04 13:42:31 -04:00
player-03
f23ecb6c3f Add preserveDrawingBuffer context attribute. 2024-05-31 21:43:37 -04:00
player-03
5bcf8fcf8e Merge pull request #1770 from barisyild/make-preserveDrawingBuffer-configurable
make preserveDrawingBuffer configurable
2024-05-31 17:54:20 -04:00
tobil4sk
a74127b866 Fix usage of missing variable in CFFI.hx
See a850b12fa0
2024-05-31 22:46:54 +01:00
tobil4sk
587de6d0c5 Update neko scripts 2024-05-31 14:40:23 -07:00
tobil4sk
653c8c92f7 Include MacArm64 when rebuilding tools 2024-05-31 14:40:23 -07:00
tobil4sk
45972bb733 Copy correct ndll on arm64 mac 2024-05-31 14:40:23 -07:00