2013-04-25 16:02:17 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2013-04-25 16:02:17 +02:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** 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.
|
2013-04-25 16:02:17 +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.
|
2013-04-25 16:02:17 +02:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include "iosplugin.h"
|
|
|
|
|
|
2017-03-03 16:21:55 +01:00
|
|
|
#include "iosbuildconfiguration.h"
|
2013-11-04 11:11:56 +01:00
|
|
|
#include "iosbuildstep.h"
|
2013-04-25 16:02:17 +02:00
|
|
|
#include "iosconfigurations.h"
|
2013-11-04 11:11:56 +01:00
|
|
|
#include "iosconstants.h"
|
|
|
|
|
#include "iosdeployconfiguration.h"
|
|
|
|
|
#include "iosdeploystepfactory.h"
|
2013-04-25 16:02:17 +02:00
|
|
|
#include "iosdevicefactory.h"
|
2014-03-12 21:25:28 +01:00
|
|
|
#include "iosdsymbuildstep.h"
|
2013-11-04 11:11:56 +01:00
|
|
|
#include "iosqtversionfactory.h"
|
2013-04-25 16:02:17 +02:00
|
|
|
#include "iosrunfactories.h"
|
2017-07-14 10:12:37 +02:00
|
|
|
#include "iosrunner.h"
|
2013-04-25 16:02:17 +02:00
|
|
|
#include "iossettingspage.h"
|
2013-11-04 11:11:56 +01:00
|
|
|
#include "iossimulator.h"
|
|
|
|
|
#include "iossimulatorfactory.h"
|
2013-10-08 15:27:45 +02:00
|
|
|
#include "iostoolhandler.h"
|
2017-07-14 10:12:37 +02:00
|
|
|
#include "iosrunconfiguration.h"
|
2013-11-04 11:11:56 +01:00
|
|
|
|
2017-07-14 10:12:37 +02:00
|
|
|
#include <projectexplorer/devicesupport/devicemanager.h>
|
2013-04-25 16:02:17 +02:00
|
|
|
#include <projectexplorer/kitmanager.h>
|
2017-07-14 10:12:37 +02:00
|
|
|
#include <projectexplorer/runconfiguration.h>
|
|
|
|
|
|
2013-04-25 16:02:17 +02:00
|
|
|
#include <qtsupport/qtversionmanager.h>
|
|
|
|
|
|
|
|
|
|
#include <QtPlugin>
|
|
|
|
|
|
2017-07-14 10:12:37 +02:00
|
|
|
using namespace ProjectExplorer;
|
2013-04-25 16:02:17 +02:00
|
|
|
|
|
|
|
|
namespace Ios {
|
2014-07-07 09:24:17 +02:00
|
|
|
namespace Internal {
|
|
|
|
|
Q_LOGGING_CATEGORY(iosLog, "qtc.ios.common")
|
|
|
|
|
}
|
2013-04-25 16:02:17 +02:00
|
|
|
|
|
|
|
|
IosPlugin::IosPlugin()
|
2013-10-08 15:27:45 +02:00
|
|
|
{
|
|
|
|
|
qRegisterMetaType<Ios::IosToolHandler::Dict>("Ios::IosToolHandler::Dict");
|
|
|
|
|
}
|
2013-04-25 16:02:17 +02:00
|
|
|
|
|
|
|
|
bool IosPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
|
|
|
|
{
|
|
|
|
|
Q_UNUSED(arguments);
|
|
|
|
|
Q_UNUSED(errorMessage);
|
|
|
|
|
|
2013-10-15 13:39:14 +02:00
|
|
|
Internal::IosConfigurations::initialize();
|
2013-04-25 16:02:17 +02:00
|
|
|
|
2017-03-03 16:21:55 +01:00
|
|
|
addAutoReleasedObject(new Internal::IosBuildConfigurationFactory);
|
2015-10-09 09:50:07 +02:00
|
|
|
addAutoReleasedObject(new Internal::IosToolChainFactory);
|
2013-04-25 16:02:17 +02:00
|
|
|
addAutoReleasedObject(new Internal::IosRunConfigurationFactory);
|
|
|
|
|
addAutoReleasedObject(new Internal::IosSettingsPage);
|
|
|
|
|
addAutoReleasedObject(new Internal::IosQtVersionFactory);
|
|
|
|
|
addAutoReleasedObject(new Internal::IosDeviceFactory);
|
|
|
|
|
addAutoReleasedObject(new Internal::IosSimulatorFactory);
|
|
|
|
|
addAutoReleasedObject(new Internal::IosBuildStepFactory);
|
|
|
|
|
addAutoReleasedObject(new Internal::IosDeployStepFactory);
|
2014-03-12 21:25:28 +01:00
|
|
|
addAutoReleasedObject(new Internal::IosDsymBuildStepFactory);
|
2013-04-25 16:02:17 +02:00
|
|
|
addAutoReleasedObject(new Internal::IosDeployConfigurationFactory);
|
2013-11-04 11:11:56 +01:00
|
|
|
|
2017-07-14 10:12:37 +02:00
|
|
|
auto constraint = [](RunConfiguration *runConfig) {
|
|
|
|
|
return qobject_cast<Internal::IosRunConfiguration *>(runConfig) != nullptr;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
RunControl::registerWorker<Internal::IosRunSupport>
|
|
|
|
|
(ProjectExplorer::Constants::NORMAL_RUN_MODE, constraint);
|
|
|
|
|
RunControl::registerWorker<Internal::IosDebugSupport>
|
|
|
|
|
(ProjectExplorer::Constants::DEBUG_RUN_MODE, constraint);
|
|
|
|
|
RunControl::registerWorker<Internal::IosQmlProfilerSupport>
|
|
|
|
|
(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE, constraint);
|
|
|
|
|
|
2013-04-25 16:02:17 +02:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void IosPlugin::extensionsInitialized()
|
|
|
|
|
{
|
2016-06-29 19:35:23 +03:00
|
|
|
connect(ProjectExplorer::KitManager::instance(), &ProjectExplorer::KitManager::kitsLoaded,
|
|
|
|
|
this, &IosPlugin::kitsRestored);
|
2013-04-25 16:02:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void IosPlugin::kitsRestored()
|
|
|
|
|
{
|
2016-06-29 19:35:23 +03:00
|
|
|
disconnect(ProjectExplorer::KitManager::instance(), &ProjectExplorer::KitManager::kitsLoaded,
|
|
|
|
|
this, &IosPlugin::kitsRestored);
|
2013-10-14 17:07:51 +02:00
|
|
|
Internal::IosConfigurations::updateAutomaticKitList();
|
2013-04-25 16:02:17 +02:00
|
|
|
connect(QtSupport::QtVersionManager::instance(),
|
2016-06-29 19:35:23 +03:00
|
|
|
&QtSupport::QtVersionManager::qtVersionsChanged,
|
2013-10-07 20:14:54 +02:00
|
|
|
Internal::IosConfigurations::instance(),
|
2016-06-29 19:35:23 +03:00
|
|
|
&Internal::IosConfigurations::updateAutomaticKitList);
|
2013-04-25 16:02:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Ios
|