1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
{
"version": 1,
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
"id": "A.Plain C Application",
"category": "I.Projects",
"trDescription": "Creates a simple C application with no dependencies.",
"trDisplayName": "Plain C Application",
"trDisplayCategory": "Non-Qt Project",
"icon": "../../global/consoleapplication.png",
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0 && ([ %{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": "CFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-csrc')}" }
],
"pages":
[
{
"trDisplayName": "Project Location",
"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": "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.c",
"target": "%{CFileName}",
"openInEditor": true
},
{
"source": "../git.ignore",
"target": ".gitignore",
"condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
}
]
}
]
}
|