2014-03-12 21:25:28 +01:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2014-03-12 21:25:28 +01: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.
|
2014-03-12 21:25:28 +01: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.
|
2014-03-12 21:25:28 +01:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
2016-01-15 14:57:40 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2014-03-12 21:25:28 +01:00
|
|
|
|
|
|
|
|
#include <projectexplorer/abstractprocessstep.h>
|
|
|
|
|
|
|
|
|
|
namespace Ios {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
namespace Ui { class IosPresetBuildStep; }
|
|
|
|
|
|
|
|
|
|
class IosPresetBuildStepConfigWidget;
|
|
|
|
|
class IosPresetBuildStepFactory;
|
|
|
|
|
|
|
|
|
|
class IosPresetBuildStep : public ProjectExplorer::AbstractProcessStep
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
friend class IosPresetBuildStepConfigWidget;
|
|
|
|
|
friend class IosPresetBuildStepFactory;
|
|
|
|
|
|
|
|
|
|
public:
|
2015-11-13 12:19:35 +01:00
|
|
|
bool init(QList<const BuildStep *> &earlierSteps) override;
|
2015-06-03 15:32:21 +02:00
|
|
|
void run(QFutureInterface<bool> &fi) override;
|
2014-03-12 21:25:28 +01:00
|
|
|
|
2015-06-03 15:32:21 +02:00
|
|
|
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
|
|
|
|
|
bool immutable() const override;
|
2014-03-12 21:25:28 +01:00
|
|
|
void setArguments(const QStringList &args);
|
|
|
|
|
QStringList arguments() const;
|
|
|
|
|
QStringList defaultArguments() const;
|
|
|
|
|
QString defaultCommand() const;
|
|
|
|
|
QString command() const;
|
|
|
|
|
void setCommand(const QString &command);
|
|
|
|
|
bool clean() const;
|
|
|
|
|
void setClean(bool clean);
|
|
|
|
|
bool isDefault() const;
|
|
|
|
|
|
2015-06-03 15:32:21 +02:00
|
|
|
QVariantMap toMap() const override;
|
2014-03-12 21:25:28 +01:00
|
|
|
protected:
|
2014-07-01 11:08:26 +02:00
|
|
|
IosPresetBuildStep(ProjectExplorer::BuildStepList *parent, Core::Id id);
|
2014-03-12 21:25:28 +01:00
|
|
|
virtual bool completeSetup();
|
|
|
|
|
virtual bool completeSetupWithStep(ProjectExplorer::BuildStep *bs);
|
2015-06-03 15:32:21 +02:00
|
|
|
bool fromMap(const QVariantMap &map) override;
|
2014-03-12 21:25:28 +01:00
|
|
|
virtual QStringList defaultCleanCmdList() const = 0;
|
|
|
|
|
virtual QStringList defaultCmdList() const = 0;
|
|
|
|
|
private:
|
|
|
|
|
QStringList m_arguments;
|
|
|
|
|
QString m_command;
|
|
|
|
|
bool m_clean;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class IosPresetBuildStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
IosPresetBuildStepConfigWidget(IosPresetBuildStep *buildStep);
|
|
|
|
|
~IosPresetBuildStepConfigWidget();
|
2015-06-03 15:32:21 +02:00
|
|
|
QString displayName() const override;
|
|
|
|
|
QString summaryText() const override;
|
2014-03-12 21:25:28 +01:00
|
|
|
|
2016-06-29 19:35:23 +03:00
|
|
|
private:
|
2014-03-12 21:25:28 +01:00
|
|
|
void commandChanged();
|
|
|
|
|
void argumentsChanged();
|
|
|
|
|
void resetDefaults();
|
|
|
|
|
void updateDetails();
|
|
|
|
|
|
|
|
|
|
Ui::IosPresetBuildStep *m_ui;
|
|
|
|
|
IosPresetBuildStep *m_buildStep;
|
|
|
|
|
QString m_summaryText;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class IosPresetBuildStepFactory : public ProjectExplorer::IBuildStepFactory
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit IosPresetBuildStepFactory(QObject *parent = 0);
|
|
|
|
|
|
2015-06-03 15:32:21 +02:00
|
|
|
ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, Core::Id id) override;
|
2014-03-12 21:25:28 +01:00
|
|
|
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
|
2015-06-03 15:32:21 +02:00
|
|
|
ProjectExplorer::BuildStep *source) override;
|
2014-03-12 21:25:28 +01:00
|
|
|
ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent,
|
2015-06-03 15:32:21 +02:00
|
|
|
const QVariantMap &map) override;
|
2014-03-12 21:25:28 +01:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
virtual IosPresetBuildStep *createPresetStep(ProjectExplorer::BuildStepList *parent,
|
|
|
|
|
const Core::Id id) const = 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class IosDsymBuildStep : public IosPresetBuildStep
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
friend class IosDsymBuildStepFactory;
|
|
|
|
|
protected:
|
2015-06-03 15:32:21 +02:00
|
|
|
QStringList defaultCleanCmdList() const override;
|
|
|
|
|
QStringList defaultCmdList() const override;
|
2014-07-01 11:08:26 +02:00
|
|
|
IosDsymBuildStep(ProjectExplorer::BuildStepList *parent, Core::Id id);
|
2014-03-12 21:25:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class IosDsymBuildStepFactory : public IosPresetBuildStepFactory
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2016-05-18 12:37:29 +02:00
|
|
|
QList<ProjectExplorer::BuildStepInfo>
|
|
|
|
|
availableSteps(ProjectExplorer::BuildStepList *parent) const override;
|
|
|
|
|
|
2014-03-12 21:25:28 +01:00
|
|
|
IosPresetBuildStep *createPresetStep(ProjectExplorer::BuildStepList *parent,
|
2015-06-03 15:32:21 +02:00
|
|
|
const Core::Id id) const override;
|
2014-03-12 21:25:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Ios
|