aboutsummaryrefslogtreecommitdiff
path: root/depends/packages/qt.mk
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2021-03-24 19:01:56 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2021-03-24 19:02:01 +0100
commit23b15601dfeb0f4e61343acce3bf3111f54ea6e7 (patch)
treef58adb112d9d22267d26f07b309b0aa9f6a9047f /depends/packages/qt.mk
parentb1281b5d8fe346bb275929acbc7fba82c24621cd (diff)
parent246774e26459cb3652e308880abdd140e8e9d204 (diff)
downloadbitcoin-23b15601dfeb0f4e61343acce3bf3111f54ea6e7.tar.xz
Merge #17227: Qt: Add Android packaging support
246774e26459cb3652e308880abdd140e8e9d204 depends: fix Qt precompiled headers bug (Igor Cota) 8e7ad4146d55f472e3d1dacaabb6b7dee704a896 depends: disable Qt Vulkan support on Android (Igor Cota) ba46adaa1abd51798394b5bad3799021adc237d2 CI: add Android APK build to cirrus (Igor Cota) 7563720e30a3052b7ee390f1b3d2874856fd073a CI: add Android APK build script (Igor Cota) ebfb10cb75adb704418d08197681c1e742e63bd5 Qt: add Android packaging support (Igor Cota) Pull request description: ![bitcoin-qt](https://user-images.githubusercontent.com/762502/67396157-62f3d000-f5a7-11e9-8a6f-9425823fcd6c.gif) This PR is the third and final piece of the basic Android support puzzle - it depends on https://github.com/bitcoin/bitcoin/pull/16110 and is related to https://github.com/bitcoin/bitcoin/pull/16883. It introduces an `android` directory under `qt` and a simple way to build an Android package of `bitcoin-qt`: 1. Build depends for Android as described in the [README](https://github.com/bitcoin/bitcoin/blob/master/depends/README.md) 2. Configure with one of the resulting prefixes 3. Run `make && make apk` in `src/qt` The resulting APK files will be in `android/build/outputs/apk`. You can install them manually or with [adb](https://developer.android.com/studio/command-line/adb). One can also open the `android` directory in Android Studio for that integrated development and debugging experience. `BitcoinQtActivity` is your starting point. Under the hood makefile `apk` target: 1. Renames the `bitcoin-qt` binary to `libbitcoin-qt.so` and copies it over to a folder under `android/libs` depending on which prefix and corresponding [ABI](https://developer.android.com/ndk/guides/abis.html#sa) `bitcoin-qt` was built for 2. Takes `libc++_shared.so` from the Android NDK and puts in the same place. It [must be included](https://developer.android.com/ndk/guides/cpp-support) in the APK 3. Extracts Qt for Android Java support files from the `qtbase` archive in `depends/sources` to `android/src` There is also just a tiny bit of `ifdef`'d code to make the Qt Widgets menus usable. It's not pretty but it works and is a stepping stone towards https://github.com/bitcoin/bitcoin/pull/16883. ACKs for top commit: MarcoFalke: cr ACK 246774e264 laanwj: Code review ACK 246774e26459cb3652e308880abdd140e8e9d204 Tree-SHA512: ba30a746576a167545223c35a51ae60bb0838818779fc152c210f5af1413961b2a6ab6af520ff92cbc8dcd5dcb663e81ca960f021218430c1f76397ed4cead6c
Diffstat (limited to 'depends/packages/qt.mk')
-rw-r--r--depends/packages/qt.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index 7d96197221..18adfaadc3 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -9,7 +9,7 @@ $(package)_qt_libs=corelib network widgets gui plugins testlib
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no-xlib.patch
$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
$(package)_patches+= drop_lrelease_dependency.patch no_sdk_version_check.patch
-$(package)_patches+= fix_qpainter_non_determinism.patch fix_lib_paths.patch
+$(package)_patches+= fix_qpainter_non_determinism.patch fix_lib_paths.patch fix_android_pch.patch
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=e1de58ed108b7e0a138815ea60fd46a2c4e1fc31396a707e5630e92de79c53de
@@ -165,6 +165,7 @@ $(package)_config_opts_android += -no-fontconfig
$(package)_config_opts_android += -L $(host_prefix)/lib
$(package)_config_opts_android += -I $(host_prefix)/include
$(package)_config_opts_android += -pch
+$(package)_config_opts_android += -no-feature-vulkan
$(package)_config_opts_aarch64_android += -android-arch arm64-v8a
$(package)_config_opts_armv7a_android += -android-arch armeabi-v7a
@@ -224,6 +225,7 @@ define $(package)_preprocess_cmds
patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_android_qmake_conf.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \
+ patch -p1 -i $($(package)_patch_dir)/fix_android_pch.patch && \
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_qpainter_non_determinism.patch &&\
patch -p1 -i $($(package)_patch_dir)/no_sdk_version_check.patch && \