Commit Graph

5920 Commits

Author SHA1 Message Date
Chris Speciale
20c9bec3bc Update Build.xml
Hxcpp doesn't respect HXCPP_CPP11 for android. We can avoid this issue just by adding -std=c++11 here. This resolves a conflict with openal soft 1.20.1 for android builds. This works because the library assumes c++17 and invokes a function that isn't available in android sdk below 28.
2025-03-14 05:29:18 -04:00
Chris Speciale
e41dc949fe Revert "Merge pull request #1924 from tobil4sk/update-openal-1.21.1"
This reverts commit 3f0179657b, reversing
changes made to 80aaaaef9f.
2025-03-14 05:16:24 -04:00
Tobiasz Laskowski
b709a5bb0d Fix old android ndk error not showing
The error flag is not valid inside `<files />`, so this wasn't actually
doing anything.

The error now shows properly
2025-03-14 07:41:17 +00:00
Chris Speciale
ee1d56e864 Android: Revert to sdk 21 as default minimumSdkVersion
Minimum SDK 28 is no longer required to build android after updating openal to 1.21.1. See: https://github.com/openfl/lime/pull/1924

Closes https://github.com/openfl/lime/issues/1923
2025-03-14 01:45:05 -04:00
Chris Speciale
3f0179657b Merge pull request #1924 from tobil4sk/update-openal-1.21.1
Update openal soft to 1.21.1
2025-03-14 01:39:16 -04:00
Tobiasz Laskowski
755781fdf2 Fix mac -stdlib=libstdc++ compilation error
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2025-03-13 21:15:45 +00:00
Tobiasz Laskowski
a13b3c37bb Avoid hxcpp overriding openal_soft's c++14 2025-03-13 21:15:34 +00:00
Tobiasz Laskowski
ea2bbd0be3 Update OpenAL Soft to 1.21.1 2025-03-13 21:15:18 +00:00
Chris Speciale
80aaaaef9f Android: Set hard minimum sdk ver for rebuild
Avoids expectations of rebuilding clean which could lead to some confusing situations otherwise.
2025-03-13 08:56:59 -04:00
Chris Speciale
855996e122 Remove PLATFORM from Build.xml
We shouldn't need it anymore following this commit: 46aab0c80e
2025-03-13 05:59:14 -04:00
Chris Speciale
46aab0c80e Android: Allow minimumSDKVersion to be set dynamically
This change moves away from purely hard coding the minimum sdk version for android and also correctly sets the PLATFORM_NUMBER define. The gcc toolchain is no longer compatible in lime 8.3.x+ so, we shouldn't have to worry about the PLATFORM define at all.

