Commit 164f9fe0 authored by Vincent Pinon's avatar Vincent Pinon

Fix melt.exe finding on windows

parent 0a12e90c
......@@ -57,9 +57,9 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
KdenliveSettings::setMltpath(profilePath);
#ifdef Q_OS_WIN
QString meltPath = QDir::cleanPath(profilePath).section(QLatin1Char('/'), 0, -3) + QStringLiteral("/melt.exe");
QString meltPath = QDir::cleanPath(profilePath + QStringLiteral("../../../melt.exe"));
#else
QString meltPath = QDir::cleanPath(profilePath).section(QLatin1Char('/'), 0, -3) + QStringLiteral("/bin/melt");
QString meltPath = QDir::cleanPath(profilePath + QStringLiteral("../../../bin/melt"));
if (!QFile::exists(meltPath)) meltPath = qgetenv("MLT_PREFIX") + QStringLiteral("/bin/melt");
if (!QFile::exists(meltPath)) meltPath = KdenliveSettings::rendererpath();
if (!QFile::exists(meltPath)) meltPath = QStandardPaths::findExecutable("melt");
......@@ -84,7 +84,11 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
}
}
if (profilePath.isEmpty()) {
profilePath = QDir::cleanPath(meltPath).section(QLatin1Char('/'), 0, -3) + QStringLiteral("/share/mlt/profiles/");
#ifdef Q_OS_WIN
profilePath = QDir::cleanPath(meltPath + QStringLiteral("/../share/mlt/profiles/"));
#else
profilePath = QDir::cleanPath(meltPath + QStringLiteral("/../../share/mlt/profiles/"));
#endif
KdenliveSettings::setMltpath(profilePath);
}
QStringList profilesFilter;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment