| 91 | } |
| 92 | |
| 93 | QString GetExternalPath(QString const & name, QString const & primaryPath, QString const & secondaryPath) |
| 94 | { |
| 95 | QString const resourceDir = GetPlatform().ResourcesDir().c_str(); |
| 96 | QString path = JoinPathQt({resourceDir, primaryPath, name}); |
| 97 | if (!QFileInfo::exists(path)) |
| 98 | path = JoinPathQt({resourceDir, secondaryPath, name}); |
| 99 | |
| 100 | // Special case for looking for in application folder. |
| 101 | if (!QFileInfo::exists(path) && secondaryPath.isEmpty()) |
| 102 | { |
| 103 | QString appPath = QCoreApplication::applicationDirPath(); |
| 104 | |
| 105 | #if defined(OMIM_OS_MAC) |
| 106 | path = JoinPathQt({appPath, "..", "..", "..", name}); |
| 107 | #elif defined(OMIM_OS_LINUX) |
| 108 | path = JoinPathQt({appPath, name}); |
| 109 | #endif |
| 110 | } |
| 111 | return path; |
| 112 | } |
| 113 | |
| 114 | QString GetProtobufEggPath() |
| 115 | { |