-
Notifications
You must be signed in to change notification settings - Fork 314
Android: fix GUI not loading on Qt 5.15 #504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc @hebasto |
Concept ACK. |
https://cirrus-ci.com/task/5550307582148608:
|
Tested f2f924e (configured with |
I've updated the PR description to explain why we could get away with not using Broken |
The following patch fixes link error: --- a/build-aux/m4/bitcoin_qt.m4
+++ b/build-aux/m4/bitcoin_qt.m4
@@ -162,6 +162,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
AC_DEFINE([QT_QPA_PLATFORM_COCOA], [1], [Define this symbol if the qt platform is cocoa])
elif test "$TARGET_OS" = "android"; then
QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid_$ANDROID_ARCH -ljnigraphics -landroid -lqtfreetype_$ANDROID_ARCH $QT_LIBS"
+ QT_TEST_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid_$ANDROID_ARCH -ljnigraphics -landroid -lqtfreetype_$ANDROID_ARCH $QT_TEST_LIBS"
AC_DEFINE([QT_QPA_PLATFORM_ANDROID], [1], [Define this symbol if the qt platform is android])
fi
fi Not sure if it is optimal though. UPDATE: See a more preferable patch in #504 (comment). |
#elif defined(QT_QPA_PLATFORM_ANDROID) | ||
Q_IMPORT_PLUGIN(QAndroidPlatformIntegrationPlugin); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same in qt/test/test_main.cpp
?
A more optimal suggestion: --- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -52,7 +52,7 @@ if ENABLE_ZMQ
qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
endif
qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) \
- $(LIBLEVELDB_SSE42) $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
+ $(LIBLEVELDB_SSE42) $(LIBMEMENV) $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) \
$(QR_LIBS) $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(LIBSECP256K1) \
$(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(SQLITE_LIBS)
qt_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) UPDATE: Suggesting to move this PR into the main repo as it touches the code outside the |
Is there a nice way to do this? I'd like to preserve comments and stuff. |
No, there is not, unfortunately.
A link to this PR in the OP will work fine. |
Qt 5.14 introduced certain breaking changes to the way it parses AndroidManifest.xml metadata https://lists.qt-project.org/pipermail/interest/2020-January/034372.html
Continued in bitcoin/bitcoin#23757 |
…Qt 5.15 27f353d build, android: Fix Android GUI not loading on Qt 5.15 (Igor Cota) 6fc5c77 build, qt: use static QAndroidPlatformIntegrationPlugin (Igor Cota) Pull request description: PR moved from #504 as it escaped the confines of `src/qt`. ACKs for top commit: hebasto: re-ACK 27f353d promag: utACK 27f353d Tree-SHA512: 4b6e6b2fb1923b89934f11caa8c05c6f340881689273f0c08916144e623f03fd5b781f1a53af83f6e87dce211fe02a1cb87e5943d13811c791cc8aa458184d9f
Qt 5.14 introduced certain breaking changes to the way it parses
AndroidManifest.xml
metadata.This PR also adds an explicit
QAndroidPlatformIntegrationPlugin
import tobitcoin.cpp
(in line with other platforms).I'm not sure why Android GUI worked without this before but it certainly doesn't on Qt 5.15.We could do without
Q_IMPORT_PLUGIN
before because we were manually pulling aJNI_Onload
function to the linkage.