Commit Graph

5178 Commits

Author SHA1 Message Date
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
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
Josh Tynjala
f2ef5d0082 add comment about cast 2024-01-22 10:43:33 -08:00
Timur
c58013c5e6 Fix "don't know how to cast array" error.
This can happen when compiling HL with `analyzer-optimize`.
2024-01-22 10:43:33 -08:00
player-03
f0aae1f8f2 Correctly check for errors in Haxelib.runProcess().
In safe mode, this function includes its own `try ... catch` block, so we don't need one here. Instead, we need to check if the output is null.
2024-01-21 14:11:51 -05:00
player-03
13865cbbc9 Make better use of getPath().
If you check `paths.exists()` first, then there's no benefit to calling `getPath(id)`: it always just returns `paths.get(id)`. It's more effective to let `getPath()` perform all of its checks.
2024-01-18 14:02:58 -05:00
player-03
558fd0791c Merge pull request #1700 from EliteMasterEric/bugfix/library-get-path
Always use `getPath` instead of `paths.get()` directly.
2024-01-18 13:57:13 -05:00
player-03
40d70d8e53 Use paths.get() when pathGroups was already checked. 2024-01-18 13:56:44 -05:00
player-03
c121dfdd30 Merge pull request #1734 from soccertutor/fix/ios-rebuild
Remove armv7 from default iOS target architectures
2024-01-18 13:37:02 -05:00
player-03
d520fc6a85 Merge pull request #1745 from MAJigsaw77/patch-1
Don't compile `armv7` if the `architecture` excluded it.
2024-01-18 13:35:55 -05:00
player-03
86bcc7352d Tweak warning message. 2024-01-18 13:35:07 -05:00
player-03
a414f64173 Optimize CI workflow. (#1743)
See pull request for details. Summary:

* Reduce dependencies between CI jobs, allowing more of them to run in parallel.
* Use Linux for as many jobs as possible.
* Merge matching "-ndll" and "-samples" jobs. This way, the latter doesn't have to waste time recreating the former's environment, and the workflow summary is simplified. Downside: this delays package-haxelib.
* Update to a newer macOS version, as the old version massively slowed down Homebrew.
* Skip the HelloWorld test for Mac and iOS, as those two can build slowly under some circumstances, delaying package-haxelib. These could be restored later, if performance seems good enough.
* Add `HAXE_VERSION` environment variable, so future updates will only have to make one change. Unfortunately, doing the same for the Windows/Mac/Linux versions would severely hurt performance, so those remain hard-coded.
* Split up some steps within jobs for better organization.
2024-01-18 13:22:05 -05:00
Mihai Alexandru
d6a3954a57 Also warn the user about it. 2024-01-17 06:34:40 +02:00
Mihai Alexandru
380f64cb6e Forgot this 2024-01-17 06:17:00 +02:00
Mihai Alexandru
1f0ddb34cb Just in case 2024-01-17 05:59:08 +02:00
Mihai Alexandru
8648b05991 Update AndroidPlatform.hx 2024-01-16 15:15:06 +02:00
Josh Tynjala
a48898849e actions: use github.workspace instead of platform specific environment variables syntax 2024-01-10 10:11:11 -08:00
tobil4sk
186124dfd3 Avoid error no such file or directory: 'arm64' 2023-12-20 19:51:56 +00:00
Josh Tynjala
e6205bf3aa PlatformSetup: openfl alias setup on Linux was missing try/catch, but lime alias setup and other platforms had it 2023-12-08 09:46:21 -08:00
andrew-git
c40ec312fc Joystick: add try/catch around navigator.getGamepads() because it might throw a JS SecurityError if we don't have permission to call it (#1728)
Fixes the following exception when we don't have permissions:

> Failed to execute 'getGamepads' on 'Navigator': Access to the feature "gamepad" is disallowed by permissions policy.

By catching the exception, it should now behave the same as older browsers, where navigator.getGamepads() doesn't exist at all.

In the future, it might make sense to set a flag if navigator.getGamepads() throws, and skip calling it more than once. However, we may want to listen for some kind of browser event that indicates that permission was granted later, and clear the flag when appropriate. Perhaps the gamepadconnected event?

---------

Co-authored-by: Josh Tynjala <joshtynjala@bowlerhat.dev>
2023-12-01 11:09:34 -08:00
Josh Tynjala
d68bce1a87 actions: svg.n needs openfl 2023-11-27 10:14:36 -08:00
Josh Tynjala
b330249a88 actions: build svg.n 2023-11-27 09:20:40 -08:00
Josh Tynjala
d05f10b15f prepare for Lime 8.1.1 8.1.1 2023-11-08 09:26:20 -08:00
player-03
a6aad10e92 Merge pull request #1721 from player-03/escaped-characters
Only escape backslashes in Android SDK/NDK paths. The others don't need to be escaped in .properties files, and shouldn't be escaped in .gradle files.
2023-10-25 19:08:19 -04:00
Joseph Cloutier
d931869dcf Only escape backslashes in Android paths.
Neither .properties nor .gradle files require anything else to be escaped. And at least in .gradle files, escaping anything else is incorrect.
2023-10-24 01:13:32 -04:00
player-03
1a3a9bd5c5 Avoid integer overflow for long sounds.
Multiplying `dataLength * 8` produces a high number, which in the case of very long audio files can exceed the integer limit. Multiplying by 8.0 coerces to float, allowing much higher values.

An alternate solution is to divide first and multiply by 8 second, thus keeping the number from getting too large at any point. However, the purpose of the 8 is to convert `dataLength` from bytes to bits, so it's clearer if those two are close together.
2023-10-19 22:57:43 -04:00
Josh Tynjala
51273fb258 FUNDING: add joshtynjala 2023-10-18 10:24:56 -07:00
Josh Tynjala
6d36d6f874 CHANGELOG and releasenote 8.1.0 2023-10-16 11:01:46 -07:00
Josh Tynjala
2b50fe5273 actions: move some jobs from macos to ubuntu 2023-09-29 11:13:05 -07:00
Josh Tynjala
667567f7bd WebAudioContext: add missing resume() field for non-html5 platforms to fix doc gen 2023-09-29 09:31:08 -07:00
Josh Tynjala
27c528ffbb air externs: don't use openfl APIs in lime 2023-09-12 08:47:23 -07:00
Josh Tynjala
7979a99c7b fill in more of sys file externs for AIR 2023-09-12 08:02:40 -07:00
Josh Tynjala
0b87e1aa63 fix invalid air extern 2023-09-12 07:46:08 -07:00
player-03
d4a04c80df Merge pull request #1709 from UncertainProd/remove-hello
Removed unused field `hello` in Float32Array.hx
2023-08-19 12:39:16 -04:00