Add fallback path to app dir for urde/hecl/visigen on Linux

This commit is contained in:
Luke Street 2020-04-14 15:35:46 -04:00
parent 37324e7fe0
commit 4c178bee84
1 changed files with 6 additions and 0 deletions

View File

@ -395,6 +395,12 @@ bool MainWindow::checkDownloadedBinary() {
QString urdePath = m_path + QStringLiteral("/urde");
QString heclPath = m_path + QStringLiteral("/hecl");
QString visigenPath = m_path + QStringLiteral("/visigen");
if (!QFileInfo::exists(urdePath) || !QFileInfo::exists(heclPath) || !QFileInfo::exists(visigenPath)) {
const QString dir = QApplication::instance()->applicationDirPath();
urdePath = dir + QStringLiteral("/urde");
heclPath = dir + QStringLiteral("/hecl");
visigenPath = dir + QStringLiteral("/visigen");
}
#endif
urdePath = QFileInfo(urdePath).absoluteFilePath();
heclPath = QFileInfo(heclPath).absoluteFilePath();