2009-02-25 09:15:00 +01:00
|
|
|
/**************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
2011-01-11 16:28:15 +01:00
|
|
|
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2009-06-17 00:01:27 +10:00
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** No Commercial Usage
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** This file contains pre-release code and may not be distributed.
|
|
|
|
|
** You may use this file in accordance with the terms and conditions
|
|
|
|
|
** contained in the Technology Preview License Agreement accompanying
|
|
|
|
|
** this package.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** GNU Lesser General Public License Usage
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** Alternatively, 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.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** 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.
|
|
|
|
|
**
|
|
|
|
|
** If you have questions regarding the use of this file, please contact
|
|
|
|
|
** Nokia at qt-info@nokia.com.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
**************************************************************************/
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#ifndef MAKESTEP_H
|
|
|
|
|
#define MAKESTEP_H
|
|
|
|
|
|
2009-12-09 13:54:46 +01:00
|
|
|
#include <projectexplorer/abstractprocessstep.h>
|
2010-03-17 17:45:33 +01:00
|
|
|
#include <projectexplorer/buildstep.h>
|
|
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class MakeStep;
|
|
|
|
|
}
|
|
|
|
|
QT_END_NAMESPACE
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2009-04-20 16:25:48 +02:00
|
|
|
namespace ProjectExplorer {
|
|
|
|
|
class BuildStep;
|
2010-08-12 12:18:11 +02:00
|
|
|
class GnuMakeParser;
|
2009-04-20 16:25:48 +02:00
|
|
|
class IBuildStepFactory;
|
|
|
|
|
class Project;
|
|
|
|
|
}
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
namespace Qt4ProjectManager {
|
2009-11-26 14:43:27 +01:00
|
|
|
class Qt4BuildConfiguration;
|
|
|
|
|
|
2010-12-06 13:29:18 +01:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2009-04-20 16:25:48 +02:00
|
|
|
class MakeStepFactory : public ProjectExplorer::IBuildStepFactory
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2010-01-14 17:41:29 +01:00
|
|
|
|
2009-04-20 16:25:48 +02:00
|
|
|
public:
|
2010-01-14 17:41:29 +01:00
|
|
|
explicit MakeStepFactory(QObject *parent = 0);
|
2009-04-20 16:25:48 +02:00
|
|
|
virtual ~MakeStepFactory();
|
2010-01-14 17:41:29 +01:00
|
|
|
|
2010-07-16 14:00:41 +02:00
|
|
|
bool canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const;
|
|
|
|
|
ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const QString &id);
|
|
|
|
|
bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const;
|
|
|
|
|
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source);
|
|
|
|
|
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
|
|
|
|
|
ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
|
|
|
|
|
|
|
|
|
|
QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
|
2010-01-07 18:17:24 +01:00
|
|
|
QString displayNameForId(const QString &id) const;
|
2009-04-20 16:25:48 +02:00
|
|
|
};
|
2009-11-26 14:43:27 +01:00
|
|
|
} //namespace Internal
|
2009-04-20 16:25:48 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
class Qt4Project;
|
|
|
|
|
|
2009-12-09 13:54:46 +01:00
|
|
|
class MakeStep : public ProjectExplorer::AbstractProcessStep
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2010-01-14 17:41:29 +01:00
|
|
|
friend class Internal::MakeStepFactory;
|
2009-10-15 19:06:51 +02:00
|
|
|
friend class MakeStepConfigWidget; // TODO remove this
|
2009-10-27 14:16:28 +01:00
|
|
|
// used to access internal stuff
|
2010-01-14 17:41:29 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
public:
|
2010-07-16 14:00:41 +02:00
|
|
|
explicit MakeStep(ProjectExplorer::BuildStepList *bsl);
|
2010-01-14 17:41:29 +01:00
|
|
|
virtual ~MakeStep();
|
2009-11-26 14:43:27 +01:00
|
|
|
|
2010-12-06 13:29:18 +01:00
|
|
|
Qt4BuildConfiguration *qt4BuildConfiguration() const;
|
2009-11-26 14:43:27 +01:00
|
|
|
|
2009-10-27 14:16:28 +01:00
|
|
|
virtual bool init();
|
2008-12-02 12:01:29 +01:00
|
|
|
virtual void run(QFutureInterface<bool> &);
|
2010-04-09 15:04:20 +02:00
|
|
|
bool processSucceeded(int exitCode, QProcess::ExitStatus status);
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
|
|
|
|
|
virtual bool immutable() const;
|
2010-10-19 11:14:03 +02:00
|
|
|
QString userArguments();
|
|
|
|
|
void setUserArguments(const QString &arguments);
|
2009-12-03 18:37:27 +01:00
|
|
|
void setClean(bool clean);
|
2011-03-14 14:39:02 +01:00
|
|
|
bool isClean() const;
|
2009-10-15 19:06:51 +02:00
|
|
|
|
2010-01-14 17:41:29 +01:00
|
|
|
QVariantMap toMap() const;
|
2009-10-15 19:06:51 +02:00
|
|
|
|
2009-07-24 18:53:54 +02:00
|
|
|
signals:
|
2009-11-30 19:30:51 +01:00
|
|
|
void userArgumentsChanged();
|
2010-01-14 17:41:29 +01:00
|
|
|
|
|
|
|
|
protected:
|
2010-07-16 14:00:41 +02:00
|
|
|
MakeStep(ProjectExplorer::BuildStepList *bsl, MakeStep *bs);
|
|
|
|
|
MakeStep(ProjectExplorer::BuildStepList *bsl, const QString &id);
|
2010-01-14 17:41:29 +01:00
|
|
|
virtual bool fromMap(const QVariantMap &map);
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
private:
|
2010-01-14 17:41:29 +01:00
|
|
|
void ctor();
|
2009-10-15 19:06:51 +02:00
|
|
|
bool m_clean;
|
2010-10-19 11:14:03 +02:00
|
|
|
QString m_userArgs;
|
2009-10-27 14:16:28 +01:00
|
|
|
QString m_makeCmd;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class MakeStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2010-03-17 17:45:33 +01:00
|
|
|
explicit MakeStepConfigWidget(MakeStep *makeStep);
|
|
|
|
|
virtual ~MakeStepConfigWidget();
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
QString displayName() const;
|
2009-10-27 14:16:28 +01:00
|
|
|
void init();
|
2009-08-06 15:31:32 +02:00
|
|
|
QString summaryText() const;
|
2008-12-02 12:01:29 +01:00
|
|
|
private slots:
|
2009-12-03 18:37:27 +01:00
|
|
|
// User changes to our widgets
|
|
|
|
|
void makeEdited();
|
|
|
|
|
void makeArgumentsLineEdited();
|
|
|
|
|
|
2009-08-12 17:02:28 +02:00
|
|
|
void updateMakeOverrideLabel();
|
2009-08-13 11:47:34 +02:00
|
|
|
void updateDetails();
|
2009-11-30 19:30:51 +01:00
|
|
|
void userArgumentsChanged();
|
2010-03-30 17:08:00 +02:00
|
|
|
void qtVersionChanged();
|
2008-12-02 12:01:29 +01:00
|
|
|
private:
|
2010-03-17 17:45:33 +01:00
|
|
|
Ui::MakeStep *m_ui;
|
2008-12-02 12:01:29 +01:00
|
|
|
MakeStep *m_makeStep;
|
2009-08-06 15:31:32 +02:00
|
|
|
QString m_summaryText;
|
2009-11-30 19:30:51 +01:00
|
|
|
bool m_ignoreChange;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // Qt4ProjectManager
|
|
|
|
|
|
|
|
|
|
#endif // MAKESTEP_H
|