mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-16 10:40:45 +00:00
Add /usr/local/share to resource pathlist
This commit is contained in:
parent
a688f48f5d
commit
61c40a6702
@ -224,8 +224,14 @@ QString appResourcePath()
|
|||||||
#else
|
#else
|
||||||
// QStringList paths = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation);
|
// QStringList paths = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation);
|
||||||
// Check the Appiication Path first, so we can execute out of the build directory
|
// Check the Appiication Path first, so we can execute out of the build directory
|
||||||
QStringList paths = QCoreApplication::applicationDirPath();
|
QStringList paths;
|
||||||
paths.pushBack( QString( "/usr/share/" ) + QCoreApplication::applicationName() );
|
// This one will be used if the Html and Translations folders
|
||||||
|
// are in the same folder as the OSCAR executable
|
||||||
|
paths.push_back( QCoreApplication::applicationDirPath() );
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
paths.push_back( QString( "/usr/share/" ) + QCoreApplication::applicationName() );
|
||||||
|
paths.push_back( QString( "/usr/local/share/" ) + QCoreApplication::applicationName() );
|
||||||
|
#endif
|
||||||
for (auto p = begin(paths); p != end(paths); ++p ) {
|
for (auto p = begin(paths); p != end(paths); ++p ) {
|
||||||
QString fname = *p+QString("/Translations/oscar_qt_fr.qm");
|
QString fname = *p+QString("/Translations/oscar_qt_fr.qm");
|
||||||
qDebug() << "Trying" << fname;
|
qDebug() << "Trying" << fname;
|
||||||
|
@ -362,7 +362,7 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
qDebug().noquote() << "OSCAR starting" << QDateTime::currentDateTime().toString();
|
qDebug().noquote() << "OSCAR starting" << QDateTime::currentDateTime().toString();
|
||||||
qDebug() << "APP-NAME:" << QCoreApplication::applicationName();
|
qDebug() << "APP-NAME:" << QCoreApplication::applicationName();
|
||||||
qDebug() << "APP-PATH:" << QCoreApplication::applicationFilePath();
|
qDebug() << "APP-PATH:" << QCoreApplication::applicationDirPath();
|
||||||
qDebug() << "APP-RESOURCES:" << appResourcePath();
|
qDebug() << "APP-RESOURCES:" << appResourcePath();
|
||||||
|
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user