Fix android compilation with newer Qt

In lastest Qt versions linux-* mkspec doesn't match android anymore,
this was triggering a compilation error as DATA_DIR was not defined the
RsAccountsDetail::PathDataDirectory(bool check) code has been rearranged
so it works reasonably also on Android and do not depend on DATA_DIR
define anymore

Updated Android compiling documentation
This commit is contained in:
Gioacchino Mazzurco 2017-10-16 20:07:52 +02:00
parent ebf99a4eaf
commit 034d88c4e2
6 changed files with 11 additions and 12 deletions

View file

@ -916,7 +916,7 @@ test_bitdht {
################################# Android #####################################
android-g++ {
## ifaddrs is missing on Android add them don't use the one from
## ifaddrs is missing on Android to add them don't use the one from
## https://github.com/morristech/android-ifaddrs
## because they crash, use QNetworkInterface from Qt instead
CONFIG *= qt

View file

@ -803,7 +803,8 @@ static bool checkAccount(std::string accountdir, AccountDetails &account,std::ma
/* Use RetroShare's exe dir */
dataDirectory = ".";
#elif defined(ANDROID)
dataDirectory = defaultBaseDirectory()+"/usr/share/retroshare";
#elif defined(DATA_DIR)
dataDirectory = DATA_DIR;
// For all other OS the data directory must be set in libretroshare.pro