forked from qt-creator/qt-creator
Add ToolChain paths to the building of the debuggign helper
Ugly as hell, that code needs a refactoring once 1.1 is out.
This commit is contained in:
@@ -1375,6 +1375,12 @@ bool QtVersion::hasDebuggingHelper() const
|
|||||||
return m_hasDebuggingHelper;
|
return m_hasDebuggingHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// TODO buildDebuggingHelperLibrary needs to be accessible outside of the
|
||||||
|
// qt4versionmanager
|
||||||
|
// That probably means moving qt4version management into either the projectexplorer
|
||||||
|
// (The Projectexplorer plugin probably needs some splitting up, most of the stuff
|
||||||
|
// could be in a plugin shared by qt4projectmanager, cmakemanager and debugger.)
|
||||||
QString QtVersion::buildDebuggingHelperLibrary()
|
QString QtVersion::buildDebuggingHelperLibrary()
|
||||||
{
|
{
|
||||||
// Locations to try:
|
// Locations to try:
|
||||||
@@ -1420,6 +1426,21 @@ QString QtVersion::buildDebuggingHelperLibrary()
|
|||||||
ProjectExplorer::Environment env = ProjectExplorer::Environment::systemEnvironment();
|
ProjectExplorer::Environment env = ProjectExplorer::Environment::systemEnvironment();
|
||||||
addToEnvironment(env);
|
addToEnvironment(env);
|
||||||
|
|
||||||
|
// TODO this is a hack to get, to be removed and rewritten for 1.2
|
||||||
|
//
|
||||||
|
// For MSVC and MINGW, we need a toolchain to get the right environment
|
||||||
|
ProjectExplorer::ToolChain *toolChain = 0;
|
||||||
|
ProjectExplorer::ToolChain::ToolChainType t = toolchainType();
|
||||||
|
if (t == ProjectExplorer::ToolChain::MinGW)
|
||||||
|
toolChain = ProjectExplorer::ToolChain::createMinGWToolChain("g++", mingwDirectory());
|
||||||
|
else if(t == ProjectExplorer::ToolChain::MSVC)
|
||||||
|
toolChain = ProjectExplorer::ToolChain::createMSVCToolChain(msvcVersion());
|
||||||
|
if (toolChain) {
|
||||||
|
toolChain->addToEnvironment(env);
|
||||||
|
delete toolChain;
|
||||||
|
toolChain = 0;
|
||||||
|
}
|
||||||
|
|
||||||
qmake.setEnvironment(env.toStringList());
|
qmake.setEnvironment(env.toStringList());
|
||||||
qmake.setWorkingDirectory(directory);
|
qmake.setWorkingDirectory(directory);
|
||||||
qmake.setProcessChannelMode(QProcess::MergedChannels);
|
qmake.setProcessChannelMode(QProcess::MergedChannels);
|
||||||
@@ -1437,7 +1458,6 @@ QString QtVersion::buildDebuggingHelperLibrary()
|
|||||||
// and think about how to fix that later
|
// and think about how to fix that later
|
||||||
|
|
||||||
QString make;
|
QString make;
|
||||||
ProjectExplorer::ToolChain::ToolChainType t = toolchainType();
|
|
||||||
if (t == ProjectExplorer::ToolChain::MinGW)
|
if (t == ProjectExplorer::ToolChain::MinGW)
|
||||||
make = "mingw32-make.exe";
|
make = "mingw32-make.exe";
|
||||||
else if(t == ProjectExplorer::ToolChain::MSVC || t == ProjectExplorer::ToolChain::WINCE)
|
else if(t == ProjectExplorer::ToolChain::MSVC || t == ProjectExplorer::ToolChain::WINCE)
|
||||||
|
Reference in New Issue
Block a user