Repository navigation
Add basic Android APK integration - #1001
Conversation
|
The 90-degree rotation is a related Tempest swapchain issue, not an OpenGothic menu issue. Fix submitted in Try/Tempest#119: use |
| traceback.collect(0); | ||
| traceback.log(db, std::cout); | ||
| #elif defined(__LINUX__) || defined(__APPLE__) | ||
| #elif (defined(__LINUX__) && !defined(__ANDROID__)) || defined(__APPLE__) |
There was a problem hiding this comment.
So, crash-logging wont work by look of this code?
That quite surprising, based that android still have compatibility with unix/linux
There was a problem hiding this comment.
The NDK lacks <execinfo.h> and backtrace. Android now uses _Unwind_Backtrace and dladdr, including module-relative addresses for offline symbolization.
| Tempest::Log::setOutputCallback([](Tempest::Log::Mode mode, const char* text) { | ||
| #if defined(__ANDROID__) | ||
| const int priority = mode==Tempest::Log::Error ? ANDROID_LOG_ERROR : mode==Tempest::Log::Debug ? ANDROID_LOG_DEBUG : ANDROID_LOG_INFO; | ||
| __android_log_write(priority,"OpenGothic",text); |
There was a problem hiding this comment.
Tempest::Log already implements __android_log_print, so application never really need to relay on OS-specific api
There was a problem hiding this comment.
Removed the application-side Android logging call. Tempest::Log handles logcat output; the README now filters its app tag.
|
|
||
| # installation | ||
| install(TARGETS Gothic2Notr Spacer DESTINATION bin) | ||
| install(TARGETS Gothic2Notr DESTINATION bin) |
There was a problem hiding this comment.
Restored the single install(TARGETS Gothic2Notr Spacer DESTINATION bin) call.
|
@Solessfir PR looks good - I'll need to find time to run/test it locally and then will merge (hopefully this week) |
|
Testing now, with clean install of android-studio (rabbit). There is apparently mistake in project generation: |
|
Merged, thanks! And also I managed to get main menu running on emulator - cant wait to input support :D |
Adds a minimal ARM64 Android APK using Tempest's NativeActivity/Vulkan backend and
add_android_apkhelper. Depends on Try/Tempest#120 for native application-storage paths.Gothic2Notras a shared library; the APK target does not build Spacer.NativeActivity, with storage detection inInstallDetectinstead of a Java/JNI bridge._Unwind_Backtraceanddladdr.Build through the existing CMake project with the NDK toolchain, then run
cmake --build build/android --target OpenGothic-apk. Build, installation and game-file copy commands are inandroid/README.md. No hand-maintained Gradle project is added.Ray tracing and mesh shading are disabled in this initial build. Touch/controller input, importing, HDR and gameplay changes are separate follow-ups.
ARM64 release native compilation, APK assembly, Android lint and Windows Release compilation pass locally. This revised native-storage path has not been tested on a device yet. The earlier revision reached the Vulkan main menu on a Galaxy S24 but crashed on Home during
Resources/VFS cleanup.DmLoader_createfails withDmResult_MUTEX_ERROR: NDK 27 requiresmtx_plain | mtx_recursive, whereas the pinned dependency passes onlymtx_recursive. Its failure path leaves a dangling output pointer, which OpenGothic subsequently uses. The pointer-contract fix is pending in GothicKit/dmusic#14.