From 2b228704efda5152cf3e1eab552ce346a76fcd7f Mon Sep 17 00:00:00 2001 From: John Gibbon Date: Thu, 1 Oct 2020 13:22:12 +0200 Subject: [PATCH] add architecture detection a bit unrelated to feature branch, but I just wanted to build it. ;) --- README.md | 2 +- harbour-fernschreiber.pro | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1752f98..e9eb45e 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ const char TDLIB_API_HASH[] = "1234567890abcdef1234567890abcdef"; You get the Telegram API ID and hash as soon as you've registered your own application on [https://my.telegram.org](https://my.telegram.org). -Moreover, you need to have a compiled version of [TDLib](https://github.com/tdlib/td) in the sub-directory `tdlib`. This sub-directory must contain another sub-directory that fits to the target device architecture (e.g. armv7hl, i486). Within this directory, there needs to be a folder called `lib` that contains at least `libtdjson.so`. For armv7hl the relative path would consequently be `tdlib/armv7hl/lib`. Before compiling the project, be sure to set the target architecture in the project file `harbour-fernschreiber.pro` correctly using the variable `TARGET_ARCHITECTURE`. This can most certainly be automated. Pull requests welcome! ;) +Moreover, you need to have a compiled version of [TDLib](https://github.com/tdlib/td) in the sub-directory `tdlib`. This sub-directory must contain another sub-directory that fits to the target device architecture (e.g. armv7hl, i486). Within this directory, there needs to be a folder called `lib` that contains at least `libtdjson.so`. For armv7hl the relative path would consequently be `tdlib/armv7hl/lib`. ## Credits This project uses diff --git a/harbour-fernschreiber.pro b/harbour-fernschreiber.pro index b96aa0b..75b4ce3 100644 --- a/harbour-fernschreiber.pro +++ b/harbour-fernschreiber.pro @@ -57,8 +57,11 @@ TRANSLATIONS += translations/harbour-fernschreiber-de.ts \ translations/harbour-fernschreiber-pl.ts \ translations/harbour-fernschreiber-zh_CN.ts -# Use armv7hl for most devices and i486 for emulator and Jolla Tablet. Can most certainly be automated... ;) -TARGET_ARCHITECTURE = i486 +contains(QT_ARCH, arm) { + TARGET_ARCHITECTURE = armv7hl +} else { + TARGET_ARCHITECTURE = i486 +} INCLUDEPATH += $$PWD/tdlib/include DEPENDPATH += $$PWD/tdlib/include