Commit 487f1c61 authored by Stéphane Albert's avatar Stéphane Albert
Browse files

ENH: [mvd] Updated finding/loading path of fr_FR.qm in build and install dirs.

parent 8ec23e35
......@@ -45,18 +45,18 @@
#define Monteverdi_UI_VERSION @Monteverdi_UI_VERSION@
//
// Directories
#define Monteverdi_INSTALL_BIN_DIR "@OTB_INSTALL_BIN_DIR@"
#define Monteverdi_INSTALL_INCLUDE_DIR "@OTB_INSTALL_INCLUDE_DIR@"
#define Monteverdi_INSTALL_LIB_DIR "@OTB_INSTALL_LIB_DIR@"
#define Monteverdi_INSTALL_DATA_DIR "@OTB_INSTALL_DATA_DIR@"
//
#define OTB_VERSION_CHECK( M, m, p ) \
(OTB_VERSION_MAJOR>(M) || \
(OTB_VERSION_MAJOR==(M) && (OTB_VERSION_MINOR>(m) || \
OTB_VERSION_MINOR==(m) && OTB_VERSION_PATH>=(p))))
//
// Directories
#define Monteverdi_INSTALL_BIN_DIR "@Monteverdi_INSTALL_BIN_DIR@"
#define Monteverdi_INSTALL_INCLUDE_DIR "@Monteverdi_INSTALL_INCLUDE_DIR@"
#define Monteverdi_INSTALL_LIB_DIR "@Monteverdi_INSTALL_LIB_DIR@"
#define Monteverdi_INSTALL_DATA_DIR "@Monteverdi_INSTALL_DATA_DIR@"
//
// Sub-directories
#define Monteverdi_INSTALL_DATA_I18N_DIR Monteverdi_INSTALL_DATA_DIR "/i18n"
......@@ -64,6 +64,7 @@
//
// Files
#define Monteverdi_CONFIGURE_FILE "@Monteverdi_CONFIGURE_FILE@"
#define Monteverdi_BUILD_DIR_FILE "CMakeCache.txt"
//
// Miscellaneous
......
......@@ -602,7 +602,7 @@ I18nCoreApplication
QDir prefix( bin_dir );
while ( prefix.cdUp() )
{
if ( QDir(prefix).cd(Monteverdi_INSTALL_BIN_DIR) )
if ( QDir(prefix).cd( Monteverdi_INSTALL_BIN_DIR) )
{
prefixFound = true;
break;
......@@ -620,8 +620,8 @@ I18nCoreApplication
QDir i18n_dir( prefix );
// At this point the candidate install prefix can also be the build dir root
if ( prefix.exists( Monteverdi_CONFIGURE_FILE )
&& i18n_dir.cd("i18n") )
if ( prefix.exists( Monteverdi_BUILD_DIR_FILE )
&& i18n_dir.cd( "i18n" ) )
{
m_IsRunningFromBuildDir = true;
......@@ -643,7 +643,7 @@ I18nCoreApplication
<< tr( "Running from install directory '%1'." )
.arg( prefix.path() );
if (i18n_dir.cd(Monteverdi_INSTALL_DATA_I18N_DIR))
if ( i18n_dir.cd( Monteverdi_INSTALL_DATA_I18N_DIR ) )
{
qDebug()
<< tr( "Loading translation files from directory '%1'." )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment