2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2013-04-25 16:02:17 +02:00
|
|
|
|
|
|
|
|
#include "iosbuildstep.h"
|
|
|
|
|
#include "iosconstants.h"
|
|
|
|
|
|
2020-09-01 12:37:18 +02:00
|
|
|
#include <projectexplorer/abstractprocessstep.h>
|
|
|
|
|
#include <projectexplorer/buildconfiguration.h>
|
2013-04-25 16:02:17 +02:00
|
|
|
#include <projectexplorer/buildsteplist.h>
|
2020-09-01 12:37:18 +02:00
|
|
|
#include <projectexplorer/gcctoolchain.h>
|
2013-04-25 16:02:17 +02:00
|
|
|
#include <projectexplorer/gnumakeparser.h>
|
|
|
|
|
#include <projectexplorer/kitinformation.h>
|
2018-11-17 21:19:04 +02:00
|
|
|
#include <projectexplorer/processparameters.h>
|
2020-09-01 12:37:18 +02:00
|
|
|
#include <projectexplorer/project.h>
|
|
|
|
|
#include <projectexplorer/projectexplorer.h>
|
2013-04-25 16:02:17 +02:00
|
|
|
#include <projectexplorer/projectexplorerconstants.h>
|
2020-09-01 12:37:18 +02:00
|
|
|
#include <projectexplorer/target.h>
|
2013-04-25 16:02:17 +02:00
|
|
|
#include <projectexplorer/toolchain.h>
|
2019-06-21 08:31:37 +02:00
|
|
|
|
|
|
|
|
#include <utils/fileutils.h>
|
2013-04-25 16:02:17 +02:00
|
|
|
#include <utils/qtcassert.h>
|
|
|
|
|
#include <utils/qtcprocess.h>
|
|
|
|
|
|
2019-06-26 11:41:36 +02:00
|
|
|
#include <QGridLayout>
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
#include <QLineEdit>
|
|
|
|
|
#include <QPlainTextEdit>
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
2013-04-25 16:02:17 +02:00
|
|
|
using namespace Core;
|
|
|
|
|
using namespace ProjectExplorer;
|
2019-06-21 08:31:37 +02:00
|
|
|
using namespace Utils;
|
2013-04-25 16:02:17 +02:00
|
|
|
|
|
|
|
|
namespace Ios {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
const char IOS_BUILD_STEP_ID[] = "Ios.IosBuildStep";
|
|
|
|
|
const char BUILD_USE_DEFAULT_ARGS_KEY[] = "Ios.IosBuildStep.XcodeArgumentsUseDefault";
|
|
|
|
|
const char BUILD_ARGUMENTS_KEY[] = "Ios.IosBuildStep.XcodeArguments";
|
|
|
|
|
const char CLEAN_KEY[] = "Ios.IosBuildStep.Clean";
|
|
|
|
|
|
2020-02-20 17:14:37 +01:00
|
|
|
class IosBuildStep final : public AbstractProcessStep
|
|
|
|
|
{
|
|
|
|
|
Q_DECLARE_TR_FUNCTIONS(Ios::Internal::IosBuildStep)
|
|
|
|
|
|
|
|
|
|
public:
|
2020-09-01 16:53:21 +02:00
|
|
|
IosBuildStep(BuildStepList *stepList, Utils::Id id);
|
2020-02-20 17:14:37 +01:00
|
|
|
|
2020-09-01 12:37:18 +02:00
|
|
|
private:
|
2020-10-02 17:53:39 +02:00
|
|
|
QWidget *createConfigWidget() final;
|
2020-02-20 17:14:37 +01:00
|
|
|
void setBaseArguments(const QStringList &args);
|
|
|
|
|
void setExtraArguments(const QStringList &extraArgs);
|
|
|
|
|
QStringList baseArguments() const;
|
|
|
|
|
QStringList allArguments() const;
|
|
|
|
|
QStringList defaultArguments() const;
|
|
|
|
|
Utils::FilePath buildCommand() const;
|
|
|
|
|
|
|
|
|
|
bool init() final;
|
2020-11-18 15:26:38 +01:00
|
|
|
void setupOutputFormatter(Utils::OutputFormatter *formatter) final;
|
2020-02-20 17:14:37 +01:00
|
|
|
bool fromMap(const QVariantMap &map) final;
|
|
|
|
|
QVariantMap toMap() const final;
|
|
|
|
|
|
|
|
|
|
QStringList m_baseBuildArguments;
|
|
|
|
|
QStringList m_extraArguments;
|
|
|
|
|
bool m_useDefaultArguments = true;
|
|
|
|
|
};
|
|
|
|
|
|
2020-10-02 17:53:39 +02:00
|
|
|
QWidget *IosBuildStep::createConfigWidget()
|
2019-06-26 11:41:36 +02:00
|
|
|
{
|
2020-10-02 17:53:39 +02:00
|
|
|
auto widget = new QWidget;
|
2019-06-26 11:41:36 +02:00
|
|
|
|
2020-09-01 12:37:18 +02:00
|
|
|
auto buildArgumentsLabel = new QLabel(tr("Base arguments:"), widget);
|
2019-06-26 11:41:36 +02:00
|
|
|
|
2020-09-01 12:37:18 +02:00
|
|
|
auto buildArgumentsTextEdit = new QPlainTextEdit(widget);
|
2021-05-06 13:07:36 +02:00
|
|
|
buildArgumentsTextEdit->setPlainText(ProcessArgs::joinArgs(baseArguments()));
|
2019-06-26 11:41:36 +02:00
|
|
|
|
2020-09-01 12:37:18 +02:00
|
|
|
auto resetDefaultsButton = new QPushButton(widget);
|
|
|
|
|
resetDefaultsButton->setLayoutDirection(Qt::RightToLeft);
|
|
|
|
|
resetDefaultsButton->setText(tr("Reset Defaults"));
|
|
|
|
|
resetDefaultsButton->setEnabled(!m_useDefaultArguments);
|
2019-06-26 11:41:36 +02:00
|
|
|
|
2020-09-01 12:37:18 +02:00
|
|
|
auto extraArgumentsLabel = new QLabel(tr("Extra arguments:"), widget);
|
2019-06-26 11:41:36 +02:00
|
|
|
|
2020-09-01 12:37:18 +02:00
|
|
|
auto extraArgumentsLineEdit = new QLineEdit(widget);
|
2021-05-06 13:07:36 +02:00
|
|
|
extraArgumentsLineEdit->setText(ProcessArgs::joinArgs(m_extraArguments));
|
2019-06-26 11:41:36 +02:00
|
|
|
|
2020-09-01 12:37:18 +02:00
|
|
|
auto gridLayout = new QGridLayout(widget);
|
|
|
|
|
gridLayout->addWidget(buildArgumentsLabel, 0, 0, 1, 1);
|
|
|
|
|
gridLayout->addWidget(buildArgumentsTextEdit, 0, 1, 2, 1);
|
|
|
|
|
gridLayout->addWidget(resetDefaultsButton, 1, 2, 1, 1);
|
|
|
|
|
gridLayout->addWidget(extraArgumentsLabel, 2, 0, 1, 1);
|
|
|
|
|
gridLayout->addWidget(extraArgumentsLineEdit, 2, 1, 1, 1);
|
2019-06-26 11:41:36 +02:00
|
|
|
|
2020-09-01 12:37:18 +02:00
|
|
|
setDisplayName(tr("iOS build", "iOS BuildStep display name."));
|
2019-06-26 11:41:36 +02:00
|
|
|
|
2020-09-14 12:37:32 +02:00
|
|
|
auto updateDetails = [this] {
|
2019-06-26 11:41:36 +02:00
|
|
|
ProcessParameters param;
|
2020-09-01 12:37:18 +02:00
|
|
|
setupProcessParameters(¶m);
|
2020-09-14 12:37:32 +02:00
|
|
|
setSummaryText(param.summary(displayName()));
|
2020-09-01 12:37:18 +02:00
|
|
|
};
|
2019-06-26 11:41:36 +02:00
|
|
|
|
2020-09-01 12:37:18 +02:00
|
|
|
updateDetails();
|
2019-06-26 11:41:36 +02:00
|
|
|
|
2020-09-01 12:37:18 +02:00
|
|
|
connect(buildArgumentsTextEdit, &QPlainTextEdit::textChanged, this, [=] {
|
2021-05-06 13:07:36 +02:00
|
|
|
setBaseArguments(ProcessArgs::splitArgs(buildArgumentsTextEdit->toPlainText()));
|
2020-09-01 12:37:18 +02:00
|
|
|
resetDefaultsButton->setEnabled(!m_useDefaultArguments);
|
|
|
|
|
updateDetails();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
connect(resetDefaultsButton, &QAbstractButton::clicked, this, [=] {
|
|
|
|
|
setBaseArguments(defaultArguments());
|
2021-05-06 13:07:36 +02:00
|
|
|
buildArgumentsTextEdit->setPlainText(ProcessArgs::joinArgs(baseArguments()));
|
2020-09-01 12:37:18 +02:00
|
|
|
resetDefaultsButton->setEnabled(!m_useDefaultArguments);
|
|
|
|
|
});
|
|
|
|
|
|
2022-12-07 23:26:08 +01:00
|
|
|
connect(extraArgumentsLineEdit, &QLineEdit::editingFinished, this, [=] {
|
2021-05-06 13:07:36 +02:00
|
|
|
setExtraArguments(ProcessArgs::splitArgs(extraArgumentsLineEdit->text()));
|
2020-09-01 12:37:18 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::settingsChanged,
|
|
|
|
|
this, updateDetails);
|
|
|
|
|
connect(target(), &Target::kitChanged,
|
|
|
|
|
this, updateDetails);
|
|
|
|
|
connect(buildConfiguration(), &BuildConfiguration::environmentChanged,
|
|
|
|
|
this, updateDetails);
|
|
|
|
|
|
|
|
|
|
return widget;
|
|
|
|
|
}
|
2019-06-26 11:41:36 +02:00
|
|
|
|
2020-09-01 16:53:21 +02:00
|
|
|
IosBuildStep::IosBuildStep(BuildStepList *stepList, Id id)
|
|
|
|
|
: AbstractProcessStep(stepList, id)
|
2013-04-25 16:02:17 +02:00
|
|
|
{
|
2020-08-13 17:34:54 +02:00
|
|
|
setCommandLineProvider([this] { return CommandLine(buildCommand(), allArguments()); });
|
|
|
|
|
setUseEnglishOutput();
|
|
|
|
|
|
2020-09-01 16:53:21 +02:00
|
|
|
if (stepList->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) {
|
|
|
|
|
// If we are cleaning, then build can fail with an error code,
|
|
|
|
|
// but that doesn't mean we should stop the clean queue
|
|
|
|
|
// That is mostly so that rebuild works on an already clean project
|
|
|
|
|
setIgnoreReturnValue(true);
|
ProjectExplorer/all: Re-organize BuildSteps/{Deploy,Build}Config setup
This follow the rough pattern of recent *RunConfigurationFactory changes
for build and deploy configurations.
- Collapse the two lines of constructors similar to what
890c1906e6fb2ec did for RunConfigurations
* Deploy* was purely mechanical
* Build* ctors are split in connects() in the ctor body
to create "empty shell for clone" etc
and build step additions in initialize() functions which
are only used in the create() case.
-- Allows to collapse the shared 'ctor()' functions, too.
- Move FooBuildConfigurationFactory::create() implementations
to FooBuildConfiguration() constructor. That was a strange
and unneeded ping-pong between factories and objects, and
furthermore allows one level less of indirection (and for a
later, left out here, some reduction of the
FooBuildConfiguration interfaces that were only used to
accommodate the *Factory::create() functions.
- Most {Build,Deploy}Configuration{,Factory} classes had a canHandle(),
but there wasn't one in the base classses. Have one there.
- Most canHandle() functions were checking simple restrictions on
e.g. project or target types, specify those by setters in the
constructors instead and check them in the base canHandle()
- clone() is generally replaced by a creation of a "shell object"
and a fromMap(source->toMap()), implemented in the base, there
are two cases left for Android and Qbs that needed(?) some extra
polish
- generally use canHandle() in base implementation, instead
of doing that in all Derived::canFoo()
- as a result, canCreate/create/canClone/clone reimplementations
are not needed anymore, keep the base implementation for
now (could be inlined into their only users later), but
de-virtualize them.
- Combine Ios{Preset,DSym}BuildStepFactory. There was only one
'dsym' build step they could create.
- Split the 'mangled' id into the ProjectConfiguration subtype
specific constant identifier, and a QString extraId() bit.
Only maintain the mangled id in saved settings.
- Make ProjectConfiguration::m_id a constant member, adapt
all constructors of derived classe.
Not done in this patch:
- Finish possible cosmetic changes on top
- Add a way to specify restrictions to supported Qt versions
(used in Android/Ios), as the base implementation does not
depend on the qtsupport plugin
- Combine the QList<X> availableFoo() + createFoo(X) function
pairs to somthing like a direct
QList<struct { X; std::function<X()>; }> fooCreators()
to avoid e.g. the baseId.withSuffix() <-> id.suffixAfter(base)
pingpong
- Remove the *Factories from the global object pool
- Do something about priority(). Falling back to plain
qmake in android+qmake setup is not helpful.
Change-Id: I2be7d88d554c5aa8b7db8edf5b93278e1ae0112a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-29 12:28:40 +01:00
|
|
|
setExtraArguments(QStringList("clean"));
|
|
|
|
|
}
|
2013-04-25 16:02:17 +02:00
|
|
|
}
|
|
|
|
|
|
2019-01-10 15:31:44 +01:00
|
|
|
bool IosBuildStep::init()
|
2013-04-25 16:02:17 +02:00
|
|
|
{
|
2020-09-14 17:17:55 +02:00
|
|
|
if (!AbstractProcessStep::init())
|
|
|
|
|
return false;
|
|
|
|
|
|
2020-09-07 15:56:18 +02:00
|
|
|
ToolChain *tc = ToolChainKitAspect::cxxToolChain(kit());
|
2020-10-05 12:15:37 +02:00
|
|
|
if (!tc) {
|
2014-06-20 14:32:40 +02:00
|
|
|
emit addTask(Task::compilerMissingTask());
|
|
|
|
|
emitFaultyConfigurationMessage();
|
2013-04-25 16:02:17 +02:00
|
|
|
return false;
|
|
|
|
|
}
|
2014-06-20 14:32:40 +02:00
|
|
|
|
2020-09-14 17:17:55 +02:00
|
|
|
return true;
|
2013-04-25 16:02:17 +02:00
|
|
|
}
|
|
|
|
|
|
2020-04-16 13:53:05 +02:00
|
|
|
void IosBuildStep::setupOutputFormatter(OutputFormatter *formatter)
|
|
|
|
|
{
|
|
|
|
|
formatter->addLineParser(new GnuMakeParser);
|
2020-09-07 15:56:18 +02:00
|
|
|
formatter->addLineParsers(kit()->createOutputParsers());
|
2020-04-16 13:53:05 +02:00
|
|
|
formatter->addSearchDir(processParameters()->effectiveWorkingDirectory());
|
|
|
|
|
AbstractProcessStep::setupOutputFormatter(formatter);
|
|
|
|
|
}
|
|
|
|
|
|
2013-04-25 16:02:17 +02:00
|
|
|
QVariantMap IosBuildStep::toMap() const
|
|
|
|
|
{
|
|
|
|
|
QVariantMap map(AbstractProcessStep::toMap());
|
|
|
|
|
|
2017-06-12 14:23:06 +02:00
|
|
|
map.insert(BUILD_ARGUMENTS_KEY, m_baseBuildArguments);
|
|
|
|
|
map.insert(BUILD_USE_DEFAULT_ARGS_KEY, m_useDefaultArguments);
|
2020-09-01 16:53:21 +02:00
|
|
|
|
|
|
|
|
// Not used anymore since 4.14. But make sure older versions of Creator can read this.
|
|
|
|
|
map.insert(CLEAN_KEY, stepList()->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
|
|
|
|
|
|
2013-04-25 16:02:17 +02:00
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IosBuildStep::fromMap(const QVariantMap &map)
|
|
|
|
|
{
|
2017-06-12 14:23:06 +02:00
|
|
|
QVariant bArgs = map.value(BUILD_ARGUMENTS_KEY);
|
2013-04-25 16:02:17 +02:00
|
|
|
m_baseBuildArguments = bArgs.toStringList();
|
2017-06-12 14:23:06 +02:00
|
|
|
m_useDefaultArguments = map.value(BUILD_USE_DEFAULT_ARGS_KEY).toBool();
|
2013-04-25 16:02:17 +02:00
|
|
|
|
|
|
|
|
return BuildStep::fromMap(map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QStringList IosBuildStep::allArguments() const
|
|
|
|
|
{
|
|
|
|
|
return baseArguments() + m_extraArguments;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QStringList IosBuildStep::defaultArguments() const
|
|
|
|
|
{
|
|
|
|
|
QStringList res;
|
|
|
|
|
Kit *kit = target()->kit();
|
2020-02-18 18:25:26 +01:00
|
|
|
ToolChain *tc = ToolChainKitAspect::cxxToolChain(kit);
|
2018-05-17 10:26:10 +02:00
|
|
|
switch (buildConfiguration()->buildType()) {
|
2013-04-25 16:02:17 +02:00
|
|
|
case BuildConfiguration::Debug :
|
2017-06-12 14:23:06 +02:00
|
|
|
res << "-configuration" << "Debug";
|
2013-04-25 16:02:17 +02:00
|
|
|
break;
|
|
|
|
|
case BuildConfiguration::Release :
|
2015-02-20 15:10:56 +01:00
|
|
|
case BuildConfiguration::Profile :
|
2017-06-12 14:23:06 +02:00
|
|
|
res << "-configuration" << "Release";
|
2013-04-25 16:02:17 +02:00
|
|
|
break;
|
|
|
|
|
case BuildConfiguration::Unknown :
|
|
|
|
|
break;
|
|
|
|
|
default:
|
2020-02-19 11:55:48 +01:00
|
|
|
qCWarning(iosLog) << "IosBuildStep had an unknown buildType " << buildType();
|
2013-04-25 16:02:17 +02:00
|
|
|
}
|
2015-07-07 15:37:50 +02:00
|
|
|
if (tc->typeId() == ProjectExplorer::Constants::GCC_TOOLCHAIN_TYPEID
|
|
|
|
|
|| tc->typeId() == ProjectExplorer::Constants::CLANG_TOOLCHAIN_TYPEID) {
|
2018-11-12 19:55:59 +01:00
|
|
|
auto gtc = static_cast<GccToolChain *>(tc);
|
2013-04-25 16:02:17 +02:00
|
|
|
res << gtc->platformCodeGenFlags();
|
|
|
|
|
}
|
2019-02-06 12:50:51 +01:00
|
|
|
if (!SysRootKitAspect::sysRoot(kit).isEmpty())
|
|
|
|
|
res << "-sdk" << SysRootKitAspect::sysRoot(kit).toString();
|
2020-02-19 11:55:48 +01:00
|
|
|
res << "SYMROOT=" + buildDirectory().toString();
|
2013-04-25 16:02:17 +02:00
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
2019-06-21 08:31:37 +02:00
|
|
|
FilePath IosBuildStep::buildCommand() const
|
2013-04-25 16:02:17 +02:00
|
|
|
{
|
2021-08-10 16:19:02 +02:00
|
|
|
return "xcodebuild"; // add path?
|
2013-04-25 16:02:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void IosBuildStep::setBaseArguments(const QStringList &args)
|
|
|
|
|
{
|
|
|
|
|
m_baseBuildArguments = args;
|
|
|
|
|
m_useDefaultArguments = (args == defaultArguments());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void IosBuildStep::setExtraArguments(const QStringList &extraArgs)
|
|
|
|
|
{
|
|
|
|
|
m_extraArguments = extraArgs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QStringList IosBuildStep::baseArguments() const
|
|
|
|
|
{
|
|
|
|
|
if (m_useDefaultArguments)
|
|
|
|
|
return defaultArguments();
|
|
|
|
|
return m_baseBuildArguments;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// IosBuildStepFactory
|
|
|
|
|
//
|
|
|
|
|
|
ProjectExplorer/all: Re-organize BuildSteps/{Deploy,Build}Config setup
This follow the rough pattern of recent *RunConfigurationFactory changes
for build and deploy configurations.
- Collapse the two lines of constructors similar to what
890c1906e6fb2ec did for RunConfigurations
* Deploy* was purely mechanical
* Build* ctors are split in connects() in the ctor body
to create "empty shell for clone" etc
and build step additions in initialize() functions which
are only used in the create() case.
-- Allows to collapse the shared 'ctor()' functions, too.
- Move FooBuildConfigurationFactory::create() implementations
to FooBuildConfiguration() constructor. That was a strange
and unneeded ping-pong between factories and objects, and
furthermore allows one level less of indirection (and for a
later, left out here, some reduction of the
FooBuildConfiguration interfaces that were only used to
accommodate the *Factory::create() functions.
- Most {Build,Deploy}Configuration{,Factory} classes had a canHandle(),
but there wasn't one in the base classses. Have one there.
- Most canHandle() functions were checking simple restrictions on
e.g. project or target types, specify those by setters in the
constructors instead and check them in the base canHandle()
- clone() is generally replaced by a creation of a "shell object"
and a fromMap(source->toMap()), implemented in the base, there
are two cases left for Android and Qbs that needed(?) some extra
polish
- generally use canHandle() in base implementation, instead
of doing that in all Derived::canFoo()
- as a result, canCreate/create/canClone/clone reimplementations
are not needed anymore, keep the base implementation for
now (could be inlined into their only users later), but
de-virtualize them.
- Combine Ios{Preset,DSym}BuildStepFactory. There was only one
'dsym' build step they could create.
- Split the 'mangled' id into the ProjectConfiguration subtype
specific constant identifier, and a QString extraId() bit.
Only maintain the mangled id in saved settings.
- Make ProjectConfiguration::m_id a constant member, adapt
all constructors of derived classe.
Not done in this patch:
- Finish possible cosmetic changes on top
- Add a way to specify restrictions to supported Qt versions
(used in Android/Ios), as the base implementation does not
depend on the qtsupport plugin
- Combine the QList<X> availableFoo() + createFoo(X) function
pairs to somthing like a direct
QList<struct { X; std::function<X()>; }> fooCreators()
to avoid e.g. the baseId.withSuffix() <-> id.suffixAfter(base)
pingpong
- Remove the *Factories from the global object pool
- Do something about priority(). Falling back to plain
qmake in android+qmake setup is not helpful.
Change-Id: I2be7d88d554c5aa8b7db8edf5b93278e1ae0112a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-29 12:28:40 +01:00
|
|
|
IosBuildStepFactory::IosBuildStepFactory()
|
2013-04-25 16:02:17 +02:00
|
|
|
{
|
ProjectExplorer/all: Re-organize BuildSteps/{Deploy,Build}Config setup
This follow the rough pattern of recent *RunConfigurationFactory changes
for build and deploy configurations.
- Collapse the two lines of constructors similar to what
890c1906e6fb2ec did for RunConfigurations
* Deploy* was purely mechanical
* Build* ctors are split in connects() in the ctor body
to create "empty shell for clone" etc
and build step additions in initialize() functions which
are only used in the create() case.
-- Allows to collapse the shared 'ctor()' functions, too.
- Move FooBuildConfigurationFactory::create() implementations
to FooBuildConfiguration() constructor. That was a strange
and unneeded ping-pong between factories and objects, and
furthermore allows one level less of indirection (and for a
later, left out here, some reduction of the
FooBuildConfiguration interfaces that were only used to
accommodate the *Factory::create() functions.
- Most {Build,Deploy}Configuration{,Factory} classes had a canHandle(),
but there wasn't one in the base classses. Have one there.
- Most canHandle() functions were checking simple restrictions on
e.g. project or target types, specify those by setters in the
constructors instead and check them in the base canHandle()
- clone() is generally replaced by a creation of a "shell object"
and a fromMap(source->toMap()), implemented in the base, there
are two cases left for Android and Qbs that needed(?) some extra
polish
- generally use canHandle() in base implementation, instead
of doing that in all Derived::canFoo()
- as a result, canCreate/create/canClone/clone reimplementations
are not needed anymore, keep the base implementation for
now (could be inlined into their only users later), but
de-virtualize them.
- Combine Ios{Preset,DSym}BuildStepFactory. There was only one
'dsym' build step they could create.
- Split the 'mangled' id into the ProjectConfiguration subtype
specific constant identifier, and a QString extraId() bit.
Only maintain the mangled id in saved settings.
- Make ProjectConfiguration::m_id a constant member, adapt
all constructors of derived classe.
Not done in this patch:
- Finish possible cosmetic changes on top
- Add a way to specify restrictions to supported Qt versions
(used in Android/Ios), as the base implementation does not
depend on the qtsupport plugin
- Combine the QList<X> availableFoo() + createFoo(X) function
pairs to somthing like a direct
QList<struct { X; std::function<X()>; }> fooCreators()
to avoid e.g. the baseId.withSuffix() <-> id.suffixAfter(base)
pingpong
- Remove the *Factories from the global object pool
- Do something about priority(). Falling back to plain
qmake in android+qmake setup is not helpful.
Change-Id: I2be7d88d554c5aa8b7db8edf5b93278e1ae0112a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-29 12:28:40 +01:00
|
|
|
registerStep<IosBuildStep>(IOS_BUILD_STEP_ID);
|
|
|
|
|
setSupportedDeviceTypes({Constants::IOS_DEVICE_TYPE,
|
|
|
|
|
Constants::IOS_SIMULATOR_TYPE});
|
|
|
|
|
setSupportedStepLists({ProjectExplorer::Constants::BUILDSTEPS_CLEAN,
|
|
|
|
|
ProjectExplorer::Constants::BUILDSTEPS_BUILD});
|
2020-02-20 17:14:37 +01:00
|
|
|
setDisplayName(IosBuildStep::tr("xcodebuild"));
|
2013-04-25 16:02:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Ios
|