diff options
author | Tobias Nätterlund <tobias.naetterlund.qnx@kdab.com> | 2014-02-10 14:16:55 +0100 |
---|---|---|
committer | Tobias Nätterlund <tobias.naetterlund@kdab.com> | 2014-02-13 09:29:38 +0100 |
commit | 6b8b60cef6cb286186d09cdb4ee999b12615935c (patch) | |
tree | 0953454025cf2b3d3a2c331ce8c998293960f891 | |
parent | 2128b289efb99cf8477774f383841150fc4309ed (diff) | |
download | qt-creator-6b8b60cef6cb286186d09cdb4ee999b12615935c.tar.gz |
BlackBerry: Improve handling of Qt libraries when creating package
This lets the user choose between bundling the Qt libraries in the
bar package, use the libraries shipped with the device, or use
libraries deployed to the device by the user.
From the user's choice, the correct assets will be added to the bar
package, and the correct environment will be set up, so those does
not have to be pre-filled in the bar-descriptor.xml template any longer.
Task-number: QTCREATORBUG-11376
Change-Id: If44a9f9868d068f2ccbbeca3e25447496a336648
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
-rw-r--r-- | share/qtcreator/templates/wizards/bb-qt5-bardescriptor/bar-descriptor.xml | 15 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrycreatepackagestep.cpp | 142 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrycreatepackagestep.h | 15 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrycreatepackagestepconfigwidget.cpp | 87 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrycreatepackagestepconfigwidget.h | 5 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrycreatepackagestepconfigwidget.ui | 165 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrydeployqtlibrariesdialog.cpp | 295 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrydeployqtlibrariesdialog.h | 109 | ||||
-rw-r--r-- | src/plugins/qnx/blackberrydeployqtlibrariesdialog.ui | 117 | ||||
-rw-r--r-- | src/plugins/qnx/qnx.pro | 9 | ||||
-rw-r--r-- | src/plugins/qnx/qnx.qbs | 3 | ||||
-rw-r--r-- | src/plugins/qnx/qnxconstants.h | 2 |
12 files changed, 909 insertions, 55 deletions
diff --git a/share/qtcreator/templates/wizards/bb-qt5-bardescriptor/bar-descriptor.xml b/share/qtcreator/templates/wizards/bb-qt5-bardescriptor/bar-descriptor.xml index 4b2a41577a..421dfa82f8 100644 --- a/share/qtcreator/templates/wizards/bb-qt5-bardescriptor/bar-descriptor.xml +++ b/share/qtcreator/templates/wizards/bb-qt5-bardescriptor/bar-descriptor.xml @@ -24,19 +24,4 @@ <action system="true">run_native</action> <asset entry="true" path="PROJECTPATH" type="Qnx/Elf">PROJECTNAME</asset> - - <!-- - %QT_INSTALL_LIBS%, %QT_INSTALL_PLUGINS, %QT_INSTALL_QML% and %SRC_DIR% - tags are replaced on-the-fly when deploying the app. in Qt Creator. - --> - <asset path="%QT_INSTALL_LIBS%">lib</asset> - <asset path="%QT_INSTALL_PLUGINS%">plugins</asset> - <asset path="%QT_INSTALL_QML%">imports</asset> - - <!-- - By default this bar-descriptor.xml embeds Qt5 runtime - into the application itself. See the following document - for various deployments of Qt runtime to a device: - http://qt-project.org/wiki/Qt-on-BlackBerry-devices - --> </qnx> diff --git a/src/plugins/qnx/blackberrycreatepackagestep.cpp b/src/plugins/qnx/blackberrycreatepackagestep.cpp index 440388556d..ee1c6d6236 100644 --- a/src/plugins/qnx/blackberrycreatepackagestep.cpp +++ b/src/plugins/qnx/blackberrycreatepackagestep.cpp @@ -35,6 +35,7 @@ #include "blackberrycreatepackagestepconfigwidget.h" #include "blackberrydeployconfiguration.h" #include "qnxutils.h" +#include "bardescriptordocument.h" #include "blackberryqtversion.h" #include "blackberrydeviceconfiguration.h" #include "blackberrydeployinformation.h" @@ -61,6 +62,8 @@ const char PACKAGE_MODE_KEY[] = "Qt4ProjectManager.BlackBerryCreatePackageS const char CSK_PASSWORD_KEY[] = "Qt4ProjectManager.BlackBerryCreatePackageStep.CskPassword"; const char KEYSTORE_PASSWORD_KEY[] = "Qt4ProjectManager.BlackBerryCreatePackageStep.KeystorePassword"; const char SAVE_PASSWORDS_KEY[] = "Qt4ProjectManager.BlackBerryCreatePackageStep.SavePasswords"; +const char BUNDLE_MODE_KEY[] = "Qt4ProjectManager.BlackBerryCreatePackageStep.BundleMode"; +const char QT_LIBRARY_PATH_KEY[] = "Qt4ProjectManager.BlackBerryCreatePackageStep.QtLibraryPath"; } BlackBerryCreatePackageStep::BlackBerryCreatePackageStep(ProjectExplorer::BuildStepList *bsl) @@ -81,6 +84,8 @@ void BlackBerryCreatePackageStep::ctor() setDisplayName(tr("Create packages")); m_packageMode = DevelopmentMode; + m_bundleMode = PreInstalledQt; + m_qtLibraryPath = QLatin1String("qt"); } bool BlackBerryCreatePackageStep::init() @@ -159,6 +164,40 @@ bool BlackBerryCreatePackageStep::init() } args << QLatin1String("-package") << QnxUtils::addQuotes(QDir::toNativeSeparators(info.packagePath())); args << QnxUtils::addQuotes(QDir::toNativeSeparators(preparedFilePath)); + + if (m_packageMode == DevelopmentMode && m_bundleMode == BundleQt) { + BlackBerryQtVersion *qtVersion = dynamic_cast<BlackBerryQtVersion *> + (QtSupport::QtKitInformation::qtVersion(target()->kit())); + if (!qtVersion) { + raiseError(tr("Qt version configured for BlackBerry kit " + "is not a BlackBerry Qt version")); + return false; + } + + QMap<QString, QString> qtFolders; + qtFolders[QLatin1String("lib")] = + qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_LIBS")); + qtFolders[QLatin1String("plugins")] = + qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_PLUGINS")); + qtFolders[QLatin1String("imports")] = + qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_IMPORTS")); + qtFolders[QLatin1String("qml")] = + qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_QML")); + + for (QMap<QString, QString>::const_iterator it = qtFolders.constBegin(); + it != qtFolders.constEnd(); ++it) { + const QString target = it.key(); + const QString qtFolder = it.value(); + if (QFileInfo(qtFolder).exists()) { + args << QLatin1String("-e"); + args << qtFolder; + args << target; + } + } + + args << QLatin1String("."); + } + addCommand(packageCmd, args); } @@ -181,12 +220,17 @@ QString BlackBerryCreatePackageStep::debugToken() const bool BlackBerryCreatePackageStep::fromMap(const QVariantMap &map) { - m_packageMode = static_cast<PackageMode>(map.value(QLatin1String(PACKAGE_MODE_KEY), DevelopmentMode).toInt()); + m_packageMode = static_cast<PackageMode>(map.value(QLatin1String(PACKAGE_MODE_KEY), + DevelopmentMode).toInt()); m_savePasswords = map.value(QLatin1String(SAVE_PASSWORDS_KEY), false).toBool(); if (m_savePasswords) { m_cskPassword = map.value(QLatin1String(CSK_PASSWORD_KEY)).toString(); m_keystorePassword = map.value(QLatin1String(KEYSTORE_PASSWORD_KEY)).toString(); } + m_bundleMode = static_cast<BundleMode>(map.value(QLatin1String(BUNDLE_MODE_KEY), + PreInstalledQt).toInt()); + m_qtLibraryPath = map.value(QLatin1String(QT_LIBRARY_PATH_KEY), + QLatin1String("qt")).toString(); return BlackBerryAbstractDeployStep::fromMap(map); } @@ -199,6 +243,8 @@ QVariantMap BlackBerryCreatePackageStep::toMap() const map.insert(QLatin1String(CSK_PASSWORD_KEY), m_cskPassword); map.insert(QLatin1String(KEYSTORE_PASSWORD_KEY), m_keystorePassword); } + map.insert(QLatin1String(BUNDLE_MODE_KEY), m_bundleMode); + map.insert(QLatin1String(QT_LIBRARY_PATH_KEY), m_qtLibraryPath); return map; } @@ -222,6 +268,21 @@ bool BlackBerryCreatePackageStep::savePasswords() const return m_savePasswords; } +BlackBerryCreatePackageStep::BundleMode BlackBerryCreatePackageStep::bundleMode() const +{ + return m_bundleMode; +} + +QString BlackBerryCreatePackageStep::qtLibraryPath() const +{ + return m_qtLibraryPath; +} + +QString BlackBerryCreatePackageStep::fullQtLibraryPath() const +{ + return QLatin1String(Constants::QNX_BLACKBERRY_DEFAULT_DEPLOY_QT_BASEPATH) + m_qtLibraryPath; +} + void BlackBerryCreatePackageStep::setPackageMode(BlackBerryCreatePackageStep::PackageMode packageMode) { m_packageMode = packageMode; @@ -242,11 +303,14 @@ void BlackBerryCreatePackageStep::setSavePasswords(bool savePasswords) m_savePasswords = savePasswords; } -static void addQtInfoPlaceHolderToHash(QHash<QString, QString> &hash, - const BlackBerryQtVersion *qtVersion, const char *key) +void BlackBerryCreatePackageStep::setBundleMode(BlackBerryCreatePackageStep::BundleMode bundleMode) +{ + m_bundleMode = bundleMode; +} + +void BlackBerryCreatePackageStep::setQtLibraryPath(const QString &qtLibraryPath) { - hash[QLatin1Char('%') + QString::fromLatin1(key) + QLatin1Char('%')] = - qtVersion->versionInfo().value(QLatin1String(key)); + m_qtLibraryPath = qtLibraryPath; } bool BlackBerryCreatePackageStep::prepareAppDescriptorFile(const QString &appDescriptorPath, const QString &preparedFilePath) @@ -270,42 +334,66 @@ bool BlackBerryCreatePackageStep::prepareAppDescriptorFile(const QString &appDes " any changes will get overwritten if deploying with Qt Creator"); doc.setBannerComment(warningText); - // Replace Qt path placeholders - QHash<QString, QString> placeHoldersHash; - addQtInfoPlaceHolderToHash(placeHoldersHash, qtVersion, "QT_INSTALL_LIBS"); - addQtInfoPlaceHolderToHash(placeHoldersHash, qtVersion, "QT_INSTALL_PLUGINS"); - addQtInfoPlaceHolderToHash(placeHoldersHash, qtVersion, "QT_INSTALL_IMPORTS"); - addQtInfoPlaceHolderToHash(placeHoldersHash, qtVersion, "QT_INSTALL_QML"); //Replace Source path placeholder + QHash<QString, QString> placeHoldersHash; placeHoldersHash[QLatin1String("%SRC_DIR%")] = QDir::toNativeSeparators(target()->project()->projectDirectory()); doc.expandPlaceHolders(placeHoldersHash); - QStringList commandLineArguments = doc.value(BarDescriptorDocument::arg).toStringList(); - QStringList extraCommandLineArguments; - // Add parameter for QML debugging (if enabled) Debugger::DebuggerRunConfigurationAspect *aspect = target()->activeRunConfiguration()->extraAspect<Debugger::DebuggerRunConfigurationAspect>(); if (aspect->useQmlDebugger()) { - bool qmljsdebuggerExists = false; - foreach (const QString &s, commandLineArguments) { - if (s.startsWith(QLatin1String("-qmljsdebugger="))) { - qmljsdebuggerExists = true; - break; - } - } - if (!qmljsdebuggerExists) { - extraCommandLineArguments << QString::fromLatin1("-qmljsdebugger=port:%1") + const QString qmlDebuggerArg = QString::fromLatin1("-qmljsdebugger=port:%1") .arg(aspect->qmlDebugServerPort()); - } + + QStringList args = doc.value(BarDescriptorDocument::arg).toStringList(); + if (!args.contains(qmlDebuggerArg)) + args.append(qmlDebuggerArg); + + doc.setValue(BarDescriptorDocument::arg, args); } - if (extraCommandLineArguments.count()) { - commandLineArguments << extraCommandLineArguments; - doc.setValue(BarDescriptorDocument::arg, commandLineArguments); + // Set up correct environment depending on using bundled/pre-installed Qt + QList<Utils::EnvironmentItem> envItems = + doc.value(BarDescriptorDocument::env).value<QList<Utils::EnvironmentItem> >(); + Utils::Environment env(Utils::EnvironmentItem::toStringList(envItems), Utils::OsTypeOtherUnix); + + if (m_packageMode == SigningPackageMode + || (m_packageMode == DevelopmentMode && m_bundleMode == PreInstalledQt)) { + QtSupport::QtVersionNumber versionNumber = qtVersion->qtVersion(); + env.appendOrSet(QLatin1String("QML_IMPORT_PATH"), + QString::fromLatin1("/usr/lib/qt%1/imports").arg(versionNumber.majorVersion), + QLatin1String(":")); + env.appendOrSet(QLatin1String("QT_PLUGIN_PATH"), + QString::fromLatin1("/usr/lib/qt%1/plugins").arg(versionNumber.majorVersion), + QLatin1String(":")); + env.prependOrSetLibrarySearchPath(QString::fromLatin1("/usr/lib/qt%1/lib") + .arg(versionNumber.majorVersion)); + } else if (m_packageMode == DevelopmentMode && m_bundleMode == BundleQt) { + env.appendOrSet(QLatin1String("QML2_IMPORT_PATH"), + QLatin1String("app/native/imports:app/native/qml"), QLatin1String(":")); + env.appendOrSet(QLatin1String("QML_IMPORT_PATH"), + QLatin1String("app/native/imports:app/native/qml"), QLatin1String(":")); + env.appendOrSet(QLatin1String("QT_PLUGIN_PATH"), + QLatin1String("app/native/plugins"), QLatin1String(":")); + env.prependOrSetLibrarySearchPath(QLatin1String("app/native/lib")); + } else if (m_packageMode == DevelopmentMode && m_bundleMode == DeployedQt) { + env.appendOrSet(QLatin1String("QML2_IMPORT_PATH"), + QString::fromLatin1("%1/qml:%1/imports").arg(fullQtLibraryPath()), + QLatin1String(":")); + env.appendOrSet(QLatin1String("QML_IMPORT_PATH"), + QString::fromLatin1("%1/qml:%1/imports").arg(fullQtLibraryPath()), + QLatin1String(":")); + env.appendOrSet(QLatin1String("QT_PLUGIN_PATH"), + QString::fromLatin1("%1/plugins").arg(fullQtLibraryPath()), QLatin1String(":")); + env.prependOrSetLibrarySearchPath(QString::fromLatin1("%1/lib").arg(fullQtLibraryPath())); } + QVariant envVar; + envVar.setValue(Utils::EnvironmentItem::fromStringList(env.toStringList())); + doc.setValue(BarDescriptorDocument::env, envVar); + doc.setFilePath(preparedFilePath); if (!doc.save(&errorString)) { raiseError(tr("Error saving prepared application descriptor file '%1' - %2") diff --git a/src/plugins/qnx/blackberrycreatepackagestep.h b/src/plugins/qnx/blackberrycreatepackagestep.h index c9b8521dc6..40d0618e8f 100644 --- a/src/plugins/qnx/blackberrycreatepackagestep.h +++ b/src/plugins/qnx/blackberrycreatepackagestep.h @@ -52,6 +52,12 @@ public: DevelopmentMode }; + enum BundleMode { + PreInstalledQt, + BundleQt, + DeployedQt + }; + explicit BlackBerryCreatePackageStep(ProjectExplorer::BuildStepList *bsl); bool init(); @@ -67,12 +73,18 @@ public: QString keystorePassword() const; bool savePasswords() const; + BundleMode bundleMode() const; + QString qtLibraryPath() const; + public slots: void setPackageMode(PackageMode packageMode); void setCskPassword(const QString &cskPassword); void setKeystorePassword(const QString &keystorePassword); void setSavePasswords(bool savePasswords); + void setBundleMode(BundleMode bundleMode); + void setQtLibraryPath(const QString &qtLibraryPath); + signals: void cskPasswordChanged(QString); void keystorePasswordChanged(QString); @@ -86,11 +98,14 @@ private: void ctor(); bool prepareAppDescriptorFile(const QString &appDescriptorPath, const QString &preparedFilePath); + QString fullQtLibraryPath() const; PackageMode m_packageMode; QString m_cskPassword; QString m_keystorePassword; bool m_savePasswords; + BundleMode m_bundleMode; + QString m_qtLibraryPath; }; } // namespace Internal diff --git a/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.cpp b/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.cpp index 1970dc2ec5..e1663eaa3d 100644 --- a/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.cpp +++ b/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.cpp @@ -32,6 +32,12 @@ #include "blackberrycreatepackagestepconfigwidget.h" #include "ui_blackberrycreatepackagestepconfigwidget.h" #include "blackberrycreatepackagestep.h" +#include "blackberrydeployqtlibrariesdialog.h" + +#include <projectexplorer/kitinformation.h> +#include <projectexplorer/target.h> +#include <qtsupport/qtkitinformation.h> +#include <utils/qtcassert.h> using namespace Qnx; using namespace Qnx::Internal; @@ -43,22 +49,46 @@ BlackBerryCreatePackageStepConfigWidget::BlackBerryCreatePackageStepConfigWidget m_ui = new Ui::BlackBerryCreatePackageStepConfigWidget; m_ui->setupUi(this); - m_ui->signPackages->setChecked(m_step->packageMode() == BlackBerryCreatePackageStep::SigningPackageMode); - m_ui->developmentMode->setChecked(m_step->packageMode() == BlackBerryCreatePackageStep::DevelopmentMode); - m_ui->cskPassword->setText(m_step->cskPassword()); m_ui->keystorePassword->setText(m_step->keystorePassword()); m_ui->savePasswords->setChecked(m_step->savePasswords()); + m_ui->qtLibraryPath->setText(m_step->qtLibraryPath()); + + m_qtLibraryExplanations[0] = tr("Use the Qt libraries shipped with the BlackBerry device."); + m_qtLibraryExplanations[1] = tr("Include Qt libraries in the package. " + "This will increase the package size."); + m_qtLibraryExplanations[2] = tr("Use deployed Qt libraries on the device."); + m_ui->qtLibrary->addItem(tr("Use pre-installed Qt"), BlackBerryCreatePackageStep::PreInstalledQt); + m_ui->qtLibrary->addItem(tr("Bundle Qt in package"), BlackBerryCreatePackageStep::BundleQt); + m_ui->qtLibrary->addItem(tr("Use deployed Qt"), BlackBerryCreatePackageStep::DeployedQt); connect(m_ui->signPackages, SIGNAL(toggled(bool)), this, SLOT(setPackageMode(bool))); connect(m_ui->cskPassword, SIGNAL(textChanged(QString)), m_step, SLOT(setCskPassword(QString))); - connect(m_ui->keystorePassword, SIGNAL(textChanged(QString)), m_step, SLOT(setKeystorePassword(QString))); + connect(m_ui->keystorePassword, SIGNAL(textChanged(QString)), + m_step, SLOT(setKeystorePassword(QString))); connect(m_ui->showPasswords, SIGNAL(toggled(bool)), this, SLOT(showPasswords(bool))); connect(m_ui->savePasswords, SIGNAL(toggled(bool)), m_step, SLOT(setSavePasswords(bool))); + connect(m_ui->qtLibrary, SIGNAL(currentIndexChanged(int)), this, SLOT(setBundleMode(int))); + connect(m_ui->qtLibrary, SIGNAL(currentIndexChanged(int)), this, SLOT(updateDeployWidgetsState())); + connect(m_ui->qtLibraryPath, SIGNAL(textChanged(QString)), + m_step, SLOT(setQtLibraryPath(QString))); + connect(m_ui->qtLibraryPath, SIGNAL(textChanged(QString)), + this, SLOT(updateDeployWidgetsState())); + connect(m_ui->deployNowButton, SIGNAL(clicked()), this, SLOT(deployLibraries())); + connect(ProjectExplorer::KitManager::instance(), SIGNAL(kitsChanged()), this, SLOT(updateDeployWidgetsState())); + connect(m_step, SIGNAL(cskPasswordChanged(QString)), m_ui->cskPassword, SLOT(setText(QString))); - connect(m_step, SIGNAL(keystorePasswordChanged(QString)), m_ui->keystorePassword, SLOT(setText(QString))); + connect(m_step, SIGNAL(keystorePasswordChanged(QString)), + m_ui->keystorePassword, SLOT(setText(QString))); + + m_ui->signPackages->setChecked(m_step->packageMode() == + BlackBerryCreatePackageStep::SigningPackageMode); + m_ui->developmentMode->setChecked(m_step->packageMode() == + BlackBerryCreatePackageStep::DevelopmentMode); - m_ui->signPackagesWidget->setEnabled(m_ui->signPackages->isChecked()); + m_ui->qtLibrary->setCurrentIndex(m_ui->qtLibrary->findData(m_step->bundleMode())); + setBundleMode(m_step->bundleMode()); + updateDeployWidgetsState(); } BlackBerryCreatePackageStepConfigWidget::~BlackBerryCreatePackageStepConfigWidget() @@ -92,3 +122,48 @@ void BlackBerryCreatePackageStepConfigWidget::showPasswords(bool show) m_ui->cskPassword->setEchoMode(show ? QLineEdit::Normal : QLineEdit::Password); m_ui->keystorePassword->setEchoMode(show ? QLineEdit::Normal : QLineEdit::Password); } + +void BlackBerryCreatePackageStepConfigWidget::setBundleMode(int qtLibraryIndex) +{ + QTC_ASSERT(m_qtLibraryExplanations.contains(qtLibraryIndex), return); + + BlackBerryCreatePackageStep::BundleMode bundleMode = + static_cast<BlackBerryCreatePackageStep::BundleMode>( + m_ui->qtLibrary->itemData(qtLibraryIndex).toInt()); + + m_step->setBundleMode(bundleMode); + m_ui->qtLibraryExplanationLabel->setText(m_qtLibraryExplanations[qtLibraryIndex]); + m_ui->qtLibraryPath->setVisible(bundleMode == BlackBerryCreatePackageStep::DeployedQt); + m_ui->qtLibraryLabel->setVisible(bundleMode == BlackBerryCreatePackageStep::DeployedQt); +} + +void BlackBerryCreatePackageStepConfigWidget::updateDeployWidgetsState() +{ + BlackBerryCreatePackageStep::BundleMode bundleMode = + static_cast<BlackBerryCreatePackageStep::BundleMode>( + m_ui->qtLibrary->itemData(m_ui->qtLibrary->currentIndex()).toInt()); + + ProjectExplorer::Kit *kit = m_step->target()->kit(); + ProjectExplorer::IDevice::ConstPtr device = ProjectExplorer::DeviceKitInformation::device(kit); + + const bool enableButton = !m_ui->qtLibraryPath->text().isEmpty() + && bundleMode == BlackBerryCreatePackageStep::DeployedQt + && !device.isNull(); + const bool visibleButton = bundleMode == BlackBerryCreatePackageStep::DeployedQt; + const bool visibleLabels = bundleMode == BlackBerryCreatePackageStep::DeployedQt + && device.isNull(); + + m_ui->deployNowButton->setEnabled(enableButton); + m_ui->deployNowButton->setVisible(visibleButton); + + m_ui->deployErrorPixmap->setVisible(visibleLabels); + m_ui->deployErrorLabel->setVisible(visibleLabels); +} + +void BlackBerryCreatePackageStepConfigWidget::deployLibraries() +{ + ProjectExplorer::Kit *kit = m_step->target()->kit(); + BlackBerryDeployQtLibrariesDialog dlg(ProjectExplorer::DeviceKitInformation::device(kit), + this); + dlg.execAndDeploy(QtSupport::QtKitInformation::qtVersionId(kit), m_ui->qtLibraryPath->text()); +} diff --git a/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.h b/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.h index e7d3a74da3..66e8d1aa1f 100644 --- a/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.h +++ b/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.h @@ -56,10 +56,15 @@ public: private slots: void setPackageMode(bool signPackagesChecked); void showPasswords(bool show); + void setBundleMode(int qtLibraryIndex); + void updateDeployWidgetsState(); + void deployLibraries(); private: BlackBerryCreatePackageStep *m_step; Ui::BlackBerryCreatePackageStepConfigWidget *m_ui; + + QMap<int, QString> m_qtLibraryExplanations; }; } // namespace Internal diff --git a/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.ui b/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.ui index 6c3f214152..ae89b80c94 100644 --- a/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.ui +++ b/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>803</width> - <height>135</height> + <width>613</width> + <height>204</height> </rect> </property> <property name="windowTitle"> @@ -24,7 +24,16 @@ <item> <widget class="QWidget" name="signPackagesWidget" native="true"> <layout class="QHBoxLayout" name="horizontalLayout"> - <property name="margin"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> <number>0</number> </property> <item> @@ -115,9 +124,109 @@ </property> </widget> </item> + <item> + <widget class="QWidget" name="developmentModeWidget" native="true"> + <layout class="QGridLayout" name="gridLayout"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item row="0" column="0"> + <spacer name="horizontalSpacer_3"> + <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>20</height> + </size> + </property> + </spacer> + </item> + <item row="0" column="1"> + <widget class="QComboBox" name="qtLibrary"/> + </item> + <item row="0" column="2"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="qtLibraryLabel"> + <property name="text"> + <string>/accounts/devuser/</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="qtLibraryPath"/> + </item> + </layout> + </item> + <item row="0" column="3"> + <widget class="QPushButton" name="deployNowButton"> + <property name="text"> + <string>Deploy now</string> + </property> + </widget> + </item> + <item row="0" column="4"> + <widget class="QLabel" name="deployErrorPixmap"> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_warning.png</pixmap> + </property> + </widget> + </item> + <item row="0" column="5"> + <widget class="QLabel" name="deployErrorLabel"> + <property name="text"> + <string>No device configured, cannot deploy.</string> + </property> + </widget> + </item> + <item row="0" column="6"> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="1" column="1" colspan="5"> + <widget class="QLabel" name="qtLibraryExplanationLabel"> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </widget> + </item> </layout> </widget> - <resources/> + <resources> + <include location="../projectexplorer/projectexplorer.qrc"/> + </resources> <connections> <connection> <sender>signPackages</sender> @@ -135,5 +244,53 @@ </hint> </hints> </connection> + <connection> + <sender>developmentMode</sender> + <signal>toggled(bool)</signal> + <receiver>developmentModeWidget</receiver> + <slot>setEnabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>44</x> + <y>129</y> + </hint> + <hint type="destinationlabel"> + <x>22</x> + <y>169</y> + </hint> + </hints> + </connection> + <connection> + <sender>signPackages</sender> + <signal>toggled(bool)</signal> + <receiver>developmentModeWidget</receiver> + <slot>setDisabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>66</x> + <y>16</y> + </hint> + <hint type="destinationlabel"> + <x>115</x> + <y>174</y> + </hint> + </hints> + </connection> + <connection> + <sender>developmentMode</sender> + <signal>toggled(bool)</signal> + <receiver>signPackagesWidget</receiver> + <slot>setDisabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>69</x> + <y>132</y> + </hint> + <hint type="destinationlabel"> + <x>338</x> + <y>97</y> + </hint> + </hints> + </connection> </connections> </ui> diff --git a/src/plugins/qnx/blackberrydeployqtlibrariesdialog.cpp b/src/plugins/qnx/blackberrydeployqtlibrariesdialog.cpp new file mode 100644 index 0000000000..c29c3affa3 --- /dev/null +++ b/src/plugins/qnx/blackberrydeployqtlibrariesdialog.cpp @@ -0,0 +1,295 @@ +/************************************************************************** +** +** Copyright (C) 2014 BlackBerry Limited. All rights reserved. +** +** Contact: BlackBerry (qt@blackberry.com) +** Contact: KDAB (info@kdab.com) +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#include "blackberrydeployqtlibrariesdialog.h" +#include "ui_blackberrydeployqtlibrariesdialog.h" + +#include "blackberryqtversion.h" + +#include <projectexplorer/deployablefile.h> +#include <qtsupport/qtversionmanager.h> +#include <remotelinux/genericdirectuploadservice.h> +#include <ssh/sshremoteprocessrunner.h> +#include <utils/qtcassert.h> + +#include <QDir> +#include <QMessageBox> + +using namespace Qnx; +using namespace Qnx::Internal; + +BlackBerryDeployQtLibrariesDialog::BlackBerryDeployQtLibrariesDialog( + const ProjectExplorer::IDevice::ConstPtr &device, QWidget *parent) + : QDialog(parent) + , m_ui(new Ui::BlackBerryDeployQtLibrariesDialog) + , m_device(device) + , m_progressCount(0) + , m_state(Inactive) +{ + m_ui->setupUi(this); + + QList<QtSupport::BaseQtVersion*> qtVersions = QtSupport::QtVersionManager::validVersions(); + foreach (QtSupport::BaseQtVersion *qtVersion, qtVersions) { + BlackBerryQtVersion *blackBerryQt = dynamic_cast<BlackBerryQtVersion *>(qtVersion); + if (!blackBerryQt) + continue; + + m_ui->qtLibraryCombo->addItem(blackBerryQt->displayName(), blackBerryQt->uniqueId()); + } + + m_uploadService = new RemoteLinux::GenericDirectUploadService(this); + m_uploadService->setDevice(m_device); + + connect(m_uploadService, SIGNAL(progressMessage(QString)), this, SLOT(updateProgress(QString))); + connect(m_uploadService, SIGNAL(progressMessage(QString)), + m_ui->deployLogWindow, SLOT(appendPlainText(QString))); + connect(m_uploadService, SIGNAL(errorMessage(QString)), + m_ui->deployLogWindow, SLOT(appendPlainText(QString))); + connect(m_uploadService, SIGNAL(warningMessage(QString)), + m_ui->deployLogWindow, SLOT(appendPlainText(QString))); + connect(m_uploadService, SIGNAL(stdOutData(QString)), + m_ui->deployLogWindow, SLOT(appendPlainText(QString))); + connect(m_uploadService, SIGNAL(stdErrData(QString)), + m_ui->deployLogWindow, SLOT(appendPlainText(QString))); + connect(m_uploadService, SIGNAL(finished()), this, SLOT(handleUploadFinished())); + + m_processRunner = new QSsh::SshRemoteProcessRunner(this); + connect(m_processRunner, SIGNAL(connectionError()), + this, SLOT(handleRemoteProcessError())); + connect(m_processRunner, SIGNAL(processClosed(int)), + this, SLOT(handleRemoteProcessCompleted())); + + connect(m_ui->deployButton, SIGNAL(clicked()), this, SLOT(deployLibraries())); + connect(m_ui->closeButton, SIGNAL(clicked()), this, SLOT(close())); +} + +BlackBerryDeployQtLibrariesDialog::~BlackBerryDeployQtLibrariesDialog() +{ + delete m_ui; +} + +int BlackBerryDeployQtLibrariesDialog::execAndDeploy(int qtVersionId, const QString &remoteDirectory) +{ + m_ui->remoteDirectory->setText(remoteDirectory); + m_ui->qtLibraryCombo->setCurrentIndex(m_ui->qtLibraryCombo->findData(qtVersionId)); + + deployLibraries(); + return exec(); +} + +void BlackBerryDeployQtLibrariesDialog::closeEvent(QCloseEvent *event) +{ + // A disabled Deploy button indicates the upload is still running + if (!m_ui->deployButton->isEnabled()) { + int answer = QMessageBox::question(this, windowTitle(), + tr("Closing the dialog will stop the deployment. " + "Are you sure you want to do this?"), + QMessageBox::Yes | QMessageBox::No); + if (answer == QMessageBox::No) + event->ignore(); + else if (answer == QMessageBox::Yes) + m_uploadService->stop(); + } +} + +void BlackBerryDeployQtLibrariesDialog::deployLibraries() +{ + QTC_ASSERT(m_state == Inactive, return); + + if (m_ui->remoteDirectory->text().isEmpty()) { + QMessageBox::warning(this, windowTitle(), + tr("Please input a remote directory to deploy to.")); + return; + } + + QTC_ASSERT(!m_device.isNull(), return); + + m_progressCount = 0; + m_ui->deployProgress->setValue(0); + m_ui->remoteDirectory->setEnabled(false); + m_ui->deployButton->setEnabled(false); + m_ui->qtLibraryCombo->setEnabled(false); + m_ui->deployLogWindow->clear(); + + checkRemoteDirectoryExistance(); +} + +void BlackBerryDeployQtLibrariesDialog::startUpload() +{ + QTC_CHECK(m_state == CheckingRemoteDirectory || m_state == RemovingRemoteDirectory); + + m_state = Uploading; + + QList<ProjectExplorer::DeployableFile> filesToUpload = gatherFiles(); + + m_ui->deployProgress->setRange(0, filesToUpload.count()); + + m_uploadService->setDeployableFiles(filesToUpload); + m_uploadService->start(); +} + +void BlackBerryDeployQtLibrariesDialog::updateProgress(const QString &progressMessage) +{ + QTC_CHECK(m_state == Uploading); + + if (!progressMessage.startsWith(QLatin1String("Uploading file"))) + return; + + ++m_progressCount; + + m_ui->deployProgress->setValue(m_progressCount); +} + +void BlackBerryDeployQtLibrariesDialog::handleUploadFinished() +{ + m_ui->remoteDirectory->setEnabled(true); + m_ui->deployButton->setEnabled(true); + m_ui->qtLibraryCombo->setEnabled(true); + + m_state = Inactive; +} + +void BlackBerryDeployQtLibrariesDialog::handleRemoteProcessError() +{ + QTC_CHECK(m_state == CheckingRemoteDirectory || m_state == RemovingRemoteDirectory); + + m_ui->deployLogWindow->appendPlainText( + tr("Connection failed: %1") + .arg(m_processRunner->lastConnectionErrorString())); + handleUploadFinished(); +} + +void BlackBerryDeployQtLibrariesDialog::handleRemoteProcessCompleted() +{ + QTC_CHECK(m_state == CheckingRemoteDirectory || m_state == RemovingRemoteDirectory); + + if (m_state == CheckingRemoteDirectory) { + // Directory exists + if (m_processRunner->processExitCode() == 0) { + int answer = QMessageBox::question(this, windowTitle(), + tr("The remote directory '%1' already exist. " + "Deploying to that directory will remove any files " + "already present.\n\n" + "Are you sure you want to continue?") + .arg(fullRemoteDirectory()), + QMessageBox::Yes | QMessageBox::No); + if (answer == QMessageBox::Yes) + removeRemoteDirectory(); + else + handleUploadFinished(); + } else { + startUpload(); + } + } else if (m_state == RemovingRemoteDirectory) { + QTC_ASSERT(m_processRunner->processExitCode() == 0, return); + + startUpload(); + } +} + +QList<ProjectExplorer::DeployableFile> BlackBerryDeployQtLibrariesDialog::gatherFiles() +{ + QList<ProjectExplorer::DeployableFile> result; + + const int qtVersionId = + m_ui->qtLibraryCombo->itemData(m_ui->qtLibraryCombo->currentIndex()).toInt(); + BlackBerryQtVersion *qtVersion = + dynamic_cast<BlackBerryQtVersion *>(QtSupport::QtVersionManager::version(qtVersionId)); + + QTC_ASSERT(qtVersion, return result); + + result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_LIBS")))); + result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_PLUGINS")))); + result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_IMPORTS")))); + result.append(gatherFiles(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_QML")))); + + return result; +} + +QList<ProjectExplorer::DeployableFile> BlackBerryDeployQtLibrariesDialog::gatherFiles( + const QString &dirPath, const QString &baseDirPath) +{ + QList<ProjectExplorer::DeployableFile> result; + QDir dir(dirPath); + QFileInfoList list = dir.entryInfoList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot); + + for (int i = 0; i < list.size(); ++i) { + QFileInfo fileInfo = list.at(i); + if (fileInfo.isDir()) { + result.append(gatherFiles(fileInfo.absoluteFilePath(), baseDirPath.isEmpty() ? + dirPath : baseDirPath)); + } else { + QString remoteDir; + if (baseDirPath.isEmpty()) { + remoteDir = fullRemoteDirectory() + QLatin1Char('/') + + QFileInfo(dirPath).baseName(); + } else { + QDir baseDir(baseDirPath); + baseDir.cdUp(); + remoteDir = fullRemoteDirectory() + QLatin1Char('/') + + baseDir.relativeFilePath(dirPath); + } + result.append(ProjectExplorer::DeployableFile(fileInfo.absoluteFilePath(), remoteDir)); + } + } + + return result; +} + +QString BlackBerryDeployQtLibrariesDialog::fullRemoteDirectory() const +{ + return QLatin1String(Constants::QNX_BLACKBERRY_DEFAULT_DEPLOY_QT_BASEPATH) + m_ui->remoteDirectory->text(); +} + +void BlackBerryDeployQtLibrariesDialog::checkRemoteDirectoryExistance() +{ + QTC_CHECK(m_state == Inactive); + + m_state = CheckingRemoteDirectory; + + m_ui->deployLogWindow->appendPlainText(tr("Checking existence of '%1'") + .arg(fullRemoteDirectory())); + + const QByteArray cmd = "test -d " + fullRemoteDirectory().toLatin1(); + m_processRunner->run(cmd, m_device->sshParameters()); +} + +void BlackBerryDeployQtLibrariesDialog::removeRemoteDirectory() +{ + QTC_CHECK(m_state == CheckingRemoteDirectory); + + m_state = RemovingRemoteDirectory; + + m_ui->deployLogWindow->appendPlainText(tr("Removing '%1'").arg(fullRemoteDirectory())); + + const QByteArray cmd = "rm -rf " + fullRemoteDirectory().toLatin1(); + m_processRunner->run(cmd, m_device->sshParameters()); +} diff --git a/src/plugins/qnx/blackberrydeployqtlibrariesdialog.h b/src/plugins/qnx/blackberrydeployqtlibrariesdialog.h new file mode 100644 index 0000000000..44e7536462 --- /dev/null +++ b/src/plugins/qnx/blackberrydeployqtlibrariesdialog.h @@ -0,0 +1,109 @@ +/************************************************************************** +** +** Copyright (C) 2014 BlackBerry Limited. All rights reserved. +** +** Contact: BlackBerry (qt@blackberry.com) +** Contact: KDAB (info@kdab.com) +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#ifndef QNX_INTERNAL_BLACKBERRYDEPLOYQTLIBRARIESDIALOG_H +#define QNX_INTERNAL_BLACKBERRYDEPLOYQTLIBRARIESDIALOG_H + +#include <QDialog> + +#include <projectexplorer/deployablefile.h> +#include <projectexplorer/devicesupport/idevice.h> + +namespace QSsh { +class SshRemoteProcessRunner; +} + +namespace RemoteLinux { +class GenericDirectUploadService; +} + +namespace Qnx { +namespace Internal { + +namespace Ui { +class BlackBerryDeployQtLibrariesDialog; +} + +class BlackBerryDeployQtLibrariesDialog : public QDialog +{ + Q_OBJECT + +public: + enum State { + Inactive, + CheckingRemoteDirectory, + RemovingRemoteDirectory, + Uploading + }; + + explicit BlackBerryDeployQtLibrariesDialog(const ProjectExplorer::IDevice::ConstPtr &device, + QWidget *parent = 0); + ~BlackBerryDeployQtLibrariesDialog(); + + int execAndDeploy(int qtVersionId, const QString &remoteDirectory); + +protected: + void closeEvent(QCloseEvent *event); + +private slots: + void deployLibraries(); + void updateProgress(const QString &progressMessage); + void handleUploadFinished(); + + void handleRemoteProcessError(); + void handleRemoteProcessCompleted(); + +private: + QList<ProjectExplorer::DeployableFile> gatherFiles(); + QList<ProjectExplorer::DeployableFile> gatherFiles(const QString &dirPath, + const QString &baseDir = QString()); + + QString fullRemoteDirectory() const; + void checkRemoteDirectoryExistance(); + void removeRemoteDirectory(); + void startUpload(); + + Ui::BlackBerryDeployQtLibrariesDialog *m_ui; + + QSsh::SshRemoteProcessRunner *m_processRunner; + RemoteLinux::GenericDirectUploadService *m_uploadService; + + ProjectExplorer::IDevice::ConstPtr m_device; + + int m_progressCount; + + State m_state; +}; + + +} // namespace Internal +} // namespace Qnx +#endif // QNX_INTERNAL_BLACKBERRYDEPLOYQTLIBRARIESDIALOG_H diff --git a/src/plugins/qnx/blackberrydeployqtlibrariesdialog.ui b/src/plugins/qnx/blackberrydeployqtlibrariesdialog.ui new file mode 100644 index 0000000000..befef4957a --- /dev/null +++ b/src/plugins/qnx/blackberrydeployqtlibrariesdialog.ui @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Qnx::Internal::BlackBerryDeployQtLibrariesDialog</class> + <widget class="QDialog" name="Qnx::Internal::BlackBerryDeployQtLibrariesDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>520</width> + <height>479</height> + </rect> + </property> + <property name="windowTitle"> + <string>Deploy Qt to BlackBerry device</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <layout class="QFormLayout" name="formLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Qt library to deploy:</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QComboBox" name="qtLibraryCombo"/> + </item> + <item> + <widget class="QPushButton" name="deployButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Deploy</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Remote directory:</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>/accounts/devuser/</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="remoteDirectory"> + <property name="text"> + <string>qt</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <widget class="QProgressBar" name="deployProgress"> + <property name="value"> + <number>0</number> + </property> + <property name="textVisible"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QPlainTextEdit" name="deployLogWindow"/> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>218</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="closeButton"> + <property name="text"> + <string>Close</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/plugins/qnx/qnx.pro b/src/plugins/qnx/qnx.pro index c1f74c7f71..67dcdfc796 100644 --- a/src/plugins/qnx/qnx.pro +++ b/src/plugins/qnx/qnx.pro @@ -101,7 +101,8 @@ SOURCES += qnxplugin.cpp \ blackberrycheckdevicestatusstepconfigwidget.cpp \ blackberrycheckdevicestatusstep.cpp \ qnxattachdebugsupport.cpp \ - qnxattachdebugdialog.cpp + qnxattachdebugdialog.cpp \ + blackberrydeployqtlibrariesdialog.cpp HEADERS += qnxplugin.h\ qnxconstants.h \ @@ -202,7 +203,8 @@ HEADERS += qnxplugin.h\ blackberrycheckdevicestatusstepfactory.h \ blackberrycheckdevicestatusstepconfigwidget.h \ qnxattachdebugsupport.h \ - qnxattachdebugdialog.h + qnxattachdebugdialog.h \ + blackberrydeployqtlibrariesdialog.h FORMS += \ blackberrydeviceconfigurationwizardsetuppage.ui \ @@ -235,7 +237,8 @@ FORMS += \ blackberryinstallwizardprocesspage.ui \ blackberryinstallwizardoptionpage.ui \ blackberrydebugtokenpinsdialog.ui \ - blackberrycheckdevicestatusstepconfigwidget.ui + blackberrycheckdevicestatusstepconfigwidget.ui \ + blackberrydeployqtlibrariesdialog.ui include(../../private_headers.pri) include(./cascadesimport/cascadesimport.pri) diff --git a/src/plugins/qnx/qnx.qbs b/src/plugins/qnx/qnx.qbs index c5ce9711f5..9061e93a9d 100644 --- a/src/plugins/qnx/qnx.qbs +++ b/src/plugins/qnx/qnx.qbs @@ -87,6 +87,9 @@ QtcPlugin { "blackberrydeployconfigurationwidget.ui", "blackberrydeployinformation.cpp", "blackberrydeployinformation.h", + "blackberrydeployqtlibrariesdialog.cpp", + "blackberrydeployqtlibrariesdialog.h", + "blackberrydeployqtlibrariesdialog.ui", "blackberrydeploystep.cpp", "blackberrydeploystep.h", "blackberrydeploystepconfigwidget.cpp", diff --git a/src/plugins/qnx/qnxconstants.h b/src/plugins/qnx/qnxconstants.h index 478a3267f7..8d92a17264 100644 --- a/src/plugins/qnx/qnxconstants.h +++ b/src/plugins/qnx/qnxconstants.h @@ -117,6 +117,8 @@ const char QNX_BLACKBERRY_CONFIGS_FILENAME[] = "bbndkconfigurations.xml"; const char QNX_DEBUGGING_GROUP[] = "Debugger.Group.Qnx"; +const char QNX_BLACKBERRY_DEFAULT_DEPLOY_QT_BASEPATH[] = "/accounts/devuser/"; + } // namespace Constants } // namespace Qnx |