Commit 4e7d0d9c authored by Christian Kandeler's avatar Christian Kandeler

Introduce new "Madde" plugin.

The new plugin contains everything specific to Maemo and MeeGo
as supported by the MADDE framework.
This leaves the RemoteLinux plugin with abstract base classes and
generic implementations.

Change-Id: I6068caa758214cf26a27fe9893e0817b7834b580
Reviewed-on: http://codereview.qt-project.org/5230Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 43465cbe
<plugin name=\"Madde\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</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 Nokia.
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>
<description>Support for MADDE-based platforms, including Fremantle and MeeGo 1.2 Harmattan.</description>
<category>Device Support</category>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name=\"RemoteLinux\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
</plugin>
include(madde_dependencies.pri)
LIBS *= -l$$qtLibraryName(Madde)
TEMPLATE = lib
TARGET = Madde
include(../../qtcreatorplugin.pri)
include(madde_dependencies.pri)
HEADERS += \
maddeplugin.h \
maemoconstants.h \
maemorunconfigurationwidget.h \
maemoruncontrol.h \
maemorunfactories.h \
maemosettingspages.h \
maemotoolchain.h \
maemopackagecreationstep.h \
maemopackagecreationfactory.h \
maemopackagecreationwidget.h \
maemoqemumanager.h \
maemodeploystepfactory.h \
maemoglobal.h \
maemosshrunner.h \
maemodebugsupport.h \
maemoremotemountsmodel.h \
maemomountspecification.h \
maemoremotemounter.h \
maemopublishingwizardfactories.h \
maemopublishingbuildsettingspagefremantlefree.h \
maemopublishingfileselectiondialog.h \
maemopublishedprojectmodel.h \
maemopublishinguploadsettingspagefremantlefree.h \
maemopublishingwizardfremantlefree.h \
maemopublishingresultpagefremantlefree.h \
maemopublisherfremantlefree.h \
maemoqemuruntime.h \
maemoqemuruntimeparser.h \
maemoqemusettingswidget.h \
maemoqemusettings.h \
qt4maemotargetfactory.h \
qt4maemotarget.h \
qt4maemodeployconfiguration.h \
maemodeviceconfigwizard.h \
maemodeployconfigurationwidget.h \
maemoinstalltosysrootstep.h \
maemodeploymentmounter.h \
maemopackageinstaller.h \
maemoremotecopyfacility.h \
maemoqtversionfactory.h \
maemoqtversion.h \
maemorunconfiguration.h \
maddeuploadandinstallpackagesteps.h \
maemodeploybymountsteps.h \
maddedevicetester.h \
maddedeviceconfigurationfactory.h \
SOURCES += \
maddeplugin.cpp \
maemorunconfigurationwidget.cpp \
maemoruncontrol.cpp \
maemorunfactories.cpp \
maemosettingspages.cpp \
maemotoolchain.cpp \
maemopackagecreationstep.cpp \
maemopackagecreationfactory.cpp \
maemopackagecreationwidget.cpp \
maemoqemumanager.cpp \
maemodeploystepfactory.cpp \
maemoglobal.cpp \
maemosshrunner.cpp \
maemodebugsupport.cpp \
maemoremotemountsmodel.cpp \
maemomountspecification.cpp \
maemoremotemounter.cpp \
maemopublishingwizardfactories.cpp \
maemopublishingbuildsettingspagefremantlefree.cpp \
maemopublishingfileselectiondialog.cpp \
maemopublishedprojectmodel.cpp \
maemopublishinguploadsettingspagefremantlefree.cpp \
maemopublishingwizardfremantlefree.cpp \
maemopublishingresultpagefremantlefree.cpp \
maemopublisherfremantlefree.cpp \
maemoqemuruntimeparser.cpp \
maemoqemusettingswidget.cpp \
maemoqemusettings.cpp \
qt4maemotargetfactory.cpp \
qt4maemotarget.cpp \
qt4maemodeployconfiguration.cpp \
maemodeviceconfigwizard.cpp \
maemodeployconfigurationwidget.cpp \
maemoinstalltosysrootstep.cpp \
maemodeploymentmounter.cpp \
maemopackageinstaller.cpp \
maemoremotecopyfacility.cpp \
maemoqtversionfactory.cpp \
maemoqtversion.cpp \
maddedeviceconfigurationfactory.cpp \
maddeuploadandinstallpackagesteps.cpp \
maemodeploybymountsteps.cpp \
maddedevicetester.cpp \
maemorunconfiguration.cpp
FORMS += \
maemopackagecreationwidget.ui \
maemopublishingbuildsettingspagefremantlefree.ui \
maemopublishingfileselectiondialog.ui \
maemopublishinguploadsettingspagefremantlefree.ui \
maemopublishingresultpagefremantlefree.ui \
maemoqemusettingswidget.ui \
maemodeviceconfigwizardstartpage.ui \
maemodeviceconfigwizardpreviouskeysetupcheckpage.ui \
maemodeviceconfigwizardreusekeyscheckpage.ui \
maemodeviceconfigwizardkeycreationpage.ui \
maemodeviceconfigwizardkeydeploymentpage.ui \
maemodeployconfigurationwidget.ui
RESOURCES += qt-maemo.qrc
DEFINES += QT_NO_CAST_TO_ASCII
DEFINES += MADDE_LIBRARY
include(../../plugins/remotelinux/remotelinux.pri)
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (info@qt.nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** 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, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at info@qt.nokia.com.
**
**************************************************************************/
#ifndef MADDEEXPORT_H
#define MADDEEXPORT_H
#include <QtCore/qglobal.h>
#if defined(MADDE_LIBRARY)
# define MADDE_EXPORT Q_DECL_EXPORT
#else
# define MADDE_EXPORT Q_DECL_IMPORT
#endif
#endif // MADDEEXPORT_H
......@@ -34,15 +34,17 @@
#include "maddedevicetester.h"
#include "maemoconstants.h"
#include "maemodeviceconfigwizard.h"
#include "publickeydeploymentdialog.h"
#include <remotelinux/linuxdevicetestdialog.h>
#include <remotelinux/publickeydeploymentdialog.h>
#include <remotelinux/remotelinuxprocessesdialog.h>
#include <remotelinux/remotelinuxprocesslist.h>
#include <remotelinux/remotelinux_constants.h>
#include <utils/qtcassert.h>
namespace RemoteLinux {
using namespace RemoteLinux;
namespace Madde {
namespace Internal {
namespace {
const char MaddeDeviceTestActionId[] = "Madde.DeviceTestAction";
......@@ -115,4 +117,4 @@ QDialog *MaddeDeviceConfigurationFactory::createDeviceAction(const QString &acti
}
} // namespace Internal
} // namespace RemoteLinux
} // namespace Madde
......@@ -34,7 +34,7 @@
#include <remotelinux/linuxdeviceconfiguration.h>
namespace RemoteLinux {
namespace Madde {
namespace Internal {
class MaddeDeviceConfigurationFactory : public RemoteLinux::ILinuxDeviceConfigurationFactory
......@@ -44,16 +44,16 @@ public:
MaddeDeviceConfigurationFactory(QObject *parent = 0);
QString displayName() const;
ILinuxDeviceConfigurationWizard *createWizard(QWidget *parent) const;
RemoteLinux::ILinuxDeviceConfigurationWizard *createWizard(QWidget *parent) const;
bool supportsOsType(const QString &osType) const;
QString displayNameForOsType(const QString &osType) const;
QStringList supportedDeviceActionIds() const;
QString displayNameForActionId(const QString &actionId) const;
QDialog *createDeviceAction(const QString &actionId,
const LinuxDeviceConfiguration::ConstPtr &deviceConfig, QWidget *parent) const;
const RemoteLinux::LinuxDeviceConfiguration::ConstPtr &deviceConfig, QWidget *parent) const;
};
} // namespace Internal
} // namespace RemoteLinux
} // namespace Madde
#endif // MADDEDEVICECONFIGURATIONFACTORY_H
......@@ -40,9 +40,10 @@
#include <QtCore/QRegExp>
using namespace RemoteLinux;
using namespace Utils;
namespace RemoteLinux {
namespace Madde {
namespace Internal {
namespace {
const char QmlToolingDirectory[] = "/usr/lib/qt4/plugins/qmltooling";
......@@ -287,4 +288,4 @@ QString MaddeDeviceTester::processedQtLibsList()
}
} // namespace Internal
} // namespace RemoteLinux
} // namespace Madde
......@@ -40,7 +40,7 @@ namespace Utils {
class SshRemoteProcessRunner;
}
namespace RemoteLinux {
namespace Madde {
namespace Internal {
class MaddeDeviceTester : public RemoteLinux::AbstractLinuxDeviceTester
......@@ -50,7 +50,7 @@ public:
explicit MaddeDeviceTester(QObject *parent = 0);
~MaddeDeviceTester();
void testDevice(const QSharedPointer<const LinuxDeviceConfiguration> &deviceConfiguration);
void testDevice(const QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> &deviceConfiguration);
void stopTest();
private slots:
......@@ -74,12 +74,12 @@ private:
State m_state;
TestResult m_result;
QSharedPointer<Utils::SshRemoteProcessRunner> m_processRunner;
QSharedPointer<const LinuxDeviceConfiguration> m_deviceConfiguration;
QSharedPointer<const RemoteLinux::LinuxDeviceConfiguration> m_deviceConfiguration;
QByteArray m_stdout;
QByteArray m_stderr;
};
} // namespace Internal
} // namespace RemoteLinux
} // namespace Madde
#endif // MADDEDEVICETESTER_H
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (info@qt.nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** 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, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at info@qt.nokia.com.
**
**************************************************************************/
#include "maddeplugin.h"
#include "maddedeviceconfigurationfactory.h"
#include "maemoconstants.h"
#include "maemodeploystepfactory.h"
#include "maemopackagecreationfactory.h"
#include "maemopublishingwizardfactories.h"
#include "maemoqemumanager.h"
#include "maemorunfactories.h"
#include "maemosettingspages.h"
#include "maemotoolchain.h"
#include "qt4maemodeployconfiguration.h"
#include "maemoqtversionfactory.h"
#include "qt4maemotargetfactory.h"
#include <QtCore/QtPlugin>
namespace Madde {
namespace Internal {
MaddePlugin::MaddePlugin()
{
}
MaddePlugin::~MaddePlugin()
{
}
bool MaddePlugin::initialize(const QStringList &arguments, QString *error_message)
{
Q_UNUSED(arguments)
Q_UNUSED(error_message)
MaemoQemuManager::instance(this);
addAutoReleasedObject(new MaemoRunControlFactory);
addAutoReleasedObject(new MaemoRunConfigurationFactory);
addAutoReleasedObject(new MaemoToolChainFactory);
addAutoReleasedObject(new Qt4MaemoDeployConfigurationFactory);
addAutoReleasedObject(new MaemoPackageCreationFactory);
addAutoReleasedObject(new MaemoDeployStepFactory);
addAutoReleasedObject(new MaemoQemuSettingsPage);
addAutoReleasedObject(new MaemoPublishingWizardFactoryFremantleFree);
addAutoReleasedObject(new Qt4MaemoTargetFactory);
addAutoReleasedObject(new MaemoQtVersionFactory);
addAutoReleasedObject(new MaddeDeviceConfigurationFactory);
return true;
}
void MaddePlugin::extensionsInitialized()
{
}
} // namespace Internal
} // namespace Madde
Q_EXPORT_PLUGIN(Madde::Internal::MaddePlugin)
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (info@qt.nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** 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, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at info@qt.nokia.com.
**
**************************************************************************/
#ifndef MADDEPLUGIN_H
#define MADDEPLUGIN_H
#include <extensionsystem/iplugin.h>
namespace Madde {
namespace Internal {
class MaddePlugin : public ExtensionSystem::IPlugin
{
Q_OBJECT
public:
MaddePlugin();
~MaddePlugin();
bool initialize(const QStringList &arguments, QString *error_message);
void extensionsInitialized();
};
} // namespace Internal
} // namespace Madde
#endif // MADDEPLUGIN_H
......@@ -41,7 +41,9 @@
#include <remotelinux/abstractuploadandinstallpackageservice.h>
#include <remotelinux/linuxdeviceconfiguration.h>
namespace RemoteLinux {
using namespace RemoteLinux;
namespace Madde {
namespace Internal {
namespace {
class AbstractMaddeUploadAndInstallPackageAction : public AbstractUploadAndInstallPackageService
......@@ -213,6 +215,6 @@ QString MeegoUploadAndInstallPackageStep::displayName()
}
} // namespace Internal
} // namespace RemoteLinux
} // namespace Madde
#include "maddeuploadandinstallpackagesteps.moc"
......@@ -36,7 +36,9 @@
namespace RemoteLinux {
class AbstractUploadAndInstallPackageService;
}
namespace Madde {
namespace Internal {
class MaemoUploadAndInstallPackageStep : public RemoteLinux::AbstractRemoteLinuxDeployStep
......@@ -53,11 +55,11 @@ public:
static QString displayName();
private:
AbstractRemoteLinuxDeployService *deployService() const;
RemoteLinux::AbstractRemoteLinuxDeployService *deployService() const;
void ctor();
AbstractUploadAndInstallPackageService *m_deployService;
RemoteLinux::AbstractUploadAndInstallPackageService *m_deployService;
};
......@@ -75,14 +77,14 @@ public:
static QString displayName();
private:
AbstractRemoteLinuxDeployService *deployService() const;
RemoteLinux::AbstractRemoteLinuxDeployService *deployService() const;
void ctor();
AbstractUploadAndInstallPackageService *m_deployService;
RemoteLinux::AbstractUploadAndInstallPackageService *m_deployService;
};
} // namespace Internal
} // namespace RemoteLinux
} // namespace Madde
#endif // MADDEUPLOADANDINSTALLPACKAGESTEPS_H
......@@ -34,7 +34,7 @@
#include <QtCore/QLatin1String>
namespace RemoteLinux {
namespace Madde {
namespace Internal {
const char Maemo5OsType[] = "Maemo5OsType";
......@@ -60,6 +60,6 @@ static const QLatin1String ExportedLocalDirsKey(PREFIX ".ExportedLocalDirs");
static const QLatin1String RemoteMountPointsKey(PREFIX ".RemoteMountPoints");
} // namespace Internal
} // namespace RemoteLinux
} // namespace Madde
#endif // MAEMOCONSTANTS_H
......@@ -35,7 +35,9 @@
#include <remotelinux/linuxdeviceconfiguration.h>
namespace RemoteLinux {
using namespace RemoteLinux;
namespace Madde {
namespace Internal {
MaemoDebugSupport::MaemoDebugSupport(MaemoRunConfiguration *runConfig, Debugger::DebuggerEngine *engine)
......@@ -51,4 +53,4 @@ MaemoDebugSupport::~MaemoDebugSupport()
AbstractRemoteLinuxApplicationRunner *MaemoDebugSupport::runner() const { return m_runner; }
} // namespace Internal
} // namespace RemoteLinux
} // namespace Madde
......@@ -34,12 +34,12 @@
#include <remotelinux/remotelinuxdebugsupport.h>
namespace RemoteLinux {
namespace Madde {
namespace Internal {
class MaemoRunConfiguration;
class MaemoSshRunner;
class MaemoDebugSupport : public AbstractRemoteLinuxDebugSupport
class MaemoDebugSupport : public RemoteLinux::AbstractRemoteLinuxDebugSupport
{
Q_OBJECT
public:
......@@ -47,12 +47,12 @@ public:
~MaemoDebugSupport();
private:
AbstractRemoteLinuxApplicationRunner *runner() const;
RemoteLinux::AbstractRemoteLinuxApplicationRunner *runner() const;
MaemoSshRunner * const m_runner;
};
} // namespace Internal
} // namespace RemoteLinux
} // namespace Madde
#endif // MAEMODEBUGSUPPORT_H
......@@ -54,8 +54,9 @@
#include <QtCore/QList>
using namespace ProjectExplorer;
using namespace RemoteLinux;
namespace RemoteLinux {
namespace Madde {
namespace Internal {
class AbstractMaemoDeployByMountService : public AbstractRemoteLinuxDeployService
{
......@@ -489,6 +490,6 @@ QString MaemoCopyFilesViaMountStep::displayName()
}
} // namespace Internal
} // namespace RemoteLinux
} // namespace Madde
#include "maemodeploybymountsteps.moc"
......@@ -33,7 +33,7 @@
#include <remotelinux/abstractremotelinuxdeploystep.h>
namespace RemoteLinux {
namespace Madde {
namespace Internal {
class MaemoMountAndInstallPackageService;
class MaemoMountAndCopyFilesService;
......@@ -53,7 +53,7 @@ public:
static QString displayName();