Closed 20kano closed 1 year ago
That's a bit tricky. In C with CMake I have created a lot of build system magic to build an Android APK without Gradle. I guess this would need to be replicated in the Zig build system and it wouldn't be standalone but require an installed Android SDK (for the extra tools required for bundling and signing the APK file).
Googling around a bit it looks like this project solves that issue: https://github.com/MasterQ32/ZigAndroidTemplate, but it's a bit much to include in the sokol-zig repo. Might make sense to create a separate repository... or hopefully once Zig gets its package manager it might be possible to put this stuff into a helper package...
In C with CMake I have created a lot of build system magic to build an Android APK without Gradle.
Thanks. I've tried your https://github.com/floooh/sokol-samples#to-build-for-android and tried to find out how to do it, but due to my unfamiliarity with compiling C, I could not find which file to refer to. Could you please tell me which file to refer to?
The interesting stuff actually is all in Python scripts...
E.g. the automated Android SDK and NDK installation is here,
https://github.com/floooh/fips/blob/master/mod/android.py
Creating and signing the Android-APK is here:
https://github.com/floooh/fips/blob/master/tools/android-create-apk.py
...that last script is integrated into cmake as a custom post-build-step here:
It would be helpful to have an example of Zig + Sokol running on Android.