forked from qt-creator/qt-creator
QbsProjectManager: Support the "plain C" and "plain C++" wizards.
Change-Id: Idcc8459660526f972949a6f6908acc19bd52a4f7 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
60fa56db8e
commit
824c6a5c56
@@ -0,0 +1,6 @@
|
|||||||
|
import qbs
|
||||||
|
|
||||||
|
CppApplication {
|
||||||
|
type: "application" // To suppress bundle generation on Mac
|
||||||
|
files: "main.c"
|
||||||
|
}
|
42
share/qtcreator/templates/wizards/plaincapp/qbs/wizard.xml
Normal file
42
share/qtcreator/templates/wizards/plaincapp/qbs/wizard.xml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
|
**
|
||||||
|
** 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
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
|
**
|
||||||
|
** GNU Lesser General Public License Usage
|
||||||
|
** 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.
|
||||||
|
**
|
||||||
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
-->
|
||||||
|
<wizard version="1" kind="project" firstpage="10" id="S.Plain C (Qbs)" category="I.Projects"
|
||||||
|
platformIndependent="true" featuresRequired="Qbs.QbsSupport">
|
||||||
|
<icon>../common/console.png</icon>
|
||||||
|
<description>Creates a plain C project using qbs.</description>
|
||||||
|
<displayname>Plain C Project (Qbs Build)</displayname>;
|
||||||
|
<displaycategory>Non-Qt Project</displaycategory>
|
||||||
|
<files>
|
||||||
|
<file source="../common/main.c" target="main.c" openeditor="true"/>
|
||||||
|
<file source="project.qbs" target="%ProjectName%.qbs" openproject="true"/>
|
||||||
|
</files>
|
||||||
|
</wizard>
|
@@ -0,0 +1,6 @@
|
|||||||
|
import qbs
|
||||||
|
|
||||||
|
CppApplication {
|
||||||
|
type: "application" // To suppress bundle generation on Mac
|
||||||
|
files: "main.cpp"
|
||||||
|
}
|
42
share/qtcreator/templates/wizards/plaincppapp/qbs/wizard.xml
Normal file
42
share/qtcreator/templates/wizards/plaincppapp/qbs/wizard.xml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
|
**
|
||||||
|
** 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
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
|
**
|
||||||
|
** GNU Lesser General Public License Usage
|
||||||
|
** 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.
|
||||||
|
**
|
||||||
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
-->
|
||||||
|
<wizard version="1" kind="project" firstpage="10" id="S.Plain C++ (Qbs)" category="I.Projects"
|
||||||
|
platformIndependent="true" featuresRequired="Qbs.QbsSupport">
|
||||||
|
<icon>../common/console.png</icon>
|
||||||
|
<description>Creates a plain (non-Qt) C++ project using qbs.</description>
|
||||||
|
<displayname>Plain C++ Project (Qbs Build)</displayname>;
|
||||||
|
<displaycategory>Non-Qt Project</displaycategory>
|
||||||
|
<files>
|
||||||
|
<file source="../common/main.cpp" target="main.cpp" openeditor="true"/>
|
||||||
|
<file source="project.qbs" target="%ProjectName%.qbs" openproject="true"/>
|
||||||
|
</files>
|
||||||
|
</wizard>
|
@@ -45,6 +45,7 @@
|
|||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
#include <coreplugin/editormanager/ieditor.h>
|
#include <coreplugin/editormanager/ieditor.h>
|
||||||
|
#include <coreplugin/featureprovider.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/fileiconprovider.h>
|
#include <coreplugin/fileiconprovider.h>
|
||||||
#include <projectexplorer/buildmanager.h>
|
#include <projectexplorer/buildmanager.h>
|
||||||
@@ -62,6 +63,17 @@
|
|||||||
namespace QbsProjectManager {
|
namespace QbsProjectManager {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
class QbsFeatureProvider : public Core::IFeatureProvider
|
||||||
|
{
|
||||||
|
Core::FeatureSet availableFeatures(const QString & /* platform */) const {
|
||||||
|
return Core::FeatureSet(Core::Id("Qbs.QbsSupport"));
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList availablePlatforms() const { return QStringList(); }
|
||||||
|
QString displayNameForPlatform(const QString & /* platform */) const { return QString(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
QbsProjectManagerPlugin::QbsProjectManagerPlugin() :
|
QbsProjectManagerPlugin::QbsProjectManagerPlugin() :
|
||||||
m_manager(0),
|
m_manager(0),
|
||||||
m_projectExplorer(0),
|
m_projectExplorer(0),
|
||||||
@@ -92,6 +104,7 @@ bool QbsProjectManagerPlugin::initialize(const QStringList &arguments, QString *
|
|||||||
addAutoReleasedObject(new QbsInstallStepFactory);
|
addAutoReleasedObject(new QbsInstallStepFactory);
|
||||||
addAutoReleasedObject(new QbsDeployConfigurationFactory);
|
addAutoReleasedObject(new QbsDeployConfigurationFactory);
|
||||||
addAutoReleasedObject(new QbsRunConfigurationFactory);
|
addAutoReleasedObject(new QbsRunConfigurationFactory);
|
||||||
|
addAutoReleasedObject(new QbsFeatureProvider);
|
||||||
|
|
||||||
//menus
|
//menus
|
||||||
// Build Menu:
|
// Build Menu:
|
||||||
|
Reference in New Issue
Block a user