mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 00:18:43 +00:00
Changed: Append getAppBundlePath() to search paths under OS X
This commit is contained in:
parent
5d7ee3b030
commit
c8a0d17a77
1 changed files with 12 additions and 0 deletions
|
@ -664,6 +664,7 @@ void addSearchPaths(IProgressCallback &progress)
|
||||||
|
|
||||||
CPath::loadRemappedFiles("remap_files.csv");
|
CPath::loadRemappedFiles("remap_files.csv");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint i = 0; i < ClientCfg.DataPathNoRecurse.size(); i++)
|
for (uint i = 0; i < ClientCfg.DataPathNoRecurse.size(); i++)
|
||||||
{
|
{
|
||||||
progress.progress ((float)i/(float)ClientCfg.DataPathNoRecurse.size());
|
progress.progress ((float)i/(float)ClientCfg.DataPathNoRecurse.size());
|
||||||
|
@ -673,6 +674,17 @@ void addSearchPaths(IProgressCallback &progress)
|
||||||
|
|
||||||
progress.popCropedValues ();
|
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)
|
void addPreDataPaths(NLMISC::IProgressCallback &progress)
|
||||||
|
|
Loading…
Reference in a new issue