From 3367eb3205ba4f99a0f6011a86e2b8fecdcbff75 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 11 Jan 2015 14:59:15 +0100 Subject: [PATCH] Changed: Append getAppBundlePath() to search paths under OS X --HG-- branch : develop --- code/ryzom/client/src/init.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 704260a64..07ac27b62 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -664,6 +664,7 @@ void addSearchPaths(IProgressCallback &progress) CPath::loadRemappedFiles("remap_files.csv"); } + for (uint i = 0; i < ClientCfg.DataPathNoRecurse.size(); i++) { progress.progress ((float)i/(float)ClientCfg.DataPathNoRecurse.size()); @@ -673,6 +674,17 @@ void addSearchPaths(IProgressCallback &progress) progress.popCropedValues (); } + + // add in last position, a specific possibly read only directory + std::string defaultDirectory; + +#ifdef NL_OS_MAC + defaultDirectory = getAppBundlePath() + "/Contents/Resources/data"; +#elif defined(NL_OS_UNIX) && defined(RYZOM_SHARE_PREFIX) + defaultDirectory = std::string(RYZOM_SHARE_PREFIX) + "/data"; +#endif + + if (!defaultDirectory.empty()) CPath::addSearchPath(defaultDirectory, true, false); } void addPreDataPaths(NLMISC::IProgressCallback &progress)