2012-04-24 15:49:09 +02:00
|
|
|
/**************************************************************************
|
|
|
|
|
**
|
2014-01-07 13:27:11 +01:00
|
|
|
** Copyright (c) 2014 BogDan Vatra <bog_dan_ro@yahoo.com>
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2012-04-24 15:49:09 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2012-04-24 15:49:09 +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-04-24 15:49:09 +02:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** 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-04-24 15:49:09 +02:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2012-04-24 15:49:09 +02:00
|
|
|
|
|
|
|
|
#ifndef ANDROIDMANAGER_H
|
|
|
|
|
#define ANDROIDMANAGER_H
|
|
|
|
|
|
2014-06-25 15:42:11 +02:00
|
|
|
#include "android_global.h"
|
2012-04-24 15:49:09 +02:00
|
|
|
#include <utils/fileutils.h>
|
|
|
|
|
|
2013-08-28 15:48:02 +02:00
|
|
|
#include <QPair>
|
2012-04-24 15:49:09 +02:00
|
|
|
#include <QObject>
|
|
|
|
|
#include <QStringList>
|
|
|
|
|
|
2014-06-25 15:42:11 +02:00
|
|
|
namespace ProjectExplorer {
|
|
|
|
|
class Kit;
|
|
|
|
|
class Target;
|
|
|
|
|
}
|
2012-04-24 15:49:09 +02:00
|
|
|
|
|
|
|
|
namespace Android {
|
2014-06-25 15:42:11 +02:00
|
|
|
|
2014-06-24 16:47:38 +02:00
|
|
|
class AndroidQtSupport;
|
2012-04-24 15:49:09 +02:00
|
|
|
|
2014-06-25 15:42:11 +02:00
|
|
|
class ANDROID_EXPORT AndroidManager : public QObject
|
2012-04-24 15:49:09 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
2014-06-25 15:42:11 +02:00
|
|
|
static bool supportsAndroid(const ProjectExplorer::Kit *kit);
|
|
|
|
|
static bool supportsAndroid(const ProjectExplorer::Target *target);
|
2012-04-24 15:49:09 +02:00
|
|
|
|
|
|
|
|
static QString packageName(ProjectExplorer::Target *target);
|
|
|
|
|
|
|
|
|
|
static QString intentName(ProjectExplorer::Target *target);
|
|
|
|
|
static QString activityName(ProjectExplorer::Target *target);
|
|
|
|
|
|
2013-04-19 12:27:58 +02:00
|
|
|
static bool bundleQt(ProjectExplorer::Target *target);
|
2013-09-17 18:24:57 +02:00
|
|
|
static bool useLocalLibs(ProjectExplorer::Target *target);
|
|
|
|
|
static QString deviceSerialNumber(ProjectExplorer::Target *target);
|
2014-06-25 15:42:11 +02:00
|
|
|
static void setDeviceSerialNumber(ProjectExplorer::Target *target, const QString &deviceSerialNumber);
|
2013-03-07 13:22:21 +01:00
|
|
|
|
2013-08-28 15:20:54 +02:00
|
|
|
static QString buildTargetSDK(ProjectExplorer::Target *target);
|
2014-06-25 15:42:11 +02:00
|
|
|
|
|
|
|
|
static bool signPackage(ProjectExplorer::Target *target);
|
|
|
|
|
|
2013-08-28 15:23:04 +02:00
|
|
|
static int minimumSDK(ProjectExplorer::Target *target);
|
2012-04-24 15:49:09 +02:00
|
|
|
|
2013-05-03 15:10:21 +02:00
|
|
|
static QString targetArch(ProjectExplorer::Target *target);
|
|
|
|
|
|
2012-04-24 15:49:09 +02:00
|
|
|
static Utils::FileName dirPath(ProjectExplorer::Target *target);
|
|
|
|
|
static Utils::FileName manifestPath(ProjectExplorer::Target *target);
|
|
|
|
|
static Utils::FileName libsPath(ProjectExplorer::Target *target);
|
|
|
|
|
static Utils::FileName defaultPropertiesPath(ProjectExplorer::Target *target);
|
|
|
|
|
|
|
|
|
|
static Utils::FileName localLibsRulesFilePath(ProjectExplorer::Target *target);
|
2013-04-19 12:27:58 +02:00
|
|
|
static QString loadLocalLibs(ProjectExplorer::Target *target, int apiLevel = -1);
|
|
|
|
|
static QString loadLocalJars(ProjectExplorer::Target *target, int apiLevel = -1);
|
|
|
|
|
static QString loadLocalJarsInitClasses(ProjectExplorer::Target *target, int apiLevel = -1);
|
2012-04-24 15:49:09 +02:00
|
|
|
|
2014-05-07 15:03:43 +03:00
|
|
|
static QPair<int, int> apiLevelRange();
|
2013-08-14 13:39:45 +02:00
|
|
|
static QString androidNameForApiLevel(int x);
|
|
|
|
|
|
2012-04-24 15:49:09 +02:00
|
|
|
static QStringList qtLibs(ProjectExplorer::Target *target);
|
|
|
|
|
static QStringList prebundledLibs(ProjectExplorer::Target *target);
|
2013-02-26 15:53:33 +01:00
|
|
|
|
2013-09-17 18:24:57 +02:00
|
|
|
static void cleanLibsOnDevice(ProjectExplorer::Target *target);
|
|
|
|
|
static void installQASIPackage(ProjectExplorer::Target *target, const QString &packagePath);
|
|
|
|
|
|
|
|
|
|
static bool checkKeystorePassword(const QString &keystorePath, const QString &keystorePasswd);
|
|
|
|
|
static bool checkCertificatePassword(const QString &keystorePath, const QString &keystorePasswd, const QString &alias, const QString &certificatePasswd);
|
2014-06-24 16:47:10 +02:00
|
|
|
static bool checkForQt51Files(Utils::FileName fileName);
|
2014-06-24 16:47:38 +02:00
|
|
|
static AndroidQtSupport *androidQtSupport(ProjectExplorer::Target *target);
|
2012-04-24 15:49:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Android
|
|
|
|
|
|
|
|
|
|
#endif // ANDROIDMANAGER_H
|