forked from qt-creator/qt-creator
Take the right sis package when using the Smart Installer flag.
This commit is contained in:
@@ -161,14 +161,15 @@ void S60CreatePackageStep::setCustomKeyPath(const QString &path)
|
||||
m_customKeyPath = path;
|
||||
}
|
||||
|
||||
bool S60CreatePackageStep::createSmartInstaller() const
|
||||
bool S60CreatePackageStep::createsSmartInstaller() const
|
||||
{
|
||||
return m_createSmartInstaller;
|
||||
}
|
||||
|
||||
void S60CreatePackageStep::setCreateSmartInstaller(bool value)
|
||||
void S60CreatePackageStep::setCreatesSmartInstaller(bool value)
|
||||
{
|
||||
m_createSmartInstaller = value;
|
||||
static_cast<Qt4BuildConfiguration *>(buildConfiguration())->emitS60CreatesSmartInstallerChanged();
|
||||
}
|
||||
|
||||
// #pragma mark -- S60SignBuildStepFactory
|
||||
@@ -273,7 +274,7 @@ void S60CreatePackageStepConfigWidget::updateUi()
|
||||
m_ui.keyFilePath->setEnabled(!selfSigned);
|
||||
m_ui.signaturePath->setPath(m_signStep->customSignaturePath());
|
||||
m_ui.keyFilePath->setPath(m_signStep->customKeyPath());
|
||||
m_ui.smartInstaller->setChecked(m_signStep->createSmartInstaller());
|
||||
m_ui.smartInstaller->setChecked(m_signStep->createsSmartInstaller());
|
||||
emit updateSummary();
|
||||
}
|
||||
|
||||
@@ -284,7 +285,7 @@ void S60CreatePackageStepConfigWidget::updateFromUi()
|
||||
: S60CreatePackageStep::SignCustom);
|
||||
m_signStep->setCustomSignaturePath(m_ui.signaturePath->path());
|
||||
m_signStep->setCustomKeyPath(m_ui.keyFilePath->path());
|
||||
m_signStep->setCreateSmartInstaller(m_ui.smartInstaller->isChecked());
|
||||
m_signStep->setCreatesSmartInstaller(m_ui.smartInstaller->isChecked());
|
||||
updateUi();
|
||||
}
|
||||
|
||||
@@ -298,7 +299,7 @@ QString S60CreatePackageStepConfigWidget::summaryText() const
|
||||
.arg(m_signStep->customSignaturePath())
|
||||
.arg(m_signStep->customKeyPath());
|
||||
}
|
||||
if (m_signStep->createSmartInstaller())
|
||||
if (m_signStep->createsSmartInstaller())
|
||||
return tr("<b>Create SIS Package:</b> %1, using Smart Installer").arg(text);
|
||||
return tr("<b>Create SIS Package:</b> %1").arg(text);
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ public:
|
||||
void setCustomSignaturePath(const QString &path);
|
||||
QString customKeyPath() const;
|
||||
void setCustomKeyPath(const QString &path);
|
||||
bool createSmartInstaller() const;
|
||||
void setCreateSmartInstaller(bool value);
|
||||
bool createsSmartInstaller() const;
|
||||
void setCreatesSmartInstaller(bool value);
|
||||
|
||||
protected:
|
||||
S60CreatePackageStep(ProjectExplorer::BuildConfiguration *bc, S60CreatePackageStep *bs);
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "symbiandevicemanager.h"
|
||||
#include "qt4buildconfiguration.h"
|
||||
#include "qt4projectmanagerconstants.h"
|
||||
#include "s60createpackagestep.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/messagemanager.h>
|
||||
@@ -109,6 +110,7 @@ QString pathToId(const QString &path)
|
||||
S60DeviceRunConfiguration::S60DeviceRunConfiguration(Target *parent, const QString &proFilePath) :
|
||||
RunConfiguration(parent, QLatin1String(S60_DEVICE_RC_ID)),
|
||||
m_proFilePath(proFilePath),
|
||||
m_activeBuildConfiguration(0),
|
||||
#ifdef Q_OS_WIN
|
||||
m_serialPortName(QLatin1String("COM5"))
|
||||
#else
|
||||
@@ -121,6 +123,7 @@ S60DeviceRunConfiguration::S60DeviceRunConfiguration(Target *parent, const QStri
|
||||
S60DeviceRunConfiguration::S60DeviceRunConfiguration(Target *target, S60DeviceRunConfiguration *source) :
|
||||
RunConfiguration(target, source),
|
||||
m_proFilePath(source->m_proFilePath),
|
||||
m_activeBuildConfiguration(0),
|
||||
m_serialPortName(source->m_serialPortName)
|
||||
{
|
||||
ctor();
|
||||
@@ -135,6 +138,9 @@ void S60DeviceRunConfiguration::ctor()
|
||||
|
||||
connect(qt4Target()->qt4Project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode*)),
|
||||
this, SLOT(proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode*)));
|
||||
connect(qt4Target(), SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
|
||||
this, SLOT(updateActiveBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
|
||||
updateActiveBuildConfiguration(qt4Target()->activeBuildConfiguration());
|
||||
}
|
||||
|
||||
void S60DeviceRunConfiguration::proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode *pro)
|
||||
@@ -143,6 +149,17 @@ void S60DeviceRunConfiguration::proFileUpdate(Qt4ProjectManager::Internal::Qt4Pr
|
||||
emit targetInformationChanged();
|
||||
}
|
||||
|
||||
void S60DeviceRunConfiguration::updateActiveBuildConfiguration(ProjectExplorer::BuildConfiguration *buildConfiguration)
|
||||
{
|
||||
if (m_activeBuildConfiguration)
|
||||
disconnect(m_activeBuildConfiguration, SIGNAL(s60CreatesSmartInstallerChanged()),
|
||||
this, SIGNAL(targetInformationChanged()));
|
||||
m_activeBuildConfiguration = buildConfiguration;
|
||||
if (m_activeBuildConfiguration)
|
||||
connect(m_activeBuildConfiguration, SIGNAL(s60CreatesSmartInstallerChanged()),
|
||||
this, SIGNAL(targetInformationChanged()));
|
||||
}
|
||||
|
||||
S60DeviceRunConfiguration::~S60DeviceRunConfiguration()
|
||||
{
|
||||
}
|
||||
@@ -346,12 +363,27 @@ QString S60DeviceRunConfiguration::localExecutableFileName() const
|
||||
return QDir::toNativeSeparators(localExecutable);
|
||||
}
|
||||
|
||||
bool S60DeviceRunConfiguration::runSmartInstaller() const
|
||||
{
|
||||
BuildConfiguration *bc = target()->activeBuildConfiguration();
|
||||
QTC_ASSERT(bc, return false);
|
||||
QList<BuildStep *> steps = bc->steps(Build);
|
||||
foreach (const BuildStep *step, steps) {
|
||||
if (const S60CreatePackageStep *packageStep = qobject_cast<const S60CreatePackageStep *>(step)) {
|
||||
return packageStep->createsSmartInstaller();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QString S60DeviceRunConfiguration::signedPackage() const
|
||||
{
|
||||
TargetInformation ti = qt4Target()->qt4Project()->rootProjectNode()->targetInformation(m_proFilePath);
|
||||
if (!ti.valid)
|
||||
return QString();
|
||||
return ti.buildDir + QLatin1Char('/') + ti.target + QLatin1String(".sis");
|
||||
return ti.buildDir + QLatin1Char('/') + ti.target
|
||||
+ (runSmartInstaller() ? QLatin1String("_installer") : QLatin1String(""))
|
||||
+ QLatin1String(".sis");
|
||||
}
|
||||
|
||||
QStringList S60DeviceRunConfiguration::commandLineArguments() const
|
||||
|
||||
@@ -100,6 +100,7 @@ signals:
|
||||
|
||||
private slots:
|
||||
void proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode *pro);
|
||||
void updateActiveBuildConfiguration(ProjectExplorer::BuildConfiguration *buildConfiguration);
|
||||
|
||||
protected:
|
||||
S60DeviceRunConfiguration(ProjectExplorer::Target *parent, S60DeviceRunConfiguration *source);
|
||||
@@ -109,7 +110,10 @@ private:
|
||||
ProjectExplorer::ToolChain::ToolChainType toolChainType(ProjectExplorer::BuildConfiguration *configuration) const;
|
||||
void ctor();
|
||||
|
||||
bool runSmartInstaller() const;
|
||||
|
||||
QString m_proFilePath;
|
||||
ProjectExplorer::BuildConfiguration *m_activeBuildConfiguration;
|
||||
QString m_serialPortName;
|
||||
QStringList m_commandLineArguments;
|
||||
};
|
||||
|
||||
@@ -371,6 +371,12 @@ void Qt4BuildConfiguration::emitBuildDirectoryInitialized()
|
||||
emit buildDirectoryInitialized();
|
||||
}
|
||||
|
||||
void Qt4BuildConfiguration::emitS60CreatesSmartInstallerChanged()
|
||||
{
|
||||
emit s60CreatesSmartInstallerChanged();
|
||||
}
|
||||
|
||||
|
||||
void Qt4BuildConfiguration::getConfigCommandLineArguments(QStringList *addedUserConfigs, QStringList *removedUserConfigs) const
|
||||
{
|
||||
QtVersion::QmakeBuildConfigs defaultBuildConfiguration = qtVersion()->defaultBuildConfig();
|
||||
|
||||
@@ -83,6 +83,10 @@ public:
|
||||
// used by qmake step to notify that the build directory was initialized
|
||||
// not really nice
|
||||
void emitBuildDirectoryInitialized();
|
||||
// used by S60CreatePackageStep to notify that the smart installer property changed
|
||||
// not really nice
|
||||
void emitS60CreatesSmartInstallerChanged();
|
||||
|
||||
void getConfigCommandLineArguments(QStringList *addedUserConfigs, QStringList *removedUserConfigs) const;
|
||||
|
||||
// Those functions are used in a few places.
|
||||
@@ -112,6 +116,8 @@ signals:
|
||||
/// emitted for setQMakeBuildConfig, not emitted for qt version changes, even
|
||||
/// if those change the qmakebuildconfig
|
||||
void qmakeBuildConfigurationChanged();
|
||||
/// emitted when smart installer property of S60 create package step changes
|
||||
void s60CreatesSmartInstallerChanged();
|
||||
|
||||
/// emitted if the build configuration changed in a way that
|
||||
/// should trigger a reevaluation of all .pro files
|
||||
|
||||
Reference in New Issue
Block a user