Skip to content
Snippets Groups Projects
Commit c8d6c400 authored by con's avatar con
Browse files

If no mwc path is set explicitly, still don't destroy working environment.

So now we use the values of the system environment as a backup
for build environment and system includes.
parent b7933d87
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include "winscwtoolchain.h" #include "winscwtoolchain.h"
#include <QtDebug>
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace Qt4ProjectManager::Internal; using namespace Qt4ProjectManager::Internal;
...@@ -64,30 +66,42 @@ QList<HeaderPath> WINSCWToolChain::systemHeaderPaths() ...@@ -64,30 +66,42 @@ QList<HeaderPath> WINSCWToolChain::systemHeaderPaths()
QStringList WINSCWToolChain::systemIncludes() const QStringList WINSCWToolChain::systemIncludes() const
{ {
QStringList symIncludes = QStringList() if (m_carbidePath.isEmpty()) {
<< "\\MSL\\MSL_C\\MSL_Common\\Include" qDebug() << "no carbide path set";
<< "\\MSL\\MSL_C\\MSL_Win32\\Include" ProjectExplorer::Environment env = ProjectExplorer::Environment::systemEnvironment();
<< "\\MSL\\MSL_CMSL_X86" QString symIncludesValue = env.value("MWCSYM2INCLUDES");
<< "\\MSL\\MSL_C++\\MSL_Common\\Include" qDebug() << "includes:" << symIncludesValue.split(";");
<< "\\MSL\\MSL_Extras\\MSL_Common\\Include" if (!symIncludesValue.isEmpty())
<< "\\MSL\\MSL_Extras\\MSL_Win32\\Include" return symIncludesValue.split(";");
<< "\\Win32-x86 Support\\Headers\\Win32 SDK"; } else {
for (int i = 0; i < symIncludes.size(); ++i) QStringList symIncludes = QStringList()
symIncludes[i].prepend(QString("%1\\x86Build\\Symbian_Support").arg(m_carbidePath)); << "\\MSL\\MSL_C\\MSL_Common\\Include"
return symIncludes; << "\\MSL\\MSL_C\\MSL_Win32\\Include"
<< "\\MSL\\MSL_CMSL_X86"
<< "\\MSL\\MSL_C++\\MSL_Common\\Include"
<< "\\MSL\\MSL_Extras\\MSL_Common\\Include"
<< "\\MSL\\MSL_Extras\\MSL_Win32\\Include"
<< "\\Win32-x86 Support\\Headers\\Win32 SDK";
for (int i = 0; i < symIncludes.size(); ++i)
symIncludes[i].prepend(QString("%1\\x86Build\\Symbian_Support").arg(m_carbidePath));
return symIncludes;
}
return QStringList();
} }
void WINSCWToolChain::addToEnvironment(ProjectExplorer::Environment &env) void WINSCWToolChain::addToEnvironment(ProjectExplorer::Environment &env)
{ {
env.set("MWCSYM2INCLUDES", systemIncludes().join(";")); if (!m_carbidePath.isEmpty()) {
QStringList symLibraries = QStringList() env.set("MWCSYM2INCLUDES", systemIncludes().join(";"));
<< "\\Win32-x86 Support\\Libraries\\Win32 SDK" QStringList symLibraries = QStringList()
<< "\\Runtime\\Runtime_x86\\Runtime_Win32\\Libs"; << "\\Win32-x86 Support\\Libraries\\Win32 SDK"
for (int i = 0; i < symLibraries.size(); ++i) << "\\Runtime\\Runtime_x86\\Runtime_Win32\\Libs";
symLibraries[i].prepend(QString("%1\\x86Build\\Symbian_Support").arg(m_carbidePath)); for (int i = 0; i < symLibraries.size(); ++i)
env.set("MWSYM2LIBRARIES", symLibraries.join(";")); symLibraries[i].prepend(QString("%1\\x86Build\\Symbian_Support").arg(m_carbidePath));
env.set("MWSYM2LIBRARYFILES", "MSL_All_MSE_Symbian_D.lib;gdi32.lib;user32.lib;kernel32.lib"); env.set("MWSYM2LIBRARIES", symLibraries.join(";"));
env.prependOrSetPath(QString("%1\\x86Build\\Symbian_Tools\\Command_Line_Tools").arg(m_carbidePath)); // compiler env.set("MWSYM2LIBRARYFILES", "MSL_All_MSE_Symbian_D.lib;gdi32.lib;user32.lib;kernel32.lib");
env.prependOrSetPath(QString("%1\\x86Build\\Symbian_Tools\\Command_Line_Tools").arg(m_carbidePath)); // compiler
}
env.prependOrSetPath(QString("%1\\epoc32\\tools").arg(m_deviceRoot)); // e.g. make.exe env.prependOrSetPath(QString("%1\\epoc32\\tools").arg(m_deviceRoot)); // e.g. make.exe
env.prependOrSetPath(QString("%1\\epoc32\\gcc\\bin").arg(m_deviceRoot)); // e.g. gcc.exe env.prependOrSetPath(QString("%1\\epoc32\\gcc\\bin").arg(m_deviceRoot)); // e.g. gcc.exe
env.set("EPOCDEVICE", QString("%1:%2").arg(m_deviceId, m_deviceName)); env.set("EPOCDEVICE", QString("%1:%2").arg(m_deviceId, m_deviceName));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment