Doesnt work, I have changed that
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
//Next line was changed
env.insert("QTDIR", m_pathToProjectFiles); // Add an environment variable
env.insert("PATH", env.value("Path") + ";C:\\Qt\\2010.01\\qt\\bin");
env.insert("QMAKESPEC", "win32-g++"); // Add an environment variable
firstProcess->setProcessEnvironment(env);
//Next line was changed
QString qmake
="C:/Qt/2010.01/qt/qmake/qmke.exe";
arguments << m_pathToProjectFiles + "/MyProject.pro" << "CONFIG+=release";
firstProcess->start(qmake, arguments);
firstProcess->waitForFinished();
QProcess *firstProcess = new QProcess;
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
//Next line was changed
env.insert("QTDIR", m_pathToProjectFiles); // Add an environment variable
env.insert("PATH", env.value("Path") + ";C:\\Qt\\2010.01\\qt\\bin");
env.insert("QMAKESPEC", "win32-g++"); // Add an environment variable
firstProcess->setProcessEnvironment(env);
//Next line was changed
QString qmake ="C:/Qt/2010.01/qt/qmake/qmke.exe";
QStringList arguments;
arguments << m_pathToProjectFiles + "/MyProject.pro" << "CONFIG+=release";
firstProcess->start(qmake, arguments);
firstProcess->waitForFinished();
To copy to clipboard, switch view to plain text mode
Now it is supposed that it enters in the proper dir, because QTDIR now is the path to the .pro file. Then I give the absolute path for the qmake, but it doesnt work.
Bookmarks