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 doc DESTINATION ${CMAKE_INSTALL_DOCDIR})
install(DIRECTORY papers DESTINATION ${CMAKE_INSTALL_DOCDIR}/other) install(DIRECTORY papers DESTINATION ${CMAKE_INSTALL_DOCDIR}/other)
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DATADIR}/licenses/furnace) 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) if (WITH_DEMOS OR WITH_INSTRUMENTS OR WITH_WAVETABLES)
set(FURNACE_DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/furnace) set(FURNACE_DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/furnace)
if (WITH_DEMOS) 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","locale"))==NULL) {
if ((localeRet=TA_BINDTEXTDOMAIN("furnace","../po/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!"); logE("could not bind text domain!");
} else { } else {
logV("text domain 1: %s",localeRet); logV("text domain 1: %s",localeRet);
} }
#else
logE("could not bind text domain!");
#endif
} else {
logV("text domain 1: %s",localeRet);
}
} else { } else {
logV("text domain 1: %s",localeRet); logV("text domain 1: %s",localeRet);
} }