From 47b3d5ce60183543cd9628497ca6045f0d9446e1 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 30 Aug 2010 17:41:15 +0200 Subject: [PATCH] Changed: Use of CFile::getApplicationDirectory --- code/nel/tools/3d/zviewer/zviewer.cpp | 5 ++--- code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp | 5 ++--- code/nel/tools/pacs/build_ig_boxes/main.cpp | 5 ++--- code/nel/tools/pacs/build_indoor_rbank/main.cpp | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/code/nel/tools/3d/zviewer/zviewer.cpp b/code/nel/tools/3d/zviewer/zviewer.cpp index 01a1c36c1..ccbdf4b56 100644 --- a/code/nel/tools/3d/zviewer/zviewer.cpp +++ b/code/nel/tools/3d/zviewer/zviewer.cpp @@ -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"); diff --git a/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp b/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp index 2755e2a96..c84b328ef 100644 --- a/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp +++ b/code/nel/tools/misc/make_sheet_id/make_sheet_id.cpp @@ -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 ) diff --git a/code/nel/tools/pacs/build_ig_boxes/main.cpp b/code/nel/tools/pacs/build_ig_boxes/main.cpp index de308ed25..9d420745d 100644 --- a/code/nel/tools/pacs/build_ig_boxes/main.cpp +++ b/code/nel/tools/pacs/build_ig_boxes/main.cpp @@ -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; diff --git a/code/nel/tools/pacs/build_indoor_rbank/main.cpp b/code/nel/tools/pacs/build_indoor_rbank/main.cpp index e237f9bcd..9fbd77d1e 100644 --- a/code/nel/tools/pacs/build_indoor_rbank/main.cpp +++ b/code/nel/tools/pacs/build_indoor_rbank/main.cpp @@ -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;