From 57f216dc3e5c496dc336a2f1c696547872949a11 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 13 Jan 2016 19:59:09 +0100 Subject: [PATCH] Changed: Expand environment variables in paths read from cfg files --HG-- branch : develop --- code/nel/src/net/service.cpp | 4 ++-- code/ryzom/server/src/ai_service/sheets.cpp | 8 ++++---- code/ryzom/tools/client/client_patcher/main.cpp | 2 +- .../leveldesign/alias_synchronizer/alias_synchronizer.cpp | 2 +- code/ryzom/tools/make_alias_file/make_alias_file.cpp | 2 +- .../build_world_packed_col/build_world_packed_col.cpp | 2 +- code/ryzom/tools/sheets_packer/sheets_packer_init.cpp | 2 +- code/ryzom/tools/translation_tools/extract_bot_names.cpp | 6 +++--- .../tools/translation_tools/extract_new_sheet_names.cpp | 6 +++--- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/code/nel/src/net/service.cpp b/code/nel/src/net/service.cpp index 1f3436d1c..f7dc40da1 100644 --- a/code/nel/src/net/service.cpp +++ b/code/nel/src/net/service.cpp @@ -1169,7 +1169,7 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName, { for (uint i = 0; i < var->size(); i++) { - CPath::addSearchPath (var->asString(i), true, false); + CPath::addSearchPath (NLMISC::expandEnvironmentVariables(var->asString(i)), true, false); } } @@ -1177,7 +1177,7 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName, { for (uint i = 0; i < var->size(); i++) { - CPath::addSearchPath (var->asString(i), false, false); + CPath::addSearchPath (NLMISC::expandEnvironmentVariables(var->asString(i)), false, false); } } diff --git a/code/ryzom/server/src/ai_service/sheets.cpp b/code/ryzom/server/src/ai_service/sheets.cpp index 56060db1e..57b26f4d2 100644 --- a/code/ryzom/server/src/ai_service/sheets.cpp +++ b/code/ryzom/server/src/ai_service/sheets.cpp @@ -906,7 +906,7 @@ void AISHEETS::CSheets::packSheets(const std::string &writeFilesDirectoryName) { addSearchPath=true; for (uint32 i=0;isize();++i) - CPath::addSearchPath(varPtr->asString(i).c_str(), true, false); + CPath::addSearchPath(NLMISC::expandEnvironmentVariables(varPtr->asString(i)), true, false); } loadForm2("aiaction", writeFilesDirectoryName+AISPackedActionSheetsFilename, _ActionSheets, true); } @@ -918,7 +918,7 @@ void AISHEETS::CSheets::packSheets(const std::string &writeFilesDirectoryName) { addSearchPath=true; for (uint32 i=0;isize();++i) - CPath::addSearchPath(varPtr->asString(i).c_str(), true, false); + CPath::addSearchPath(NLMISC::expandEnvironmentVariables(varPtr->asString(i)), true, false); } loadForm("actionlist", writeFilesDirectoryName+AISPackedFightConfigSheetsFilename, _ActionListSheets, true); } @@ -931,7 +931,7 @@ void AISHEETS::CSheets::packSheets(const std::string &writeFilesDirectoryName) { addSearchPath=true; for (uint32 i=0;isize();++i) - CPath::addSearchPath(varPtr->asString(i).c_str(), true, false); + CPath::addSearchPath(NLMISC::expandEnvironmentVariables(varPtr->asString(i)), true, false); } loadForm2("creature", writeFilesDirectoryName+AISPackedSheetsFilename, _Sheets, true); } @@ -943,7 +943,7 @@ void AISHEETS::CSheets::packSheets(const std::string &writeFilesDirectoryName) { addSearchPath=true; for (uint32 i=0;isize();++i) - CPath::addSearchPath(varPtr->asString(i).c_str(), true, false); + CPath::addSearchPath(NLMISC::expandEnvironmentVariables(varPtr->asString(i)), true, false); } loadForm2("race_stats", writeFilesDirectoryName+AISPackedRaceStatsSheetsFilename, _RaceStatsSheets, true); } diff --git a/code/ryzom/tools/client/client_patcher/main.cpp b/code/ryzom/tools/client/client_patcher/main.cpp index a0730b19f..004e3d861 100644 --- a/code/ryzom/tools/client/client_patcher/main.cpp +++ b/code/ryzom/tools/client/client_patcher/main.cpp @@ -249,7 +249,7 @@ int main(int argc, char *argv[]) { for(uint i = 0; i < ClientCfg.PreDataPath.size(); ++i) { - CPath::addSearchPath(ClientCfg.PreDataPath[i], true, false); + CPath::addSearchPath(NLMISC::expandEnvironmentVariables(ClientCfg.PreDataPath[i]), true, false); } } diff --git a/code/ryzom/tools/leveldesign/alias_synchronizer/alias_synchronizer.cpp b/code/ryzom/tools/leveldesign/alias_synchronizer/alias_synchronizer.cpp index c080fd038..5bfd98eae 100644 --- a/code/ryzom/tools/leveldesign/alias_synchronizer/alias_synchronizer.cpp +++ b/code/ryzom/tools/leveldesign/alias_synchronizer/alias_synchronizer.cpp @@ -390,7 +390,7 @@ int main() // add the search paths for (uint i=0; i