diff options
author | ShadowNinja <shadowninja@minetest.net> | 2015-08-24 14:32:15 -0400 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-09-06 11:21:26 +0200 |
commit | 645e2086734e3d2d1ec95f50faa39f0f24304761 (patch) | |
tree | f7b386b295c08d63ad5f208a543d9c5901795e5e /src/porting.cpp | |
parent | 31b6d2678455c0b3de7f4b97c9607388b06c8f8c (diff) | |
download | minetest-645e2086734e3d2d1ec95f50faa39f0f24304761.tar.gz minetest-645e2086734e3d2d1ec95f50faa39f0f24304761.tar.bz2 minetest-645e2086734e3d2d1ec95f50faa39f0f24304761.zip |
Use CUSTOM_LOCALEDIR if specified
Diffstat (limited to 'src/porting.cpp')
-rw-r--r-- | src/porting.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/porting.cpp b/src/porting.cpp index cb9f3270b..5fea1d9cf 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -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,7 +505,6 @@ void initializePaths() path_share = execpath; path_user = execpath; } - #else infostream << "Using system-wide paths (NOT RUN_IN_PLACE)" << std::endl; @@ -511,6 +512,11 @@ void initializePaths() 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; infostream << "Detected user path: " << path_user << std::endl; |