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

Карелин Павел hkarel at yandex.ru
Fri Feb 19 16:45:04 CET 2021


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 at qt-project.org
> https://lists.qt-project.org/listinfo/qbs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20210219/5e6c1aa8/attachment.html>


More information about the Qbs mailing list