aboutsummaryrefslogtreecommitdiffstats
path: root/src/qtcreatorplugin.pri
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2014-08-26 17:29:38 +0200
committerEike Ziller <eike.ziller@digia.com>2014-09-02 15:11:24 +0200
commitb5b6a46b4e17dde56ac4409bd6551eaaf297b375 (patch)
tree216df467b3df092bad019656329d299b44e51ee1 /src/qtcreatorplugin.pri
parent8dc9d67e898ecb9afa239fcba914ed178931901b (diff)
ExtensionSystem: Use Qt 5 plugin metadata instead of .pluginspec files
Change-Id: I2b2c704260c613985a4bda179658ec1f8879e70f Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/qtcreatorplugin.pri')
-rw-r--r--src/qtcreatorplugin.pri53
1 files changed, 15 insertions, 38 deletions
diff --git a/src/qtcreatorplugin.pri b/src/qtcreatorplugin.pri
index a1fd8253d9..11916659c6 100644
--- a/src/qtcreatorplugin.pri
+++ b/src/qtcreatorplugin.pri
@@ -14,8 +14,8 @@ plugin_recmds = $$QTC_PLUGIN_RECOMMENDS
include(../qtcreator.pri)
-# for substitution in the .pluginspec
-dependencyList = "<dependencyList>"
+# for substitution in the .json
+dependencyList =
for(dep, plugin_deps) {
dependencies_file =
for(dir, QTC_PLUGIN_DIRS) {
@@ -27,7 +27,7 @@ for(dep, plugin_deps) {
isEmpty(dependencies_file): \
error("Plugin dependency $$dep not found")
include($$dependencies_file)
- dependencyList += " <dependency name=\"$$QTC_PLUGIN_NAME\" version=\"$$QTCREATOR_VERSION\"/>"
+ dependencyList += " { \"Name\" : \"$$QTC_PLUGIN_NAME\", \"Version\" : \"$$QTCREATOR_VERSION\" }"
}
for(dep, plugin_recmds) {
dependencies_file =
@@ -40,10 +40,11 @@ for(dep, plugin_recmds) {
isEmpty(dependencies_file): \
error("Plugin dependency $$dep not found")
include($$dependencies_file)
- dependencyList += " <dependency name=\"$$QTC_PLUGIN_NAME\" version=\"$$QTCREATOR_VERSION\" type=\"optional\"/>"
+ dependencyList += " { \"Name\" : \"$$QTC_PLUGIN_NAME\", \"Version\" : \"$$QTCREATOR_VERSION\", \"Type\" : \"optional\" }"
}
-dependencyList += " </dependencyList>"
-dependencyList = $$join(dependencyList, $$escape_expand(\\n))
+dependencyList = $$join(dependencyList, ",$$escape_expand(\\n)")
+
+dependencyList = "\"Dependencies\" : [$$escape_expand(\\n)$$dependencyList$$escape_expand(\\n) ]"
# use gui precompiled header for plugins by default
isEmpty(PRECOMPILED_HEADER):PRECOMPILED_HEADER = $$PWD/shared/qtcreator_gui_pch.h
@@ -77,38 +78,16 @@ defineReplace(stripOutDir) {
return($$relative_path($$1, $$OUT_PWD))
}
-PLUGINSPEC = $$_PRO_FILE_PWD_/$${TARGET}.pluginspec
-PLUGINSPEC_IN = $${PLUGINSPEC}.in
-exists($$PLUGINSPEC_IN) {
- OTHER_FILES += $$PLUGINSPEC_IN
- QMAKE_SUBSTITUTES += $$PLUGINSPEC_IN
- PLUGINSPEC = $$OUT_PWD/$${TARGET}.pluginspec
- copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripOutDir}
+PLUGINJSON = $$_PRO_FILE_PWD_/$${TARGET}.json
+PLUGINJSON_IN = $${PLUGINJSON}.in
+exists($$PLUGINJSON_IN) {
+ OTHER_FILES += $$PLUGINJSON_IN
+ QMAKE_SUBSTITUTES += $$PLUGINJSON_IN
+ PLUGINJSON = $$OUT_PWD/$${TARGET}.json
} else {
# need to support that for external plugins
- OTHER_FILES += $$PLUGINSPEC
- copy2build.output = $$DESTDIR/${QMAKE_FUNC_FILE_IN_stripSrcDir}
+ OTHER_FILES += $$PLUGINJSON
}
-copy2build.input = PLUGINSPEC
-isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS
-copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
-copy2build.name = COPY ${QMAKE_FILE_IN}
-copy2build.CONFIG += no_link no_clean
-QMAKE_EXTRA_COMPILERS += copy2build
-
-# Create a Json file containing the plugin information required by
-# Qt 5's plugin system by running a XSLT sheet on the
-# pluginspec file before moc runs.
-XMLPATTERNS = $$targetPath($$[QT_INSTALL_BINS]/xmlpatterns)
-
-pluginspec2json.name = Create Qt 5 plugin json file
-pluginspec2json.input = PLUGINSPEC
-pluginspec2json.variable_out = GENERATED_FILES
-pluginspec2json.output = $${TARGET}.json
-pluginspec2json.commands = $$XMLPATTERNS -no-format -output $$pluginspec2json.output $$PWD/qtcreatorplugin2json.xsl $$PLUGINSPEC
-pluginspec2json.CONFIG += no_link
-moc_header.depends += $$pluginspec2json.output
-QMAKE_EXTRA_COMPILERS += pluginspec2json
osx: QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/PlugIns/
include(rpath.pri)
@@ -121,9 +100,7 @@ linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
!macx {
target.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator/plugins
- pluginspec.files += $${TARGET}.pluginspec
- pluginspec.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator/plugins
- INSTALLS += target pluginspec
+ INSTALLS += target
}
MIMETYPES = $$_PRO_FILE_PWD_/$${TARGET}.mimetypes.xml