forked from qt-creator/qt-creator
Replace several "Plain C++" with one JSON wizard
Change-Id: Ia08f2127cdb25785cf313ec0a31a3d9775161c9b Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
committed by
Christian Stenger
parent
b0df9dc13b
commit
6b6091ea61
@@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing
|
||||
**
|
||||
** 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 The Qt Company. For licensing terms and
|
||||
** conditions see http://www.qt.io/terms-conditions. For further information
|
||||
** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
|
||||
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
||||
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
||||
** following information to ensure the GNU Lesser General Public License
|
||||
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, The Qt Company gives you certain additional
|
||||
** rights. These rights are described in The Qt Company 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++ (CMake)" category="I.Projects"
|
||||
platformIndependent="true" featuresRequired="Plugin.CMakeProjectManager">
|
||||
<icon>../common/console.png</icon>
|
||||
<description>Creates a plain C++ project using CMake, not using the Qt library.</description>
|
||||
<displayname>Plain C++ Project (CMake Build)</displayname>;
|
||||
<displaycategory>Non-Qt Project</displaycategory>
|
||||
<files>
|
||||
<file source="../common/main.cpp" target="main.%CppSourceSuffix%" openeditor="true"/>
|
||||
<file source="CMakeLists.txt" openproject="true"/>
|
||||
</files>
|
||||
</wizard>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 567 B |
@@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing
|
||||
**
|
||||
** 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 The Qt Company. For licensing terms and
|
||||
** conditions see http://www.qt.io/terms-conditions. For further information
|
||||
** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
|
||||
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
||||
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
||||
** following information to ensure the GNU Lesser General Public License
|
||||
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, The Qt Company gives you certain additional
|
||||
** rights. These rights are described in The Qt Company 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="Plugin.QbsProjectManager">
|
||||
<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.%CppSourceSuffix%" openeditor="true"/>
|
||||
<file source="project.qbs" target="%ProjectName%.qbs" openproject="true"/>
|
||||
</files>
|
||||
</wizard>
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Contact: http://www.qt.io/licensing
|
||||
**
|
||||
** 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 The Qt Company. For licensing terms and
|
||||
** conditions see http://www.qt.io/terms-conditions. For further information
|
||||
** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
|
||||
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
||||
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
||||
** following information to ensure the GNU Lesser General Public License
|
||||
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, The Qt Company gives you certain additional
|
||||
** rights. These rights are described in The Qt Company LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
Custom project wizard configuration example file. Note that by convention,
|
||||
the project file goes last.
|
||||
The "class" and "firstpage" attributes specify that it is a Qt 4 wizard and
|
||||
leave room for the Qt 4 target page.
|
||||
-->
|
||||
<wizard version="1" kind="project"
|
||||
class="qmakeproject" firstpage="10"
|
||||
id="R.Plain C++" category="I.Projects"
|
||||
featuresRequired="QtSupport.Wizards.FeatureQt">
|
||||
<icon>../common/console.png</icon>
|
||||
<description>Creates a plain C++ project using qmake, not using the Qt library.</description>
|
||||
<displayname>Plain C++ Project</displayname>;
|
||||
<displaycategory>Non-Qt Project</displaycategory>
|
||||
<files>
|
||||
<file source="../common/main.cpp" target="main.%CppSourceSuffix%" openeditor="true"/>
|
||||
<file source="project.pro" target="%ProjectName%.pro" openproject="true"/>
|
||||
</files>
|
||||
</wizard>
|
||||
@@ -1,4 +1,4 @@
|
||||
project(%ProjectName%)
|
||||
project(%{ProjectName})
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
aux_source_directory(. SRC_LIST)
|
||||
add_executable(${PROJECT_NAME} ${SRC_LIST})
|
||||
@@ -3,4 +3,4 @@ CONFIG += console c++11
|
||||
CONFIG -= app_bundle
|
||||
CONFIG -= qt
|
||||
|
||||
SOURCES += main.%CppSourceSuffix%
|
||||
SOURCES += %{CppFileName}
|
||||
@@ -3,7 +3,7 @@ import qbs
|
||||
CppApplication {
|
||||
type: "application" // To suppress bundle generation on Mac
|
||||
consoleApplication: true
|
||||
files: "main.%CppSourceSuffix%"
|
||||
files: "%{CppFileName}"
|
||||
|
||||
Group { // Properties for the produced executable
|
||||
fileTagsFilter: product.type
|
||||
@@ -1,3 +1,4 @@
|
||||
%{Cpp:LicenseTemplate}\
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
114
share/qtcreator/templates/wizards/projects/plaincpp/wizard.json
Normal file
114
share/qtcreator/templates/wizards/projects/plaincpp/wizard.json
Normal file
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"version": 1,
|
||||
"kind": "project",
|
||||
"id": "R.Plain Cpp Application",
|
||||
"category": "I.Projects",
|
||||
"trDescription": "Creates a simple C++ application using either qmake, CMake, or Qbs to build.",
|
||||
"trDisplayName": "Plain C++ Application",
|
||||
"trDisplayCategory": "Non-Qt Project",
|
||||
"icon": "../../global/consoleapplication.png",
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}",
|
||||
|
||||
"options":
|
||||
[
|
||||
{ "key": "ProjectFile", "value": "%{JS: '%{BuildSystem}' === 'qmake' ? '%{ProFile}' : ('%{BuildSystem}' === 'cmake' ? '%{CMakeFile}' : '%{QbsFile}')}" },
|
||||
{ "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
||||
{ "key": "QbsFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qbs')}" },
|
||||
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
||||
{ "key": "CppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
||||
{ "key": "IsTopLevelProject", "value": "%{JS: !'%{Exists:ProjectExplorer.Profile.Ids}'}" }
|
||||
],
|
||||
|
||||
"pages":
|
||||
[
|
||||
{
|
||||
"trDisplayName": "Project Location",
|
||||
"trShortTitle": "Location",
|
||||
"typeId": "Project"
|
||||
},
|
||||
{
|
||||
"trDisplayName": "Define Build System",
|
||||
"trShortTitle": "Build System",
|
||||
"typeId": "Fields",
|
||||
"data":
|
||||
[
|
||||
{
|
||||
"name": "BuildSystem",
|
||||
"trDisplayName": "Build system:",
|
||||
"type": "ComboBox",
|
||||
"data":
|
||||
{
|
||||
"index": 0,
|
||||
"items":
|
||||
[
|
||||
{
|
||||
"trKey": "qmake",
|
||||
"value": "qmake",
|
||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}"
|
||||
},
|
||||
{
|
||||
"trKey": "CMake",
|
||||
"value": "cmake",
|
||||
"condition": "%{JS: [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}"
|
||||
},
|
||||
{
|
||||
"trKey": "Qbs",
|
||||
"value": "qbs",
|
||||
"condition": "%{JS: [ %{Plugins} ].indexOf('QbsProjectManager') >= 0}"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"trDisplayName": "Kit Selection",
|
||||
"trShortTitle": "Kits",
|
||||
"typeId": "Kits",
|
||||
"enabled": "%{IsTopLevelProject}",
|
||||
"data": { "projectFilePath": "%{ProjectFile}" }
|
||||
},
|
||||
{
|
||||
"trDisplayName": "Project Management",
|
||||
"trShortTitle": "Summary",
|
||||
"typeId": "Summary"
|
||||
}
|
||||
],
|
||||
"generators":
|
||||
[
|
||||
{
|
||||
"typeId": "File",
|
||||
"data":
|
||||
[
|
||||
{
|
||||
"source": "file.pro",
|
||||
"target": "%{ProFile}",
|
||||
"openAsProject": true,
|
||||
"condition": "%{JS: '%{BuildSystem}' === 'qmake'}"
|
||||
},
|
||||
{
|
||||
"source": "CMakeLists.txt",
|
||||
"openAsProject": true,
|
||||
"condition": "%{JS: '%{BuildSystem}' === 'cmake'}"
|
||||
},
|
||||
{
|
||||
"source": "file.qbs",
|
||||
"target": "%{QbsFile}",
|
||||
"openAsProject": true,
|
||||
"condition": "%{JS: '%{BuildSystem}' === 'qbs'}"
|
||||
},
|
||||
{
|
||||
"source": "main.cpp",
|
||||
"target": "%{CppFileName}",
|
||||
"openInEditor": true
|
||||
},
|
||||
{
|
||||
"source": "../git.ignore",
|
||||
"target": "%{ProjectDirectory}/.gitignore",
|
||||
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user