Install the locale directory in a standard location
* fixed builds in linux distributions * backported2349d31bae
* related: https://github.com/minetest/minetest/pull/9618 * backportedca8957f500
* Fix detection of in-place path_locale when RUN_IN_PLACE=0 * related: https://github.com/minetest/minetest/issues/9745
This commit is contained in:
parent
be06a8ad6b
commit
1d10314a6d
@ -135,7 +135,7 @@ elseif(UNIX) # Linux, BSD etc
|
||||
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
|
||||
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo")
|
||||
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
|
||||
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/locale")
|
||||
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -577,7 +577,12 @@ void initializePaths()
|
||||
#ifdef USE_GETTEXT
|
||||
bool found_localedir = false;
|
||||
# ifdef STATIC_LOCALEDIR
|
||||
if (STATIC_LOCALEDIR[0] && fs::PathExists(STATIC_LOCALEDIR)) {
|
||||
path_locale = getDataPath("locale");
|
||||
if (fs::PathExists(path_locale)) {
|
||||
found_localedir = true;
|
||||
infostream << "Using in-place locale directory " << path_locale
|
||||
<< " even though a static one was provided." << std::endl;
|
||||
} else if (STATIC_LOCALEDIR[0] && fs::PathExists(STATIC_LOCALEDIR)) {
|
||||
found_localedir = true;
|
||||
path_locale = STATIC_LOCALEDIR;
|
||||
infostream << "Using locale directory " << STATIC_LOCALEDIR << std::endl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user