Commit 8cdb5aca authored by El Mehdi Fekari's avatar El Mehdi Fekari Committed by Mehdi Fekari

Qnx: Enable installing runtime and simulator

Change-Id: I3aca5575d4a925ee2efcf891f558105ffcec6094
Reviewed-by: Nicolas Arnaud-Cormos's avatarNicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: default avatarRafael Roquetto <rafael.roquetto@kdab.com>
parent 39212338
......@@ -40,6 +40,7 @@ using namespace Qnx;
using namespace Qnx::Internal;
BlackBerryInstallWizard::BlackBerryInstallWizard(BlackBerryInstallerDataHandler::Mode mode,
BlackBerryInstallerDataHandler::Target target,
const QString& version,
QWidget *parent)
: Utils::Wizard(parent)
......@@ -49,8 +50,10 @@ BlackBerryInstallWizard::BlackBerryInstallWizard(BlackBerryInstallerDataHandler:
setWindowTitle(tr("BlackBerry NDK Installation Wizard"));
m_data.mode = mode;
m_data.installTarget = target;
m_data.version = version;
if (m_data.mode != BlackBerryInstallerDataHandler::UninstallMode) {
m_optionPage = new BlackBerryInstallWizardOptionPage(m_data, this);
m_ndkPage = new BlackBerryInstallWizardNdkPage(m_data, this);
......
......@@ -53,12 +53,19 @@ public:
ManuallMode
};
enum Target {
ApiLevel,
Simulator,
Runtime
};
QString ndkPath;
QString target;
QString version;
int exitCode;
QProcess::ExitStatus exitStatus;
Mode mode;
Target installTarget;
};
class BlackBerryInstallWizard : public Utils::Wizard
......@@ -74,6 +81,7 @@ public:
};
explicit BlackBerryInstallWizard(BlackBerryInstallerDataHandler::Mode mode = BlackBerryInstallerDataHandler::InstallMode,
BlackBerryInstallerDataHandler::Target target = BlackBerryInstallerDataHandler::ApiLevel,
const QString& version = QString(),
QWidget *parent = 0);
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Qnx::Internal::BlackBerryInstallWizardOptionPage</class>
<widget class="QWidget" name="Qnx::Internal::BlackBerryInstallWizardOptionPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>457</width>
<height>278</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="apiLevelButton">
<property name="text">
<string>Install Api Level</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="apiLevelOptionsLayout">
<item>
<widget class="QRadioButton" name="installButton">
<property name="text">
<string>Install New Target</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="addButton">
<property name="text">
<string>Add Existing Target</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QRadioButton" name="simulatorButton">
<property name="text">
<string>Install Simulator</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="runtimeButton">
<property name="text">
<string>Install Runtime</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
......@@ -41,13 +41,13 @@
QT_BEGIN_NAMESPACE
class QProcess;
class QRadioButton;
class QVBoxLayout;
class QButtonGroup;
QT_END_NAMESPACE
namespace Qnx {
namespace Internal {
class Ui_BlackBerryInstallWizardOptionPage;
class Ui_BlackBerryInstallWizardNdkPage;
class Ui_BlackBerryInstallWizardTargetPage;
class Ui_BlackBerryInstallWizardProcessPage;
......@@ -74,22 +74,24 @@ class BlackBerryInstallWizardOptionPage : public QWizardPage
public:
explicit BlackBerryInstallWizardOptionPage(BlackBerryInstallerDataHandler &data, QWidget *parent = 0);
~BlackBerryInstallWizardOptionPage();
void initializePage();
bool isComplete() const;
int nextId() const;
protected slots:
void handleOptionChanged();
void handleApiLevelOptionChanged();
void handlePathChanged(const QString &envFilePath);
void handleTargetChanged();
signals:
void installModeChanged();
private:
QVBoxLayout *m_layout;
QRadioButton* m_installButton;
QRadioButton* m_addButton;
NdkPathChooser* m_envFileChooser;
Ui_BlackBerryInstallWizardOptionPage *m_ui;
QButtonGroup *m_buttonGroup;
NdkPathChooser *m_envFileChooser;
BlackBerryInstallerDataHandler &m_data;
};
......
......@@ -17,7 +17,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Please select target:</string>
<string>Please select version:</string>
</property>
</widget>
</item>
......
......@@ -398,7 +398,7 @@ void BlackBerryNDKSettingsWidget::updateDefaultApiLevel()
void BlackBerryNDKSettingsWidget::launchBlackBerryInstallerWizard(BlackBerryInstallerDataHandler::Mode mode,
const QString& targetVersion)
{
BlackBerryInstallWizard wizard(mode, targetVersion, this);
BlackBerryInstallWizard wizard(mode, BlackBerryInstallerDataHandler::ApiLevel, targetVersion, this);
if (mode == BlackBerryInstallerDataHandler::InstallMode)
connect(&wizard, SIGNAL(processFinished()), this, SLOT(handleInstallationFinished()));
else
......
......@@ -229,7 +229,8 @@ FORMS += \
blackberrydeviceconfigurationwizardquerypage.ui \
blackberryinstallwizardtargetpage.ui \
blackberryinstallwizardndkpage.ui \
blackberryinstallwizardprocesspage.ui
blackberryinstallwizardprocesspage.ui \
blackberryinstallwizardoptionpage.ui
include(../../private_headers.pri)
include(./cascadesimport/cascadesimport.pri)
......
......@@ -118,6 +118,7 @@ QtcPlugin {
"blackberryinstallwizard.cpp",
"blackberryinstallwizard.h",
"blackberryinstallwizardndkpage.ui",
"blackberryinstallwizardoptionpage.ui",
"blackberryinstallwizardpages.cpp",
"blackberryinstallwizardpages.h",
"blackberryinstallwizardprocesspage.ui",
......
......@@ -282,7 +282,8 @@ QString QnxUtils::sdkInstallerPath(const QString &ndkPath)
}
// The resulting process when launching sdkinstall
QString QnxUtils::qdeInstallProcess(const QString &ndkPath, const QString &option, const QString &version)
QString QnxUtils::qdeInstallProcess(const QString &ndkPath, const QString &target,
const QString &option, const QString &version)
{
QString installerPath = sdkInstallerPath(ndkPath);
if (installerPath.isEmpty())
......@@ -293,7 +294,7 @@ QString QnxUtils::qdeInstallProcess(const QString &ndkPath, const QString &optio
const QString installerApplication = installerPlugins.size() >= 1 ? QLatin1String("com.qnx.tools.ide.sdk.installer.app.SDKInstallerApplication")
: QLatin1String("com.qnx.tools.ide.sdk.manager.core.SDKInstallerApplication");
return QString::fromLatin1("%1 -nosplash -application %2 "
"%3 %4 -vmargs -Dosgi.console=:none").arg(installerPath, installerApplication, option, version);
"%3 %4 %5 -vmargs -Dosgi.console=:none").arg(installerPath, installerApplication, target, option, version);
}
QList<Utils::EnvironmentItem> QnxUtils::qnxEnvironment(const QString &sdkPath)
......
......@@ -75,7 +75,8 @@ public:
static QString defaultTargetVersion(const QString& ndkPath);
static QList<NdkInstallInformation> installedNdks();
static QString sdkInstallerPath(const QString& ndkPath);
static QString qdeInstallProcess(const QString& ndkPath, const QString &option, const QString &version = QString());
static QString qdeInstallProcess(const QString& ndkPath, const QString &target,
const QString &option, const QString &version = QString());
static QList<Utils::EnvironmentItem> qnxEnvironment(const QString &ndk);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment