forked from qt-creator/qt-creator
Qbs: Adapt to build system change
Change-Id: I4d3b9f765222b0f4ff3700e0f6a4640c3e9b9825 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
committed by
Christian Kandeler
parent
ace15a9e04
commit
920e4d5f23
@@ -38,13 +38,14 @@ Module {
|
|||||||
additionalProductTypes: ["qt_plugin_metadata"]
|
additionalProductTypes: ["qt_plugin_metadata"]
|
||||||
|
|
||||||
Rule {
|
Rule {
|
||||||
inputs: ["pluginJsonIn"]
|
inputs: ["pluginJsonIn", "pluginjson.license", "pluginjson.longDescription"]
|
||||||
|
multiplex: true
|
||||||
|
|
||||||
Artifact {
|
Artifact {
|
||||||
fileTags: ["qt_plugin_metadata"]
|
fileTags: ["qt_plugin_metadata"]
|
||||||
filePath: {
|
filePath: {
|
||||||
var destdir = FileInfo.joinPaths(product.moduleProperty("Qt.core",
|
var destdir = FileInfo.joinPaths(product.Qt.core.generatedHeadersDir,
|
||||||
"generatedHeadersDir"), input.fileName);
|
inputs.pluginJsonIn[0].fileName);
|
||||||
return destdir.replace(/\.[^\.]*$/,'')
|
return destdir.replace(/\.[^\.]*$/,'')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -71,7 +72,7 @@ Module {
|
|||||||
cmd.sourceCode = function() {
|
cmd.sourceCode = function() {
|
||||||
var i;
|
var i;
|
||||||
var vars = pluginJsonReplacements || {};
|
var vars = pluginJsonReplacements || {};
|
||||||
var inf = new TextFile(input.filePath);
|
var inf = new TextFile(inputs.pluginJsonIn[0].filePath);
|
||||||
var all = inf.readAll();
|
var all = inf.readAll();
|
||||||
// replace config vars
|
// replace config vars
|
||||||
var qtcVersion = product.moduleProperty("qtc", "qtcreator_version");
|
var qtcVersion = product.moduleProperty("qtc", "qtcreator_version");
|
||||||
@@ -97,6 +98,19 @@ Module {
|
|||||||
}
|
}
|
||||||
deplist = deplist.join(",\n")
|
deplist = deplist.join(",\n")
|
||||||
vars['IDE_PLUGIN_DEPENDENCIES'] = "\"Dependencies\" : [\n" + deplist + "\n ]";
|
vars['IDE_PLUGIN_DEPENDENCIES'] = "\"Dependencies\" : [\n" + deplist + "\n ]";
|
||||||
|
vars['LICENSE'] = '"No license"';
|
||||||
|
var licenseInputs = inputs["pluginjson.license"];
|
||||||
|
if (licenseInputs) {
|
||||||
|
var licFile = new TextFile(licenseInputs[0].filePath);
|
||||||
|
vars['LICENSE'] = JSON.stringify(licFile.readAll());
|
||||||
|
}
|
||||||
|
vars['LONG_DESCRIPTION'] = '""';
|
||||||
|
var longDescriptionInputs = inputs["pluginjson.longDescription"];
|
||||||
|
if (longDescriptionInputs) {
|
||||||
|
var longDescFile = new TextFile(longDescriptionInputs[0].filePath);
|
||||||
|
vars['LONG_DESCRIPTION'] = JSON.stringify(longDescFile.readAll());
|
||||||
|
}
|
||||||
|
|
||||||
for (i in vars) {
|
for (i in vars) {
|
||||||
all = all.replace(new RegExp('\\\$\\{' + i + '(?!\w)\\}', 'g'), vars[i]);
|
all = all.replace(new RegExp('\\\$\\{' + i + '(?!\w)\\}', 'g'), vars[i]);
|
||||||
}
|
}
|
||||||
|
@@ -99,6 +99,18 @@ QtcPlugin {
|
|||||||
"sdkmanageroutputparser.h"
|
"sdkmanageroutputparser.h"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Group {
|
||||||
|
name: "license"
|
||||||
|
files: "LICENSE.md"
|
||||||
|
fileTags: "pluginjson.license"
|
||||||
|
}
|
||||||
|
|
||||||
|
Group {
|
||||||
|
name: "long description"
|
||||||
|
files: "plugindescription.md"
|
||||||
|
fileTags: "pluginjson.longDescription"
|
||||||
|
}
|
||||||
|
|
||||||
QtcTestFiles {
|
QtcTestFiles {
|
||||||
files: [
|
files: [
|
||||||
"android_tst.qrc",
|
"android_tst.qrc",
|
||||||
|
Reference in New Issue
Block a user