mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Make data and plugin directory configurable at compile time
e.g.: $ qmake PREFIX=/usr/local $ qmake LIB_DIR=/usr/lib64 A full recompile is necessary when changing the PREFIX!
This commit is contained in:
parent
6b7a6e2313
commit
d4a36ed38b
@ -173,6 +173,9 @@ unix {
|
||||
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
|
||||
isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" }
|
||||
|
||||
DEFINES *= LIB_DIR=\"\\\"$${LIB_DIR}\\\"\"
|
||||
DEFINES *= DATA_DIR=\"\\\"$${DATA_DIR}\\\"\"
|
||||
|
||||
# where to put the librarys interface
|
||||
include_rsiface.path = "$${INC_DIR}"
|
||||
include_rsiface.files = $$PUBLIC_HEADERS
|
||||
|
@ -781,9 +781,9 @@ static bool checkAccount(std::string accountdir, AccountDetails &account,std::ma
|
||||
std::cerr << "getRetroshareDataDirectory() BSD: " << dataDirectory;
|
||||
|
||||
#else
|
||||
/* For Linux, we have a fixed standard data directory */
|
||||
dataDirectory = "/usr/share/RetroShare06";
|
||||
std::cerr << "getRetroshareDataDirectory() Linux: " << dataDirectory;
|
||||
/* For Linux, the data directory is set in libretroshare.pro */
|
||||
dataDirectory = DATA_DIR;
|
||||
std::cerr << "getRetroshareDataDirectory() Linux: " << dataDirectory << std::endl;
|
||||
|
||||
#endif
|
||||
#else
|
||||
|
@ -1251,7 +1251,7 @@ int RsServer::StartupRetroShare()
|
||||
std::vector<std::string> plugins_directories ;
|
||||
|
||||
#ifndef WINDOWS_SYS
|
||||
plugins_directories.push_back(std::string("/usr/lib/retroshare/extensions6/")) ;
|
||||
plugins_directories.push_back(std::string(LIB_DIR) + "/retroshare/extensions6/") ;
|
||||
#endif
|
||||
std::string extensions_dir = rsAccounts->PathBaseDirectory() + "/extensions6/" ;
|
||||
plugins_directories.push_back(extensions_dir) ;
|
||||
|
@ -70,11 +70,7 @@ SoundManager::SoundManager() : QObject()
|
||||
|
||||
void SoundManager::soundEvents(SoundEvents &events)
|
||||
{
|
||||
#ifdef WINDOWS_SYS
|
||||
QDir baseDir = QDir(qApp->applicationDirPath() + "/sounds");
|
||||
#else
|
||||
QDir baseDir = QDir("/usr/share/RetroShare06/sounds");
|
||||
#endif
|
||||
QDir baseDir = QDir(QString::fromUtf8(RsAccounts::DataDirectory().c_str()) + "/sounds");
|
||||
|
||||
events.mDefaultPath = baseDir.absolutePath();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user