sagiadinos / garlic-player

Digital Signage Player based on SMIL
https://garlic-player.com
GNU Affero General Public License v3.0
88 stars 17 forks source link

Unable to compile for Android-x86_64 #42

Closed electrikjesus closed 10 months ago

electrikjesus commented 10 months ago

Describe the bug Garlic-Launcher is compiled as a universal APK, and I was expecting an x86 or x86_64 version of Garlic-Player to be available for download, but it was not.

So I went to the source, and found out why...

Following the instructions from the build scripts lead to many missing assets required by the build scripts, like the src/player-c2qml/android/AndroidManifest.xml for example.

To Reproduce Steps to reproduce the behavior:

  1. update environment variables for local user in the 2.1_buildAndroid.sh
  2. try and build
  3. See error

Expected behavior directions we can follow or some kind of feedback from the scripts.

sagiadinos commented 10 months ago

Launcher and player are not comparable.

Garlic-launcher is a native Android app based on Java. The created bytecode uses a runtime. Garlic-player based on C++ and uses the platform-independent Qt-Framework.

The concept is using a tiny native app as an interface to the operating system, while the “complex” player is more or less agnostic and uses OS-functions via a standardized interface.

The Android version of the garlic-player is built by Android NDK for one ABI. This means armeabi-v7a, x86, x86_64 or arm64-v8a.

If you need to build for x86_64 use the precompiled android_x86 lib from Qt 5.12.12, change export ANDROID_ARCH to android_x86 In line https://github.com/sagiadinos/garlic-player/blob/master/build_scripts/player/2.1_buildAndroid.sh#L51C94-L51C105 change the armeabi-v7a to x86_64

Qt only supports multiple ABIs in one APK since version 5.14. But a multi-ABI-build is not trivial for garlic-player.

Just now, I am working with Qt5.15.11 as a step stone for porting the garlic-player code to Qt6. This includes the Android version. So, allowed me some days to update the scripts.

sagiadinos commented 10 months ago

The Android multi ABI build process is ready.

Build instructions are updated: https://garlic-player.com/garlic-player/docs/build-instructions/android/ For build Qt5.15.1x: https://garlic-player.com/garlic-player/docs/build-qt-lib/build-qt-android/ A compiled binary for x65, x86_64, armv7 and armv8: https://garlic-player.com/downloads/ci-builds/latest_android_player.apk

But from 13 Mb it grows to 85 MB now.

electrikjesus commented 10 months ago

Thank you for the quick response and solutions. You ROCK!!