2012-06-29 07:23:13 +02:00
|
|
|
/**************************************************************************
|
|
|
|
|
**
|
2014-01-07 13:27:11 +01:00
|
|
|
** Copyright (C) 2012 - 2014 BlackBerry Limited. All rights reserved
|
2012-06-29 07:23:13 +02:00
|
|
|
**
|
2013-09-12 18:35:41 +02:00
|
|
|
** Contact: BlackBerry (qt@blackberry.com)
|
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
|
|
|
|
|
** 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.
|
2012-06-29 07:23:13 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** 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
|
2012-06-29 07:23:13 +02:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2012-06-29 07:23:13 +02:00
|
|
|
|
|
|
|
|
#ifndef QNX_INTERNAL_QNXUTILS_H
|
|
|
|
|
#define QNX_INTERNAL_QNXUTILS_H
|
|
|
|
|
|
|
|
|
|
#include "qnxconstants.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 {
|
|
|
|
|
|
|
|
|
|
class QnxAbstractQtVersion;
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
2012-06-29 07:23:13 +02:00
|
|
|
class QnxUtils
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static QString addQuotes(const QString &string);
|
|
|
|
|
static Qnx::QnxArchitecture cpudirToArch(const QString &cpuDir);
|
|
|
|
|
static QStringList searchPaths(QnxAbstractQtVersion *qtVersion);
|
2014-03-12 17:43:26 +01:00
|
|
|
static QList<Utils::EnvironmentItem> qnxEnvironmentFromEnvFile(const QString &fileName);
|
2013-01-09 09:23:37 -05:00
|
|
|
static bool isValidNdkPath(const QString & ndkPath);
|
2013-08-22 17:00:58 +02:00
|
|
|
static QString envFilePath(const QString & ndkPath, const QString& targetVersion = QString());
|
2014-04-08 19:33:27 +02:00
|
|
|
static QString bbDataDirPath();
|
|
|
|
|
static QString bbqConfigPath();
|
2013-08-22 17:00:58 +02:00
|
|
|
static QString defaultTargetVersion(const QString& ndkPath);
|
2014-04-08 19:33:27 +02:00
|
|
|
static QList<ConfigInstallInformation> installedConfigs(const QString &configPath = QString());
|
2013-09-12 18:35:41 +02:00
|
|
|
static QString sdkInstallerPath(const QString& ndkPath);
|
2014-01-22 18:55:11 +01:00
|
|
|
static QString qdeInstallProcess(const QString& ndkPath, const QString &target,
|
|
|
|
|
const QString &option, const QString &version = QString());
|
2013-10-12 19:20:37 +02:00
|
|
|
static QList<Utils::EnvironmentItem> qnxEnvironment(const QString &ndk);
|
2012-06-29 07:23:13 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Qnx
|
|
|
|
|
|
|
|
|
|
#endif // QNX_INTERNAL_QNXUTILS_H
|