Commit Graph

5210 Commits

Author SHA1 Message Date
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
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
tobil4sk
1ebce5faa3 Load ndlls from correct path on Apple Silicon Mac 2024-05-31 14:40:23 -07:00
Josh Tynjala
e88b3d21c1 ProjectXMLParser: <echo/> and <log/> (except error) are skipped if the command is display (references openfl/lime-vscode-extension#88) 2024-05-31 08:34:48 -07:00
Josh Tynjala
0cf13bf3dd Clipboard: fix text always getting cleared to null in __update() when targeting html5 2024-05-30 16:02:54 -07:00
Joseph Cloutier
1b8d7ac7fa Reduce indentation in ProjectXMLParser.
Whitespace changes interfere with merges, so this change must be applied manually first.
2024-05-27 15:58:20 -04:00
player-03
3078b7c1f6 Merge pull request #1787 from player-03/CFFI_haxelib_libpath
Fix error when locating Lime's bundled NDLLs.
2024-05-27 15:30:19 -04:00
Josh Tynjala
ac4039d849 ProjectXMLParser: handle Std.parseInt() returning null
Previously, null was propagated, which could lead to confusing errors from arithmetic operations. Now, it is ignored, and a warning is displayed that says where the invalid value can be found.
2024-05-22 09:10:04 -07:00
player-03
a850b12fa0 Replace __findHaxelib() with a function that finds Lime's NDLL folder.
This is its only use case, so there's no need for an intermediate step of getting the library root. `haxelib path` does return the NDLL folder; the problem with the old implementation of `__findHaxelib()` was it got Lime's source folder instead.
2024-05-17 17:26:35 -04:00
player-03
4ce0a8302d Fix uninitialized variable. 2024-05-16 17:46:20 -04:00
player-03
3b115885f1 Use haxelib libpath when searching for NDLLs.
We could fall back to `haxelib path` for very old versions of Haxelib, but most likely even people stuck on Haxe 3 have updated Haxelib.

Also, `haxelib path` gave incorrect results in the first place, so falling back wouldn't do any good.
2024-05-16 17:40:49 -04:00
player-03
d2ea41570b Print an error message if the HXP project class doesn't match the file name.
This is required but not obvious, so we should spell it out.
2024-05-16 16:49:17 -04:00
Tobi Laskowski
333d093df0 Build.xml: Add /opt/homebrew/lib as rpath on arm64 macos
This is where arm64 homebrew installs `libneko.dylib`. However, it may still be in `/usr/local/lib` if installed via the haxe .pkg installer, so we add both.
2024-05-15 09:18:39 -07:00
Josh Tynjala
c70ec9fbe0 Build.xml: on macOS, add /usr/local/lib to rpath when building lime.ndll
This seems to be required with Xcode 15, but was not required previously
2024-05-09 15:07:12 -07:00
Chris Speciale
bb3b31b08d ObjectPool: Write documentation 2024-04-12 06:35:09 -04:00
Chris Speciale
307d3ed54e Update LICENSE.md 2024-03-24 05:00:49 -04:00
Josh Tynjala
5f63ef1ee3 ObjectPool: null safety because map exists() result with null key is unspecified 2024-03-21 10:10:25 -07:00
Josh Tynjala
1c8ecd30ea CHANGELOG 8.1.2 2024-03-13 08:34:09 -07:00
Tobi Laskowski
fc6b90538a Downgrade mbedtls to 2.28.7
On ios, we build statically linked executables. This means that if lime uses mbedtls 3, hxcpp is also forced to use it which can cause crashes and other problems, as hxcpp is currently written for 2.28
2024-03-11 12:41:07 -07:00
Josh Tynjala
0894d9010d haxelib.json: prepare for Lime 8.1.2 2024-03-07 15:42:43 -08:00
player-03
0a8a84a61b Prepare for Lime 8.1.2. 2024-03-07 18:06:08 -05:00
player-03
d0e2a34014 Merge pull request #1764 from player-03/AssetsMacro
Remove conditional compilation from `AssetsMacro` class.
2024-02-27 19:05:10 -05:00
Joseph Cloutier
2fd8817ed6 Exclude AssetMacro from doc builds. 2024-02-24 19:39:05 -05:00
Joseph Cloutier
adcccc863f Remove embedBytesHL() function.
This was likely added when `#if hl` began to fail, hiding the problem. With the issue fixed, there's no more need for a workaround.
2024-02-24 19:25:37 -05:00
Joseph Cloutier
95cef72616 Inline resourceName and resourceType.
Sure they're private, but even then they shouldn't be writable.
2024-02-24 19:13:49 -05:00
Joseph Cloutier
3b04a053b7 Simplify AssetsMacro.embedData(). 2024-02-24 19:11:32 -05:00
Joseph Cloutier
c11ae61a1b Replace #if html5 in AssetsMacro. 2024-02-24 19:05:51 -05:00
Joseph Cloutier
81e129f804 Replace #if !display in AssetsMacro.
And while I'm at it, the `if` statement doesn't need to span the whole function. It can be a simple guard clause.
2024-02-24 18:58:49 -05:00
Joseph Cloutier
929dd2b015 Use class reification for readability. 2024-02-24 18:29:23 -05:00
Josh Tynjala
045920596c WindowsPlatform: fix Visual Studio path discovery for uwp target
It was hardcoding VS 2017, but now uses vswhere.exe to find newer Visual Studio versions too.

Newer versions of VS don't actually support UWP JavaScript, though. However, if users have UWP installed in VS, the error message will be clearer about that lack of support.
2024-02-12 10:46:48 -08:00
Josh Tynjala
458ee49fbd FileDialog: fix compilation error for sys.io.File on non-sys desktop targets 2024-02-12 09:48:47 -08:00
player-03
76437a3014 Don't set asset.id to an empty string.
The `Asset` constructor sets `asset.id` to the asset's path, a sensible default. Of course, if the asset has a name instead of a path, we have to use that instead. Or if the user specified an ID, that's even better.

We just don't want to default to `""`, since then a bunch of assets could have the same ID.

Resolves #1758.
2024-02-11 21:18:19 -05:00
Josh Tynjala
c9605ee784 PlatformSetup: in verbose mode, failure to install lime alias logs a warning
On Windows, if HAXEPATH is not set, but it probably should be, and installing the alias fails, logs a warning suggesting to set HAXEPATH
2024-02-08 14:29:04 -08:00
player-03
4ed893afbd Use consistent capitalization.
Not that `dirSuffix` includes any letters yet, but it likely will in the future.
2024-02-04 18:05:54 -05:00
player-03
e72db10900 Change "vcruntime.dll" to "vcruntime140.dll" per HashLink's makefile. 2024-02-04 18:00:43 -05:00
player-03
6fe43ea1e4 Merge pull request #1752 from tobil4sk/fix/mac-HXCPP_ARM64
Set HXCPP_ARM64 by default when building on Apple Silicon Mac
2024-02-03 22:23:24 -05:00
player-03
3cbafc4622 Fix filename typo.
Closes #1756.
2024-02-03 22:21:50 -05:00
player-03
560ad5a6ba Don't force an architecture when building HL on Mac.
Originally, we forced compilation on x86, presumably because at the time HashLink lacked good 64-bit support. When this support improved, the line was changed to force x64 compilation rather than being removed, which may have been a mistake. Now that there are even more valid architectures, it just doesn't make sense to force one.
2024-01-29 20:30:06 -05:00
player-03
3ee35b05c0 Streamline architecture selection.
I don't know if there are any ARMv6 or ARMv7 Macs, but they were in the old switch block, so maybe?
2024-01-29 16:37:17 -05:00
Josh Tynjala
f8a70444f5 Some missing docs 2024-01-29 12:27:48 -08:00
player-03
17ad0577d7 Merge is64 and isArm64. 2024-01-28 16:17:24 -05:00
player-03
3d87dfeb97 Only set one of is64 and isArm64. 2024-01-28 16:03:37 -05:00
player-03
f0bae5692e Improve target selection logic in MacPlatform.rebuild().
The old logic could produce inappropriate results, such as attempting to compile an x86 binary on ARM64, or compiling no binary when "64" is specified on a 32-bit machine. I'd argue that it makes sense to only check the flags when they're supported, and not to bother otherwise.
2024-01-27 22:29:04 -05:00
tobil4sk
f06c78e82a Set HXCPP_ARM64 by default when building on Apple Silicon Mac 2024-01-27 13:20:22 +00:00
player-03
9fb1817f99 Merge pull request #1749 from ninjamuffin99/patch-1
Update howler.min.js
2024-01-25 19:06:52 -05:00
Cameron Taylor
8d38950108 Update howler.min.js 2024-01-25 01:14:42 -05:00