2013-09-12 18:46:35 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 Tim Sander <tim@krieglstein.org>
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2013-09-12 18:46:35 +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-09-12 18:46:35 +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-09-12 18:46:35 +02:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
2018-03-20 17:00:19 +01:00
|
|
|
#include "baremetalconstants.h"
|
2019-05-08 13:49:19 +03:00
|
|
|
#include "baremetalrunconfiguration.h"
|
2013-09-12 18:46:35 +02:00
|
|
|
|
2019-11-15 15:44:45 +01:00
|
|
|
#include <projectexplorer/buildsystem.h>
|
2013-09-12 18:46:35 +02:00
|
|
|
#include <projectexplorer/buildtargetinfo.h>
|
|
|
|
|
#include <projectexplorer/project.h>
|
2015-12-15 17:05:51 +01:00
|
|
|
#include <projectexplorer/runconfigurationaspects.h>
|
2013-09-12 18:46:35 +02:00
|
|
|
#include <projectexplorer/target.h>
|
|
|
|
|
|
|
|
|
|
using namespace ProjectExplorer;
|
|
|
|
|
using namespace Utils;
|
|
|
|
|
|
|
|
|
|
namespace BareMetal {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2018-03-20 17:00:19 +01:00
|
|
|
// BareMetalRunConfiguration
|
|
|
|
|
|
2018-04-25 10:26:08 +02:00
|
|
|
BareMetalRunConfiguration::BareMetalRunConfiguration(Target *target, Core::Id id)
|
|
|
|
|
: RunConfiguration(target, id)
|
2013-09-12 18:46:35 +02:00
|
|
|
{
|
2019-05-08 13:49:19 +03:00
|
|
|
const auto exeAspect = addAspect<ExecutableAspect>();
|
2018-04-26 12:16:47 +02:00
|
|
|
exeAspect->setDisplayStyle(BaseStringAspect::LabelDisplay);
|
|
|
|
|
exeAspect->setPlaceHolderText(tr("Unknown"));
|
|
|
|
|
|
2018-09-04 10:36:44 +02:00
|
|
|
addAspect<ArgumentsAspect>();
|
|
|
|
|
addAspect<WorkingDirectoryAspect>();
|
2018-03-21 12:48:43 +01:00
|
|
|
|
2019-11-25 17:04:16 +01:00
|
|
|
setUpdater([this, exeAspect] {
|
|
|
|
|
const BuildTargetInfo bti = buildTargetInfo();
|
|
|
|
|
exeAspect->setExecutable(bti.targetFilePath);
|
|
|
|
|
});
|
2013-09-12 18:46:35 +02:00
|
|
|
|
2019-11-25 17:04:16 +01:00
|
|
|
connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
|
2013-09-12 18:46:35 +02:00
|
|
|
}
|
|
|
|
|
|
2018-03-20 17:00:19 +01:00
|
|
|
// BareMetalRunConfigurationFactory
|
|
|
|
|
|
|
|
|
|
BareMetalRunConfigurationFactory::BareMetalRunConfigurationFactory()
|
|
|
|
|
{
|
2019-12-11 13:49:29 +01:00
|
|
|
registerRunConfiguration<BareMetalRunConfiguration>("BareMetalCustom");
|
2018-03-20 17:00:19 +01:00
|
|
|
setDecorateDisplayNames(true);
|
|
|
|
|
addSupportedTargetDeviceType(BareMetal::Constants::BareMetalOsType);
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-19 19:14:56 +02:00
|
|
|
} // namespace Internal
|
2013-09-12 18:46:35 +02:00
|
|
|
} // namespace BareMetal
|
|
|
|
|
|