Initial Android support#262
Conversation
|
Thanks for the contribution 🙏
You may want to try using a recent version of CMake and specify the variable https://cmake.org/cmake/help/latest/variable/CMAKE_CROSSCOMPILING_EMULATOR.html Here are examples illustrating how the variable is used: https://github.com/dockcross/dockcross/blob/1c10fb2ce795a85707f063eb33e42b0f67d2acec/linux-armv7/Toolchain.cmake#L19 |
|
I've tried |
|
I've found |
|
@jcfr It looks like there nothing could be used for I suppose it should be maintained manually like |
|
No, I found a way: #!/bin/sh
adb push "$1" /data/local/tmp/ 1>/dev/null 2>/dev/null
adb shell /data/local/tmp/$(basename $1)It requires to start up emulator with correct ABI, but latest Google emulator for ARM CPUs are 7.1.1 Android. Now it configures but fails on compilation: |
abd7390 to
cfffedc
Compare
|
Linker failure can be solved with checks for Clang compiler and option Now it fails on assembler |
|
I have to disable extension |
|
To fix Now I stopped on error: I suppose it shouldn't be called from emulation. |
|
I've managed to solve it by fix adb-emu.sh. It is left last step: But at least I already get |
cfffedc to
c841b09
Compare
|
I've disabled "Relocate sysconfigdata_m_generic_.py and update pybuilddir.txt" step and python successfully built. Now it fails on |
|
Thanks @o01eg for working on this and sharing your progress 🙏 Just done with a week long hackathon, I will be traveling for few days and then will head to an other week long hackathon ... this means that I may not have a lot of time to review your awesome work right away. |
|
I've removed last python call in installation and now I get |
3684b99 to
347426a
Compare
|
I've rebased it. Does something need to be done to be accepted? |
|
Fixed configuration for Android-x86 |
|
Example of working application https://github.com/o01eg/freeorion/tree/python-parser-exec-techs_android |
322127e to
555170d
Compare
189c857 to
4d02b74
Compare
|
Add Github Actions CI to build it |
Translated to CMake from a patch on the Yocto project: http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/python/python3/0002-Don-t-do-runtime-test-to-get-float-byte-order.patch?h=zeus It avoids the execution of a program on the target device, and produces a clearer endianness result.
4d02b74 to
d47d7ce
Compare
|
Rebased, fixed conflicts. Builds on CI https://github.com/o01eg/python-cmake-buildsystem/actions/runs/2073151534 Also builds with boost https://github.com/o01eg/freeorion-sdk/actions/runs/2073529344 |
|
Can I do something else for this PR to be accepted? |
Fixes #253 and fixes #158