mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
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:
@@ -30,7 +30,7 @@ win32 {
|
|||||||
}
|
}
|
||||||
macx {
|
macx {
|
||||||
# Chemins MacOS X
|
# Chemins MacOS X
|
||||||
COMPIL_PREFIX = '/usr/local/'
|
COMPIL_PREFIX = ''
|
||||||
INSTALL_PREFIX = '/usr/local/'
|
INSTALL_PREFIX = '/usr/local/'
|
||||||
QET_BINARY_PATH = 'bin/'
|
QET_BINARY_PATH = 'bin/'
|
||||||
QET_COMMON_COLLECTION_PATH = 'share/qelectrotech/elements/'
|
QET_COMMON_COLLECTION_PATH = 'share/qelectrotech/elements/'
|
||||||
@@ -309,7 +309,7 @@ unix {
|
|||||||
INSTALLS += desktop mime_xml mime_desktop mime_package icons man examples
|
INSTALLS += desktop mime_xml mime_desktop mime_package icons man examples
|
||||||
}
|
}
|
||||||
|
|
||||||
# Options de compilation propres a Unix
|
# Options de compilation communes a Unix et MacOS X
|
||||||
unix {
|
unix {
|
||||||
# Chemin des fichiers de traduction ; par defaut : lang/ dans le repertoire d'execution
|
# Chemin des fichiers de traduction ; par defaut : lang/ dans le repertoire d'execution
|
||||||
DEFINES += QET_LANG_PATH=$$join(COMPIL_PREFIX,,,$${QET_LANG_PATH})
|
DEFINES += QET_LANG_PATH=$$join(COMPIL_PREFIX,,,$${QET_LANG_PATH})
|
||||||
@@ -317,3 +317,10 @@ unix {
|
|||||||
# Chemin de la collection commune ; par defaut : elements/ dans le repertoire d'execution
|
# Chemin de la collection commune ; par defaut : elements/ dans le repertoire d'execution
|
||||||
DEFINES += QET_COMMON_COLLECTION_PATH=$$join(COMPIL_PREFIX,,,$${QET_COMMON_COLLECTION_PATH})
|
DEFINES += QET_COMMON_COLLECTION_PATH=$$join(COMPIL_PREFIX,,,$${QET_COMMON_COLLECTION_PATH})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Options de compilation specifiques a MacOS X
|
||||||
|
macx {
|
||||||
|
# les chemins definis precedemment sont relatifs au dossier contenant le binaire executable
|
||||||
|
DEFINES += QET_LANG_PATH_RELATIVE_TO_BINARY_PATH
|
||||||
|
DEFINES += QET_COMMON_COLLECTION_PATH_RELATIVE_TO_BINARY_PATH
|
||||||
|
}
|
||||||
|
|||||||
@@ -264,10 +264,17 @@ QString QETApp::commonElementsDir() {
|
|||||||
#ifdef QET_ALLOW_OVERRIDE_CED_OPTION
|
#ifdef QET_ALLOW_OVERRIDE_CED_OPTION
|
||||||
if (common_elements_dir != QString()) return(common_elements_dir);
|
if (common_elements_dir != QString()) return(common_elements_dir);
|
||||||
#endif
|
#endif
|
||||||
#ifdef QET_COMMON_COLLECTION_PATH
|
#ifndef QET_COMMON_COLLECTION_PATH
|
||||||
return(QUOTE(QET_COMMON_COLLECTION_PATH));
|
// en l'absence d'option de compilation, on utilise le dossier elements, situe a cote du binaire executable
|
||||||
#else
|
|
||||||
return(QCoreApplication::applicationDirPath() + "/elements/");
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,9 +419,16 @@ QString QETApp::languagesPath() {
|
|||||||
return(lang_dir);
|
return(lang_dir);
|
||||||
} else {
|
} else {
|
||||||
#ifndef QET_LANG_PATH
|
#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/");
|
return(QCoreApplication::applicationDirPath() + "/lang/");
|
||||||
#else
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user