diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-04-27 11:38:59 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-04-27 10:03:30 +0000 |
commit | 68039a9745105e1980c3ec9aa170b84e13940383 (patch) | |
tree | 408a132c9401455b69a0e81db89caa7152852c9b /src/lib/qtprofilesetup/templates | |
parent | 4dee140ea3570f6111751b0b58dfd9167f6c5394 (diff) |
Fix DBUS module on Windows.
The qdbusxml2cpp tool fails silently when the header file it should
create has an absolute path. So use just the file name and set the
working directory accordingly to appease this clever tool.
Change-Id: Ifae56341c41e22b90fd49fe33efe8430a8911ab8
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/lib/qtprofilesetup/templates')
-rw-r--r-- | src/lib/qtprofilesetup/templates/dbus.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/qtprofilesetup/templates/dbus.js b/src/lib/qtprofilesetup/templates/dbus.js index e2b0ff3ab..f4230393a 100644 --- a/src/lib/qtprofilesetup/templates/dbus.js +++ b/src/lib/qtprofilesetup/templates/dbus.js @@ -27,21 +27,26 @@ ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ + +var FileInfo = loadExtension("qbs.FileInfo"); + function createCommands(product, input, outputs, option) { var exe = ModUtils.moduleProperty(product, "binPath") + '/' + ModUtils.moduleProperty(product, "xml2cppName"); var hppOutput = outputs["hpp"][0]; var hppArgs = ModUtils.moduleProperty(product, "xml2CppHeaderFlags"); - hppArgs.push(option, hppOutput.filePath + ':', input.filePath); + hppArgs.push(option, hppOutput.fileName + ':', input.filePath); // Can't use filePath on Windows var hppCmd = new Command(exe, hppArgs) hppCmd.description = "qdbusxml2cpp " + input.fileName + " -> " + hppOutput.fileName; hppCmd.highlight = "codegen"; + hppCmd.workingDirectory = FileInfo.path(hppOutput.filePath); var cppOutput = outputs["cpp"][0]; var cppArgs = ModUtils.moduleProperty(product, "xml2CppSourceFlags"); - cppArgs.push("-i", hppOutput.filePath, option, ':' + cppOutput.filePath, input.filePath); + cppArgs.push("-i", hppOutput.filePath, option, ':' + cppOutput.fileName, input.filePath); var cppCmd = new Command(exe, cppArgs) cppCmd.description = "qdbusxml2cpp " + input.fileName + " -> " + cppOutput.fileName; cppCmd.highlight = "codegen"; + cppCmd.workingDirectory = FileInfo.path(hppOutput.filePath); return [hppCmd, cppCmd]; } |