It might be wise to enforce a baseline minimum version and complain if users try to use something lower than the default.
2025-03-13 02:24:30 -04:00
Chris Speciale
8d21626297 set PLATFORM to android 28 2025-03-12 18:55:09 -04:00
Chris Speciale
ed8354a86a Update the API level for Android to 28 2025-03-12 18:45:42 -04:00
Chris Speciale
37c9155608 Set minSdkVersion to 28
Should resolve part of the issues related here: https://github.com/openfl/lime/issues/1923#issuecomment-2719250849
2025-03-12 18:26:56 -04:00
Chris Speciale
63b9a88e34 Merge pull request #1921 from tobil4sk/fix/get_glyphs_infinite_loop
Fix Font.getGlyphs returning zeros and looping
2025-03-11 01:34:41 -04:00
Tobiasz Laskowski
23b90dff3f Fix loop in GetGlyphIndices with invalid input
If the text is invalid, then readNextChar returns -1 and does not
progress to the next character. This previously meant that we got stuck
and looped indefinitely.
2025-03-11 01:23:29 +00:00
Tobiasz Laskowski
f495b777ab Remove old comment for hl GetGlyphIndices
The array size is already determined by the first loop
2025-03-11 01:19:58 +00:00
Tobiasz Laskowski
6283017adb Fix GetGlyphIndices returning array of 0 on hl
Previously, the first for loop would reach the end of the characters, so
no further characters were read in the second loop. This meant that the
array remained filled with 0 values.
2025-03-11 01:19:43 +00:00
Josh Tynjala
5488eee50c IOSHelper: comment about how the Platform == 'iOS' filter used by xcrun devicectl includes iPadOS, so there's no need to check for that one separately 2025-03-10 14:58:58 -07:00
Tobiasz Laskowski
70e55b1fa5 Fix rebuild warning about unknown option on msvc
cl : Command line warning D9002 : ignoring unknown option '-std=c11'
2025-03-10 14:20:55 -07:00
Josh Tynjala
6f2f88ca74 IOSHelper: if no iOS device is connected, look for one that is available (paired) and wired (closes #1918)
Consolidate fallback to ios-deploy when Xcode version < 16 and when xcrun devicectl doesn't find any devices
2025-03-10 14:17:20 -07:00
Josh Tynjala
99209da430 IOSHelper: if xcrun devicectl list devices fails, try to fall back to ios-deploy
Devices running iOS 16 and older don't support xcrun devicectl, but they should still work with ios-deploy.
2025-03-10 11:07:15 -07:00
Chris Speciale
4104e9fbd5 Merge pull request #1916 from tobil4sk/fix/hb-add-utf8
Fix utf8 conversions in hb_buffer_add_utf8
2025-03-10 07:04:56 -04:00
Chris Speciale
adf2cf1056 Merge pull request #1917 from tobil4sk/feature/hb-buffer-add-string
Add hb_buffer_add_hxstring
2025-03-10 07:04:40 -04:00
Tobiasz Laskowski
ca770337cb Add hb_buffer_add_hxstring
To properly handle encoding conversions, we need to do it in native
code. This new function performs this role.

This is useful for hxcpp which may have either ascii or utf16 encoding,
but this can only be checked via the native api and it is not possible
on the haxe side.
2025-03-10 02:37:52 +00:00
Tobiasz Laskowski
0ca7c392e0 Fix length for hl_hb_buffer_add_utf8
This function wants the utf8 length, but text->length does not give
this. We can instead use -1 to tell harfbuzz to treat it as null-
terminating, which is the case with all hashlink strings anyway.
2025-03-10 01:45:37 +00:00
Tobiasz Laskowski
504df5e0d0 Add missing utf8 conversion for hb_buffer_add_utf8
A HxString is not guaranteed to be utf8 on hxcpp, so we need to use
hxs_utf8 to convert it otherwise it incorrectly displays any utf16
encoded string.

Unfortunately, hxs_utf8 doesn't give us the length of the utf8 string.
The best thing we can do is to tell harfbuzz it is null terminated. This
isn't perfect because technically hxcpp strings are allowed to contain
NULL, but it's better than all utf16 strings being broken.
2025-03-10 01:17:41 +00:00
Josh Tynjala
9f9a5b9f31 Merge branch 'develop' into 8.3.0-Dev 2025-03-03 13:19:35 -08:00
Josh Tynjala
3aa32e2167 Image: __fromBytes() null and length check to avoid EXC_BAD_ACCESS lime::PNG::Decode (closes #1894) 2025-03-03 11:44:44 -08:00
Josh Tynjala
d7b2b75f1e AIRPlatform: default AIR SDK version to 32.0 instead of 28.0
You can't get 28.0 from Adobe anymore, but you can get 32.0
2025-02-24 15:49:32 -08:00
Joseph Cloutier
ec4305915d Stop shadowing haxe.io.Bytes. (#1765) 2025-02-24 15:42:51 -08:00
Josh Tynjala
ebab7dd2c2 AL: keep old constant to avoid breaking user code 2025-02-24 15:36:56 -08:00
Ralty
be461754a3 Fix typo on EFFECT_AUTOWAH 2025-02-24 15:36:56 -08:00
DigiEggz
cd404bd2a0 Support pannerAttr for Howler sounds (#1788)
Exposes the pannerAttr field, which allows panner values to be set. By setting the panningModel to "equalpower", audio degradation is prevented and results in crisp by default, resolving the problem mentioned in https://github.com/goldfire/howler.js/issues/112.

In the future, panner attributes can be passed (for example `parent.buffer.__srcHowl.pannerAttr({panningModel: "HRTF”});)` within the HTML5AudioSource `play()` function, after it has began playback via `parent.buffer.__srcHowl.play()`.
2025-02-24 15:32:50 -08:00
Josh Tynjala
b8435aa894 PlatformSetup: Further refine HL setup to explain how to remove a custom HL_PATH value 2025-02-20 10:19:55 -08:00
Josh Tynjala
c975a31f12 README: community links 2025-02-11 10:01:53 -08:00
Chris Speciale
c4cc642002 Merge pull request #1905 from MAJigsaw77/feature/resource-file-windows
Initial support for Windows resource file.
2025-02-11 07:34:03 -05: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
1b5958f6ff Remove CPP_LIBPREFIX from ios/tvos template
It is no longer used, and was only there to provide compatibility with
hxcpp versions older than 3.2
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
c9ad850578 Update curl submodule
Hxcpp's mbedtls has MBEDTLS_NET_C disabled, which meant that older
versions of curl which use this feature cannot be linked against it.
This version of curl no longer requires this feature, which avoids the
issue.
2025-02-10 09:24:47 -08:00
Tobiasz Laskowski
7df96b53d7 Support hxcpp older than 4.3.0 for mbedtls linking
Hxcpp 4.3.0 has an mbedtls_config.h file in ${HXCPP}/src/hx/libs/ssl,
which we have to ensure is included, but older versions do not.

To support both 4.3.0 and older versions, we can add an empty
mbedtls_config.h and add the include path at the end. This way it will
only be used if it does not exist in the previous include paths.
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