2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2016-01-15 14:57:40 +01:00
|
|
|
|
2014-03-12 21:25:28 +01:00
|
|
|
#include "iosdsymbuildstep.h"
|
|
|
|
|
|
|
|
|
|
#include "iosconstants.h"
|
|
|
|
|
#include "iosconfigurations.h"
|
|
|
|
|
#include "iosrunconfiguration.h"
|
2022-12-20 13:39:23 +01:00
|
|
|
#include "iostr.h"
|
2014-03-12 21:25:28 +01:00
|
|
|
|
|
|
|
|
#include <extensionsystem/pluginmanager.h>
|
2023-05-03 17:05:35 +02:00
|
|
|
|
|
|
|
|
#include <projectexplorer/buildconfiguration.h>
|
2014-03-12 21:25:28 +01:00
|
|
|
#include <projectexplorer/buildsteplist.h>
|
|
|
|
|
#include <projectexplorer/kitinformation.h>
|
2018-11-17 21:19:04 +02:00
|
|
|
#include <projectexplorer/processparameters.h>
|
2023-05-03 17:05:35 +02:00
|
|
|
#include <projectexplorer/project.h>
|
2014-03-12 21:25:28 +01:00
|
|
|
#include <projectexplorer/projectexplorer.h>
|
|
|
|
|
#include <projectexplorer/projectexplorerconstants.h>
|
2023-05-03 17:05:35 +02:00
|
|
|
#include <projectexplorer/target.h>
|
2019-06-21 08:31:37 +02:00
|
|
|
|
2014-03-12 21:25:28 +01:00
|
|
|
#include <qtsupport/qtkitinformation.h>
|
|
|
|
|
#include <qtsupport/qtparser.h>
|
2019-06-21 08:31:37 +02:00
|
|
|
|
2023-05-03 17:05:35 +02:00
|
|
|
#include <utils/process.h>
|
2014-03-12 21:25:28 +01:00
|
|
|
#include <utils/qtcassert.h>
|
2023-05-03 17:05:35 +02:00
|
|
|
#include <utils/stringutils.h>
|
2014-03-12 21:25:28 +01:00
|
|
|
|
2020-08-26 15:11:40 +02:00
|
|
|
#include <QGridLayout>
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
#include <QLineEdit>
|
|
|
|
|
#include <QPlainTextEdit>
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
2014-03-12 21:25:28 +01:00
|
|
|
using namespace Core;
|
|
|
|
|
using namespace ProjectExplorer;
|
2019-06-21 08:31:37 +02:00
|
|
|
using namespace Utils;
|
2014-03-12 21:25:28 +01:00
|
|
|
|
2022-12-20 13:39:23 +01:00
|
|
|
namespace Ios::Internal {
|
2014-03-12 21:25:28 +01:00
|
|
|
|
2022-12-20 13:39:23 +01:00
|
|
|
const char USE_DEFAULT_ARGS_PARTIAL_KEY[] = ".ArgumentsUseDefault";
|
|
|
|
|
const char COMMAND_PARTIAL_KEY[] = ".Command";
|
|
|
|
|
const char ARGUMENTS_PARTIAL_KEY[] = ".Arguments";
|
|
|
|
|
const char CLEAN_PARTIAL_KEY[] = ".Clean";
|
|
|
|
|
|
|
|
|
|
class IosDsymBuildStep : public AbstractProcessStep
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
IosDsymBuildStep(BuildStepList *parent, Id id);
|
|
|
|
|
|
|
|
|
|
QWidget *createConfigWidget() override;
|
|
|
|
|
void setArguments(const QStringList &args);
|
|
|
|
|
QStringList arguments() const;
|
|
|
|
|
QStringList defaultArguments() const;
|
|
|
|
|
FilePath defaultCommand() const;
|
|
|
|
|
FilePath command() const;
|
|
|
|
|
void setCommand(const FilePath &command);
|
|
|
|
|
bool isDefault() const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void setupOutputFormatter(OutputFormatter *formatter) override;
|
|
|
|
|
QVariantMap toMap() const override;
|
|
|
|
|
bool fromMap(const QVariantMap &map) override;
|
|
|
|
|
|
|
|
|
|
QStringList defaultCleanCmdList() const;
|
|
|
|
|
QStringList defaultCmdList() const;
|
|
|
|
|
|
|
|
|
|
QStringList m_arguments;
|
|
|
|
|
FilePath m_command;
|
|
|
|
|
bool m_clean;
|
|
|
|
|
};
|
2014-03-12 21:25:28 +01:00
|
|
|
|
2019-12-20 17:05:30 +01:00
|
|
|
IosDsymBuildStep::IosDsymBuildStep(BuildStepList *parent, Id id) :
|
|
|
|
|
AbstractProcessStep(parent, id),
|
2014-03-12 21:25:28 +01:00
|
|
|
m_clean(parent->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN)
|
|
|
|
|
{
|
2020-08-13 17:34:54 +02:00
|
|
|
setCommandLineProvider([this] { return CommandLine(command(), arguments()); });
|
|
|
|
|
setUseEnglishOutput();
|
2014-03-12 21:25:28 +01:00
|
|
|
|
|
|
|
|
// 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(m_clean);
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
QVariantMap IosDsymBuildStep::toMap() const
|
2014-03-12 21:25:28 +01:00
|
|
|
{
|
|
|
|
|
QVariantMap map(AbstractProcessStep::toMap());
|
|
|
|
|
|
2017-06-12 14:23:06 +02:00
|
|
|
map.insert(id().withSuffix(ARGUMENTS_PARTIAL_KEY).toString(),
|
2014-03-12 21:25:28 +01:00
|
|
|
arguments());
|
2017-06-12 14:23:06 +02:00
|
|
|
map.insert(id().withSuffix(USE_DEFAULT_ARGS_PARTIAL_KEY).toString(),
|
2014-03-12 21:25:28 +01:00
|
|
|
isDefault());
|
2017-06-12 14:23:06 +02:00
|
|
|
map.insert(id().withSuffix(CLEAN_PARTIAL_KEY).toString(), m_clean);
|
2023-01-03 12:31:52 +01:00
|
|
|
map.insert(id().withSuffix(COMMAND_PARTIAL_KEY).toString(), command().toSettings());
|
2014-03-12 21:25:28 +01:00
|
|
|
return map;
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
bool IosDsymBuildStep::fromMap(const QVariantMap &map)
|
2014-03-12 21:25:28 +01:00
|
|
|
{
|
2017-06-12 14:23:06 +02:00
|
|
|
QVariant bArgs = map.value(id().withSuffix(ARGUMENTS_PARTIAL_KEY).toString());
|
2014-03-12 21:25:28 +01:00
|
|
|
m_arguments = bArgs.toStringList();
|
|
|
|
|
bool useDefaultArguments = map.value(
|
2017-06-12 14:23:06 +02:00
|
|
|
id().withSuffix(USE_DEFAULT_ARGS_PARTIAL_KEY).toString()).toBool();
|
|
|
|
|
m_clean = map.value(id().withSuffix(CLEAN_PARTIAL_KEY).toString(), m_clean).toBool();
|
2023-01-03 12:31:52 +01:00
|
|
|
m_command = FilePath::fromSettings(map.value(id().withSuffix(COMMAND_PARTIAL_KEY).toString()));
|
2014-03-12 21:25:28 +01:00
|
|
|
if (useDefaultArguments) {
|
|
|
|
|
m_command = defaultCommand();
|
|
|
|
|
m_arguments = defaultArguments();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return BuildStep::fromMap(map);
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
QStringList IosDsymBuildStep::defaultArguments() const
|
2014-03-12 21:25:28 +01:00
|
|
|
{
|
|
|
|
|
if (m_clean)
|
|
|
|
|
return defaultCleanCmdList().mid(1);
|
|
|
|
|
return defaultCmdList().mid(1);
|
|
|
|
|
}
|
|
|
|
|
|
2019-06-21 08:31:37 +02:00
|
|
|
FilePath IosDsymBuildStep::defaultCommand() const
|
2014-03-12 21:25:28 +01:00
|
|
|
{
|
|
|
|
|
if (m_clean)
|
2019-06-21 08:31:37 +02:00
|
|
|
return FilePath::fromString(defaultCleanCmdList().at(0));
|
2014-03-12 21:25:28 +01:00
|
|
|
else
|
2019-06-21 08:31:37 +02:00
|
|
|
return FilePath::fromString(defaultCmdList().at(0));
|
2014-03-12 21:25:28 +01: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
|
|
|
QStringList IosDsymBuildStep::defaultCleanCmdList() const
|
|
|
|
|
{
|
|
|
|
|
auto runConf = qobject_cast<IosRunConfiguration *>(target()->activeRunConfiguration());
|
|
|
|
|
QTC_ASSERT(runConf, return QStringList("echo"));
|
|
|
|
|
QString dsymPath = runConf->bundleDirectory().toUserOutput();
|
|
|
|
|
dsymPath.chop(4);
|
|
|
|
|
dsymPath.append(".dSYM");
|
|
|
|
|
return QStringList({"rm", "-rf", dsymPath});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QStringList IosDsymBuildStep::defaultCmdList() const
|
|
|
|
|
{
|
|
|
|
|
QString dsymutilCmd = "dsymutil";
|
2019-05-28 13:49:26 +02:00
|
|
|
const Utils::FilePath dsymUtilPath = IosConfigurations::developerPath()
|
2019-05-15 15:49:19 +02:00
|
|
|
.pathAppended("Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil");
|
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
|
|
|
if (dsymUtilPath.exists())
|
|
|
|
|
dsymutilCmd = dsymUtilPath.toUserOutput();
|
2018-11-12 19:55:59 +01:00
|
|
|
auto runConf = qobject_cast<const IosRunConfiguration *>(target()->activeRunConfiguration());
|
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
|
|
|
QTC_ASSERT(runConf, return QStringList("echo"));
|
|
|
|
|
QString dsymPath = runConf->bundleDirectory().toUserOutput();
|
|
|
|
|
dsymPath.chop(4);
|
|
|
|
|
dsymPath.append(".dSYM");
|
|
|
|
|
return QStringList({dsymutilCmd, "-o", dsymPath, runConf->localExecutable().toUserOutput()});
|
|
|
|
|
}
|
|
|
|
|
|
2019-06-21 08:31:37 +02:00
|
|
|
FilePath IosDsymBuildStep::command() const
|
2014-03-12 21:25:28 +01:00
|
|
|
{
|
|
|
|
|
if (m_command.isEmpty())
|
|
|
|
|
return defaultCommand();
|
|
|
|
|
return m_command;
|
|
|
|
|
}
|
|
|
|
|
|
2019-06-21 08:31:37 +02:00
|
|
|
void IosDsymBuildStep::setCommand(const FilePath &command)
|
2014-03-12 21:25:28 +01:00
|
|
|
{
|
|
|
|
|
if (command == m_command)
|
|
|
|
|
return;
|
|
|
|
|
if (command.isEmpty() || command == defaultCommand()) {
|
|
|
|
|
if (arguments() == defaultArguments())
|
|
|
|
|
m_command.clear();
|
|
|
|
|
else
|
|
|
|
|
m_command = defaultCommand();
|
|
|
|
|
} else if (m_command.isEmpty()) {
|
|
|
|
|
m_arguments = defaultArguments();
|
|
|
|
|
m_command = command;
|
|
|
|
|
} else {
|
|
|
|
|
m_command = command;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
bool IosDsymBuildStep::isDefault() const
|
2014-03-12 21:25:28 +01:00
|
|
|
{
|
|
|
|
|
return arguments() == defaultArguments() && command() == defaultCommand();
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-16 13:53:05 +02:00
|
|
|
void IosDsymBuildStep::setupOutputFormatter(OutputFormatter *formatter)
|
|
|
|
|
{
|
2020-09-07 15:56:18 +02:00
|
|
|
formatter->setLineParsers(kit()->createOutputParsers());
|
2020-04-16 13:53:05 +02:00
|
|
|
formatter->addSearchDir(processParameters()->effectiveWorkingDirectory());
|
|
|
|
|
AbstractProcessStep::setupOutputFormatter(formatter);
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
void IosDsymBuildStep::setArguments(const QStringList &args)
|
2014-03-12 21:25:28 +01:00
|
|
|
{
|
|
|
|
|
if (arguments() == args)
|
|
|
|
|
return;
|
|
|
|
|
if (args == defaultArguments() && command() == defaultCommand())
|
|
|
|
|
m_command.clear();
|
|
|
|
|
else {
|
|
|
|
|
if (m_command.isEmpty())
|
|
|
|
|
m_command = defaultCommand();
|
|
|
|
|
m_arguments = args;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
QStringList IosDsymBuildStep::arguments() const
|
2014-03-12 21:25:28 +01:00
|
|
|
{
|
|
|
|
|
if (m_command.isEmpty())
|
|
|
|
|
return defaultArguments();
|
|
|
|
|
return m_arguments;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-02 17:53:39 +02:00
|
|
|
QWidget *IosDsymBuildStep::createConfigWidget()
|
2014-03-12 21:25:28 +01:00
|
|
|
{
|
2020-10-02 17:53:39 +02:00
|
|
|
auto widget = new QWidget;
|
2014-03-12 21:25:28 +01:00
|
|
|
|
2022-12-20 13:39:23 +01:00
|
|
|
auto commandLabel = new QLabel(Tr::tr("Command:"), widget);
|
2014-03-12 21:25:28 +01:00
|
|
|
|
2020-08-26 15:11:40 +02:00
|
|
|
auto commandLineEdit = new QLineEdit(widget);
|
|
|
|
|
commandLineEdit->setText(command().toString());
|
2016-05-24 16:10:47 +02:00
|
|
|
|
2020-08-26 15:11:40 +02:00
|
|
|
auto argumentsTextEdit = new QPlainTextEdit(widget);
|
2021-05-06 13:07:36 +02:00
|
|
|
argumentsTextEdit->setPlainText(Utils::ProcessArgs::joinArgs(arguments()));
|
2014-03-12 21:25:28 +01:00
|
|
|
|
2022-12-20 13:39:23 +01:00
|
|
|
auto argumentsLabel = new QLabel(Tr::tr("Arguments:"), widget);
|
2014-03-12 21:25:28 +01:00
|
|
|
|
2022-12-20 13:39:23 +01:00
|
|
|
auto resetDefaultsButton = new QPushButton(Tr::tr("Reset to Default"), widget);
|
2020-08-26 15:11:40 +02:00
|
|
|
resetDefaultsButton->setLayoutDirection(Qt::RightToLeft);
|
|
|
|
|
resetDefaultsButton->setEnabled(!isDefault());
|
2014-03-12 21:25:28 +01:00
|
|
|
|
2020-08-26 15:11:40 +02:00
|
|
|
auto gridLayout = new QGridLayout(widget);
|
|
|
|
|
gridLayout->addWidget(commandLabel, 0, 0, 1, 1);
|
|
|
|
|
gridLayout->addWidget(commandLineEdit, 0, 2, 1, 1);
|
|
|
|
|
gridLayout->addWidget(argumentsLabel, 1, 0, 1, 1);
|
|
|
|
|
gridLayout->addWidget(argumentsTextEdit, 1, 2, 2, 1);
|
|
|
|
|
gridLayout->addWidget(resetDefaultsButton, 2, 3, 1, 1);
|
2014-03-12 21:25:28 +01:00
|
|
|
|
2020-09-14 12:37:32 +02:00
|
|
|
auto updateDetails = [this] {
|
2020-08-26 15:11:40 +02:00
|
|
|
ProcessParameters param;
|
|
|
|
|
setupProcessParameters(¶m);
|
2020-09-14 12:37:32 +02:00
|
|
|
setSummaryText(param.summary(displayName()));
|
2020-08-26 15:11:40 +02:00
|
|
|
};
|
2014-03-12 21:25:28 +01:00
|
|
|
|
|
|
|
|
updateDetails();
|
2020-08-26 15:11:40 +02:00
|
|
|
|
|
|
|
|
connect(argumentsTextEdit, &QPlainTextEdit::textChanged, this,
|
|
|
|
|
[this, argumentsTextEdit, resetDefaultsButton, updateDetails] {
|
2023-02-07 16:46:47 +01:00
|
|
|
setArguments(ProcessArgs::splitArgs(argumentsTextEdit->toPlainText(),
|
|
|
|
|
HostOsInfo::hostOs()));
|
2020-08-26 15:11:40 +02:00
|
|
|
resetDefaultsButton->setEnabled(!isDefault());
|
|
|
|
|
updateDetails();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
connect(commandLineEdit, &QLineEdit::editingFinished, this,
|
|
|
|
|
[this, commandLineEdit, resetDefaultsButton, updateDetails] {
|
|
|
|
|
setCommand(FilePath::fromString(commandLineEdit->text()));
|
|
|
|
|
resetDefaultsButton->setEnabled(!isDefault());
|
|
|
|
|
updateDetails();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
connect(resetDefaultsButton, &QAbstractButton::clicked, this,
|
|
|
|
|
[this, commandLineEdit, resetDefaultsButton, argumentsTextEdit, updateDetails] {
|
|
|
|
|
setCommand(defaultCommand());
|
|
|
|
|
setArguments(defaultArguments());
|
|
|
|
|
commandLineEdit->setText(command().toString());
|
2021-05-06 13:07:36 +02:00
|
|
|
argumentsTextEdit->setPlainText(Utils::ProcessArgs::joinArgs(arguments()));
|
2020-08-26 15:11:40 +02:00
|
|
|
resetDefaultsButton->setEnabled(!isDefault());
|
|
|
|
|
updateDetails();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::settingsChanged,
|
|
|
|
|
this, updateDetails);
|
|
|
|
|
connect(target(), &Target::kitChanged,
|
|
|
|
|
this, updateDetails);
|
|
|
|
|
connect(buildConfiguration(), &BuildConfiguration::enabledChanged,
|
|
|
|
|
this, updateDetails);
|
|
|
|
|
|
|
|
|
|
return widget;
|
2014-03-12 21:25:28 +01: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
|
|
|
// IosDsymBuildStepFactory
|
2014-03-12 21:25:28 +01: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
|
|
|
IosDsymBuildStepFactory::IosDsymBuildStepFactory()
|
2014-03-12 21:25:28 +01: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<IosDsymBuildStep>(Constants::IOS_DSYM_BUILD_STEP_ID);
|
|
|
|
|
setSupportedDeviceTypes({Constants::IOS_DEVICE_TYPE,
|
|
|
|
|
Constants::IOS_SIMULATOR_TYPE});
|
|
|
|
|
setDisplayName("dsymutil");
|
2014-03-12 21:25:28 +01:00
|
|
|
}
|
|
|
|
|
|
2022-12-20 13:39:23 +01:00
|
|
|
} // Ios::Internal
|