Rename DATA_DIR macro to less polluting RS_DATA_DIR

This commit is contained in:
Gioacchino Mazzurco 2021-12-09 12:55:06 +01:00
parent e55fa2b9d5
commit 94bd099407
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
5 changed files with 9 additions and 9 deletions

View file

@ -205,7 +205,7 @@ linux-* {
LIBS *= -ldl
DEFINES *= PLUGIN_DIR=\"\\\"$${PLUGIN_DIR}\\\"\"
DEFINES *= DATA_DIR=\"\\\"$${DATA_DIR}\\\"\"
DEFINES *= RS_DATA_DIR=\"\\\"$${RS_DATA_DIR}\\\"\"
}
linux-g++ {
@ -289,7 +289,7 @@ mac {
#LIBS += -lsqlite3
DEFINES *= PLUGIN_DIR=\"\\\"$${PLUGIN_DIR}\\\"\"
DEFINES *= DATA_DIR=\"\\\"$${DATA_DIR}\\\"\"
DEFINES *= RS_DATA_DIR=\"\\\"$${RS_DATA_DIR}\\\"\"
}
################################# FreeBSD ##########################################

View file

@ -841,14 +841,15 @@ static bool checkAccount(const std::string &accountdir, AccountDetails &account,
/* Use RetroShare's exe dir */
dataDirectory = ".";
#elif defined(ANDROID)
#elif defined(__ANDROID__)
// TODO: This is probably not really used on Android
dataDirectory = PathBaseDirectory()+"/usr/share/retroshare";
#elif defined(DATA_DIR)
#elif defined(RS_DATA_DIR)
// cppcheck-suppress ConfigurationNotChecked
dataDirectory = DATA_DIR;
dataDirectory = RS_DATA_DIR;
// For all other OS the data directory must be set in libretroshare.pro
#else
# error "For your target OS automatic data dir discovery is not supported, cannot compile if DATA_DIR variable not set."
# error "For your target OS automatic data dir discovery is not supported, cannot compile if RS_DATA_DIR variable not set."
#endif
if (!check)

View file

@ -245,7 +245,7 @@ bool BroadcastDiscoveryService::isMulticastListeningEnabled()
env, "isHeld" );
return mAndroidWifiMulticastLock.Call(env, isHeld);
#else if // def __ANDROID__
#else // def __ANDROID__
return true;
#endif // def __ANDROID__
}