forked from qt-creator/qt-creator
Clean up projects wizards and support for Qbs+CMake+qmake to all
Task-number: QTCREATORBUG-17308 Change-Id: I5d320a52f2cc5c0adbaf513985e4be0d75219a7d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
project(%{ProjectName})
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
find_package(Qt5Core)
|
||||
|
||||
add_executable(${PROJECT_NAME} "%{CppFileName}")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} Qt5::Core)
|
@@ -9,7 +9,7 @@ CONFIG -= app_bundle
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
SOURCES += %{MainCppName}
|
||||
SOURCES += %{CppFileName}
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any feature of Qt which as been marked deprecated (the exact warnings
|
@@ -0,0 +1,32 @@
|
||||
import qbs
|
||||
|
||||
Project {
|
||||
minimumQbsVersion: "1.7.1"
|
||||
|
||||
CppApplication {
|
||||
Depends { name: "Qt.core" }
|
||||
|
||||
cpp.cxxLanguageVersion: "c++11"
|
||||
|
||||
cpp.defines: [
|
||||
// The following define makes your compiler emit warnings if you use
|
||||
// any feature of Qt which as been marked deprecated (the exact warnings
|
||||
// depend on your compiler). Please consult the documentation of the
|
||||
// deprecated API in order to know how to port your code away from it.
|
||||
"QT_DEPRECATED_WARNINGS",
|
||||
|
||||
// You can also make your code fail to compile if you use deprecated APIs.
|
||||
// In order to do so, uncomment the following line.
|
||||
// You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
//"QT_DISABLE_DEPRECATED_BEFORE=0x060000" // disables all the APIs deprecated before Qt 6.0.0
|
||||
]
|
||||
|
||||
consoleApplication: true
|
||||
files: "%{CppFileName}"
|
||||
|
||||
Group { // Properties for the produced executable
|
||||
fileTagsFilter: product.type
|
||||
qbs.install: true
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"version": 1,
|
||||
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
|
||||
"id": "E.QtCore",
|
||||
"category": "F.Application",
|
||||
"trDescription": "Creates a project containing a single main.cpp file with a stub implementation.\n\nPreselects a desktop Qt for building the application if available.",
|
||||
"trDisplayName": "Qt Console Application",
|
||||
"trDisplayCategory": "Application",
|
||||
"icon": "../../global/consoleapplication.png",
|
||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQt" ],
|
||||
"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')}" }
|
||||
],
|
||||
|
||||
"pages":
|
||||
[
|
||||
{
|
||||
"trDisplayName": "Project Location",
|
||||
"trShortTitle": "Location",
|
||||
"typeId": "Project",
|
||||
"data": { "trDescription": "This wizard creates a simple Qt-based console application." }
|
||||
},
|
||||
{
|
||||
"trDisplayName": "Define Build System",
|
||||
"trShortTitle": "Build System",
|
||||
"typeId": "Fields",
|
||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
||||
"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": "%{JS: ! %{IsSubproject}}",
|
||||
"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": ".gitignore",
|
||||
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@@ -13,8 +13,7 @@
|
||||
[
|
||||
{ "key": "ProjectFile", "value": "%{JS: '%{NimProjectFile}'}" },
|
||||
{ "key": "NimProjectFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'nimproject')}" },
|
||||
{ "key": "NimFileName", "value": "%{JS: 'main.nim'}" },
|
||||
{ "key": "IsTopLevelProject", "value": "%{JS: !'%{Exists:ProjectExplorer.Profile.Ids}'}" }
|
||||
{ "key": "NimFileName", "value": "%{JS: 'main.nim'}" }
|
||||
],
|
||||
|
||||
"pages":
|
||||
@@ -28,7 +27,7 @@
|
||||
"trDisplayName": "Kit Selection",
|
||||
"trShortTitle": "Kits",
|
||||
"typeId": "Kits",
|
||||
"enabled": "%{IsTopLevelProject}",
|
||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
||||
"data": { "projectFilePath": "%{ProjectFile}" }
|
||||
},
|
||||
{
|
||||
|
@@ -1,11 +1,15 @@
|
||||
import qbs
|
||||
|
||||
CppApplication {
|
||||
consoleApplication: true
|
||||
files: "%{CFileName}"
|
||||
Project {
|
||||
minimumQbsVersion: "1.7.1"
|
||||
|
||||
Group { // Properties for the produced executable
|
||||
fileTagsFilter: product.type
|
||||
qbs.install: true
|
||||
CppApplication {
|
||||
consoleApplication: true
|
||||
files: "%{CFileName}"
|
||||
|
||||
Group { // Properties for the produced executable
|
||||
fileTagsFilter: product.type
|
||||
qbs.install: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main()
|
||||
{
|
||||
printf("Hello World!\\n");
|
||||
return 0;
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
|
||||
"id": "A.Plain C Application",
|
||||
"category": "I.Projects",
|
||||
"trDescription": "Creates a simple C application using either qmake, CMake, or Qbs to build.",
|
||||
"trDescription": "Creates a simple C application with no dependencies.",
|
||||
"trDisplayName": "Plain C Application",
|
||||
"trDisplayCategory": "Non-Qt Project",
|
||||
"icon": "../../global/consoleapplication.png",
|
||||
@@ -15,8 +15,7 @@
|
||||
{ "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": "CFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-csrc')}" },
|
||||
{ "key": "IsTopLevelProject", "value": "%{JS: !'%{Exists:ProjectExplorer.Profile.Ids}'}" }
|
||||
{ "key": "CFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-csrc')}" }
|
||||
],
|
||||
|
||||
"pages":
|
||||
@@ -30,6 +29,7 @@
|
||||
"trDisplayName": "Define Build System",
|
||||
"trShortTitle": "Build System",
|
||||
"typeId": "Fields",
|
||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
||||
"data":
|
||||
[
|
||||
{
|
||||
@@ -61,12 +61,11 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"trDisplayName": "Kit Selection",
|
||||
"trShortTitle": "Kits",
|
||||
"typeId": "Kits",
|
||||
"enabled": "%{IsTopLevelProject}",
|
||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
||||
"data": { "projectFilePath": "%{ProjectFile}" }
|
||||
},
|
||||
{
|
||||
@@ -105,7 +104,7 @@
|
||||
},
|
||||
{
|
||||
"source": "../git.ignore",
|
||||
"target": "%{ProjectDirectory}/.gitignore",
|
||||
"target": ".gitignore",
|
||||
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
||||
}
|
||||
]
|
||||
|
@@ -1,11 +1,15 @@
|
||||
import qbs
|
||||
|
||||
CppApplication {
|
||||
consoleApplication: true
|
||||
files: "%{CppFileName}"
|
||||
Project {
|
||||
minimumQbsVersion: "1.7.1"
|
||||
|
||||
Group { // Properties for the produced executable
|
||||
fileTagsFilter: product.type
|
||||
qbs.install: true
|
||||
CppApplication {
|
||||
consoleApplication: true
|
||||
files: "%{CppFileName}"
|
||||
|
||||
Group { // Properties for the produced executable
|
||||
fileTagsFilter: product.type
|
||||
qbs.install: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main()
|
||||
{
|
||||
cout << "Hello World!" << endl;
|
||||
return 0;
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
|
||||
"id": "R.Plain Cpp Application",
|
||||
"category": "I.Projects",
|
||||
"trDescription": "Creates a simple C++ application using either qmake, CMake, or Qbs to build.",
|
||||
"trDescription": "Creates a simple C++ application with no dependencies.",
|
||||
"trDisplayName": "Plain C++ Application",
|
||||
"trDisplayCategory": "Non-Qt Project",
|
||||
"icon": "../../global/consoleapplication.png",
|
||||
@@ -15,8 +15,7 @@
|
||||
{ "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}'}" }
|
||||
{ "key": "CppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" }
|
||||
],
|
||||
|
||||
"pages":
|
||||
@@ -30,6 +29,7 @@
|
||||
"trDisplayName": "Define Build System",
|
||||
"trShortTitle": "Build System",
|
||||
"typeId": "Fields",
|
||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
||||
"data":
|
||||
[
|
||||
{
|
||||
@@ -61,12 +61,11 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"trDisplayName": "Kit Selection",
|
||||
"trShortTitle": "Kits",
|
||||
"typeId": "Kits",
|
||||
"enabled": "%{IsTopLevelProject}",
|
||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
||||
"data": { "projectFilePath": "%{ProjectFile}" }
|
||||
},
|
||||
{
|
||||
@@ -105,7 +104,7 @@
|
||||
},
|
||||
{
|
||||
"source": "../git.ignore",
|
||||
"target": "%{ProjectDirectory}/.gitignore",
|
||||
"target": ".gitignore",
|
||||
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
||||
}
|
||||
]
|
||||
|
@@ -1,65 +0,0 @@
|
||||
{
|
||||
"version": 1,
|
||||
"supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ],
|
||||
"id": "E.QtCore",
|
||||
"category": "F.Application",
|
||||
"trDescription": "Creates a project containing a single main.cpp file with a stub implementation.\n\nPreselects a desktop Qt for building the application if available.",
|
||||
"trDisplayName": "Qt Console Application",
|
||||
"trDisplayCategory": "Application",
|
||||
"icon": "../../../global/consoleapplication.png",
|
||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQt" ],
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}",
|
||||
|
||||
"options":
|
||||
[
|
||||
{ "key": "ProFileName", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
||||
{ "key": "IsTopLevelProject", "value": "%{JS: !'%{Exists:ProjectExplorer.Profile.Ids}' }" },
|
||||
{ "key": "MainCppName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src') }" }
|
||||
],
|
||||
|
||||
"pages":
|
||||
[
|
||||
{
|
||||
"trDisplayName": "Project Location",
|
||||
"trShortTitle": "Location",
|
||||
"typeId": "Project",
|
||||
"data": { "trDescription": "This wizard creates a simple Qt-based console application." }
|
||||
},
|
||||
{
|
||||
"trDisplayName": "Kit Selection",
|
||||
"trShortTitle": "Kits",
|
||||
"typeId": "Kits",
|
||||
"enabled": "%{IsTopLevelProject}",
|
||||
"data": { "projectFilePath": "%{ProFileName}" }
|
||||
},
|
||||
{
|
||||
"trDisplayName": "Project Management",
|
||||
"trShortTitle": "Summary",
|
||||
"typeId": "Summary"
|
||||
}
|
||||
],
|
||||
"generators":
|
||||
[
|
||||
{
|
||||
"typeId": "File",
|
||||
"data":
|
||||
[
|
||||
{
|
||||
"source": "file.pro",
|
||||
"target": "%{ProFileName}",
|
||||
"openAsProject": true
|
||||
},
|
||||
{
|
||||
"source": "main.cpp",
|
||||
"target": "%{MainCppName}",
|
||||
"openInEditor": true
|
||||
},
|
||||
{
|
||||
"source": "../../git.ignore",
|
||||
"target": ".gitignore",
|
||||
"condition": "%{JS: ( %{IsTopLevelProject} && '%{VersionControl}' === 'G.Git' )}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 543 B |
@@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
project(%{ProjectName} LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
find_package(Qt5 COMPONENTS Core Quick REQUIRED)
|
||||
|
||||
add_executable(${PROJECT_NAME} "%{MainCppFileName}" "qml.qrc")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Quick)
|
@@ -4,7 +4,7 @@ QT += qml quick
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
SOURCES += main.cpp
|
||||
SOURCES += %{MainCppFileName}
|
||||
|
||||
RESOURCES += qml.qrc
|
||||
|
@@ -0,0 +1,38 @@
|
||||
import qbs
|
||||
|
||||
Project {
|
||||
minimumQbsVersion: "1.7.1"
|
||||
|
||||
CppApplication {
|
||||
Depends { name: "Qt.core" }
|
||||
Depends { name: "Qt.quick" }
|
||||
|
||||
// Additional import path used to resolve QML modules in Qt Creator's code model
|
||||
property pathList qmlImportPaths: []
|
||||
|
||||
cpp.cxxLanguageVersion: "c++11"
|
||||
|
||||
cpp.defines: [
|
||||
// The following define makes your compiler emit warnings if you use
|
||||
// any feature of Qt which as been marked deprecated (the exact warnings
|
||||
// depend on your compiler). Please consult the documentation of the
|
||||
// deprecated API in order to know how to port your code away from it.
|
||||
"QT_DEPRECATED_WARNINGS",
|
||||
|
||||
// You can also make your code fail to compile if you use deprecated APIs.
|
||||
// In order to do so, uncomment the following line.
|
||||
// You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
//"QT_DISABLE_DEPRECATED_BEFORE=0x060000" // disables all the APIs deprecated before Qt 6.0.0
|
||||
]
|
||||
|
||||
files: [
|
||||
"%{MainCppFileName}",
|
||||
"qml.qrc",
|
||||
]
|
||||
|
||||
Group { // Properties for the produced executable
|
||||
fileTagsFilter: product.type
|
||||
qbs.install: true
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 1,
|
||||
"supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ],
|
||||
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
|
||||
"id": "W.QtCanvas3dApplication",
|
||||
"category": "F.Application",
|
||||
"trDescription": "Creates a Qt Canvas 3D QML project. Optionally including three.js.",
|
||||
@@ -8,11 +8,14 @@
|
||||
"trDisplayCategory": "Application",
|
||||
"icon": "3dapplication.png",
|
||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQtCanvas3d1.1" ],
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}",
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}",
|
||||
|
||||
"options":
|
||||
[
|
||||
{ "key": "ProFileName", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
||||
{ "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": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
||||
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.qtQuickVersion}" },
|
||||
{ "key": "QtQuickWindowVersion", "value": "%{JS: %{QtVersion}.qtQuickWindowVersion}" }
|
||||
@@ -25,6 +28,42 @@
|
||||
"trShortTitle": "Location",
|
||||
"typeId": "Project"
|
||||
},
|
||||
{
|
||||
"trDisplayName": "Define Build System",
|
||||
"trShortTitle": "Build System",
|
||||
"typeId": "Fields",
|
||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
||||
"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": "Define Project Details",
|
||||
"trShortTitle": "Details",
|
||||
@@ -46,7 +85,8 @@
|
||||
"trDisplayName": "Kit Selection",
|
||||
"trShortTitle": "Kits",
|
||||
"typeId": "Kits",
|
||||
"data": { "projectFilePath": "%{ProFileName}" }
|
||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
||||
"data": { "projectFilePath": "%{ProjectFile}" }
|
||||
},
|
||||
{
|
||||
"trDisplayName": "Project Management",
|
||||
@@ -62,8 +102,20 @@
|
||||
[
|
||||
{
|
||||
"source": "app.pro",
|
||||
"target": "%{ProFileName}",
|
||||
"openAsProject": true
|
||||
"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",
|
@@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
project(%{ProjectName} LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
find_package(Qt5 COMPONENTS Core Quick REQUIRED)
|
||||
|
||||
add_executable(${PROJECT_NAME} "%{MainCppFileName}" "qml.qrc")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Quick)
|
@@ -0,0 +1,38 @@
|
||||
import qbs
|
||||
|
||||
Project {
|
||||
minimumQbsVersion: "1.7.1"
|
||||
|
||||
CppApplication {
|
||||
Depends { name: "Qt.core" }
|
||||
Depends { name: "Qt.quick" }
|
||||
|
||||
// Additional import path used to resolve QML modules in Qt Creator's code model
|
||||
property pathList qmlImportPaths: []
|
||||
|
||||
cpp.cxxLanguageVersion: "c++11"
|
||||
|
||||
cpp.defines: [
|
||||
// The following define makes your compiler emit warnings if you use
|
||||
// any feature of Qt which as been marked deprecated (the exact warnings
|
||||
// depend on your compiler). Please consult the documentation of the
|
||||
// deprecated API in order to know how to port your code away from it.
|
||||
"QT_DEPRECATED_WARNINGS",
|
||||
|
||||
// You can also make your code fail to compile if you use deprecated APIs.
|
||||
// In order to do so, uncomment the following line.
|
||||
// You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
//"QT_DISABLE_DEPRECATED_BEFORE=0x060000" // disables all the APIs deprecated before Qt 6.0.0
|
||||
]
|
||||
|
||||
files: [
|
||||
"%{MainCppFileName}",
|
||||
"qml.qrc",
|
||||
]
|
||||
|
||||
Group { // Properties for the produced executable
|
||||
fileTagsFilter: product.type
|
||||
qbs.install: true
|
||||
}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 586 B |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 1,
|
||||
"supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ],
|
||||
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
|
||||
"id": "U.QtQuickApplication",
|
||||
"category": "F.Application",
|
||||
"trDescription": "Creates a deployable Qt Quick 2 application.",
|
||||
@@ -8,11 +8,14 @@
|
||||
"trDisplayCategory": "Application",
|
||||
"icon": "qml_wizard.png",
|
||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.3" ],
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 }",
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}",
|
||||
|
||||
"options":
|
||||
[
|
||||
{ "key": "ProFileName", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
||||
{ "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": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
||||
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.qtQuickVersion}" },
|
||||
{ "key": "QtQuickWindowVersion", "value": "%{JS: %{QtVersion}.qtQuickWindowVersion}" },
|
||||
@@ -31,6 +34,42 @@
|
||||
"trShortTitle": "Location",
|
||||
"typeId": "Project"
|
||||
},
|
||||
{
|
||||
"trDisplayName": "Define Build System",
|
||||
"trShortTitle": "Build System",
|
||||
"typeId": "Fields",
|
||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
||||
"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": "Define Project Details",
|
||||
"trShortTitle": "Details",
|
||||
@@ -125,8 +164,9 @@
|
||||
"trDisplayName": "Kit Selection",
|
||||
"trShortTitle": "Kits",
|
||||
"typeId": "Kits",
|
||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
||||
"data": {
|
||||
"projectFilePath": "%{ProFileName}",
|
||||
"projectFilePath": "%{ProjectFile}",
|
||||
"requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
|
||||
}
|
||||
},
|
||||
@@ -144,8 +184,20 @@
|
||||
[
|
||||
{
|
||||
"source": "app.pro",
|
||||
"target": "%{ProFileName}",
|
||||
"openAsProject": true
|
||||
"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",
|
@@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
project(%{ProjectName} LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
find_package(Qt5 COMPONENTS Core Quick REQUIRED)
|
||||
|
||||
add_executable(${PROJECT_NAME} "%{MainCppFileName}" "qml.qrc")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Quick)
|
@@ -0,0 +1,38 @@
|
||||
import qbs
|
||||
|
||||
Project {
|
||||
minimumQbsVersion: "1.7.1"
|
||||
|
||||
CppApplication {
|
||||
Depends { name: "Qt.core" }
|
||||
Depends { name: "Qt.quick" }
|
||||
|
||||
// Additional import path used to resolve QML modules in Qt Creator's code model
|
||||
property pathList qmlImportPaths: []
|
||||
|
||||
cpp.cxxLanguageVersion: "c++11"
|
||||
|
||||
cpp.defines: [
|
||||
// The following define makes your compiler emit warnings if you use
|
||||
// any feature of Qt which as been marked deprecated (the exact warnings
|
||||
// depend on your compiler). Please consult the documentation of the
|
||||
// deprecated API in order to know how to port your code away from it.
|
||||
"QT_DEPRECATED_WARNINGS",
|
||||
|
||||
// You can also make your code fail to compile if you use deprecated APIs.
|
||||
// In order to do so, uncomment the following line.
|
||||
// You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
//"QT_DISABLE_DEPRECATED_BEFORE=0x060000" // disables all the APIs deprecated before Qt 6.0.0
|
||||
]
|
||||
|
||||
files: [
|
||||
"%{MainCppFileName}",
|
||||
"qml.qrc",
|
||||
]
|
||||
|
||||
Group { // Properties for the produced executable
|
||||
fileTagsFilter: product.type
|
||||
qbs.install: true
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 1,
|
||||
"supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ],
|
||||
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
|
||||
"id": "V.QtQuickControls2Application",
|
||||
"category": "F.Application",
|
||||
"trDescription": "Creates a deployable Qt Quick 2 application using Qt Quick Controls 2.<br/><br/><b>Note:</b> Qt Quick Controls 2 are available with Qt 5.7 and later.",
|
||||
@@ -8,11 +8,14 @@
|
||||
"trDisplayCategory": "Application",
|
||||
"icon": "../qtquickapplication/qml_wizard.png",
|
||||
"featuresRequired": [ "QtSupport.Wizards.FeatureQtQuick.Controls.2" ],
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}",
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('QbsProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0}",
|
||||
|
||||
"options":
|
||||
[
|
||||
{ "key": "ProFileName", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
|
||||
{ "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": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
||||
{ "key": "QtQuickVersion", "value": "2.7" },
|
||||
{ "key": "QtQuickControls2Version", "value": "2.0" },
|
||||
@@ -29,6 +32,42 @@
|
||||
"trShortTitle": "Location",
|
||||
"typeId": "Project"
|
||||
},
|
||||
{
|
||||
"trDisplayName": "Define Build System",
|
||||
"trShortTitle": "Build System",
|
||||
"typeId": "Fields",
|
||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
||||
"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": "Define Project Details",
|
||||
"trShortTitle": "Details",
|
||||
@@ -65,8 +104,8 @@
|
||||
"trDisplayName": "Kit Selection",
|
||||
"trShortTitle": "Kits",
|
||||
"typeId": "Kits",
|
||||
"enabled": "%{IsTopLevelProject}",
|
||||
"data": { "projectFilePath": "%{ProFileName}" }
|
||||
"enabled": "%{JS: ! %{IsSubproject}}",
|
||||
"data": { "projectFilePath": "%{ProjectFile}" }
|
||||
},
|
||||
{
|
||||
"trDisplayName": "Project Management",
|
||||
@@ -82,8 +121,20 @@
|
||||
[
|
||||
{
|
||||
"source": "app.pro",
|
||||
"target": "%{ProFileName}",
|
||||
"openAsProject": true
|
||||
"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",
|
||||
@@ -110,7 +161,7 @@
|
||||
},
|
||||
{
|
||||
"source": "../../git.ignore",
|
||||
"target": "%{ProjectDirectory}/.gitignore",
|
||||
"target": ".gitignore",
|
||||
"condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
|
||||
}
|
||||
]
|
Reference in New Issue
Block a user