Skip to content
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

How to build Android or IOS ? #4

Open
rayloi777 opened this issue Mar 6, 2022 · 5 comments
Open

How to build Android or IOS ? #4

rayloi777 opened this issue Mar 6, 2022 · 5 comments

Comments

@rayloi777
Copy link

rayloi777 commented Mar 6, 2022

HLC Window is working but
How to build HLC Android or HLC IOS ?
Thanks

@Apprentice-Alchemist
Copy link
Owner

For Android see https://github.com/HaxeFoundation/hashlink/wiki/Android

I'm not sure if anything needs to be done on the KincHL side, I'll have a look at that.

For iOS: I don't have any Apple devices, so I can't help you.

@rayloi777
Copy link
Author

maybe need cmakelist to build arm kinc.hdll

@Apprentice-Alchemist
Copy link
Owner

I've (hopefully) added support for iOS.
Android support is not working, and I don't have the time to finish it nor do I have a need for it personally.

If you want it, pull requests are always welcome 🙂 .

Things required:
You'd have to add support for "custom" libraries on Android to kmake.
Best way is probably to copy custom libraries to the jniLibs folder in the gradle project.
Or maybe something else, I'm not familiar with either Android or CMake.

And then you'd also have to make sure my little hack here works:

KincHL/Build.hx

Line 141 in 2e3e639

File.saveContent("app/CMakeLists.txt", File.getContent("app/CMakeLists.txt") + '\nset_target_properties(kinc PROPERTIES SUFFIX ".hdll")'); final configuration = debug ? "Debug" : "Release";

  • figure out where gradle puts files and copy kinc.hdll to somewhere more easily reachable.

@Apprentice-Alchemist
Copy link
Owner

Another solution would be to build your entire project with kmake, and put hl + kinchl in the same library, instead of doing dynamic linking.

@rayloi777
Copy link
Author

rayloi777 commented Apr 29, 2022

Thanks for your help 😘

but

HaxeFoundation/hashlink#503

Hashlink through Apple's Rosetta 2 (on MacOS 12.0) emulation layer, debugging currently is broken. 🤯🤯🤯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants