Re: [Qbs] Understanding installation rules

2019-11-18 Thread Alberto Mardegan
On 19/11/19 00:27, Richard Weickelt wrote:
[...]
> Does it work with the change suggested above?

Yes. Wow. Thanks :-)

  Alberto

-- 
http://www.mardy.it - Geek in un lingua international
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Understanding installation rules

2019-11-18 Thread Richard Weickelt
> The reason why I added the "application" tag to the rule is that this
> seemed to force the execution of the rule, with otherwise wouldn't be
> considered.

This is semantically wrong because your rule does not produce an
"application" artifact. I'd suggest to add "desktopfile" to the
additionalProductTypes property of your module:

https://doc.qt.io/qbs/qml-qbslanguageitems-module.html#additionalProductTypes-prop

> I understand that QBS is not running the rule again, because both the
> application and the desktopfile are still available under the build
> directory. But why isn't the desktopfile copied to the installRoot
> again, along with the application?

Does it work with the change suggested above?
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


[Qbs] Understanding installation rules

2019-11-18 Thread Alberto Mardegan
Hi all!
  About a couple of weeks ago I posted a message to this list about a
module I've written to handle freedesktop.org desktop files. I thought
it was working really well, until I noticed the following problem: if I
manually delete the directory tree which I was as installRoot and I run
QBS again, the .desktop file is not copied over.

I paste here the relevant parts of the module (which you can see in its
entirety here: [1]):


===
FileTagger {
patterns: [ "*.desktop" ]
fileTags: [ "desktopfile_source" ]
}

Rule {
inputs: [ "desktopfile_source" ]
outputFileTags: [ "desktopfile", "application" ]
outputArtifacts: [
{
fileTags: [ "desktopfile" ],
filePath: input.fileName

}
]



prepare: {

...take the input .desktop file and add some keys,
then save it as output.filePath...
}
}

Group {
fileTagsFilter: [ "desktopfile" ]
qbs.install: true
qbs.installDir: "share/applications"
}
===

The reason why I added the "application" tag to the rule is that this
seemed to force the execution of the rule, with otherwise wouldn't be
considered.

I understand that QBS is not running the rule again, because both the
application and the desktopfile are still available under the build
directory. But why isn't the desktopfile copied to the installRoot
again, along with the application?

Any ideas of how to debug this?

Ciao,
  Alberto


[1]: https://gitlab.com/mardy/mappero/tree/master/qbs/modules/freedesktop

-- 
http://www.mardy.it - Geek in un lingua international
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs