Commit c6fff90c authored by David Kaspar's avatar David Kaspar
Browse files

Qnx: Fixing incorrect environment for running BlackBerry cmd-line tools



The BlackBerry command-line tools were launched without any environment set
that would match the related BB NDK Target. This results in command-line
tools to not run at all (they fail to find 'java' program).

The only workaround it to have 'java' program on system PATH.

Task-number: QTCREATORBUG-11029
Change-Id: I90e102413d7843d538d394aec306749e37e6148b
Reviewed-by: default avatarRafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: default avatarTobias Nätterlund <tobias.naetterlund@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos's avatarNicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: default avatarDavid Kaspar <dkaspar@blackberry.com>
parent 9be80434
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "blackberryconfigurationmanager.h" #include "blackberryconfigurationmanager.h"
#include "blackberryndkprocess.h" #include "blackberryndkprocess.h"
#include <utils/environment.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <QProcess> #include <QProcess>
...@@ -52,6 +53,8 @@ BlackBerryCertificate::BlackBerryCertificate(const QString &fileName, ...@@ -52,6 +53,8 @@ BlackBerryCertificate::BlackBerryCertificate(const QString &fileName,
m_process(new QProcess(this)) m_process(new QProcess(this))
{ {
m_process->setProcessChannelMode(QProcess::MergedChannels); m_process->setProcessChannelMode(QProcess::MergedChannels);
m_process->setEnvironment(Utils::EnvironmentItem::toStringList(
BlackBerryConfigurationManager::instance().defaultQnxEnv()));
} }
void BlackBerryCertificate::load() void BlackBerryCertificate::load()
......
...@@ -30,8 +30,11 @@ ...@@ -30,8 +30,11 @@
#include "blackberrydevicelistdetector.h" #include "blackberrydevicelistdetector.h"
#include "blackberryconfigurationmanager.h"
#include "blackberryndkprocess.h" #include "blackberryndkprocess.h"
#include <utils/environment.h>
#include <QStringList> #include <QStringList>
namespace Qnx { namespace Qnx {
...@@ -53,6 +56,8 @@ void BlackBerryDeviceListDetector::detectDeviceList() ...@@ -53,6 +56,8 @@ void BlackBerryDeviceListDetector::detectDeviceList()
if (m_process->state() != QProcess::NotRunning) if (m_process->state() != QProcess::NotRunning)
return; return;
m_process->setEnvironment(Utils::EnvironmentItem::toStringList(
BlackBerryConfigurationManager::instance().defaultQnxEnv()));
const QString command = BlackBerryNdkProcess::resolveNdkToolPath(QLatin1String("blackberry-deploy")); const QString command = BlackBerryNdkProcess::resolveNdkToolPath(QLatin1String("blackberry-deploy"));
QStringList arguments; QStringList arguments;
arguments << QLatin1String("-devices"); arguments << QLatin1String("-devices");
......
...@@ -46,6 +46,8 @@ BlackBerryNdkProcess::BlackBerryNdkProcess(const QString &command, QObject *pare ...@@ -46,6 +46,8 @@ BlackBerryNdkProcess::BlackBerryNdkProcess(const QString &command, QObject *pare
m_command(command) m_command(command)
{ {
m_process->setProcessChannelMode(QProcess::MergedChannels); m_process->setProcessChannelMode(QProcess::MergedChannels);
m_process->setEnvironment(Utils::EnvironmentItem::toStringList(
BlackBerryConfigurationManager::instance().defaultQnxEnv()));
connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)),
this, SLOT(processFinished())); this, SLOT(processFinished()));
......
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