https://gitlab.winehq.org/winehq/tools/-/blob/master/packaging/android/build...
It’s good to know that such a script exists. I wasn’t aware of it before, as there are no references to it in the Wine source tree, and manual searches mostly lead to third-party scripts. I also tried to locate it with the help of ChatGPT, but it didn’t come up there either. In any case, I’m glad there is an official one. Would it make sense to add a reference to this script in `wineandroid.drv`'s `Makefile.in`? That said, I still have the impression that preparing the prefix and pulling required dependencies (NOT building them) are steps that could be handled by the main Wine build system, since they are required for producing a usable Android package. For the purpose of the makefile test rules, missing dependencies could simply result in warnings rather than hard failures. Resolving library paths from detected CFLAGS/LDFLAGS can also be reliably reproduced using the linker trace option (`-Wl,-t`), so it would likely be more appropriate to handle this in the Wine build system rather than in external scripts. Another issue is that tools like `wineboot` and `winedbg` used to be scripts, but are now symlinks. Since `aapt` does not preserve or handle symlinks, they cannot be packaged directly into the APK, which requires replacing them with wrapper scripts during staging.
The makefile rules are only meant to test that the build can succeed.
I understand that. However, in practice the Android project will not build with the system Gradle anyway. The Android Gradle plugin is updated frequently by Google and typically requires a newer Gradle version than what is packaged in most distributions, so relying on the system Gradle is not sufficient to validate the build. Given that, it still makes sense to keep APK generation separate from the default `all` target, since a proper build requires additional setup and a suitable Gradle environment. The other changes should be fine. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10354#note_132596