diff options
| author | xiphon <xiphon@protonmail.com> | 2020-10-22 03:30:12 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2020-10-26 11:24:45 +0000 |
| commit | cd054f6c26c27964425ec7d93de99821e6309fc2 (patch) | |
| tree | e6f676eb6979241ab4665f056af4467ac1cfb736 /android | |
| parent | d6cb9b6c85eb5aa210173e0ff84d8e5f58807c41 (diff) | |
| download | monzero-gui-cd054f6c26c27964425ec7d93de99821e6309fc2.tar.gz monzero-gui-cd054f6c26c27964425ec7d93de99821e6309fc2.tar.xz monzero-gui-cd054f6c26c27964425ec7d93de99821e6309fc2.zip | |
docker: fix Android build, update to Qt 5.15, README.md build steps
Co-authored-by: takel
Diffstat (limited to 'android')
| -rw-r--r-- | android/README.md | 53 | ||||
| -rw-r--r-- | android/docker/android.mk.patch | 61 | ||||
| -rw-r--r-- | android/docker/androiddeployqt.patch | 62 |
3 files changed, 0 insertions, 176 deletions
diff --git a/android/README.md b/android/README.md deleted file mode 100644 index 88499336..00000000 --- a/android/README.md +++ /dev/null @@ -1,53 +0,0 @@ -Copyright (c) 2014-2018, The Monero Project - - -## Current status : ALPHA - - - Minimum Android 5.0 (api level 21) - - Modal dialogs can appear in background giving the feeling that the application is frozen (Work around : turn screen off/on or switch to another app and back) - -## Build using Docker - -# Base environnement - - cd monero/utils/build_scripts - docker build -f android32.Dockerfile -t monero-android . - cd .. - -# Build GUI - - cd android/docker - docker build -t monero-gui-android . - docker create -it --name monero-gui-android monero-gui-android bash - -# Get the apk - - docker cp monero-gui-android:/opt/android/monero-gui/build/release/bin/bin/QtApp-debug.apk . - -## Deployment - -- Using ADB (Android debugger bridge) : - - First, see section [Enable adb debugging on your device](https://developer.android.com/studio/command-line/adb.html#Enabling) - The only place where we are allowed to play is `/data/local/tmp`. So : - - adb push /opt/android/monero-gui/build/release/bin/bin/QtApp-debug.apk /data/local/tmp - adb shell pm install -r /data/local/tmp/QtApp-debug.apk - - - Troubleshooting: - - adb devices -l - adb logcat - - if using adb inside docker, make sure you did "docker run -v /dev/bus/usb:/dev/bus/usb --privileged" - -- Using a web server - - mkdir /usr/tmp - cp QtApp-debug.apk /usr/tmp - docker run -d -v /usr/tmp:/usr/share/nginx/html:ro -p 8080:80 nginx - - Now it should be accessible through a web browser at - - http://<your.local.ip>:8080/QtApp-debug.apk - diff --git a/android/docker/android.mk.patch b/android/docker/android.mk.patch deleted file mode 100644 index 9fd7f172..00000000 --- a/android/docker/android.mk.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff --git a/android/jni/Android.mk b/android/jni/Android.mk -index e442b07..158afd5 100644 ---- a/android/jni/Android.mk -+++ b/android/jni/Android.mk -@@ -12,14 +12,18 @@ LOCAL_PATH := $(ICONV_SRC) - - LOCAL_MODULE := libiconv - -+LOCAL_ARM_MODE := arm -+LOCAL_CPP_FEATURES := exceptions rtti features - LOCAL_CFLAGS := \ - -Wno-multichar \ - -D_ANDROID \ -- -DLIBDIR="c" \ -+ -DLIBDIR="\".\"" \ - -DBUILDING_LIBICONV \ - -DBUILDING_LIBCHARSET \ - -DIN_LIBRARY - -+LOCAL_CFLAGS += -fno-stack-protector -+ - LOCAL_SRC_FILES := \ - lib/iconv.c \ - libcharset/lib/localcharset.c \ -@@ -30,13 +34,14 @@ LOCAL_C_INCLUDES := \ - $(ICONV_SRC)/libcharset \ - $(ICONV_SRC)/libcharset/include - --include $(BUILD_SHARED_LIBRARY) -+include $(BUILD_STATIC_LIBRARY) - - LOCAL_LDLIBS := -llog -lcharset - - # libzbarjni - include $(CLEAR_VARS) - -+ - LOCAL_PATH := $(MY_LOCAL_PATH) - LOCAL_MODULE := zbarjni - LOCAL_SRC_FILES := ../../java/zbarjni.c \ -@@ -71,6 +76,17 @@ LOCAL_C_INCLUDES := ../include \ - ../zbar \ - $(ICONV_SRC)/include - --LOCAL_SHARED_LIBRARIES := libiconv -+LOCAL_STATIC_LIBRARIES := libiconv -+LOCAL_ARM_MODE := arm -+LOCAL_CPP_FEATURES := exceptions rtti features -+ -+LOCAL_CFLAGS := \ -+ -Wno-multichar \ -+ -D_ANDROID \ -+ -DLIBDIR="\".\"" \ -+ -DBUILDING_LIBICONV \ -+ -DBUILDING_LIBCHARSET \ -+ -DIN_LIBRARY -+ - --include $(BUILD_SHARED_LIBRARY) -\ No newline at end of file -+include $(BUILD_STATIC_LIBRARY) diff --git a/android/docker/androiddeployqt.patch b/android/docker/androiddeployqt.patch deleted file mode 100644 index b0657677..00000000 --- a/android/docker/androiddeployqt.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp -index 8a8e591..71d693e 100644 ---- a/src/androiddeployqt/main.cpp -+++ b/src/androiddeployqt/main.cpp -@@ -1122,7 +1122,7 @@ bool updateLibsXml(const Options &options) - - QString libsPath = QLatin1String("libs/") + options.architecture + QLatin1Char('/'); - -- QString qtLibs = QLatin1String("<item>gnustl_shared</item>\n"); -+ QString qtLibs = QLatin1String("<item>c++_shared</item>\n"); - QString bundledInLibs; - QString bundledInAssets; - foreach (Options::BundledFile bundledFile, options.bundledFiles) { -@@ -2519,6 +2519,39 @@ bool installApk(const Options &options) - return true; - } - -+bool copyStl(Options *options) -+{ -+ if (options->deploymentMechanism == Options::Debug && !options->installApk) -+ return true; -+ -+ if (options->verbose) -+ fprintf(stdout, "Copying LIBC++ STL library\n"); -+ -+ QString filePath = options->ndkPath -+ + QLatin1String("/sources/cxx-stl/llvm-libc++") -+ + QLatin1String("/libs/") -+ + options->architecture -+ + QLatin1String("/libc++_shared.so"); -+ if (!QFile::exists(filePath)) { -+ fprintf(stderr, "LIBC STL library does not exist at %s\n", qPrintable(filePath)); -+ return false; -+ } -+ -+ QString destinationDirectory = -+ options->deploymentMechanism == Options::Debug -+ ? options->temporaryDirectoryName + QLatin1String("/lib") -+ : options->outputDirectory + QLatin1String("/libs/") + options->architecture; -+ -+ if (!copyFileIfNewer(filePath, destinationDirectory -+ + QLatin1String("/libc++_shared.so"), options->verbose)) { -+ return false; -+ } -+ -+ if (options->deploymentMechanism == Options::Debug && !deployToLocalTmp(options, QLatin1String("/lib/libc++_shared.so"))) -+ return false; -+ -+ return true; -+} - bool copyGnuStl(Options *options) - { - if (options->deploymentMechanism == Options::Debug && !options->installApk) -@@ -2870,7 +2903,7 @@ int main(int argc, char *argv[]) - if (Q_UNLIKELY(options.timing)) - fprintf(stdout, "[TIMING] %d ms: Read dependencies\n", options.timer.elapsed()); - -- if (options.deploymentMechanism != Options::Ministro && !copyGnuStl(&options)) -+ if (options.deploymentMechanism != Options::Ministro && !copyStl(&options)) - return CannotCopyGnuStl; - - if (Q_UNLIKELY(options.timing)) |
