Commit Graph

218 Commits

Author SHA1 Message Date
Josh Tynjala
b866632a6f tools: allow -x86_64 and -x86_32 as command line flags to select those architectures instead of defaults (closes #1819)
Still supports -32 and -64, though, for backwards compatibility. We could consider removing those in Lime 9.
2024-07-19 14:46:47 -07:00
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
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
Tobiasz Laskowski
5eafeb047d [tools] Support cross compiling arm64 ndll on mac 2024-07-06 14:04:29 +01: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
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
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
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
Joseph Cloutier
8066037cdd Bug fix: Node.js was being treated as a web worker context. 2024-06-10 14:07:22 -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
tobil4sk
45972bb733 Copy correct ndll on arm64 mac 2024-05-31 14:40:23 -07:00
Joseph Cloutier
224c0a0e93 Delete stale dependencies in addition to stale assets. 2024-05-29 20:55:09 -04:00
Josh Tynjala
ae941e7442 MacPlatform: running install_name_tool with System.runCommand() works better than new Process()
new Process() was crashing before the process could start for some reason
2024-05-29 15:57:41 -07:00
Josh Tynjala
5381f96061 Allow cross-compiling to Linux cpp from other operating systems
Similar to #1661, except targeting Linux instead of Windows

On macOS, need to install https://github.com/messense/homebrew-macos-cross-toolchains

On Windows, I think it may be possible to get Linux compilers with Cygwin, but I haven't tried
2024-04-26 10:03:23 -07:00
Josh Tynjala
c26a73fc3c MacPlatform: when rebuilding the bundled HashLink, bundle all Homebrew dependencies too
Previously, a compiled .app file for HL/C wouldn't launch at all because it couldn't find these libraries. For HL/JIT, it would launch, but it might crash later when it needed to load a missing library.

We need to bundle these dependencies into the .app file so that it can successfully launch on systems that don't have Homebrew installed, or haven't separately installed the exact set of Homebrew libraries that we need. We also don't want to have to make people ask their users to install Homebrew and to install the dependencies manually.

Tested the .app files for both HL/JIT and HL/C on a system without Homebrew. It failed before, but now it launches successfully!
2024-04-25 15:20:47 -07:00
Joseph Cloutier
657ad24682 Merge branch 'develop' into 8.2.0-Dev 2024-04-13 03:09:20 -04: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
f8f97b5771 IOSPlatform: don't copy 32-bit liblime.iphonesim.a by default
Followup to commit 1186d9e
2024-02-09 10:28:46 -08:00
Josh Tynjala
1186d9e75a IOSPlatform: don't rebuild 32-bit liblime.iphonesim.a by default anymore
Similar to how we removed armv7 from the defaults. 32-bit iOS is very old and no longer supported by Apple.
2024-02-09 08:51:05 -08:00
Joseph Cloutier
f52b59bbff Merge branch 'develop' into 8.2.0-Dev 2024-02-05 14:46:33 -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
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
Josh Tynjala
c3170a0577 Merge branch '8.2.0-Dev' into feature/hlc 2024-01-30 09:16:34 -08: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
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
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
86bcc7352d Tweak warning message. 2024-01-18 13:35:07 -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
Joseph Cloutier
09724f4bca Fix HAS_ICON logic on Android.
If an icon already exists, we still want `HAS_ICON` to be true, but we also want to avoid adding even more icons.
2024-01-14 12:18:42 -05:00
player-03
55dfc267bb Merge branch '8.2.0-Dev' into ConfigData 2024-01-13 23:41:14 -05:00
Joseph Cloutier
6d437283af Merge branch 'develop' into 8.2.0-Dev 2024-01-13 23:35:33 -05:00
Joseph Cloutier
8b07a83991 Remove unnecessary casts. 2024-01-13 16:15:57 -05:00
player-03
24bc9b2495 Merge pull request #1661 from tobil4sk/mingw-fixes-develop
Allow cross compiling Windows projects with MinGW
2024-01-12 13:56:37 -05:00
Josh Tynjala
b021dbeae7 lime display: if the project file is newer than an existing debug/release/final.hxml file, don't consider the .hxml file valid anymore
Code intelligence should always use the newest hxml content, so the fallback mode where the hxml content is generated, instead of loaded from an existing .hxml file, should be used when the project file is newer.

For instance, if the user changes any file/dir paths in their project file, continuing to use the existing .hxml file could lead to confusing error messages that still reference the old/cached file paths. It should always use the latest paths or other values from the project file. It should be considered a bug to use the old cached paths.

Previously, as a workaround, the user would need to clean or build their project again to get updated .hxml files. It might also require restarting their editor/IDE too. Bad developer experience when we can detect this case automatically.
2024-01-05 13:54:36 -08:00
Joseph Cloutier
cb03d9cd9a Move variable to where it's used. 2023-12-21 22:31:58 -05:00
Joseph Cloutier
60064f55b3 Make AndroidManifest.xml more configurable.
Now if you need to add something to the `<application />` or `<activity />` tags, you can do it from project.xml. This will require new documentation, however.
2023-12-21 22:30:58 -05:00
tobil4sk
186124dfd3 Avoid error no such file or directory: 'arm64' 2023-12-20 19:51:56 +00:00
Josh Tynjala
6dc0c4c785 tools: allow -hlc on windows/mac/linux without -hl 2023-11-22 11:46:33 -08:00