[Qbs] qm-file build as internal resource

Карелин Павел hkarel at yandex.ru
Mon Dec 11 17:58:27 CET 2017


I'm build a third-party project. The peculiarity of the project is that 
qm-files are represented as internal resources.
Now I solved the problem with a terrible hack:
1) Created the 'Translations' product
Product {
     name: "Translations"
     type: "qm"
     destinationDirectory: project.sourceDirectory + "/translations"

     Depends { name: "Qt.core" }
     files: ["*.ts"]

2) The results of the work 'Translations' are located in the 
project.sourceDirectory + "/translations" directory
3) The main product made dependent on 'Translations'
Depends { name: "Translations" }

4) In the main product I cling the created qm-files through a qrc-resource
     Group {
         name: "translations"
         files: ["translations/translations.qrc"]

Is it possible to solve this task in another way?
qm-resources should be placed by the path ":translations/"

BR, Pavel Karelin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20171211/59f5e582/attachment.html>

More information about the Qbs mailing list