-
-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update hashlink. #1517
Update hashlink. #1517
Conversation
9db8416
to
c5775c0
Compare
I'm unsure how this makes things easier. Are apps going to have to load from both lime.hdll and lime.ndll, causing name conflicts? Are you saying it's clearer to have unique names? The fact that this is all one commit makes it hard to follow. If it was me, I'd break it up into three commits:
Even with simple commit messages, this will make it much easier to see why each change was made. (Though for the third commit I'd recommend a sentence or two of explanation.) |
Correct
It makes it easier by doing what the haxe compiler expects us to do. Now the functions are named |
c5775c0
to
adcdd6f
Compare
I've split the commit up into three, as you suggested. |
Perfect!
Ah, of course.
So you're saying HashLink/C was broken, and this was never detected because we'd only tested HashLink bytecode. (It wouldn't be the first time something like that happened...) Just to make sure I can understand, wouldn't it have required fewer changes to switch to |
Yes.
Personally I think |
I cannot reproduce the Windows build failure on my machine, so I don't know what's wrong. As for the Android failure, Lime seems to be using API level 16, whereas Alternatively I can try patching Hashlink, but I would really like to avoid that. |
Huh, well that led me down a rabbit hole. Lime targets API level 28 but loads header files from the Lime does already use If you want to update the minimum SDK version - and I agree you have a good case for it - please submit it as a separate pull request, so we can discuss it separately. (You can use 6dce7ad as a template - search for the strings "android-14" and "android-16".) |
We can repro the build error on Windows namely the halt at JPEG.cpp. How can we help to track the root cause down? |
Does it still fail if you combine this with #1519? |
That’s the only way we tried and it fails. Haven’t tried without that commit. |
I'm surprised it's the same error. I don't know what's up with that, but I'll take a closer look later. |
I can also reproduce the Windows error now, I think I forgot to checkout my branch when I tested it last time. The issue is the same as here: native-toolkit/libjpeg#2. |
Interesting. So the solution is to comment |
Or to merge the pull request I linked (or even to move to libjpeg-turbo). Personally I would prefer to keep our bundled hashlink headers as close as possible to upstream. (Ideally we could even add upstream hashlink as a git submodule and make |
I'd love to see HL added as a submodule, but I'm pretty sure Lime makes several other modifications. All of them will have to be undone before we can pull it directly. |
The only modification lime makes at the moment is renaming the |
7317164
to
f9e2508
Compare
So, hashlink is now a submodule. |
And of course I forget to install the bloody packages. |
becc2c0
to
b5bff78
Compare
I think the iOS failure is because |
6e0e771
to
fd8655b
Compare
1af49a0
to
1e488c3
Compare
0ff3b34
to
0238825
Compare
I've updated the PR to use the latest version of hashlink (1.12, which is now released). |
Is there any reason why this isn't merged? |
It seem to work on my machine. At least, I can rebuild lime.hdll and test DisplayingABitmap. Looking at BuildHashlink.xml (and Yet somehow lime.hdll is slightly larger than lime.ndll... Maybe that's just because Hashlink includes its own copies of several of the same libraries (inconveniently spread across two folders). |
Hashlink apps do not depend on
|
Looking back through open issues, I came across #1524, which still needs resolution. Is fmt.hdll one of the binaries you added? |
Yes, all the binaries needed for things in the Haxe standard library are added. |
Oh hey, you did mention it. Whoops. |
lets gooo this got merged! |
If anyone has issues rebuilding after this pull request was merged, don't forget to update submodules! I got the following error on macOS:
But it was an easy fix: git submodule update --recursive |
Getting the following error when I try
It appears to be looking for libhl.dylib in the wrong location. When I "Show Package Contents" in the .app file, it is actually located here: /Users/joshtynjala/Development/feathersui/feathersui-openfl/samples/components-explorer/bin/hl/bin/Components.app/libhl.dylib |
Hmm... I'll have to look again at were the tooling copies things. |
That's going to come up a bunch in the near future.
A search for "Contents/MacOS" turns up MacPlatform.hx and a bunch of SDL files, meaning the problem lies in |
Just in case it helps, I should point out that I saw that most of the .hdll files are in the root of the .app directory with the libhl.dylib too. lime.hdll in in Contents/MacOS, though. |
Found the line responsible for libhl.dylib in particular. System.copyFile(Path.combine(hlPath, "libhl.dylib"), Path.combine(applicationDirectory, "libhl.dylib")); And here's what that line was replacing. -// System.copyFile(targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-Debug" : "") + ".hl",
-// Path.combine(executableDirectory, project.app.file + ".hl"));
-System.recursiveCopyTemplate(project.templatePaths, "bin/hl/mac", executableDirectory);
-// let's not keep around hxcpp's hash files
-for (file in System.readDirectory(applicationDirectory))
-{
- if (Path.extension(file) == "hash")
- {
- System.deleteFile(file);
- }
-}
-System.copyFile(targetDirectory + "/obj/ApplicationMain.hl", Path.combine(executableDirectory, "hlboot.dat"));
-System.renameFile(Path.combine(executableDirectory, "hl"), executablePath);
+HashlinkHelper.copyHashlink(project, targetDirectory, applicationDirectory, executablePath); The old code mostly referenced |
@joshtynjala Since I'm not set up for Mac testing, can you be the one to change line 209 and push the commit? I'm sure it's the answer, I just want to do things properly. |
…when copying HashLink (references #1517)
Changing from |
Update hashlink to latest version (1.12), and add all the hdll's required for the haxe std.
Also change the names of exported functions in lime.hdll, in the interest of making future HL/C support easier.
Closes #1516.
Tested on Linux and Windows.