Commit Graph

5762 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Tobiasz Laskowski
69bbcaea27 Skip confirmation for alias with -alias/-cli flag
The user has already specified this is what they want by passing in the
flag, so there is no point in asking again.
2025-01-31 10:27:24 -08:00
Tobiasz Laskowski
dd9f9d40c9 Add -cli, -alias, and -noalias setup flags to help
The `-cli`/`-alias` flags are useful when you don't want lime to mess with
libraries that might be intentionally set to specific versions.
2025-01-31 10:27:24 -08:00
Josh Tynjala
112f3f591f actions: missed hashlinkc-samples as a dependency of notify 2025-01-30 16:15:59 -08:00
Josh Tynjala
e56c7cd49a docs: some missing classes in ImportAll
Like OpenFL, we should eventually modify the docs build to use include("lime") to automatically include everything instead of manually adding each thing to ImportAll. However, we'll need to use conditional compilation to hide certain classes from targets where they aren't supported.
2025-01-30 09:46:26 -08:00
Josh Tynjala
8031ed22d9 System: fix typo in openFile() docs 2025-01-29 15:12:30 -08:00
Tobiasz Laskowski
5fd2b560c4 Add missing harfbuzz hb-face-builder file 2025-01-29 01:28:22 +00:00
Tobiasz Laskowski
a9347de8ce Update hb-coretext to hb-coretext-shape
The name of this file was changed, see:
064b24177b
2025-01-28 13:04:18 -08:00
Tobiasz Laskowski
077ba7e5ca Update harfbuzz to 10.2.0 2025-01-28 13:04:18 -08:00
Chris Speciale
8af219fb54 Merge pull request #1899 from tobil4sk/fix/update-cairo
Update cairo to 1.18.2
2025-01-28 01:41:24 -05:00
Tobiasz Laskowski
65e2c6ba45 Add missing files to freetype build
These are required by newer versions of cairo
2025-01-27 19:12:06 +00:00
Tobiasz Laskowski
9bda9ecb32 Update cairo to 1.18.2
The previous version 1.17.6 was an unstable snapshot release. Updating
to 1.18.2 seems to resolve some font size bugs on windows.
2025-01-27 19:12:06 +00:00
Josh Tynjala
7255873893 AudioManager: if alc.openDevice() returns null, don't call alc.createContext() to avoid a SIGNAL 11 crash 2025-01-24 09:47:09 -08:00
Tobiasz Laskowski
e0c734d8fe Remove MAC_USE_CURRENT_SDK from lime setup
MAC_USE_CURRENT_SDK is an incredibly old relic from a very old version
of hxcpp (haxe 2 days). It was removed in:
9a7f7f931f

This is now instead controlled by the flag `MACOSX_DEPLOYMENT_TARGET`.

The setup command now only does two things:
- Sets up haxelibs
- Adds cli alias
2025-01-22 08:06:52 -08:00
Josh Tynjala
abb92a2a84 actions: does Haxe 4.3.3 work better on this job than 4.3.6? 2025-01-17 11:47:41 -08:00
Josh Tynjala
5472974379 actions: skip html5-samples variables on Haxe 3 2025-01-17 10:13:22 -08:00
Josh Tynjala
2fdbcd1460 actions: make html5-samples depend on package-haxelib because -eval flag fails on Haxe 3 2025-01-17 09:42:22 -08:00
Josh Tynjala
f08cebf9e5 actions: bump haxe 4.3 references to haxe 4.3.6 2025-01-17 09:30:30 -08:00
Josh Tynjala
5ed71b1204 actions: html5-samples job should have a Haxe version matrix 2025-01-17 09:30:30 -08:00
Josh Tynjala
2d22455e50 HTML5Thread: Haxe 3 compatibility fixes 2025-01-17 09:30:30 -08:00
Josh Tynjala
f604ae3b0e tools: fix haxe 4 function syntax for haxe 3 backcompat 2025-01-17 09:30:30 -08:00
Igor
c2c9d0ea7c Setting ios.non-exempt-encryption to false by default. 2025-01-10 16:00:10 -08:00