mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 04:14:27 -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
4 changed files with 8 additions and 9 deletions
|
@ -173,6 +173,9 @@ unix {
|
||||||
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
|
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
|
||||||
isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" }
|
isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" }
|
||||||
|
|
||||||
|
DEFINES *= LIB_DIR=\"\\\"$${LIB_DIR}\\\"\"
|
||||||
|
DEFINES *= DATA_DIR=\"\\\"$${DATA_DIR}\\\"\"
|
||||||
|
|
||||||
# where to put the librarys interface
|
# where to put the librarys interface
|
||||||
include_rsiface.path = "$${INC_DIR}"
|
include_rsiface.path = "$${INC_DIR}"
|
||||||
include_rsiface.files = $$PUBLIC_HEADERS
|
include_rsiface.files = $$PUBLIC_HEADERS
|
||||||
|
|
|
@ -781,9 +781,9 @@ static bool checkAccount(std::string accountdir, AccountDetails &account,std::ma
|
||||||
std::cerr << "getRetroshareDataDirectory() BSD: " << dataDirectory;
|
std::cerr << "getRetroshareDataDirectory() BSD: " << dataDirectory;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* For Linux, we have a fixed standard data directory */
|
/* For Linux, the data directory is set in libretroshare.pro */
|
||||||
dataDirectory = "/usr/share/RetroShare06";
|
dataDirectory = DATA_DIR;
|
||||||
std::cerr << "getRetroshareDataDirectory() Linux: " << dataDirectory;
|
std::cerr << "getRetroshareDataDirectory() Linux: " << dataDirectory << std::endl;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -1251,7 +1251,7 @@ int RsServer::StartupRetroShare()
|
||||||
std::vector<std::string> plugins_directories ;
|
std::vector<std::string> plugins_directories ;
|
||||||
|
|
||||||
#ifndef WINDOWS_SYS
|
#ifndef WINDOWS_SYS
|
||||||
plugins_directories.push_back(std::string("/usr/lib/retroshare/extensions6/")) ;
|
plugins_directories.push_back(std::string(LIB_DIR) + "/retroshare/extensions6/") ;
|
||||||
#endif
|
#endif
|
||||||
std::string extensions_dir = rsAccounts->PathBaseDirectory() + "/extensions6/" ;
|
std::string extensions_dir = rsAccounts->PathBaseDirectory() + "/extensions6/" ;
|
||||||
plugins_directories.push_back(extensions_dir) ;
|
plugins_directories.push_back(extensions_dir) ;
|
||||||
|
|
|
@ -70,11 +70,7 @@ SoundManager::SoundManager() : QObject()
|
||||||
|
|
||||||
void SoundManager::soundEvents(SoundEvents &events)
|
void SoundManager::soundEvents(SoundEvents &events)
|
||||||
{
|
{
|
||||||
#ifdef WINDOWS_SYS
|
QDir baseDir = QDir(QString::fromUtf8(RsAccounts::DataDirectory().c_str()) + "/sounds");
|
||||||
QDir baseDir = QDir(qApp->applicationDirPath() + "/sounds");
|
|
||||||
#else
|
|
||||||
QDir baseDir = QDir("/usr/share/RetroShare06/sounds");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
events.mDefaultPath = baseDir.absolutePath();
|
events.mDefaultPath = baseDir.absolutePath();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue