1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Use CUSTOM_LOCALEDIR if specified

This commit is contained in:
ShadowNinja 2015-08-24 14:32:15 -04:00 committed by est31
parent 31b6d26784
commit 645e208673
4 changed files with 16 additions and 4 deletions

View file

@ -136,6 +136,8 @@ void signal_handler_init(void)
// Default to RUN_IN_PLACE style relative paths
std::string path_share = "..";
std::string path_user = "..";
std::string path_locale = path_share + DIR_DELIM + "locale";
std::string getDataPath(const char *subpath)
{
@ -503,13 +505,17 @@ void initializePaths()
path_share = execpath;
path_user = execpath;
}
#else
infostream << "Using system-wide paths (NOT RUN_IN_PLACE)" << std::endl;
if (!setSystemPaths())
errorstream << "Failed to get one or more system-wide path" << std::endl;
#endif
#ifdef STATIC_LOCALEDIR
path_locale = STATIC_LOCALEDIR[0] ? STATIC_LOCALEDIR : getDataPath("locale");
#else
path_locale = getDataPath("locale");
#endif
infostream << "Detected share path: " << path_share << std::endl;