2016-01-15 14:57:40 +01:00
|
|
|
/****************************************************************************
|
2012-06-29 07:23:13 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 BlackBerry Limited. All rights reserved
|
2012-06-29 07:23:13 +02:00
|
|
|
** Contact: KDAB (info@kdab.com)
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2012-06-29 07:23:13 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** 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
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2012-10-02 09:12:39 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2012-06-29 07:23:13 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2012-06-29 07:23:13 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2012-06-29 07:23:13 +02:00
|
|
|
|
|
|
|
|
#include "qnxconstants.h"
|
|
|
|
|
|
2016-12-16 12:48:53 -05:00
|
|
|
#include <projectexplorer/abi.h>
|
2013-01-09 09:23:37 -05:00
|
|
|
#include <utils/environment.h>
|
|
|
|
|
#include <utils/qtcassert.h>
|
|
|
|
|
#include <utils/fileutils.h>
|
|
|
|
|
|
|
|
|
|
#include <QTextStream>
|
2012-06-29 07:23:13 +02:00
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
|
|
namespace Qnx {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2015-04-24 10:31:27 +02:00
|
|
|
class QnxQtVersion;
|
2012-06-29 07:23:13 +02:00
|
|
|
|
2014-04-08 19:33:27 +02:00
|
|
|
class ConfigInstallInformation
|
2013-07-04 16:21:33 +02:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QString path;
|
|
|
|
|
QString name;
|
|
|
|
|
QString host;
|
|
|
|
|
QString target;
|
|
|
|
|
QString version;
|
2013-12-05 18:24:08 +01:00
|
|
|
QString installationXmlFilePath;
|
|
|
|
|
|
|
|
|
|
bool isValid() { return !path.isEmpty() && !name.isEmpty() && !host.isEmpty()
|
|
|
|
|
&& !target.isEmpty() && !version.isEmpty() && !installationXmlFilePath.isEmpty(); }
|
2013-07-04 16:21:33 +02:00
|
|
|
};
|
|
|
|
|
|
2016-12-16 12:48:53 -05:00
|
|
|
class QnxTarget
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QnxTarget(const Utils::FileName &path, const ProjectExplorer::Abi &abi) :
|
|
|
|
|
m_path(path), m_abi(abi)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
Utils::FileName m_path;
|
|
|
|
|
ProjectExplorer::Abi m_abi;
|
|
|
|
|
};
|
|
|
|
|
|
2012-06-29 07:23:13 +02:00
|
|
|
class QnxUtils
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static QString addQuotes(const QString &string);
|
2016-12-06 08:35:51 -05:00
|
|
|
static QString cpuDirShortDescription(const QString &cpuDir);
|
2015-04-24 10:31:27 +02:00
|
|
|
static QStringList searchPaths(Qnx::Internal::QnxQtVersion *qtVersion);
|
2014-03-12 17:43:26 +01:00
|
|
|
static QList<Utils::EnvironmentItem> qnxEnvironmentFromEnvFile(const QString &fileName);
|
2016-12-13 14:43:24 -05:00
|
|
|
static QString envFilePath(const QString &sdpPath);
|
|
|
|
|
static QString defaultTargetVersion(const QString &sdpPath);
|
2014-04-08 19:33:27 +02:00
|
|
|
static QList<ConfigInstallInformation> installedConfigs(const QString &configPath = QString());
|
2016-12-13 14:43:24 -05:00
|
|
|
static QList<Utils::EnvironmentItem> qnxEnvironment(const QString &sdpPath);
|
2016-12-16 12:48:53 -05:00
|
|
|
static QList<QnxTarget> findTargets(const Utils::FileName &basePath);
|
2012-06-29 07:23:13 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Qnx
|