allow installation of locale into system

UNTESTED
This commit is contained in:
tildearrow 2024-06-13 17:14:10 -05:00
parent e8daa0b8ee
commit c7ff788d5d
2 changed files with 10 additions and 0 deletions

View file

@ -1231,6 +1231,8 @@ if (NOT ANDROID OR TERMUX)
install(DIRECTORY doc DESTINATION ${CMAKE_INSTALL_DOCDIR})
install(DIRECTORY papers DESTINATION ${CMAKE_INSTALL_DOCDIR}/other)
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DATADIR}/licenses/furnace)
list(APPEND DEPENDENCIES_DEFINES LOCALE_DIR="${CMAKE_INSTALL_LOCALEDIR}")
install(DIRECTORY po/locale DESTINATION ${CMAKE_INSTALL_LOCALEDIR})
if (WITH_DEMOS OR WITH_INSTRUMENTS OR WITH_WAVETABLES)
set(FURNACE_DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/furnace)
if (WITH_DEMOS)

View file

@ -545,10 +545,18 @@ int main(int argc, char** argv) {
if ((localeRet=TA_BINDTEXTDOMAIN("furnace","locale"))==NULL) {
if ((localeRet=TA_BINDTEXTDOMAIN("furnace","../po/locale"))==NULL) {
#ifdef LOCALE_DIR
if ((localeRet=TA_BINDTEXTDOMAIN("furnace",LOCALE_DIR))==NULL) {
logE("could not bind text domain!");
} else {
logV("text domain 1: %s",localeRet);
}
#else
logE("could not bind text domain!");
#endif
} else {
logV("text domain 1: %s",localeRet);
}
} else {
logV("text domain 1: %s",localeRet);
}