Commit a29a5b43 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Maemo: Fix madlist crashing due to missing DLL on Windows.

Reviewed-by: kh
parent 7528b3b0
......@@ -106,13 +106,20 @@ bool MaemoManager::isValidMaemoQtVersion(const QtVersion *version) const
if (!QFileInfo(madAdminCommand).exists())
return false;
QProcess madAdminProc;
QStringList arguments(QLatin1String("list"));
#ifdef Q_OS_WIN
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert(QLatin1String("PATH"),
QDir::toNativeSeparators(dir.absolutePath() % QLatin1String("/bin"))
% QLatin1Char(';') % env.value(QLatin1String("PATH")));
madAdminProc.setProcessEnvironment(env);
arguments.prepend(madAdminCommand);
madAdminCommand = dir.absolutePath() + QLatin1String("/bin/sh.exe");
#endif
QProcess madAdminProc;
madAdminProc.start(madAdminCommand, arguments);
if (!madAdminProc.waitForStarted() || !madAdminProc.waitForFinished())
return false;
......
......@@ -678,6 +678,10 @@ QString MaemoQemuManager::runtimeForQtVersion(const QString &qmakeCommand) const
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert("HOME",
QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
env.insert(QLatin1String("PATH"),
QDir::toNativeSeparators(madRoot % QLatin1String("/bin"))
% QLatin1Char(';') % env.value(QLatin1String("PATH")));
madProc.setProcessEnvironment(env);
arguments.prepend(madCommand);
......
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