forked from qt-creator/qt-creator
Remove BlackBerry terminology and code
Remove a bunch of BlackBerry specific code blocks and functions. Change most instances of NDK/SDK (the BlackBerry terms) to SDP (the QNX term). To maintain backward compatibility, some instances of NDK/SDK that end up in external files have been left as is. Change-Id: I8f589601542983323e41e7b2dd7822914d971623 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -58,7 +58,7 @@ GdbRemoteServerEngine::GdbRemoteServerEngine(const DebuggerRunParameters &runPar
|
|||||||
: GdbEngine(runParameters), m_startAttempted(false)
|
: GdbEngine(runParameters), m_startAttempted(false)
|
||||||
{
|
{
|
||||||
if (HostOsInfo::isWindowsHost())
|
if (HostOsInfo::isWindowsHost())
|
||||||
m_gdbProc.setUseCtrlCStub(runParameters.useCtrlCStub); // This is only set for QNX/BlackBerry
|
m_gdbProc.setUseCtrlCStub(runParameters.useCtrlCStub); // This is only set for QNX
|
||||||
|
|
||||||
connect(&m_uploadProc, &QProcess::errorOccurred, this, &GdbRemoteServerEngine::uploadProcError);
|
connect(&m_uploadProc, &QProcess::errorOccurred, this, &GdbRemoteServerEngine::uploadProcError);
|
||||||
connect(&m_uploadProc, &QProcess::readyReadStandardOutput,
|
connect(&m_uploadProc, &QProcess::readyReadStandardOutput,
|
||||||
|
|||||||
@@ -38,24 +38,24 @@ namespace Internal {
|
|||||||
|
|
||||||
QnxBaseQtConfigWidget::QnxBaseQtConfigWidget(QnxQtVersion *version) :
|
QnxBaseQtConfigWidget::QnxBaseQtConfigWidget(QnxQtVersion *version) :
|
||||||
m_version(version),
|
m_version(version),
|
||||||
m_sdkPathChooser(new Utils::PathChooser)
|
m_sdpPathChooser(new Utils::PathChooser)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(version, return);
|
QTC_ASSERT(version, return);
|
||||||
|
|
||||||
QHBoxLayout *layout = new QHBoxLayout(this);
|
QHBoxLayout *layout = new QHBoxLayout(this);
|
||||||
layout->addWidget(m_sdkPathChooser);
|
layout->addWidget(m_sdpPathChooser);
|
||||||
|
|
||||||
m_sdkPathChooser->setExpectedKind(Utils::PathChooser::ExistingDirectory);
|
m_sdpPathChooser->setExpectedKind(Utils::PathChooser::ExistingDirectory);
|
||||||
m_sdkPathChooser->setHistoryCompleter(QLatin1String("Qnx.Sdk.History"));
|
m_sdpPathChooser->setHistoryCompleter(QLatin1String("Qnx.Sdp.History"));
|
||||||
m_sdkPathChooser->setPath(version->sdkPath());
|
m_sdpPathChooser->setPath(version->sdpPath());
|
||||||
|
|
||||||
connect(m_sdkPathChooser, &Utils::PathChooser::rawPathChanged,
|
connect(m_sdpPathChooser, &Utils::PathChooser::rawPathChanged,
|
||||||
this, &QnxBaseQtConfigWidget::updateSdkPath);
|
this, &QnxBaseQtConfigWidget::updateSdpPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QnxBaseQtConfigWidget::updateSdkPath(const QString &path)
|
void QnxBaseQtConfigWidget::updateSdpPath(const QString &path)
|
||||||
{
|
{
|
||||||
m_version->setSdkPath(path);
|
m_version->setSdpPath(path);
|
||||||
emit changed();
|
emit changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ public:
|
|||||||
explicit QnxBaseQtConfigWidget(QnxQtVersion *version);
|
explicit QnxBaseQtConfigWidget(QnxQtVersion *version);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateSdkPath(const QString &path);
|
void updateSdpPath(const QString &path);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QnxQtVersion *m_version;
|
QnxQtVersion *m_version;
|
||||||
Utils::PathChooser *m_sdkPathChooser;
|
Utils::PathChooser *m_sdpPathChooser;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ namespace Internal {
|
|||||||
const QLatin1String QNXEnvFileKey("EnvFile");
|
const QLatin1String QNXEnvFileKey("EnvFile");
|
||||||
const QLatin1String QNXVersionKey("QNXVersion");
|
const QLatin1String QNXVersionKey("QNXVersion");
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
const QLatin1String NDKEnvFileKey("NDKEnvFile");
|
const QLatin1String SdpEnvFileKey("NDKEnvFile");
|
||||||
|
|
||||||
QnxConfiguration::QnxConfiguration()
|
QnxConfiguration::QnxConfiguration()
|
||||||
{ }
|
{ }
|
||||||
@@ -80,7 +80,7 @@ QnxConfiguration::QnxConfiguration(const QVariantMap &data)
|
|||||||
{
|
{
|
||||||
QString envFilePath = data.value(QNXEnvFileKey).toString();
|
QString envFilePath = data.value(QNXEnvFileKey).toString();
|
||||||
if (envFilePath.isEmpty())
|
if (envFilePath.isEmpty())
|
||||||
envFilePath = data.value(NDKEnvFileKey).toString();
|
envFilePath = data.value(SdpEnvFileKey).toString();
|
||||||
|
|
||||||
m_version = QnxVersionNumber(data.value(QNXVersionKey).toString());
|
m_version = QnxVersionNumber(data.value(QNXVersionKey).toString());
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ QnxQtVersion *QnxConfiguration::qnxQtVersion(const Target &target) const
|
|||||||
QtVersionManager::instance()->versions(Utils::equal(&BaseQtVersion::type,
|
QtVersionManager::instance()->versions(Utils::equal(&BaseQtVersion::type,
|
||||||
QString::fromLatin1(Constants::QNX_QNX_QT)))) {
|
QString::fromLatin1(Constants::QNX_QNX_QT)))) {
|
||||||
QnxQtVersion *qnxQt = dynamic_cast<QnxQtVersion *>(version);
|
QnxQtVersion *qnxQt = dynamic_cast<QnxQtVersion *>(version);
|
||||||
if (qnxQt && FileName::fromString(qnxQt->sdkPath()) == sdpPath()) {
|
if (qnxQt && FileName::fromString(qnxQt->sdpPath()) == sdpPath()) {
|
||||||
foreach (const Abi &qtAbi, version->qtAbis()) {
|
foreach (const Abi &qtAbi, version->qtAbis()) {
|
||||||
if ((qtAbi == target.m_abi) && (qnxQt->cpuDir() == target.cpuDir()))
|
if ((qtAbi == target.m_abi) && (qnxQt->cpuDir() == target.cpuDir()))
|
||||||
return qnxQt;
|
return qnxQt;
|
||||||
@@ -276,7 +276,7 @@ QnxToolChain *QnxConfiguration::createToolChain(const Target &target)
|
|||||||
"QCC for %1 (%2)")
|
"QCC for %1 (%2)")
|
||||||
.arg(displayName())
|
.arg(displayName())
|
||||||
.arg(target.shortDescription()));
|
.arg(target.shortDescription()));
|
||||||
toolChain->setNdkPath(sdpPath().toString());
|
toolChain->setSdpPath(sdpPath().toString());
|
||||||
ToolChainManager::registerToolChain(toolChain);
|
ToolChainManager::registerToolChain(toolChain);
|
||||||
return toolChain;
|
return toolChain;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Deploy Qt to BlackBerry Device</string>
|
<string>Deploy Qt to QNX Device</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ using namespace ProjectExplorer;
|
|||||||
namespace Qnx {
|
namespace Qnx {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
static char SDK_PATH_KEY[] = "SDKPath";
|
static char SDP_PATH_KEY[] = "SDKPath";
|
||||||
|
|
||||||
QnxQtVersion::QnxQtVersion()
|
QnxQtVersion::QnxQtVersion()
|
||||||
{ }
|
{ }
|
||||||
@@ -126,14 +126,14 @@ void QnxQtVersion::parseMkSpec(ProFileEvaluator *evaluator) const
|
|||||||
QVariantMap QnxQtVersion::toMap() const
|
QVariantMap QnxQtVersion::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap result = BaseQtVersion::toMap();
|
QVariantMap result = BaseQtVersion::toMap();
|
||||||
result.insert(QLatin1String(SDK_PATH_KEY), sdkPath());
|
result.insert(QLatin1String(SDP_PATH_KEY), sdpPath());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QnxQtVersion::fromMap(const QVariantMap &map)
|
void QnxQtVersion::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
BaseQtVersion::fromMap(map);
|
BaseQtVersion::fromMap(map);
|
||||||
setSdkPath(QDir::fromNativeSeparators(map.value(QLatin1String(SDK_PATH_KEY)).toString()));
|
setSdpPath(QDir::fromNativeSeparators(map.value(QLatin1String(SDP_PATH_KEY)).toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<ProjectExplorer::Abi> QnxQtVersion::detectQtAbis() const
|
QList<ProjectExplorer::Abi> QnxQtVersion::detectQtAbis() const
|
||||||
@@ -153,7 +153,7 @@ void QnxQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::Enviro
|
|||||||
|
|
||||||
Utils::Environment QnxQtVersion::qmakeRunEnvironment() const
|
Utils::Environment QnxQtVersion::qmakeRunEnvironment() const
|
||||||
{
|
{
|
||||||
if (!sdkPath().isEmpty())
|
if (!sdpPath().isEmpty())
|
||||||
updateEnvironment();
|
updateEnvironment();
|
||||||
|
|
||||||
Utils::Environment env = Utils::Environment::systemEnvironment();
|
Utils::Environment env = Utils::Environment::systemEnvironment();
|
||||||
@@ -169,27 +169,28 @@ QtSupport::QtConfigWidget *QnxQtVersion::createConfigurationWidget() const
|
|||||||
|
|
||||||
bool QnxQtVersion::isValid() const
|
bool QnxQtVersion::isValid() const
|
||||||
{
|
{
|
||||||
return QtSupport::BaseQtVersion::isValid() && !sdkPath().isEmpty();
|
return QtSupport::BaseQtVersion::isValid() && !sdpPath().isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QnxQtVersion::invalidReason() const
|
QString QnxQtVersion::invalidReason() const
|
||||||
{
|
{
|
||||||
if (sdkPath().isEmpty())
|
if (sdpPath().isEmpty())
|
||||||
return QCoreApplication::translate("Qnx::Internal::QnxQtVersion", "No SDK path was set up.");
|
return QCoreApplication::translate("Qnx::Internal::QnxQtVersion",
|
||||||
|
"No SDP path was set up.");
|
||||||
return QtSupport::BaseQtVersion::invalidReason();
|
return QtSupport::BaseQtVersion::invalidReason();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QnxQtVersion::sdkPath() const
|
QString QnxQtVersion::sdpPath() const
|
||||||
{
|
{
|
||||||
return m_sdkPath;
|
return m_sdpPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QnxQtVersion::setSdkPath(const QString &sdkPath)
|
void QnxQtVersion::setSdpPath(const QString &sdpPath)
|
||||||
{
|
{
|
||||||
if (m_sdkPath == sdkPath)
|
if (m_sdpPath == sdpPath)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_sdkPath = sdkPath;
|
m_sdpPath = sdpPath;
|
||||||
m_environmentUpToDate = false;
|
m_environmentUpToDate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,7 +204,7 @@ void QnxQtVersion::updateEnvironment() const
|
|||||||
|
|
||||||
QList<Utils::EnvironmentItem> QnxQtVersion::environment() const
|
QList<Utils::EnvironmentItem> QnxQtVersion::environment() const
|
||||||
{
|
{
|
||||||
return QnxUtils::qnxEnvironment(sdkPath());
|
return QnxUtils::qnxEnvironment(sdpPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ public:
|
|||||||
bool isValid() const override;
|
bool isValid() const override;
|
||||||
QString invalidReason() const override;
|
QString invalidReason() const override;
|
||||||
|
|
||||||
QString sdkPath() const;
|
QString sdpPath() const;
|
||||||
void setSdkPath(const QString &sdkPath);
|
void setSdpPath(const QString &sdpPath);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void parseMkSpec(ProFileEvaluator *) const override;
|
void parseMkSpec(ProFileEvaluator *) const override;
|
||||||
@@ -80,7 +80,7 @@ private:
|
|||||||
|
|
||||||
QList<Utils::EnvironmentItem> environment() const;
|
QList<Utils::EnvironmentItem> environment() const;
|
||||||
|
|
||||||
QString m_sdkPath;
|
QString m_sdpPath;
|
||||||
|
|
||||||
mutable QString m_cpuDir;
|
mutable QString m_cpuDir;
|
||||||
mutable bool m_environmentUpToDate = false;
|
mutable bool m_environmentUpToDate = false;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ using namespace Utils;
|
|||||||
namespace Qnx {
|
namespace Qnx {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
static const char CompilernNdkPath[] = "Qnx.QnxToolChain.NDKPath";
|
static const char CompilerSdpPath[] = "Qnx.QnxToolChain.NDKPath";
|
||||||
|
|
||||||
static const QList<Abi> qccSupportedAbis()
|
static const QList<Abi> qccSupportedAbis()
|
||||||
{
|
{
|
||||||
@@ -87,7 +87,7 @@ void QnxToolChain::addToEnvironment(Environment &env) const
|
|||||||
{
|
{
|
||||||
if (env.value(QLatin1String("QNX_HOST")).isEmpty()
|
if (env.value(QLatin1String("QNX_HOST")).isEmpty()
|
||||||
|| env.value(QLatin1String("QNX_TARGET")).isEmpty())
|
|| env.value(QLatin1String("QNX_TARGET")).isEmpty())
|
||||||
setQnxEnvironment(env, QnxUtils::qnxEnvironment(m_ndkPath));
|
setQnxEnvironment(env, QnxUtils::qnxEnvironment(m_sdpPath));
|
||||||
|
|
||||||
GccToolChain::addToEnvironment(env);
|
GccToolChain::addToEnvironment(env);
|
||||||
}
|
}
|
||||||
@@ -105,7 +105,7 @@ FileNameList QnxToolChain::suggestedMkspecList() const
|
|||||||
QVariantMap QnxToolChain::toMap() const
|
QVariantMap QnxToolChain::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap data = GccToolChain::toMap();
|
QVariantMap data = GccToolChain::toMap();
|
||||||
data.insert(QLatin1String(CompilernNdkPath), m_ndkPath);
|
data.insert(QLatin1String(CompilerSdpPath), m_sdpPath);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,20 +114,20 @@ bool QnxToolChain::fromMap(const QVariantMap &data)
|
|||||||
if (!GccToolChain::fromMap(data))
|
if (!GccToolChain::fromMap(data))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_ndkPath = data.value(QLatin1String(CompilernNdkPath)).toString();
|
m_sdpPath = data.value(QLatin1String(CompilerSdpPath)).toString();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QnxToolChain::ndkPath() const
|
QString QnxToolChain::sdpPath() const
|
||||||
{
|
{
|
||||||
return m_ndkPath;
|
return m_sdpPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QnxToolChain::setNdkPath(const QString &ndkPath)
|
void QnxToolChain::setSdpPath(const QString &sdpPath)
|
||||||
{
|
{
|
||||||
if (m_ndkPath == ndkPath)
|
if (m_sdpPath == sdpPath)
|
||||||
return;
|
return;
|
||||||
m_ndkPath = ndkPath;
|
m_sdpPath = sdpPath;
|
||||||
toolChainUpdated();
|
toolChainUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ ToolChain *QnxToolChainFactory::create(ToolChain::Language l)
|
|||||||
QnxToolChainConfigWidget::QnxToolChainConfigWidget(QnxToolChain *tc)
|
QnxToolChainConfigWidget::QnxToolChainConfigWidget(QnxToolChain *tc)
|
||||||
: ToolChainConfigWidget(tc)
|
: ToolChainConfigWidget(tc)
|
||||||
, m_compilerCommand(new PathChooser)
|
, m_compilerCommand(new PathChooser)
|
||||||
, m_ndkPath(new PathChooser)
|
, m_sdpPath(new PathChooser)
|
||||||
, m_abiWidget(new AbiWidget)
|
, m_abiWidget(new AbiWidget)
|
||||||
{
|
{
|
||||||
m_compilerCommand->setExpectedKind(PathChooser::ExistingCommand);
|
m_compilerCommand->setExpectedKind(PathChooser::ExistingCommand);
|
||||||
@@ -220,21 +220,21 @@ QnxToolChainConfigWidget::QnxToolChainConfigWidget(QnxToolChain *tc)
|
|||||||
m_compilerCommand->setFileName(tc->compilerCommand());
|
m_compilerCommand->setFileName(tc->compilerCommand());
|
||||||
m_compilerCommand->setEnabled(!tc->isAutoDetected());
|
m_compilerCommand->setEnabled(!tc->isAutoDetected());
|
||||||
|
|
||||||
m_ndkPath->setExpectedKind(PathChooser::ExistingDirectory);
|
m_sdpPath->setExpectedKind(PathChooser::ExistingDirectory);
|
||||||
m_ndkPath->setHistoryCompleter(QLatin1String("Qnx.Ndk.History"));
|
m_sdpPath->setHistoryCompleter(QLatin1String("Qnx.Sdp.History"));
|
||||||
m_ndkPath->setPath(tc->ndkPath());
|
m_sdpPath->setPath(tc->sdpPath());
|
||||||
m_ndkPath->setEnabled(!tc->isAutoDetected());
|
m_sdpPath->setEnabled(!tc->isAutoDetected());
|
||||||
|
|
||||||
m_abiWidget->setAbis(qccSupportedAbis(), tc->targetAbi());
|
m_abiWidget->setAbis(qccSupportedAbis(), tc->targetAbi());
|
||||||
m_abiWidget->setEnabled(!tc->isAutoDetected());
|
m_abiWidget->setEnabled(!tc->isAutoDetected());
|
||||||
|
|
||||||
m_mainLayout->addRow(tr("&Compiler path:"), m_compilerCommand);
|
m_mainLayout->addRow(tr("&Compiler path:"), m_compilerCommand);
|
||||||
//: SDP refers to 'Software Development Platform'.
|
//: SDP refers to 'Software Development Platform'.
|
||||||
m_mainLayout->addRow(tr("NDK/SDP path:"), m_ndkPath);
|
m_mainLayout->addRow(tr("SDP path:"), m_sdpPath);
|
||||||
m_mainLayout->addRow(tr("&ABI:"), m_abiWidget);
|
m_mainLayout->addRow(tr("&ABI:"), m_abiWidget);
|
||||||
|
|
||||||
connect(m_compilerCommand, &PathChooser::rawPathChanged, this, &ToolChainConfigWidget::dirty);
|
connect(m_compilerCommand, &PathChooser::rawPathChanged, this, &ToolChainConfigWidget::dirty);
|
||||||
connect(m_ndkPath, &PathChooser::rawPathChanged, this, &ToolChainConfigWidget::dirty);
|
connect(m_sdpPath, &PathChooser::rawPathChanged, this, &ToolChainConfigWidget::dirty);
|
||||||
connect(m_abiWidget, &AbiWidget::abiChanged, this, &ToolChainConfigWidget::dirty);
|
connect(m_abiWidget, &AbiWidget::abiChanged, this, &ToolChainConfigWidget::dirty);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,7 +248,7 @@ void QnxToolChainConfigWidget::applyImpl()
|
|||||||
QString displayName = tc->displayName();
|
QString displayName = tc->displayName();
|
||||||
tc->resetToolChain(m_compilerCommand->fileName());
|
tc->resetToolChain(m_compilerCommand->fileName());
|
||||||
tc->setDisplayName(displayName); // reset display name
|
tc->setDisplayName(displayName); // reset display name
|
||||||
tc->setNdkPath(m_ndkPath->fileName().toString());
|
tc->setSdpPath(m_sdpPath->fileName().toString());
|
||||||
tc->setTargetAbi(m_abiWidget->currentAbi());
|
tc->setTargetAbi(m_abiWidget->currentAbi());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,7 +258,7 @@ void QnxToolChainConfigWidget::discardImpl()
|
|||||||
bool blocked = blockSignals(true);
|
bool blocked = blockSignals(true);
|
||||||
QnxToolChain *tc = static_cast<QnxToolChain *>(toolChain());
|
QnxToolChain *tc = static_cast<QnxToolChain *>(toolChain());
|
||||||
m_compilerCommand->setFileName(tc->compilerCommand());
|
m_compilerCommand->setFileName(tc->compilerCommand());
|
||||||
m_ndkPath->setPath(tc->ndkPath());
|
m_sdpPath->setPath(tc->sdpPath());
|
||||||
m_abiWidget->setAbis(tc->supportedAbis(), tc->targetAbi());
|
m_abiWidget->setAbis(tc->supportedAbis(), tc->targetAbi());
|
||||||
if (!m_compilerCommand->path().isEmpty())
|
if (!m_compilerCommand->path().isEmpty())
|
||||||
m_abiWidget->setEnabled(true);
|
m_abiWidget->setEnabled(true);
|
||||||
@@ -270,7 +270,7 @@ bool QnxToolChainConfigWidget::isDirtyImpl() const
|
|||||||
QnxToolChain *tc = static_cast<QnxToolChain *>(toolChain());
|
QnxToolChain *tc = static_cast<QnxToolChain *>(toolChain());
|
||||||
Q_ASSERT(tc);
|
Q_ASSERT(tc);
|
||||||
return m_compilerCommand->fileName() != tc->compilerCommand()
|
return m_compilerCommand->fileName() != tc->compilerCommand()
|
||||||
|| m_ndkPath->path() != tc->ndkPath()
|
|| m_sdpPath->path() != tc->sdpPath()
|
||||||
|| m_abiWidget->currentAbi() != tc->targetAbi();
|
|| m_abiWidget->currentAbi() != tc->targetAbi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ public:
|
|||||||
QVariantMap toMap() const override;
|
QVariantMap toMap() const override;
|
||||||
bool fromMap(const QVariantMap &data) override;
|
bool fromMap(const QVariantMap &data) override;
|
||||||
|
|
||||||
QString ndkPath() const;
|
QString sdpPath() const;
|
||||||
void setNdkPath(const QString &ndkPath);
|
void setSdpPath(const QString &sdpPath);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual DetectedAbisResult detectSupportedAbis() const override;
|
virtual DetectedAbisResult detectSupportedAbis() const override;
|
||||||
@@ -56,7 +56,7 @@ protected:
|
|||||||
QStringList reinterpretOptions(const QStringList &args) const override;
|
QStringList reinterpretOptions(const QStringList &args) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_ndkPath;
|
QString m_sdpPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@@ -100,7 +100,7 @@ private:
|
|||||||
void makeReadOnlyImpl() override { }
|
void makeReadOnlyImpl() override { }
|
||||||
|
|
||||||
Utils::PathChooser *m_compilerCommand;
|
Utils::PathChooser *m_compilerCommand;
|
||||||
Utils::PathChooser *m_ndkPath;
|
Utils::PathChooser *m_sdpPath;
|
||||||
ProjectExplorer::AbiWidget *m_abiWidget;
|
ProjectExplorer::AbiWidget *m_abiWidget;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -99,8 +99,8 @@ QList<Utils::EnvironmentItem> QnxUtils::qnxEnvironmentFromEnvFile(const QString
|
|||||||
|
|
||||||
const bool isWindows = Utils::HostOsInfo::isWindowsHost();
|
const bool isWindows = Utils::HostOsInfo::isWindowsHost();
|
||||||
|
|
||||||
// locking creating bbndk-env file wrapper script
|
// locking creating sdp-env file wrapper script
|
||||||
Utils::TemporaryFile tmpFile(QString::fromLatin1("bbndk-env-eval-XXXXXX")
|
Utils::TemporaryFile tmpFile(QString::fromLatin1("sdp-env-eval-XXXXXX")
|
||||||
+ QString::fromLatin1(isWindows ? ".bat" : ".sh"));
|
+ QString::fromLatin1(isWindows ? ".bat" : ".sh"));
|
||||||
if (!tmpFile.open())
|
if (!tmpFile.open())
|
||||||
return items;
|
return items;
|
||||||
@@ -155,71 +155,26 @@ QList<Utils::EnvironmentItem> QnxUtils::qnxEnvironmentFromEnvFile(const QString
|
|||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QnxUtils::envFilePath(const QString &ndkPath, const QString &targetVersion)
|
QString QnxUtils::envFilePath(const QString &sdpPath)
|
||||||
{
|
{
|
||||||
QDir ndk(ndkPath);
|
QDir sdp(sdpPath);
|
||||||
QStringList entries;
|
QStringList entries;
|
||||||
if (Utils::HostOsInfo::isWindowsHost())
|
if (Utils::HostOsInfo::isWindowsHost())
|
||||||
entries = ndk.entryList(QStringList(QLatin1String("*-env.bat")));
|
entries = sdp.entryList(QStringList(QLatin1String("*-env.bat")));
|
||||||
else
|
else
|
||||||
entries = ndk.entryList(QStringList(QLatin1String("*-env.sh")));
|
entries = sdp.entryList(QStringList(QLatin1String("*-env.sh")));
|
||||||
|
|
||||||
if (!entries.isEmpty())
|
if (!entries.isEmpty())
|
||||||
return ndk.absoluteFilePath(entries.first());
|
return sdp.absoluteFilePath(entries.first());
|
||||||
|
|
||||||
QString envFile;
|
|
||||||
if (Utils::HostOsInfo::isWindowsHost())
|
|
||||||
envFile = ndkPath + QLatin1String("/bbndk-env.bat");
|
|
||||||
else if (Utils::HostOsInfo::isAnyUnixHost())
|
|
||||||
envFile = ndkPath + QLatin1String("/bbndk-env.sh");
|
|
||||||
|
|
||||||
if (!QFileInfo::exists(envFile)) {
|
|
||||||
QString version = targetVersion.isEmpty() ? defaultTargetVersion(ndkPath) : targetVersion;
|
|
||||||
version = version.replace(QLatin1Char('.'), QLatin1Char('_'));
|
|
||||||
if (Utils::HostOsInfo::isWindowsHost())
|
|
||||||
envFile = ndkPath + QLatin1String("/bbndk-env_") + version + QLatin1String(".bat");
|
|
||||||
else if (Utils::HostOsInfo::isAnyUnixHost())
|
|
||||||
envFile = ndkPath + QLatin1String("/bbndk-env_") + version + QLatin1String(".sh");
|
|
||||||
}
|
|
||||||
return envFile;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString QnxUtils::bbDataDirPath()
|
|
||||||
{
|
|
||||||
const QString homeDir = QDir::homePath();
|
|
||||||
|
|
||||||
if (Utils::HostOsInfo::isMacHost())
|
|
||||||
return homeDir + QLatin1String("/Library/Research in Motion");
|
|
||||||
|
|
||||||
if (Utils::HostOsInfo::isAnyUnixHost())
|
|
||||||
return homeDir + QLatin1String("/.rim");
|
|
||||||
|
|
||||||
if (Utils::HostOsInfo::isWindowsHost()) {
|
|
||||||
// Get the proper storage location on Windows using QDesktopServices,
|
|
||||||
// to not hardcode "AppData/Local", as it might refer to "AppData/Roaming".
|
|
||||||
QString dataDir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)
|
|
||||||
+ QLatin1String("/data");
|
|
||||||
dataDir = dataDir.left(dataDir.indexOf(QCoreApplication::organizationName()));
|
|
||||||
dataDir.append(QLatin1String("/Research in Motion"));
|
|
||||||
return dataDir;
|
|
||||||
}
|
|
||||||
|
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QnxUtils::bbqConfigPath()
|
QString QnxUtils::defaultTargetVersion(const QString &sdpPath)
|
||||||
{
|
{
|
||||||
if (Utils::HostOsInfo::isMacHost() || Utils::HostOsInfo::isWindowsHost())
|
foreach (const ConfigInstallInformation &sdpInfo, installedConfigs()) {
|
||||||
return bbDataDirPath() + QLatin1String("/BlackBerry Native SDK/qconfig");
|
if (!sdpInfo.path.compare(sdpPath, Utils::HostOsInfo::fileNameCaseSensitivity()))
|
||||||
else
|
return sdpInfo.version;
|
||||||
return bbDataDirPath() + QLatin1String("/bbndk/qconfig");
|
|
||||||
}
|
|
||||||
|
|
||||||
QString QnxUtils::defaultTargetVersion(const QString &ndkPath)
|
|
||||||
{
|
|
||||||
foreach (const ConfigInstallInformation &ndkInfo, installedConfigs()) {
|
|
||||||
if (!ndkInfo.path.compare(ndkPath, Utils::HostOsInfo::fileNameCaseSensitivity()))
|
|
||||||
return ndkInfo.version;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return QString();
|
return QString();
|
||||||
@@ -227,18 +182,17 @@ QString QnxUtils::defaultTargetVersion(const QString &ndkPath)
|
|||||||
|
|
||||||
QList<ConfigInstallInformation> QnxUtils::installedConfigs(const QString &configPath)
|
QList<ConfigInstallInformation> QnxUtils::installedConfigs(const QString &configPath)
|
||||||
{
|
{
|
||||||
QList<ConfigInstallInformation> ndkList;
|
QList<ConfigInstallInformation> sdpList;
|
||||||
QString ndkConfigPath = configPath;
|
QString sdpConfigPath = configPath;
|
||||||
if (ndkConfigPath.isEmpty())
|
|
||||||
ndkConfigPath = bbqConfigPath();
|
|
||||||
|
|
||||||
if (!QDir(ndkConfigPath).exists())
|
if (!QDir(sdpConfigPath).exists())
|
||||||
return ndkList;
|
return sdpList;
|
||||||
|
|
||||||
QFileInfoList ndkfileList = QDir(ndkConfigPath).entryInfoList(QStringList() << QLatin1String("*.xml"),
|
QFileInfoList sdpfileList =
|
||||||
QDir::Files, QDir::Time);
|
QDir(sdpConfigPath).entryInfoList(QStringList() << QLatin1String("*.xml"),
|
||||||
foreach (const QFileInfo &ndkFile, ndkfileList) {
|
QDir::Files, QDir::Time);
|
||||||
QFile xmlFile(ndkFile.absoluteFilePath());
|
foreach (const QFileInfo &sdpFile, sdpfileList) {
|
||||||
|
QFile xmlFile(sdpFile.absoluteFilePath());
|
||||||
if (!xmlFile.open(QIODevice::ReadOnly))
|
if (!xmlFile.open(QIODevice::ReadOnly))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -254,48 +208,22 @@ QList<ConfigInstallInformation> QnxUtils::installedConfigs(const QString &config
|
|||||||
// The file contains only one installation node
|
// The file contains only one installation node
|
||||||
if (!childElt.isNull()) {
|
if (!childElt.isNull()) {
|
||||||
// The file contains only one base node
|
// The file contains only one base node
|
||||||
ConfigInstallInformation ndkInfo;
|
ConfigInstallInformation sdpInfo;
|
||||||
ndkInfo.path = childElt.firstChildElement(QLatin1String("base")).text();
|
sdpInfo.path = childElt.firstChildElement(QLatin1String("base")).text();
|
||||||
ndkInfo.name = childElt.firstChildElement(QLatin1String("name")).text();
|
sdpInfo.name = childElt.firstChildElement(QLatin1String("name")).text();
|
||||||
ndkInfo.host = childElt.firstChildElement(QLatin1String("host")).text();
|
sdpInfo.host = childElt.firstChildElement(QLatin1String("host")).text();
|
||||||
ndkInfo.target = childElt.firstChildElement(QLatin1String("target")).text();
|
sdpInfo.target = childElt.firstChildElement(QLatin1String("target")).text();
|
||||||
ndkInfo.version = childElt.firstChildElement(QLatin1String("version")).text();
|
sdpInfo.version = childElt.firstChildElement(QLatin1String("version")).text();
|
||||||
ndkInfo.installationXmlFilePath = ndkFile.absoluteFilePath();
|
sdpInfo.installationXmlFilePath = sdpFile.absoluteFilePath();
|
||||||
|
|
||||||
ndkList.append(ndkInfo);
|
sdpList.append(sdpInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ndkList;
|
return sdpList;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QnxUtils::sdkInstallerPath(const QString &ndkPath)
|
QList<Utils::EnvironmentItem> QnxUtils::qnxEnvironment(const QString &sdpPath)
|
||||||
{
|
{
|
||||||
QString sdkinstallPath = Utils::HostOsInfo::withExecutableSuffix(ndkPath + QLatin1String("/qde"));
|
return qnxEnvironmentFromEnvFile(envFilePath(sdpPath));
|
||||||
|
|
||||||
if (QFileInfo::exists(sdkinstallPath))
|
|
||||||
return sdkinstallPath;
|
|
||||||
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
// The resulting process when launching sdkinstall
|
|
||||||
QString QnxUtils::qdeInstallProcess(const QString &ndkPath, const QString &target,
|
|
||||||
const QString &option, const QString &version)
|
|
||||||
{
|
|
||||||
QString installerPath = sdkInstallerPath(ndkPath);
|
|
||||||
if (installerPath.isEmpty())
|
|
||||||
return QString();
|
|
||||||
|
|
||||||
const QDir pluginDir(ndkPath + QLatin1String("/plugins"));
|
|
||||||
const QStringList installerPlugins = pluginDir.entryList(QStringList() << QLatin1String("com.qnx.tools.ide.sdk.installer.app_*.jar"));
|
|
||||||
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 %5 -vmargs -Dosgi.console=:none").arg(installerPath, installerApplication, target, option, version);
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<Utils::EnvironmentItem> QnxUtils::qnxEnvironment(const QString &sdkPath)
|
|
||||||
{
|
|
||||||
return qnxEnvironmentFromEnvFile(envFilePath(sdkPath));
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,15 +60,10 @@ public:
|
|||||||
static QString cpuDirShortDescription(const QString &cpuDir);
|
static QString cpuDirShortDescription(const QString &cpuDir);
|
||||||
static QStringList searchPaths(Qnx::Internal::QnxQtVersion *qtVersion);
|
static QStringList searchPaths(Qnx::Internal::QnxQtVersion *qtVersion);
|
||||||
static QList<Utils::EnvironmentItem> qnxEnvironmentFromEnvFile(const QString &fileName);
|
static QList<Utils::EnvironmentItem> qnxEnvironmentFromEnvFile(const QString &fileName);
|
||||||
static QString envFilePath(const QString & ndkPath, const QString& targetVersion = QString());
|
static QString envFilePath(const QString &sdpPath);
|
||||||
static QString bbDataDirPath();
|
static QString defaultTargetVersion(const QString &sdpPath);
|
||||||
static QString bbqConfigPath();
|
|
||||||
static QString defaultTargetVersion(const QString& ndkPath);
|
|
||||||
static QList<ConfigInstallInformation> installedConfigs(const QString &configPath = QString());
|
static QList<ConfigInstallInformation> installedConfigs(const QString &configPath = QString());
|
||||||
static QString sdkInstallerPath(const QString& ndkPath);
|
static QList<Utils::EnvironmentItem> qnxEnvironment(const QString &sdpPath);
|
||||||
static QString qdeInstallProcess(const QString& ndkPath, const QString &target,
|
|
||||||
const QString &option, const QString &version = QString());
|
|
||||||
static QList<Utils::EnvironmentItem> qnxEnvironment(const QString &ndk);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -88,11 +88,6 @@ QString QnxVersionNumber::segment(int index) const
|
|||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
QnxVersionNumber QnxVersionNumber::fromNdkEnvFileName(const QString &ndkEnvFileName)
|
|
||||||
{
|
|
||||||
return fromFileName(ndkEnvFileName, QRegExp(QLatin1String("^bbndk-env_(.*)$")));
|
|
||||||
}
|
|
||||||
|
|
||||||
QnxVersionNumber QnxVersionNumber::fromTargetName(const QString &targetName)
|
QnxVersionNumber QnxVersionNumber::fromTargetName(const QString &targetName)
|
||||||
{
|
{
|
||||||
return fromFileName(targetName, QRegExp(QLatin1String("^target_(.*)$")));
|
return fromFileName(targetName, QRegExp(QLatin1String("^target_(.*)$")));
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ public:
|
|||||||
QString segment(int index) const;
|
QString segment(int index) const;
|
||||||
QString toString() const;
|
QString toString() const;
|
||||||
|
|
||||||
static QnxVersionNumber fromNdkEnvFileName(const QString &ndkEnvFileName);
|
|
||||||
static QnxVersionNumber fromTargetName(const QString &targetName);
|
static QnxVersionNumber fromTargetName(const QString &targetName);
|
||||||
static QnxVersionNumber fromFileName(const QString &fileName, const QRegExp ®Exp);
|
static QnxVersionNumber fromFileName(const QString &fileName, const QRegExp ®Exp);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user