Any complexity that's related to packaging should be handled in external scripts, like we do for Debian/RPM/macOS.
That makes sense. In that case, it would be even more consistent to keep APK generation separate from the default `all` target, so the build can be completed first, then optionally staged (prefix prepared, files adjusted), and only then packaged by the external script. At the same time, to avoid confusion or silent misbuilds, the APK target could perform explicit checks and fail fast if the staging is incomplete, for example verifying that key components like `libfreetype.so` in libs, and `wineserver` and `ntdll.so` in their expected locations are present. If not, it could print a clear error message pointing to the official packaging script as the expected workflow.
There shouldn't be any reason to ship these symlinks on Android, nobody is going to run them from the command line.
You're right. I initially ran into crashes and suspected symlinks were the issue, but it turned out to be a `wine-preloader` segfaulting problem that was resolved by updating to a newer NDK. I will drop that part later.
I'm happy to remove things from the makefile, but that means the gradle script etc. should be moved to the packaging repo as well. We don't want to include dead code.
I’m not suggesting to remove this entirely, only to move APK generation into a separate target instead of keeping it as part of `all`. To reduce the risk of misuse, I can also update the Gradle script to explicitly fail with clear errors if the Gradle/AGP versions do not meet the expected requirements. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10354#note_132658