Re: [Qbs] Build and run a AuxiliaryApplication before build a MainApplication

2021-02-19 Thread Карелин Павел

Project QGit__micro is attached.
The situation is reproduced


19.02.2021 19:20, Jochen Ulrich пишет:

I can create a micro-project that emulates this situation.

Yeah I think this would help. It might even help you understand what exactly 
triggers the issue and then it's easier to determine if this is a Qbs bug or a 
problem in your project.

Best
Jochen Ulrich


<>
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Build and run a AuxiliaryApplication before build a MainApplication

2021-02-19 Thread Jochen Ulrich
> I can create a micro-project that emulates this situation.

Yeah I think this would help. It might even help you understand what exactly 
triggers the issue and then it's easier to determine if this is a Qbs bug or a 
problem in your project.

Best
Jochen Ulrich
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Build and run a AuxiliaryApplication before build a MainApplication

2021-02-19 Thread Карелин Павел

Colleagues, developers of qbs, I still need help solving this problem.
The solution suggested by Alberto looks clear, but unfortunately it 
works with a 50/50 probability.
I would like to understand: an error in the proposed solution or it a 
bug of QBS?


The project itself is located here: https://github.com/hkarel/qgit.git
Branch: 3x-spellcheck
If you are uncomfortable working with this project, I can create a 
micro-project that emulates this situation.


--
BR, Pavel


11.02.2021 10:58, Карелин Павел пишет:

Hi, Alberto, colleagues

At first, your recipe with
  type: ["application", "trigrams-generator"]
and
  Depends { productTypes: ["trigrams-generator"] }
helped me, the project was built.

But then I found out that the assembly of the project depends on the 
order of declaring sections 'Depends'


This is how the project is build:
    Depends { name: "cpp" }
    Depends { productTypes: ["trigrams-generator"] }
    Depends { name: "SharedLib" }
    Depends { name: "Yaml" }
    Depends { name: "Qt"; submodules: ["core", "widgets"] }

But this is no longer:
    Depends { name: "cpp" }
    Depends { name: "SharedLib" }
    Depends { name: "Yaml" }
    Depends { productTypes: ["trigrams-generator"] }
    Depends { name: "Qt"; submodules: ["core", "widgets"] }

The presence of the 'explicitlyDependsOnFromDependencies' directive 
does not solve the problem.
I am attaching qbs-files of the project, so that can more accurately 
evaluate them.


The project itself is located here: https://github.com/hkarel/qgit.git
Branch: 3x-spellcheck
Commit: 50285c7aea2c8546cf95a531e645c18dd1e1ab8e

Remark: the utility for generating the trigram-file has been slightly 
redesigned.
Now instead of one map-file, a file is generated for each language. 
Accordingly, the QBS-rule has changed slightly.


--
Pavel


10.02.2021 17:54, Alberto Mardegan пишет:

Just got some more thoughts:

On 10/02/21 11:48, Карелин Павел wrote:

--- parsetrigrams.qbs ---
import qbs
import qbs.FileInfo

Product {
     name: "SonnetParseTrigrams"
     targetName: "sonnet_parsetrigrams"
     condition: true

     type: "application"

You can add an additional type here, like

 type: ["application", "trigram-generator"]

And then:


--- qgit.qbs ---
import qbs
import qbs.FileInfo

Product {
     name: "QGit"
     targetName: "qgit"

     type: "application"
     destinationDirectory: "./bin"

     Depends { name: "cpp" }
     Depends { name: "SonnetParseTrigrams" }
     Depends { name: "Qt"; submodules: ["core", "widgets"] }

Here add

 Depends { productTypes: ["trigram-generator"] }

and in your Rule add

 explicitlyDependsOnFromDependencies: ["trigram-generator"]

I'm not 100% sure that the last one is needed, but it seems to make
sense :-)

Ciao,
   Alberto




___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs