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

Иван Комиссаров abbapoh at gmail.com
Tue Mar 2 10:00:41 CET 2021


Hello!. In the second variant - do you need 

    Group {
        fileTagsFilter: "application"
        fileTags: "trigrams-generator"
    }

? The product has that type already

I’d say both variants are OK and there’s no preference.

> 1 марта 2021 г., в 21:43, Карелин Павел <hkarel at yandex.ru> написал(а):
> 
> Colleagues, hello.
> 
> It's a bit of a pity that I didn't get an answer to the last question, but it's okay.  There is a working option, and it can be used. 
> Christian, Alberto, thanks for helping to solve my problem. 
> 
> --
> BR, Pavel
> 
> 
> 22.02.2021 19:07, Карелин Павел пишет:
>> Christian, I experimented a little, and got another variant.
>> 
>> Your variant (clarification: the generation of trigrams in binary form is performed by the parsetrigrams utility) :
>> 
>> Product {
>>     name: "ParseTrigrams"
>>     targetName: "parsetrigrams"
>>   
>>     type: ["application"]
>>     ...
>>     files: [
>>         "parsetrigrams.cpp"
>>     ]
>> 
>>     Group {
>>         fileTagsFilter: "application"
>>         fileTags: "trigrams-generator"
>>     }
>> }
>> 
>> Product {
>>     name: "QGit"
>>     targetName: "qgit"
>> 
>>     type: "application"
>> 
>>     Depends { name: "cpp" }
>>     Depends { name: "ParseTrigrams" }
>>     Depends { productTypes: ["trigrams-generator"] }
>>     Depends { name: "Qt"; submodules: ["core", "widgets"] }
>> 
>>     Group {
>>         fileTags: "trigrams"
>>         files: FileInfo.joinPaths(product.sourceDirectory, "spellcheck/sonnet/trigrams/*")
>>     }
>> 
>>     Group {
>>         fileTagsFilter: ["trigrams-map"]
>>         fileTags: ["qt.core.resource_data"]
>>     }
>>     Qt.core.resourceFileBaseName: "trigrams"
>>     Qt.core.resourcePrefix: "trigrams"
>> 
>>     Rule {
>>         id: idtrigrams
>>         inputs: ["trigrams"]
>>         explicitlyDependsOnFromDependencies: ["trigrams-generator"]
>> 
>>         Artifact {
>>             fileTags: ["trigrams-map"]
>>             filePath: FileInfo.joinPaths(project.buildDirectory, "trigrams", input.baseName + ".tmap")
>>         }
>>         prepare: {
>>             var runUtl = explicitlyDependsOn["trigrams-generator"][0].filePath
>>             var outputFile = FileInfo.joinPaths(project.buildDirectory, "trigrams", input.baseName + ".tmap");
>> 
>>             var cmd = new Command(runUtl, [input.filePath, outputFile]);
>>             cmd.description = "sonnet parse trigrams";
>>             cmd.highlight = "filegen";
>>             return cmd;
>>         }
>>     }
>> 
>>     files: [
>>         "qgit.cpp",
>>     ]
>> }
>> 
>> My variant:
>> 
>> Product {
>>     name: "ParseTrigrams"
>>     targetName: "parsetrigrams"
>> 
>>     type: ["application", "trigrams-generator"]
>>     ...
>>     files: [
>>         "parsetrigrams.cpp"
>>     ]
>>     Group {
>>         fileTagsFilter: "application"
>>         fileTags: "trigrams-generator"
>>     }
>> }
>> 
>> Product {
>>     name: "QGit"
>> 
>>     type: "application"
>> 
>>     Depends { name: "cpp" }
>>     Depends { productTypes: ["trigrams-generator"] }
>>     Depends { name: "Qt"; submodules: ["core", "widgets"] }
>> 
>>     Group {
>>         fileTags: "trigrams"
>>         files: FileInfo.joinPaths(product.sourceDirectory, "spellcheck/sonnet/trigrams/*")
>>     }
>> 
>>     Group {
>>         fileTagsFilter: ["trigrams-map"]
>>         fileTags: ["qt.core.resource_data"]
>>     }
>>     Qt.core.resourceFileBaseName: "trigrams"
>>     Qt.core.resourcePrefix: "trigrams"
>> 
>>     Rule {
>>         id: idtrigrams
>>         inputs: ["trigrams"]
>>         explicitlyDependsOnFromDependencies: ["trigrams-generator"]
>> 
>>         Artifact {
>>             fileTags: ["trigrams-map"]
>>             filePath: FileInfo.joinPaths(project.buildDirectory, "trigrams", input.baseName + ".tmap")
>>         }
>>         prepare: {
>>             var runUtl = explicitlyDependsOn["trigrams-generator"][0].filePath
>>             var outputFile = FileInfo.joinPaths(project.buildDirectory, "trigrams", input.baseName + ".tmap");
>> 
>>             var cmd = new Command(runUtl, [input.filePath, outputFile]);
>>             cmd.description = "sonnet parse trigrams";
>>             cmd.highlight = "filegen";
>>             return cmd;
>>         }
>>     }
>> 
>>     files: [
>>         "qgit.cpp",
>>     ]
>> }
>> 
>> The differences are as follows:
>> For ParseTrigrams:
>>     type: ["application"]
>> vs
>>     type: ["application", "trigrams-generator"]
>> 
>> For QGit:
>>     Depends { name: "ParseTrigrams" }
>>     Depends { productTypes: ["trigrams-generator"] }
>> vs
>>     Depends { productTypes: ["trigrams-generator"] }
>> 
>> 
>> I would like to know if there is a fundamental difference in these solutions, and which variant is preferable? 
>> 
>> --
>> BR, Pavel
>> 
>> 
>> 
>> 22.02.2021 13:00, Christian Kandeler пишет:
>>> On 2/19/21 5:43 PM, Карелин Павел wrote: 
>>>> Project QGit__micro is attached. 
>>>> The situation is reproduced
>>> 
>>> I've attached the corrected qbs files. 
>>> 
>>> 
>>> 
>>> Christian 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Qbs mailing list
>>> Qbs at qt-project.org <mailto:Qbs at qt-project.org>
>>> https://lists.qt-project.org/listinfo/qbs <https://lists.qt-project.org/listinfo/qbs>
>> 
>> 
>> 
>> _______________________________________________
>> Qbs mailing list
>> Qbs at qt-project.org <mailto:Qbs at qt-project.org>
>> https://lists.qt-project.org/listinfo/qbs <https://lists.qt-project.org/listinfo/qbs>
> 
> _______________________________________________
> 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/20210302/fe24690f/attachment-0001.html>


More information about the Qbs mailing list