Commit 7c995122 authored by Daniel Teske's avatar Daniel Teske Committed by hjk

Introduce QmakeAndroidSupport plugin

Holds androd + qmake related classes

Change-Id: Ib6bbc9c77a2b5f014573a1aa343dff5741abdb26
Reviewed-by: default avatarBogDan Vatra <bogdan@kde.org>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent d153da9a
...@@ -48,7 +48,8 @@ SUBDIRS = \ ...@@ -48,7 +48,8 @@ SUBDIRS = \
clearcase \ clearcase \
baremetal \ baremetal \
ios \ ios \
beautifier beautifier \
qmakeandroidsupport
minQtVersion(5, 0, 0) { minQtVersion(5, 0, 0) {
SUBDIRS += winrt SUBDIRS += winrt
......
<plugin name=\"QmakeAndroidSupport\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_COMPAT_VERSION\">
<vendor>Digia Plc</vendor>
<copyright>(C) 2014 Digia Plc</copyright>
<license>
Commercial Usage
Licensees holding valid Qt Commercial licenses may use this plugin in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Digia.
GNU Lesser General Public License Usage
Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. 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.
</license>
<category>Build Systems</category>
<description>Android support for qmake project manager</description>
<url>http://www.qt-project.org</url>
$$dependencyList
</plugin>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include <qmakeprojectmanager/qmakenodes.h> #include <qmakeprojectmanager/qmakenodes.h>
#include <proparser/prowriter.h> #include <proparser/prowriter.h>
using namespace QmakeProjectManager; using namespace QmakeAndroidSupport;
using namespace Internal; using namespace Internal;
AndroidExtraLibraryListModel::AndroidExtraLibraryListModel(QmakeProjectManager::QmakeProject *project, AndroidExtraLibraryListModel::AndroidExtraLibraryListModel(QmakeProjectManager::QmakeProject *project,
......
...@@ -37,6 +37,9 @@ ...@@ -37,6 +37,9 @@
namespace QmakeProjectManager { namespace QmakeProjectManager {
class QmakeProject; class QmakeProject;
class QmakeProFileNode; class QmakeProFileNode;
}
namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
class AndroidExtraLibraryListModel : public QAbstractItemModel class AndroidExtraLibraryListModel : public QAbstractItemModel
...@@ -70,6 +73,6 @@ private: ...@@ -70,6 +73,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace QmakeProjectManager } // namespace QmakeAndroidSupport
#endif // ANDROIDEXTRALIBRARYLISTMODEL_H #endif // ANDROIDEXTRALIBRARYLISTMODEL_H
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
using namespace ProjectExplorer; using namespace ProjectExplorer;
namespace QmakeProjectManager { namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
AndroidPackageInstallationFactory::AndroidPackageInstallationFactory(QObject *parent) AndroidPackageInstallationFactory::AndroidPackageInstallationFactory(QObject *parent)
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <projectexplorer/buildstep.h> #include <projectexplorer/buildstep.h>
namespace QmakeProjectManager { namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
class AndroidPackageInstallationFactory: public ProjectExplorer::IBuildStepFactory class AndroidPackageInstallationFactory: public ProjectExplorer::IBuildStepFactory
...@@ -58,6 +58,6 @@ public: ...@@ -58,6 +58,6 @@ public:
}; };
} // namespace Internal } // namespace Internal
} // namespace Android } // namespace QmakeAndroidSupport
#endif // ANDROIDPACKAGEINSTALLATIONFACTORY_H #endif // ANDROIDPACKAGEINSTALLATIONFACTORY_H
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
#include <QDir> #include <QDir>
using namespace Android; using namespace QmakeAndroidSupport;
using namespace QmakeProjectManager::Internal; using namespace QmakeAndroidSupport::Internal;
const Core::Id AndroidPackageInstallationStep::Id = Core::Id("Qt4ProjectManager.AndroidPackageInstallationStep"); const Core::Id AndroidPackageInstallationStep::Id = Core::Id("Qt4ProjectManager.AndroidPackageInstallationStep");
namespace { namespace {
...@@ -64,7 +64,7 @@ AndroidPackageInstallationStep::AndroidPackageInstallationStep(ProjectExplorer:: ...@@ -64,7 +64,7 @@ AndroidPackageInstallationStep::AndroidPackageInstallationStep(ProjectExplorer::
bool AndroidPackageInstallationStep::init() bool AndroidPackageInstallationStep::init()
{ {
ProjectExplorer::BuildConfiguration *bc = buildConfiguration(); ProjectExplorer::BuildConfiguration *bc = buildConfiguration();
QString dirPath = bc->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY)).toString(); QString dirPath = bc->buildDirectory().appendPath(QLatin1String(Android::Constants::ANDROID_BUILDDIRECTORY)).toString();
if (Utils::HostOsInfo::isWindowsHost()) if (Utils::HostOsInfo::isWindowsHost())
if (bc->environment().searchInPath(QLatin1String("sh.exe")).isEmpty()) if (bc->environment().searchInPath(QLatin1String("sh.exe")).isEmpty())
dirPath = QDir::toNativeSeparators(dirPath); dirPath = QDir::toNativeSeparators(dirPath);
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include <projectexplorer/buildstep.h> #include <projectexplorer/buildstep.h>
#include <projectexplorer/abstractprocessstep.h> #include <projectexplorer/abstractprocessstep.h>
namespace QmakeProjectManager { namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
class AndroidPackageInstallationStep : public ProjectExplorer::AbstractProcessStep class AndroidPackageInstallationStep : public ProjectExplorer::AbstractProcessStep
...@@ -70,6 +70,6 @@ private: ...@@ -70,6 +70,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Android } // namespace QmakeAndroidSupport
#endif // ANDROIDPACKAGEINSTALLATIONSTEP_H #endif // ANDROIDPACKAGEINSTALLATIONSTEP_H
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
#include <projectexplorer/buildsteplist.h> #include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
using namespace QmakeProjectManager; using namespace QmakeAndroidSupport;
using namespace QmakeProjectManager::Internal; using namespace QmakeAndroidSupport::Internal;
using QmakeProjectManager::QmakeBuildConfiguration;
int AndroidQmakeBuildConfigurationFactory::priority(const ProjectExplorer::Kit *k, const QString &projectPath) const int AndroidQmakeBuildConfigurationFactory::priority(const ProjectExplorer::Kit *k, const QString &projectPath) const
{ {
......
...@@ -30,13 +30,12 @@ ...@@ -30,13 +30,12 @@
#ifndef ANDROIDQMAKEBUILDCONFIGURATIONFACTORY_H #ifndef ANDROIDQMAKEBUILDCONFIGURATIONFACTORY_H
#define ANDROIDQMAKEBUILDCONFIGURATIONFACTORY_H #define ANDROIDQMAKEBUILDCONFIGURATIONFACTORY_H
#include "qmakebuildconfiguration.h" #include <qmakeprojectmanager/qmakebuildconfiguration.h>
namespace QmakeProjectManager { namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
class AndroidQmakeBuildConfigurationFactory : public QmakeProjectManager::QmakeBuildConfigurationFactory
class AndroidQmakeBuildConfigurationFactory : public QmakeBuildConfigurationFactory
{ {
public: public:
explicit AndroidQmakeBuildConfigurationFactory(QObject *parent = 0) explicit AndroidQmakeBuildConfigurationFactory(QObject *parent = 0)
......
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
#include <QVBoxLayout> #include <QVBoxLayout>
using namespace Android; using namespace Android;
using namespace QmakeProjectManager; using namespace QmakeAndroidSupport;
using namespace QmakeProjectManager::Internal; using namespace QmakeAndroidSupport::Internal;
using QmakeProjectManager::QmakeProject; using QmakeProjectManager::QmakeProject;
using QmakeProjectManager::QmakeProFileNode; using QmakeProjectManager::QmakeProFileNode;
......
...@@ -40,7 +40,7 @@ QT_END_NAMESPACE ...@@ -40,7 +40,7 @@ QT_END_NAMESPACE
namespace ProjectExplorer { class Target; } namespace ProjectExplorer { class Target; }
namespace QmakeProjectManager { class QmakeProFileNode; } namespace QmakeProjectManager { class QmakeProFileNode; }
namespace QmakeProjectManager { namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
class CreateAndroidManifestWizard; class CreateAndroidManifestWizard;
...@@ -105,7 +105,7 @@ private: ...@@ -105,7 +105,7 @@ private:
QString m_directory; QString m_directory;
}; };
} //namespace QmakeProjectManager } //namespace QmakeAndroidSupport
} //namespace Internal } //namespace Internal
#endif // CREATEANDROIDMANIFESTWIZARD_H #endif // CREATEANDROIDMANIFESTWIZARD_H
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
#include "qmakeandroidbuildapkstep.h" #include "qmakeandroidbuildapkstep.h"
#include "qmakeandroidbuildapkwidget.h" #include "qmakeandroidbuildapkwidget.h"
#include "qmakenodes.h"
#include "qmakeproject.h"
#include <android/androidconfigurations.h> #include <android/androidconfigurations.h>
#include <android/androidconstants.h> #include <android/androidconstants.h>
...@@ -43,16 +41,19 @@ ...@@ -43,16 +41,19 @@
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <qtsupport/qtkitinformation.h> #include <qtsupport/qtkitinformation.h>
#include <qmakeprojectmanager/qmakenodes.h>
#include <qmakeprojectmanager/qmakeproject.h>
#include <utils/qtcprocess.h> #include <utils/qtcprocess.h>
#include <QHBoxLayout> #include <QHBoxLayout>
using namespace Android; using namespace Android;
using QmakeProjectManager::QmakeProject;
using QmakeProjectManager::QmakeProFileNode;
namespace QmakeProjectManager { namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
const Core::Id ANDROID_BUILD_APK_ID("QmakeProjectManager.AndroidBuildApkStep"); const Core::Id ANDROID_BUILD_APK_ID("QmakeProjectManager.AndroidBuildApkStep");
......
...@@ -33,10 +33,9 @@ ...@@ -33,10 +33,9 @@
#include <android/androidbuildapkstep.h> #include <android/androidbuildapkstep.h>
namespace QmakeProjectManager { namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
class QmakeAndroidBuildApkStepFactory : public ProjectExplorer::IBuildStepFactory class QmakeAndroidBuildApkStepFactory : public ProjectExplorer::IBuildStepFactory
{ {
Q_OBJECT Q_OBJECT
...@@ -95,6 +94,6 @@ private: ...@@ -95,6 +94,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace QmakeProjectManager } // namespace QmakeAndroidSupport
#endif // QMAKEANDROIDBUILDAPKSTEP_H #endif // QMAKEANDROIDBUILDAPKSTEP_H
...@@ -30,16 +30,19 @@ ...@@ -30,16 +30,19 @@
#include "createandroidmanifestwizard.h" #include "createandroidmanifestwizard.h"
#include "qmakeandroidbuildapkstep.h" #include "qmakeandroidbuildapkstep.h"
#include "qmakeandroidbuildapkwidget.h" #include "qmakeandroidbuildapkwidget.h"
#include "qmakenodes.h"
#include "qmakeproject.h"
#include "ui_qmakeandroidbuildapkwidget.h" #include "ui_qmakeandroidbuildapkwidget.h"
#include <android/androidbuildapkwidget.h> #include <android/androidbuildapkwidget.h>
#include <android/androidmanager.h> #include <android/androidmanager.h>
#include <qmakeprojectmanager/qmakenodes.h>
#include <qmakeprojectmanager/qmakeproject.h>
#include <QFileDialog> #include <QFileDialog>
namespace QmakeProjectManager { using QmakeProjectManager::QmakeProject;
using QmakeProjectManager::QmakeProFileNode;
namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
QmakeAndroidBuildApkWidget::QmakeAndroidBuildApkWidget(QmakeAndroidBuildApkStep *step) : QmakeAndroidBuildApkWidget::QmakeAndroidBuildApkWidget(QmakeAndroidBuildApkStep *step) :
......
...@@ -40,9 +40,9 @@ QT_BEGIN_NAMESPACE ...@@ -40,9 +40,9 @@ QT_BEGIN_NAMESPACE
class QLabel; class QLabel;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace QmakeProjectManager { namespace QmakeProjectManager { class QmakeBuildConfiguration; }
class QmakeBuildConfiguration;
namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
namespace Ui { namespace Ui {
...@@ -80,6 +80,6 @@ public: ...@@ -80,6 +80,6 @@ public:
}; };
} // namespace Internal } // namespace Internal
} // namespace QmakeProjectManager } // namespace QmakeAndroidSupport
#endif // QMAKEANDROIDBUILDAPKWIDGET_H #endif // QMAKEANDROIDBUILDAPKWIDGET_H
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>QmakeProjectManager::Internal::QmakeAndroidBuildApkWidget</class> <class>QmakeAndroidSupport::Internal::QmakeAndroidBuildApkWidget</class>
<widget class="QWidget" name="QmakeProjectManager::Internal::QmakeAndroidBuildApkWidget"> <widget class="QWidget" name="QmakeAndroidSupport::Internal::QmakeAndroidBuildApkWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
......
...@@ -45,7 +45,7 @@ namespace { ...@@ -45,7 +45,7 @@ namespace {
using namespace ProjectExplorer; using namespace ProjectExplorer;
using QmakeProjectManager::QmakeProject; using QmakeProjectManager::QmakeProject;
namespace QmakeProjectManager { namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
QmakeAndroidRunConfiguration::QmakeAndroidRunConfiguration(Target *parent, Core::Id id, const QString &path) QmakeAndroidRunConfiguration::QmakeAndroidRunConfiguration(Target *parent, Core::Id id, const QString &path)
......
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
#include <android/androidrunconfiguration.h> #include <android/androidrunconfiguration.h>
namespace QmakeProjectManager { namespace QmakeProjectManager { class QmakeProFileNode; }
class QmakeProFileNode;
namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
class QmakeAndroidRunConfiguration : public Android::AndroidRunConfiguration class QmakeAndroidRunConfiguration : public Android::AndroidRunConfiguration
...@@ -68,6 +68,6 @@ private: ...@@ -68,6 +68,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Android } // namespace QmakeAndroidSupport
#endif // QMAKE_ANDROIDRUNCONFIGURATION_H #endif // QMAKE_ANDROIDRUNCONFIGURATION_H
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
#include <qtsupport/qtkitinformation.h> #include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h> #include <qtsupport/qtsupportconstants.h>
using namespace Android; using namespace Android;
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace QmakeProjectManager;
namespace QmakeProjectManager { namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
static const char ANDROID_RC_ID_PREFIX[] = "Qt4ProjectManager.AndroidRunConfiguration:"; static const char ANDROID_RC_ID_PREFIX[] = "Qt4ProjectManager.AndroidRunConfiguration:";
......
...@@ -41,7 +41,7 @@ class Target; ...@@ -41,7 +41,7 @@ class Target;
class Node; class Node;
} // namespace ProjectExplorer } // namespace ProjectExplorer
namespace QmakeProjectManager { namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
class QmakeAndroidRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory class QmakeAndroidRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory
...@@ -73,6 +73,6 @@ private: ...@@ -73,6 +73,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace Android } // namespace QmakeAndroidSupport
#endif // ANDROIDRUNFACTORIES_H #endif // ANDROIDRUNFACTORIES_H
...@@ -29,10 +29,6 @@ ...@@ -29,10 +29,6 @@
#include "androidpackageinstallationstep.h" #include "androidpackageinstallationstep.h"
#include "qmakeandroidsupport.h" #include "qmakeandroidsupport.h"
#include "qmakebuildconfiguration.h"
#include "qmakenodes.h"
#include "qmakeproject.h"
#include "qmakestep.h"
#include <android/androidconstants.h> #include <android/androidconstants.h>
#include <projectexplorer/buildmanager.h> #include <projectexplorer/buildmanager.h>
...@@ -42,8 +38,14 @@ ...@@ -42,8 +38,14 @@
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <qtsupport/qtkitinformation.h> #include <qtsupport/qtkitinformation.h>
#include <qmakeprojectmanager/qmakebuildconfiguration.h>
#include <qmakeprojectmanager/qmakenodes.h>
#include <qmakeprojectmanager/qmakeproject.h>
#include <qmakeprojectmanager/qmakestep.h>
namespace QmakeProjectManager { using namespace QmakeProjectManager;
namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
bool QmakeAndroidSupport::canHandle(const ProjectExplorer::Target *target) const bool QmakeAndroidSupport::canHandle(const ProjectExplorer::Target *target) const
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <android/androidqtsupport.h> #include <android/androidqtsupport.h>
namespace QmakeProjectManager { namespace QmakeAndroidSupport {
namespace Internal { namespace Internal {
class QmakeAndroidSupport : public Android::AndroidQtSupport class QmakeAndroidSupport : public Android::AndroidQtSupport
......
QT += network
include(../../qtcreatorplugin.pri)
DEFINES += \
QMAKEANDROID_LIBRARY
HEADERS += \
androidextralibrarylistmodel.h \
androidpackageinstallationfactory.h \
androidpackageinstallationstep.h \
createandroidmanifestwizard.h \
qmakeandroidsupport.h \
qmakeandroidrunconfiguration.h \
qmakeandroidrunfactories.h \
qmakeandroidbuildapkstep.h \
qmakeandroidbuildapkwidget.h \
androidqmakebuildconfigurationfactory.h \
qmakeandroidsupportplugin.h
SOURCES += \
androidextralibrarylistmodel.cpp \
androidpackageinstallationfactory.cpp \
androidpackageinstallationstep.cpp \
createandroidmanifestwizard.cpp \
qmakeandroidsupport.cpp \
qmakeandroidrunconfiguration.cpp \
qmakeandroidrunfactories.cpp \
qmakeandroidbuildapkstep.cpp \
qmakeandroidbuildapkwidget.cpp \
androidqmakebuildconfigurationfactory.cpp \
qmakeandroidsupportplugin.cpp
FORMS += qmakeandroidbuildapkwidget.ui
RESOURCES +=
QTC_PLUGIN_NAME = QmakeAndroidSupport
QTC_LIB_DEPENDS += \
aggregation \
extensionsystem \
qmljs \
utils
QTC_PLUGIN_DEPENDS += \
coreplugin \
projectexplorer \
qtsupport \
texteditor \
cpptools \
qmljstools \
resourceeditor \
android \
qmakeprojectmanager
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**