Modification des options de compilation : pour les dossiers des traductions et de la collection commune, il est desormais possible de specifier des chemins :

* absolus
  * relatifs (au current working directory)
  * relatifs au dossier contenant le binaire executable
... ou tout simplement de ne pas en specifier


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@633 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2009-05-09 19:58:43 +00:00
parent 8633a15bbe
commit dc43d675db
2 changed files with 27 additions and 6 deletions

View File

@@ -264,10 +264,17 @@ QString QETApp::commonElementsDir() {
#ifdef QET_ALLOW_OVERRIDE_CED_OPTION
if (common_elements_dir != QString()) return(common_elements_dir);
#endif
#ifdef QET_COMMON_COLLECTION_PATH
return(QUOTE(QET_COMMON_COLLECTION_PATH));
#else
#ifndef QET_COMMON_COLLECTION_PATH
// en l'absence d'option de compilation, on utilise le dossier elements, situe a cote du binaire executable
return(QCoreApplication::applicationDirPath() + "/elements/");
#else
#ifndef QET_COMMON_COLLECTION_PATH_RELATIVE_TO_BINARY_PATH
// l'option de compilation represente un chemin absolu ou relatif classique
return(QUOTE(QET_COMMON_COLLECTION_PATH));
#else
// l'option de compilation represente un chemin relatif au dossier contenant le binaire executable
return(QCoreApplication::applicationDirPath() + "/" + QUOTE(QET_COMMON_COLLECTION_PATH)));
#endif
#endif
}
@@ -412,9 +419,16 @@ QString QETApp::languagesPath() {
return(lang_dir);
} else {
#ifndef QET_LANG_PATH
// en l'absence d'option de compilation, on utilise le dossier lang, situe a cote du binaire executable
return(QCoreApplication::applicationDirPath() + "/lang/");
#else
return(QUOTE(QET_LANG_PATH));
#ifndef QET_LANG_PATH_RELATIVE_TO_BINARY_PATH
// l'option de compilation represente un chemin absolu ou relatif classique
return(QUOTE(QET_LANG_PATH));
#else
// l'option de compilation represente un chemin relatif au dossier contenant le binaire executable
return(QCoreApplication::applicationDirPath() + "/" + QUOTE(QET_LANG_PATH)));
#endif
#endif
}
}