Open ncannasse opened 6 years ago
I got both iOS and Android support with ci build status working :
Even if the android build generates an apk artifact, it still needs more work because I'm not correctly initializing heaps in it yet
@qkdreyer how far did you get with the Android build? Does the demo app work in the apk or is there still work to be done?
Actually the apk builds but the app doesn't run properly because of some ndk library issue. I will try to look at it again when a newer version of it get released :)
Today I was able to run a minimal heaps project on Android. It was hard, but I've managed to get the right combination of libraries and tools. Based on @qkdreyer repo. Gradle 6.5 (latest) NDK tools 21.3.6528147 (22 doesn't work) SDL2 2.0.14 (latest) OpenAL didn't update, the latest version doesn't compile. targetSdkVersion 30 with androidx appcompat
Basically I had to update SDL2, including it's Java files. And add this to HeapsActivity
protected String getMainFunction() {
return "main";
}
@Lerg, any way you can share your working project with build instructions?
@Lerg feel free to drop a PR on https://github.com/qkdreyer/heaps-android if you can :)
Hey all, I want to share a different approach I've built using Cordova (WebView based): https://github.com/zommerfelds/heaps-cordova
I automated the whole APK generation process inside Docker (see README). No build tool or Android Studio is needed since Cordova can handle building the package. This is using the Haxe JS target, so in the end the app runs in a WebView inside the app. So far I've been very happy with this approach for my simple game. I only set it up for Android but it should be simple to add the iPhone target to the Cordova project. Feel free to comment.
Of course a native approach like @Lerg's would potentially be nicer for performance reasons. (Weirdly though, I noticed some things run smoother on my laptop browser than on the HashLink version.)
Can you give me a heaps game/tool source code that would be a good fit for testing on a device?
I currently don't have any apps to share but I presume a Heaps hello world would be a good place to start?
@Lerg maybe you can use the heaps world sample as reference :
cd samples && haxe -hl world.hl World.hx -lib heaps -lib hlsdl -lib hxbit -lib format -lib hashlink -D resourcesPath=world_res -main World && hl world.hl
E/libEGL: validate_display:92 error 3008 (EGL_BAD_DISPLAY)
I created APK based on the template, and now I have this problem. What could it be?
https://github.com/rainyt/zyheaps
Hi, these are some of my achievements. It has the ability to compile heaps Android targets
There are often questions about Heaps compilation for iOS or Android. We need to update the Wiki with these