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

iOS and Android support #422

Open
ncannasse opened this issue Sep 17, 2018 · 12 comments
Open

iOS and Android support #422

ncannasse opened this issue Sep 17, 2018 · 12 comments

Comments

@ncannasse
Copy link
Member

There are often questions about Heaps compilation for iOS or Android.
We need to update the Wiki with these

@qkdreyer
Copy link
Contributor

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

@zommerfelds
Copy link
Contributor

@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?

@qkdreyer
Copy link
Contributor

qkdreyer commented Nov 8, 2020

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 :)

@Lerg
Copy link

Lerg commented Jan 14, 2021

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";
}

@zommerfelds
Copy link
Contributor

@Lerg, any way you can share your working project with build instructions?

@qkdreyer
Copy link
Contributor

@Lerg feel free to drop a PR on https://github.com/qkdreyer/heaps-android if you can :)

@zommerfelds
Copy link
Contributor

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.)

@Lerg
Copy link

Lerg commented Mar 29, 2021

Can you give me a heaps game/tool source code that would be a good fit for testing on a device?

@zommerfelds
Copy link
Contributor

I currently don't have any apps to share but I presume a Heaps hello world would be a good place to start?

@qkdreyer
Copy link
Contributor

qkdreyer commented Mar 31, 2021

@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

@rainyt
Copy link

rainyt commented Jun 28, 2022

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?

@rainyt
Copy link

rainyt commented Jun 29, 2022

https://github.com/rainyt/zyheaps

Hi, these are some of my achievements. It has the ability to compile heaps Android targets

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

5 participants