Changed: Use of CFile::getApplicationDirectory

This commit is contained in:
kervala 2010-08-30 17:41:15 +02:00
parent c5074063d3
commit 9b856d4dc5
4 changed files with 8 additions and 12 deletions

View file

@ -957,11 +957,10 @@ int main(int /* argc */, char ** /* argv */)
NLMISC::CApplicationContext myApplicationContext;
#ifdef NL_OS_UNIX
std::string homeDir = getenv("HOME");
NLMISC::CPath::addSearchPath( homeDir + "/.nel");
NLMISC::CPath::addSearchPath(NLMISC::CFile::getApplicationDirectory("NeL"));
#endif // NL_OS_UNIX
NLMISC::CPath::addSearchPath(NL_ZVIEWER_CFG);
NLMISC::CPath::addSearchPath(NL_ZVIEWER_CFG);
initViewerConfig("zviewer.cfg");

View file

@ -424,11 +424,10 @@ int main( int argc, char ** argv )
NLMISC::CApplicationContext appContext;
#ifdef NL_OS_UNIX
std::string homeDir = getenv("HOME");
NLMISC::CPath::addSearchPath( homeDir + "/.nel");
NLMISC::CPath::addSearchPath(NLMISC::CFile::getApplicationDirectory("NeL"));
#endif // NL_OS_UNIX
NLMISC::CPath::addSearchPath(NL_MK_SH_ID_CFG);
NLMISC::CPath::addSearchPath(NL_MK_SH_ID_CFG);
// read args
if( argc < 2 )

View file

@ -86,11 +86,10 @@ void init()
try
{
#ifdef NL_OS_UNIX
std::string homeDir = getenv("HOME");
NLMISC::CPath::addSearchPath( homeDir + "/.nel");
NLMISC::CPath::addSearchPath(NLMISC::CFile::getApplicationDirectory("NeL"));
#endif // NL_OS_UNIX
NLMISC::CPath::addSearchPath(NL_BIB_CFG);
NLMISC::CPath::addSearchPath(NL_BIB_CFG);
CConfigFile cf;
uint i;

View file

@ -122,11 +122,10 @@ void initConfig()
try
{
#ifdef NL_OS_UNIX
std::string homeDir = getenv("HOME");
NLMISC::CPath::addSearchPath( homeDir + "/.nel");
NLMISC::CPath::addSearchPath(NLMISC::CFile::getApplicationDirectory("NeL"));
#endif // NL_OS_UNIX
NLMISC::CPath::addSearchPath(NL_BIRB_CFG);
NLMISC::CPath::addSearchPath(NL_BIRB_CFG);
CConfigFile cf;