forked from qt-creator/qt-creator
A bit refactoring and make S60 Qt detection more flexible.
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
tool chain?
|
tool chain?
|
||||||
* seems that the make for building for device doesn't return useful exit code,
|
* seems that the make for building for device doesn't return useful exit code,
|
||||||
so a run is started even if the build has errors
|
so a run is started even if the build has errors
|
||||||
|
* gcce error parser (gcc seems not to be enough sometimes, and the make tool does not return valid exit codes
|
||||||
|
|
||||||
* Run Configurations
|
* Run Configurations
|
||||||
* handling of active run config getting disabled not optimal yet
|
* handling of active run config getting disabled not optimal yet
|
||||||
@@ -32,8 +33,8 @@
|
|||||||
* time stamp of copied sisx is ridiculous
|
* time stamp of copied sisx is ridiculous
|
||||||
* don't copy the sisx all the time
|
* don't copy the sisx all the time
|
||||||
* don't hardcode copy destination
|
* don't hardcode copy destination
|
||||||
|
* be able to cancel the copy & install process
|
||||||
* Add compile output parser winscw at least
|
* isRunning is wrong
|
||||||
|
|
||||||
* WINSCW tool chain:
|
* WINSCW tool chain:
|
||||||
* predefined macros
|
* predefined macros
|
||||||
|
|||||||
@@ -495,10 +495,8 @@ void S60DeviceRunControl::start()
|
|||||||
emit addToOutputWindow(this, tr("Creating %1.sisx ...").arg(QDir::toNativeSeparators(m_baseFileName)));
|
emit addToOutputWindow(this, tr("Creating %1.sisx ...").arg(QDir::toNativeSeparators(m_baseFileName)));
|
||||||
|
|
||||||
Q_ASSERT(project);
|
Q_ASSERT(project);
|
||||||
m_toolsDirectory = S60Manager::instance()->devices()->deviceForId(
|
m_toolsDirectory = S60Manager::instance()->deviceForQtVersion(
|
||||||
S60Manager::instance()->deviceIdFromDetectionSource(
|
project->qtVersion(project->activeBuildConfiguration())).toolsRoot
|
||||||
project->qtVersion(project->activeBuildConfiguration())
|
|
||||||
->autodetectionSource())).epocRoot
|
|
||||||
+ "/epoc32/tools";
|
+ "/epoc32/tools";
|
||||||
QString makesisTool = m_toolsDirectory + "/makesis.exe";
|
QString makesisTool = m_toolsDirectory + "/makesis.exe";
|
||||||
QString packageFile = QFileInfo(m_baseFileName + ".pkg").fileName();
|
QString packageFile = QFileInfo(m_baseFileName + ".pkg").fileName();
|
||||||
|
|||||||
@@ -143,8 +143,7 @@ void S60EmulatorRunConfiguration::updateTarget()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString baseDir = S60Manager::instance()->devices()->deviceForId(
|
QString baseDir = S60Manager::instance()->deviceForQtVersion(qtVersion).epocRoot;
|
||||||
S60Manager::instance()->deviceIdFromDetectionSource(qtVersion->autodetectionSource())).epocRoot;
|
|
||||||
QString qmakeBuildConfig = "urel";
|
QString qmakeBuildConfig = "urel";
|
||||||
if (projectBuildConfiguration & QtVersion::DebugBuild)
|
if (projectBuildConfiguration & QtVersion::DebugBuild)
|
||||||
qmakeBuildConfig = "udeb";
|
qmakeBuildConfig = "udeb";
|
||||||
|
|||||||
@@ -148,12 +148,32 @@ void S60Manager::updateQtVersions()
|
|||||||
|
|
||||||
ProjectExplorer::ToolChain *S60Manager::createWINSCWToolChain(const Qt4ProjectManager::QtVersion *version) const
|
ProjectExplorer::ToolChain *S60Manager::createWINSCWToolChain(const Qt4ProjectManager::QtVersion *version) const
|
||||||
{
|
{
|
||||||
QString id = version->autodetectionSource().mid(QString(S60_AUTODETECTION_SOURCE).length()+1);
|
return new WINSCWToolChain(deviceForQtVersion(version), version->mwcDirectory());
|
||||||
return new WINSCWToolChain(m_devices->deviceForId(id), version->mwcDirectory());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::ToolChain *S60Manager::createGCCEToolChain(const Qt4ProjectManager::QtVersion *version) const
|
ProjectExplorer::ToolChain *S60Manager::createGCCEToolChain(const Qt4ProjectManager::QtVersion *version) const
|
||||||
{
|
{
|
||||||
QString id = version->autodetectionSource().mid(QString(S60_AUTODETECTION_SOURCE).length()+1);
|
return new GCCEToolChain(deviceForQtVersion(version));
|
||||||
return new GCCEToolChain(m_devices->deviceForId(id));
|
}
|
||||||
|
|
||||||
|
S60Devices::Device S60Manager::deviceForQtVersion(const Qt4ProjectManager::QtVersion *version) const
|
||||||
|
{
|
||||||
|
S60Devices::Device device;
|
||||||
|
QString deviceId;
|
||||||
|
if (version->isAutodetected())
|
||||||
|
deviceId = deviceIdFromDetectionSource(version->autodetectionSource());
|
||||||
|
if (deviceId.isEmpty()) { // it's not an s60 autodetected version
|
||||||
|
// have a look if we find the device root anyhow
|
||||||
|
if (QFile::exists(QString::fromLatin1("%1/epoc32").arg(version->path()))) {
|
||||||
|
device.epocRoot = version->path();
|
||||||
|
device.toolsRoot = device.epocRoot;
|
||||||
|
device.qt = device.epocRoot;
|
||||||
|
device.isDefault = false;
|
||||||
|
device.name = QString::fromLatin1("SDK");
|
||||||
|
device.id = QString::fromLatin1("SDK");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
device = m_devices->deviceForId(deviceId);
|
||||||
|
}
|
||||||
|
return device;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "qtversionmanager.h"
|
#include "qtversionmanager.h"
|
||||||
#include "serialdevicelister.h"
|
#include "serialdevicelister.h"
|
||||||
|
#include "s60devices.h"
|
||||||
|
|
||||||
#include <extensionsystem/iplugin.h>
|
#include <extensionsystem/iplugin.h>
|
||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
@@ -41,7 +42,6 @@
|
|||||||
namespace Qt4ProjectManager {
|
namespace Qt4ProjectManager {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class S60Devices;
|
|
||||||
class S60DevicesPreferencePane;
|
class S60DevicesPreferencePane;
|
||||||
class S60EmulatorRunConfigurationFactory;
|
class S60EmulatorRunConfigurationFactory;
|
||||||
class S60EmulatorRunConfigurationRunner;
|
class S60EmulatorRunConfigurationRunner;
|
||||||
@@ -60,6 +60,7 @@ public:
|
|||||||
ProjectExplorer::ToolChain *createGCCEToolChain(const Qt4ProjectManager::QtVersion *version) const;
|
ProjectExplorer::ToolChain *createGCCEToolChain(const Qt4ProjectManager::QtVersion *version) const;
|
||||||
|
|
||||||
S60Devices *devices() const { return m_devices; }
|
S60Devices *devices() const { return m_devices; }
|
||||||
|
S60Devices::Device deviceForQtVersion(const Qt4ProjectManager::QtVersion *version) const;
|
||||||
QString deviceIdFromDetectionSource(const QString &autoDetectionSource) const;
|
QString deviceIdFromDetectionSource(const QString &autoDetectionSource) const;
|
||||||
|
|
||||||
SerialDeviceLister *serialDeviceLister() const { return m_serialDeviceLister; }
|
SerialDeviceLister *serialDeviceLister() const { return m_serialDeviceLister; }
|
||||||
|
|||||||
Reference in New Issue
Block a user