Commit f9f8cd35 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

auto-generate <dependencyList> in .pluginspec files



Change-Id: I8bb9b4eb0ae5ed9b283da422be882603ae0e1b49
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent 740d177a
......@@ -29,6 +29,18 @@ Module {
cmd.ide_version_release = product.moduleProperty("pluginspec", "ide_version_release");
cmd.pluginspecreplacements = product.moduleProperty("pluginspec", "pluginspecreplacements");
cmd.plugin_depends = [];
var deps = product.dependencies;
for (var d in deps) {
var depdeps = deps[d].dependencies;
for (var dd in depdeps) {
if (depdeps[dd].name == 'pluginspec') {
cmd.plugin_depends.push(deps[d].name);
break;
}
}
}
cmd.plugin_recommends = product.pluginRecommends
cmd.sourceCode = function() {
var i;
......@@ -42,6 +54,15 @@ Module {
vars['IDE_VERSION_MAJOR'] = ide_version_major;
vars['IDE_VERSION_MINOR'] = ide_version_minor;
vars['IDE_VERSION_RELEASE'] = ide_version_release;
var deplist = ["<dependencyList>"];
for (i in plugin_depends) {
deplist.push(" <dependency name=\"" + plugin_depends[i] + "\" version=\"" + qtcreator_version + "\"/>");
}
for (i in plugin_recommends) {
deplist.push(" <dependency name=\"" + plugin_recommends[i] + "\" version=\"" + qtcreator_version + "\" type=\"optional\"/>");
}
deplist.push(" </dependencyList>");
vars['dependencyList'] = deplist.join("\n");
for (i in vars) {
all = all.replace(new RegExp('\\\$\\\$' + i + '(?!\w)', 'g'), vars[i]);
}
......
......@@ -6,6 +6,7 @@ Product {
type: ["dynamiclibrary", "pluginSpec"]
property string provider: 'QtProject'
property var pluginspecreplacements
property var pluginRecommends: []
targetName: {
// see PluginSpecPrivate::loadLibrary()
if (qbs.debugInformation) {
......
......@@ -13,10 +13,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<category>Code Analyzer</category>
<description>Code Analyzer Base Plugin</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"RemoteLinux\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"CppTools\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -13,10 +13,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<description>Support for deployment to and execution on Android Devices</description>
<category>Device Support</category>
<url>http://necessitas.kde.org</url>
<dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Debugger\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Qt4ProjectManager\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -13,10 +13,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<category>Build Systems</category>
<description>Autotools project integration.</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"QtSupport\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"CppTools\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -13,10 +13,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<category>Version Control</category>
<description>Bazaar integration.</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"VcsBase\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -13,8 +13,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<category>Qt Creator</category>
<description>Binary editor component.</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -13,9 +13,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<category>Qt Creator</category>
<description>Bookmarks in text editors.</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -13,10 +13,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<category>C++</category>
<description>Class View component.</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"CppTools\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -13,10 +13,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<category>Version Control</category>
<description>ClearCase integration.</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"VcsBase\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -13,11 +13,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<category>Build Systems</category>
<description>CMake support</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"CppTools\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"QtSupport\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Designer\" version=\"$$QTCREATOR_VERSION\" type=\"optional\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -14,6 +14,10 @@ QtcPlugin {
Depends { name: "TextEditor" }
Depends { name: "QtSupport" }
pluginRecommends: [
"Designer"
]
files: [
"CMakeProject.mimetypes.xml",
"cmakebuildconfiguration.cpp",
......
......@@ -4,3 +4,5 @@ QTC_PLUGIN_DEPENDS += \
cpptools \
texteditor \
qtsupport
QTC_PLUGIN_RECOMMENDS += \
designer
......@@ -12,8 +12,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license>
<description>Codepaster plugin for pushing/fetching diff from server</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -13,9 +13,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<category>C++</category>
<description>C/C++ editor component.</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"CppTools\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -13,10 +13,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<category>C++</category>
<description>Tools for analyzing C/C++ code.</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Locator\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Find\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -13,10 +13,5 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<category>Version Control</category>
<description>CVS integration.</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"VcsBase\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList>
$$dependencyList
</plugin>
......@@ -13,14 +13,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
<category>Qt Creator</category>
<description>Debugger integration.</description>
<url>http://www.qt-project.org</url>
<dependencyList>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Find\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"CppTools\" version=\"$$QTCREATOR_VERSION\"/>
<!-- Debugger plugin adds items to the editor\'s context menu -->
<dependency name=\"CppEditor\" version=\"$$QTCREATOR_VERSION\" type=\"optional\"/>
</dependencyList>
$$dependencyList
<argumentList>
<argument name=\"-debug\" parameter=\"pid\">Attach to local process</argument>
<argument name=\"-debug\" parameter=\"executable\">Start and debug executable</argument>
......
......@@ -25,6 +25,10 @@ QtcPlugin {
"../../shared/registryaccess"
])
pluginRecommends: [
"CppEditor"
]
Group {
condition: Defaults.testsEnabled(qbs)
qbs.install: true
......
......@@ -11,3 +11,5 @@ QTC_PLUGIN_DEPENDS += \
find \
projectexplorer \
texteditor
QTC_PLUGIN_RECOMMENDS += \
cppeditor
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment