Re: [Qbs] Need help with setting up a code generator

2017-12-14 Thread Ola Røer Thorsen
2017-12-13 17:36 GMT+01:00 Christian Kandeler : > > That happens automatically if the product has a dependency on the Qt.core > module. > Note: The correct file tag for headers is "hpp" (not "h", as I wrote in my > first reply.) > > Yes using "hpp" fixed it, thanks :-)

Re: [Qbs] Need help with setting up a code generator

2017-12-13 Thread Christian Kandeler
On Wed, 13 Dec 2017 16:16:41 +0100 Ola Røer Thorsen wrote: > Now I've got a new problem related to the code generated library. I've set > up a second version of the library (new templates, basically), where the > code generated is using Qt. So there are a few QObject-based

Re: [Qbs] Need help with setting up a code generator

2017-12-13 Thread Ola Røer Thorsen
Now I've got a new problem related to the code generated library. I've set up a second version of the library (new templates, basically), where the code generated is using Qt. So there are a few QObject-based classes etc. My Rule item that produces the files are setting the fileTags "h" for the

Re: [Qbs] Need help with setting up a code generator

2017-12-13 Thread Ola Røer Thorsen
Hi Christian, thanks a lot for all your input. The build is very efficient now. The final solution was a partial "dry run" of the generator tool to help create the list of artifacts, and the usual full run in the "prepare" script. Now that this is working we'll start migrating from qmake to qbs

Re: [Qbs] Need help with setting up a code generator

2017-12-12 Thread Christian Kandeler
On Tue, 12 Dec 2017 14:20:01 +0100 Ola Røer Thorsen wrote: > To run the command inside the outputArtifacts script, I'll use the Process > object, right? Yes. > What is the exact condition for when this script is run? Is it only > whenever any of the inputs are modified (or

Re: [Qbs] Need help with setting up a code generator

2017-12-12 Thread Ola Røer Thorsen
> > > > Does this mean I need to know the exact list of files the code generator > > outputs before it is run? Normally I'd only know that after having run > the > > code generator and look into it's output directory. > > Then you'll have to run the tool in the outputArtifacts script already. >

Re: [Qbs] Need help with setting up a code generator

2017-12-12 Thread Christian Kandeler
On Tue, 12 Dec 2017 10:30:18 +0100 Ola Røer Thorsen wrote: > Is there some way to debug-print the contents of these groups as I go along > writing the qbs file? You could use the status command. Or, if you are using Qt Creator, they are simply listed in the project tree.

Re: [Qbs] Need help with setting up a code generator

2017-12-12 Thread Ola Røer Thorsen
Thanks a lot for the help, Christian! 2017-12-11 13:27 GMT+01:00 Christian Kandeler : > Group { > name: "header inputs" > files: ["dir1/*.h"] > fileTags: ["generator.in.headers"] > } > Group { > name: "template inputs" >

Re: [Qbs] Need help with setting up a code generator

2017-12-11 Thread Christian Kandeler
On Mon, 11 Dec 2017 12:38:03 +0100 Ola Røer Thorsen wrote: > The code generator (a commandline tool) takes a set of C header files (.h) > in a given directory, and another set of template files (names matching > .tpl, .h and .cpp) in another directory. StaticLibrary {

[Qbs] Need help with setting up a code generator

2017-12-11 Thread Ola Røer Thorsen
Hi all, I've got a code generator tool that I'm trying to include in a qbs project. Currently it's been used in a project using qmake, but I'd like to move on to qbs. The code generator (a commandline tool) takes a set of C header files (.h) in a given directory, and another set of template