summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-04-09 22:10:35 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-04-09 22:10:35 +0800
commitc36999311ac73160716de72a153646aa7f8367eb (patch)
treec5dc3629cc9ae7d14c1284b419be5289842b7327
parent58202a15c7e720d8d1fb5c6b7d5d30619eb6b2e0 (diff)
Make app run with Qt5.14.1
Simplify build instructions and fix OpenSSL library files to include in the apk.
-rw-r--r--CMakeLists.txt17
-rw-r--r--README.md31
m---------qrtclient0
3 files changed, 24 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c1af8fa..872eeb3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,7 @@ set(CMAKE_AUTORCC ON)
find_package(Qt5 COMPONENTS Core Quick REQUIRED)
if (ANDROID)
+ set(ANDROID_BUILD_ABI_${ANDROID_ABI} 1)
add_library(${PROJECT_NAME} SHARED
controller.hxx
controller.cxx
@@ -23,32 +24,32 @@ if (ANDROID)
set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
if (ANDROID_ABI STREQUAL "arm64-v8a")
set(ANDROID_EXTRA_LIBS
- ${CMAKE_SYSROOT}/usr/lib/aarch64-linux-android/${ANDROID_NATIVE_API_LEVEL}/libcrypto.so
- ${CMAKE_SYSROOT}/usr/lib/aarch64-linux-android/${ANDROID_NATIVE_API_LEVEL}/libssl.so
+ ${CMAKE_SYSROOT}/usr/lib/aarch64-linux-android/${ANDROID_NATIVE_API_LEVEL}/libcrypto_1_1.so
+ ${CMAKE_SYSROOT}/usr/lib/aarch64-linux-android/${ANDROID_NATIVE_API_LEVEL}/libssl_1_1.so
${CMAKE_SYSROOT}/usr/lib/aarch64-linux-android/${ANDROID_NATIVE_API_LEVEL}/libcurl.so
${CMAKE_SYSROOT}/usr/lib/aarch64-linux-android/${ANDROID_NATIVE_API_LEVEL}/librtclient.so
/opt/Qt5.14.1/5.14.1/android/lib/libqrtclient_${ANDROID_ABI}.so
CACHE INTERNAL "")
elseif (ANDROID_ABI STREQUAL "armeabi-v7a")
set(ANDROID_EXTRA_LIBS
- ${CMAKE_SYSROOT}/usr/lib/arm-linux-androideabi/${ANDROID_NATIVE_API_LEVEL}/libcrypto.so
- ${CMAKE_SYSROOT}/usr/lib/arm-linux-androideabi/${ANDROID_NATIVE_API_LEVEL}/libssl.so
+ ${CMAKE_SYSROOT}/usr/lib/arm-linux-androideabi/${ANDROID_NATIVE_API_LEVEL}/libcrypto_1_1.so
+ ${CMAKE_SYSROOT}/usr/lib/arm-linux-androideabi/${ANDROID_NATIVE_API_LEVEL}/libssl_1_1.so
${CMAKE_SYSROOT}/usr/lib/arm-linux-androideabi/${ANDROID_NATIVE_API_LEVEL}/libcurl.so
${CMAKE_SYSROOT}/usr/lib/arm-linux-androideabi/${ANDROID_NATIVE_API_LEVEL}/librtclient.so
/opt/Qt5.14.1/5.14.1/android/lib/libqrtclient_${ANDROID_ABI}.so
CACHE INTERNAL "")
elseif (ANDROID_ABI STREQUAL "x86")
set(ANDROID_EXTRA_LIBS
- ${CMAKE_SYSROOT}/usr/lib/i686-linux-android/${ANDROID_NATIVE_API_LEVEL}/libcrypto.so
- ${CMAKE_SYSROOT}/usr/lib/i686-linux-android/${ANDROID_NATIVE_API_LEVEL}/libssl.so
+ ${CMAKE_SYSROOT}/usr/lib/i686-linux-android/${ANDROID_NATIVE_API_LEVEL}/libcrypto_1_1.so
+ ${CMAKE_SYSROOT}/usr/lib/i686-linux-android/${ANDROID_NATIVE_API_LEVEL}/libssl_1_1.so
${CMAKE_SYSROOT}/usr/lib/i686-linux-android/${ANDROID_NATIVE_API_LEVEL}/libcurl.so
${CMAKE_SYSROOT}/usr/lib/i686-linux-android/${ANDROID_NATIVE_API_LEVEL}/librtclient.so
/opt/Qt5.14.1/5.14.1/android/lib/libqrtclient_${ANDROID_ABI}.so
CACHE INTERNAL "")
elseif (ANDROID_ABI STREQUAL "x86_64")
set(ANDROID_EXTRA_LIBS
- ${CMAKE_SYSROOT}/usr/lib/x86_64-linux-android/${ANDROID_NATIVE_API_LEVEL}/libcrypto.so
- ${CMAKE_SYSROOT}/usr/lib/x86_64-linux-android/${ANDROID_NATIVE_API_LEVEL}/libssl.so
+ ${CMAKE_SYSROOT}/usr/lib/x86_64-linux-android/${ANDROID_NATIVE_API_LEVEL}/libcrypto_1_1.so
+ ${CMAKE_SYSROOT}/usr/lib/x86_64-linux-android/${ANDROID_NATIVE_API_LEVEL}/libssl_1_1.so
${CMAKE_SYSROOT}/usr/lib/x86_64-linux-android/${ANDROID_NATIVE_API_LEVEL}/libcurl.so
${CMAKE_SYSROOT}/usr/lib/x86_64-linux-android/${ANDROID_NATIVE_API_LEVEL}/librtclient.so
/opt/Qt5.14.1/5.14.1/android/lib/libqrtclient_${ANDROID_ABI}.so
diff --git a/README.md b/README.md
index 9887ea3..2a3f55b 100644
--- a/README.md
+++ b/README.md
@@ -6,46 +6,45 @@
```sh
$ git clone git://darapsa.org/kelakon.git
-$ cd kelakon
```
## Configuring for various target hosts (with optional debugging)
```sh
-$ mkdir build
-$ cmake -DCMAKE_BUILD_TYPE=Debug ..
+$ mkdir build-kelakon-Desktop-Debug
+$ cd build-kelakon-Desktop-Debug
+$ cmake -DCMAKE_BUILD_TYPE=Debug ../kelakon
```
or
```sh
-$ mkdir build-Android_arm64_v8a-Debug
-$ cd build-Android_arm64_v8a-Debug
-$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/opt/Qt5.14.1/5.14.1/android -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_BUILD_ABI_arm64_v8a=1 -DCMAKE_BUILD_TYPE=Debug -DANDROID_ABI=arm64-v8a -DANDROID_SDK=/opt/android-sdk-update-manager -DCMAKE_PREFIX_PATH=/opt/Qt5.14.1/5.14.1/android ..
+$ mkdir build-kelakon-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android-Debug
+$ cd build-kelakon-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android-Debug
+```
+
+and then for any of these, do it twice (because of some bug that 3rd party libraries wouldn't get included)
+
+```sh
+$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk-r21/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/opt/Qt5.14.1/5.14.1/android -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_ABI=arm64_v8a -DANDROID_SDK=/opt/android-sdk-update-manager -DCMAKE_PREFIX_PATH=/opt/Qt5.14.1/5.14.1/android -DCMAKE_BUILD_TYPE=Debug ../kelakon
```
or
```sh
-$ mkdir build-Android_armeabi_v7a-Debug
-$ cd build-Android_armeabi_v7a-Debug
-$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/opt/Qt5.14.1/5.14.1/android -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_BUILD_ABI_armeabi_v7a=1 -DCMAKE_BUILD_TYPE=Debug -DANDROID_ABI=armeabi-v7a -DANDROID_SDK=/opt/android-sdk-update-manager -DCMAKE_PREFIX_PATH=/opt/Qt5.14.1/5.14.1/android ..
+$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk-r21/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/opt/Qt5.14.1/5.14.1/android -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_ABI=armeabi-v7a -DANDROID_SDK=/opt/android-sdk-update-manager -DCMAKE_PREFIX_PATH=/opt/Qt5.14.1/5.14.1/android -DCMAKE_BUILD_TYPE=Debug ../kelakon
```
or
```sh
-$ mkdir build-Android_x86-Debug
-$ cd build-Android_x86-Debug
-$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/opt/Qt5.14.1/5.14.1/android -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_BUILD_ABI_x86=1 -DCMAKE_BUILD_TYPE=Debug -DANDROID_ABI=x86 -DANDROID_SDK=/opt/android-sdk-update-manager -DCMAKE_PREFIX_PATH=/opt/Qt5.14.1/5.14.1/android ..
+$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk-r21/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/opt/Qt5.14.1/5.14.1/android -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_ABI=x86 -DANDROID_SDK=/opt/android-sdk-update-manager -DCMAKE_PREFIX_PATH=/opt/Qt5.14.1/5.14.1/android -DCMAKE_BUILD_TYPE=Debug ../kelakon
```
or
```sh
-$ mkdir build-Android_x86_64-Debug
-$ cd build-Android_x86_64-Debug
-$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/opt/Qt5.14.1/5.14.1/android -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_BUILD_ABI_x86_64=1 -DCMAKE_BUILD_TYPE=Debug -DANDROID_ABI=x86_64 -DANDROID_SDK=/opt/android-sdk-update-manager -DCMAKE_PREFIX_PATH=/opt/Qt5.14.1/5.14.1/android ..
+$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk-r21/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/opt/Qt5.14.1/5.14.1/android -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_ABI=x86_64 -DANDROID_SDK=/opt/android-sdk-update-manager -DCMAKE_PREFIX_PATH=/opt/Qt5.14.1/5.14.1/android -DCMAKE_BUILD_TYPE=Debug ../kelakon
```
or so on.
@@ -54,5 +53,5 @@ or so on.
```sh
$ make # -jN (with N an integer number of parallel tasks you allow your computer to run for compiling this)
-$ /opt/Qt5.14.1/5.14.1/android/bin/androiddeployqt --input android_deployment_settings.json --output android-build
+$ /opt/Qt5.14.1/5.14.1/android/bin/androiddeployqt --input android_deployment_settings.json --output android-build --android-platform android-24
```
diff --git a/qrtclient b/qrtclient
-Subproject 2e1eae4e9aa37ece0f23fc90a1ccb741b675bb9
+Subproject eabba16993fcd65d9473a2d134e43fff747d097