Allow disabling .app bundles on Mac

This commit is contained in:
Yen Chi Hsuan
2017-05-06 01:49:52 +08:00
parent 9f819061cd
commit 3822625e77
4 changed files with 27 additions and 15 deletions

View File

@@ -49,7 +49,7 @@ QString FilePath::pluginPath(const QString& name)
// for TestAutoType
pluginPaths << QCoreApplication::applicationDirPath() + "/../src/autotype/test";
#if defined(Q_OS_MAC)
#if defined(Q_OS_MAC) && defined(WITH_APP_BUNDLE)
pluginPaths << QCoreApplication::applicationDirPath() + "/../PlugIns";
#endif
@@ -195,7 +195,7 @@ FilePath::FilePath()
else if (testSetDir(QString(KEEPASSX_SOURCE_DIR) + "/share")) {
}
#endif
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
#if defined(Q_OS_UNIX) && !(defined(Q_OS_MAC) && defined(WITH_APP_BUNDLE))
else if (isDataDirAbsolute && testSetDir(KEEPASSX_DATA_DIR)) {
}
else if (!isDataDirAbsolute && testSetDir(QString("%1/../%2").arg(appDirPath, KEEPASSX_DATA_DIR))) {
@@ -203,7 +203,7 @@ FilePath::FilePath()
else if (!isDataDirAbsolute && testSetDir(QString("%1/%2").arg(KEEPASSX_PREFIX_DIR, KEEPASSX_DATA_DIR))) {
}
#endif
#ifdef Q_OS_MAC
#if defined(Q_OS_MAC) && defined(WITH_APP_BUNDLE)
else if (testSetDir(appDirPath + "/../Resources")) {
}
#endif