Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
On 5/17/22 17:40, Карелин Павел wrote: In passing, one more question: the libmod.qbs file does not appear in the project tree in QtC. It does, in the last tree branch, "Qbs files". Note that in your attached project, qbssearchPaths is missing, so if that worked on your system, then the library might have been pulled in from somewhere else, such as a global search path. The qbsSearchPaths parameter is present. See file project.qbs Right, I saw only product.qbs. In my work projects, the "Qbs files" section is present. And in this mini-project, for some reason, it is not. So I decided to pay attention to this. It is for me. Have you perhaps checked "simplify tree" in the project tree settings? Christian ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
17.05.2022 17:36, Christian Kandeler пишет: On 5/15/22 19:27, Карелин Павел wrote: A new question has appeared: the list of libraries in the product can be changed. See "lib.libmod.dynamicLibraries" in the product.qbs, line 13. The adjusted list will not be included in the rule. It can be fixed? That's because you access the dynamicLibraries property via the module id, which is a file-scope thing. Don't ever use ids, except for Probes. Instead, access the property via the product variable: product.lib.modlib.dynamicLibraries. Yes, it turned out to use the refined dynamicLibraries list. Now it will be necessary to comprehend the whole decision. Christian, Jochen, thank! In passing, one more question: the libmod.qbs file does not appear in the project tree in QtC. It does, in the last tree branch, "Qbs files". Note that in your attached project, qbssearchPaths is missing, so if that worked on your system, then the library might have been pulled in from somewhere else, such as a global search path. The qbsSearchPaths parameter is present. See file project.qbs In my work projects, the "Qbs files" section is present. And in this mini-project, for some reason, it is not. So I decided to pay attention to this. -- Pavel Christian ___ 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
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
On 5/15/22 19:27, Карелин Павел wrote: A new question has appeared: the list of libraries in the product can be changed. See "lib.libmod.dynamicLibraries" in the product.qbs, line 13. The adjusted list will not be included in the rule. It can be fixed? That's because you access the dynamicLibraries property via the module id, which is a file-scope thing. Don't ever use ids, except for Probes. Instead, access the property via the product variable: product.lib.modlib.dynamicLibraries. In passing, one more question: the libmod.qbs file does not appear in the project tree in QtC. It does, in the last tree branch, "Qbs files". Note that in your attached project, qbssearchPaths is missing, so if that worked on your system, then the library might have been pulled in from somewhere else, such as a global search path. Christian ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
Made a minimum project (in attach). It turned out to start it. A new question has appeared: the list of libraries in the product can be changed. See "lib.libmod.dynamicLibraries" in the product.qbs, line 13. The adjusted list will not be included in the rule. It can be fixed? In passing, one more question: the libmod.qbs file does not appear in the project tree in QtC. Is it supposed to be like this? -- Pavel 13.05.2022 10:07, Christian Kandeler пишет: On 5/12/22 21:10, Карелин Павел wrote: John, thanks for the tip. Unfortunately, this was not enough, the rule is still not called. Looks like something else is needed... Christian, can I ask you for help on this issue? Try to distill the project into a minimal, self-contained example. Ideally, you'll find the problem while doing that. If not, please post the result here. Christian ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs QbsTest.tar.gz Description: application/gzip ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
On 5/12/22 21:10, Карелин Павел wrote: John, thanks for the tip. Unfortunately, this was not enough, the rule is still not called. Looks like something else is needed... Christian, can I ask you for help on this issue? Try to distill the project into a minimal, self-contained example. Ideally, you'll find the problem while doing that. If not, please post the result here. Christian ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
John, thanks for the tip. Unfortunately, this was not enough, the rule is still not called. Looks like something else is needed... Christian, can I ask you for help on this issue? -- Pavel 12.05.2022 12:07, Jochen Ulrich пишет: >> Did you remember to connect the "package-build-file" tag to your >> product type? Either by making this tag the product type or via a >> chain of rules. > I didn't do it, because I don't understand how to do it. So for example you could do this: ``` Product { name: "ToxPhone" type: [ /* maybe some other types here… */ "package-build-file" ] // … ``` This will cause your rule to be executed because the product “ToxPhone” requires it because it is of the type produced by your rule. See also https://qbs.io/docs/qml-qbslanguageitems-rule/#rules-and-product-types Best Jochen *Von: *Qbs im Auftrag von Карелин Павел *Datum: *Dienstag, 10. Mai 2022 um 18:27 *An: *qbs@qt-project.org *Betreff: *Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22 10.05.2022 17:49, Christian Kandeler пишет: > > On 5/10/22 15:02, Карелин Павел wrote: >> >> >> 05.05.2022 12:14, Christian Kandeler пишет: >>> On 5/5/22 11:00, Карелин Павел wrote: >>>> >>>> >>>> 05.05.2022 10:47, Christian Kandeler пишет: >>>>> On 5/4/22 18:18, Карелин Павел wrote: >>>>>> Christian, how would you solve my problem? >>>>>> After the project is built, the deb-package is assembled. To >>>>>> build the deb-package, you need a list of dependent libraries >>>>>> (not all, only parts, system dependencies no required). For >>>>>> example this list: >>>>>> >>>>>> /opt/ffmpeg/4.4/lib/libavutil.so* >>>>>> /opt/ffmpeg/4.4/lib/libswscale.so* >>>>>> /opt/ffmpeg/4.4/lib/libswresample.so* >>>>>> /opt/opencv/4.5.5/lib/libopencv_core.so* >>>>>> /opt/opencv/4.5.5/lib/libopencv_calib3d.so* >>>>>> /opt/opencv/4.5.5/lib/libopencv_imgproc.so* >>>>>> >>>>>> I can get library paths and names of so-modules from dependencies: >>>>>> >>>>>> Depends { name: "lib.ffmpeg" } >>>>>> Depends { name: "lib.opencv" } >>>>>> >>>>>> How can I create such a list and put it in the package_build_info >>>>>> file? With the rules? >>>>> lib.ffmpeg and lib.opencv are modules in your projects? >>>> Yes, they are modules. I use my own QBS-extensions to include >>>> third-party assembled libraries in my projects >>>> (https://github.com/hkarel/QbsExt/tree/master/modules/lib). >>> >>> Then I think the correct way is to >>> >>> - collect these libraries in a Group in the respective module >>> >>> - mark them as target artifacts (see >>> https://doc.qt.io/qbs/qml-qbslanguageitems-group.html#filesAreTargets-prop) >>> >>> - give them a suitable tag >>> >>> - on the consuming side, create a rule whose >>> inputsFromDependencies matches that tag and in this rule, do >>> whatever you need to do. >> >> Tried to follow you recommendation: >> >> --- LibModule --- >> Module { >> id: libmod >> property string prefix >> property string version: "" >> >> property bool enabled: true >> property bool useSystem: false >> >> property string includeSuffix: "/include" >> property string libSuffix: "/lib" >> >> property path includePath: (useSystem || !enabled) >> ? undefined >> : prefix + (version.length ? "/" + >> version : "") + includeSuffix >> >> property path libraryPath: (useSystem || !enabled) >> ? undefined >> : prefix + (version.length ? "/" + >> version : "") + libSuffix >> >> property var dynamicLibraries: ["sodium"] >> property var staticLibraries: [] >> ... >> Group { >> //name: "package-build" >> fileTags: "package-build" >> filesAreTargets: true >> files: { >> var libfiles = []; >> if (!libmod.useSystem && libmod.enabled) >> for (var i in libmod.dynamicLibraries) { >>
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
>> Did you remember to connect the "package-build-file" tag to your >> product type? Either by making this tag the product type or via a >> chain of rules. > I didn't do it, because I don't understand how to do it. So for example you could do this: ``` Product { name: "ToxPhone" type: [ /* maybe some other types here… */ "package-build-file" ] // … ``` This will cause your rule to be executed because the product “ToxPhone” requires it because it is of the type produced by your rule. See also https://qbs.io/docs/qml-qbslanguageitems-rule/#rules-and-product-types Best Jochen Von: Qbs im Auftrag von Карелин Павел Datum: Dienstag, 10. Mai 2022 um 18:27 An: qbs@qt-project.org Betreff: Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22 10.05.2022 17:49, Christian Kandeler пишет: > > On 5/10/22 15:02, Карелин Павел wrote: >> >> >> 05.05.2022 12:14, Christian Kandeler пишет: >>> On 5/5/22 11:00, Карелин Павел wrote: >>>> >>>> >>>> 05.05.2022 10:47, Christian Kandeler пишет: >>>>> On 5/4/22 18:18, Карелин Павел wrote: >>>>>> Christian, how would you solve my problem? >>>>>> After the project is built, the deb-package is assembled. To >>>>>> build the deb-package, you need a list of dependent libraries >>>>>> (not all, only parts, system dependencies no required). For >>>>>> example this list: >>>>>> >>>>>> /opt/ffmpeg/4.4/lib/libavutil.so* >>>>>> /opt/ffmpeg/4.4/lib/libswscale.so* >>>>>> /opt/ffmpeg/4.4/lib/libswresample.so* >>>>>> /opt/opencv/4.5.5/lib/libopencv_core.so* >>>>>> /opt/opencv/4.5.5/lib/libopencv_calib3d.so* >>>>>> /opt/opencv/4.5.5/lib/libopencv_imgproc.so* >>>>>> >>>>>> I can get library paths and names of so-modules from dependencies: >>>>>> >>>>>> Depends { name: "lib.ffmpeg" } >>>>>> Depends { name: "lib.opencv" } >>>>>> >>>>>> How can I create such a list and put it in the package_build_info >>>>>> file? With the rules? >>>>> lib.ffmpeg and lib.opencv are modules in your projects? >>>> Yes, they are modules. I use my own QBS-extensions to include >>>> third-party assembled libraries in my projects >>>> (https://github.com/hkarel/QbsExt/tree/master/modules/lib). >>> >>> Then I think the correct way is to >>> >>> - collect these libraries in a Group in the respective module >>> >>> - mark them as target artifacts (see >>> https://doc.qt.io/qbs/qml-qbslanguageitems-group.html#filesAreTargets-prop) >>> >>> - give them a suitable tag >>> >>> - on the consuming side, create a rule whose >>> inputsFromDependencies matches that tag and in this rule, do >>> whatever you need to do. >> >> Tried to follow you recommendation: >> >> --- LibModule --- >> Module { >> id: libmod >> property string prefix >> property string version: "" >> >> property bool enabled: true >> property bool useSystem: false >> >> property string includeSuffix: "/include" >> property string libSuffix: "/lib" >> >> property path includePath: (useSystem || !enabled) >>? undefined >>: prefix + (version.length ? "/" + >> version : "") + includeSuffix >> >> property path libraryPath: (useSystem || !enabled) >>? undefined >>: prefix + (version.length ? "/" + >> version : "") + libSuffix >> >> property var dynamicLibraries: ["sodium"] >> property var staticLibraries: [] >> ... >> Group { >> //name: "package-build" >> fileTags: "package-build" >> filesAreTargets: true >> files: { >> var libfiles = []; >> if (!libmod.useSystem && libmod.enabled) >> for (var i in libmod.dynamicLibraries) { >> libfiles.push( >> libmod.libraryPath + >> ("/lib{0}.so*").format(libmod.dynamicLibraries[i])) >> } >> >> console.info("=== libfil
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
10.05.2022 17:49, Christian Kandeler пишет: On 5/10/22 15:02, Карелин Павел wrote: 05.05.2022 12:14, Christian Kandeler пишет: On 5/5/22 11:00, Карелин Павел wrote: 05.05.2022 10:47, Christian Kandeler пишет: On 5/4/22 18:18, Карелин Павел wrote: Christian, how would you solve my problem? After the project is built, the deb-package is assembled. To build the deb-package, you need a list of dependent libraries (not all, only parts, system dependencies no required). For example this list: /opt/ffmpeg/4.4/lib/libavutil.so* /opt/ffmpeg/4.4/lib/libswscale.so* /opt/ffmpeg/4.4/lib/libswresample.so* /opt/opencv/4.5.5/lib/libopencv_core.so* /opt/opencv/4.5.5/lib/libopencv_calib3d.so* /opt/opencv/4.5.5/lib/libopencv_imgproc.so* I can get library paths and names of so-modules from dependencies: Depends { name: "lib.ffmpeg" } Depends { name: "lib.opencv" } How can I create such a list and put it in the package_build_info file? With the rules? lib.ffmpeg and lib.opencv are modules in your projects? Yes, they are modules. I use my own QBS-extensions to include third-party assembled libraries in my projects (https://github.com/hkarel/QbsExt/tree/master/modules/lib). Then I think the correct way is to - collect these libraries in a Group in the respective module - mark them as target artifacts (see https://doc.qt.io/qbs/qml-qbslanguageitems-group.html#filesAreTargets-prop) - give them a suitable tag - on the consuming side, create a rule whose inputsFromDependencies matches that tag and in this rule, do whatever you need to do. Tried to follow you recommendation: --- LibModule --- Module { id: libmod property string prefix property string version: "" property bool enabled: true property bool useSystem: false property string includeSuffix: "/include" property string libSuffix: "/lib" property path includePath: (useSystem || !enabled) ? undefined : prefix + (version.length ? "/" + version : "") + includeSuffix property path libraryPath: (useSystem || !enabled) ? undefined : prefix + (version.length ? "/" + version : "") + libSuffix property var dynamicLibraries: ["sodium"] property var staticLibraries: [] ... Group { //name: "package-build" fileTags: "package-build" filesAreTargets: true files: { var libfiles = []; if (!libmod.useSystem && libmod.enabled) for (var i in libmod.dynamicLibraries) { libfiles.push( libmod.libraryPath + ("/lib{0}.so*").format(libmod.dynamicLibraries[i])) } console.info("=== libfiles ==="); console.info(libfiles); return libfiles; } } } // Module LibModule { id: sodium version: "1.0.x" prefix: "/opt/sodium" checkingHeaders: ["sodium.h"] dynamicLibraries: ["sodium"] staticLibraries: ["sodium"] } Product { name: "ToxPhone" ... Depends { name: "lib.sodium" } ... lib.sodium.version: project.sodiumVersion //lib.sodium.useSystem: project.useSystemSodium Rule { id: pkgbuild //inputs: ["package-build"] inputsFromDependencies: ["package-build"] Artifact { fileTags: ["package-build-file"] filePath: FileInfo.joinPaths(project.buildDirectory, "package_build_info") } prepare: { var outputFile = FileInfo.joinPaths(project.buildDirectory, "package_build_info"); console.info("=== outputFile ==="); console.info(outputFile); } } } // Product The inscription "=== outputFile ===" is never printed. What am I doing wrong? Did you remember to connect the "package-build-file" tag to your product type? Either by making this tag the product type or via a chain of rules. I didn't do it, because I don't understand how to do it. Christian ___ 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
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
Suck my ass sachel On Tue, May 10, 2022 at 8:49 AM Christian Kandeler wrote: > > On 5/10/22 15:02, Карелин Павел wrote: > > > > > > 05.05.2022 12:14, Christian Kandeler пишет: > >> On 5/5/22 11:00, Карелин Павел wrote: > >>> > >>> > >>> 05.05.2022 10:47, Christian Kandeler пишет: > On 5/4/22 18:18, Карелин Павел wrote: > > Christian, how would you solve my problem? > > After the project is built, the deb-package is assembled. To build > > the deb-package, you need a list of dependent libraries (not all, > > only parts, system dependencies no required). For example this list: > > > > /opt/ffmpeg/4.4/lib/libavutil.so* > > /opt/ffmpeg/4.4/lib/libswscale.so* > > /opt/ffmpeg/4.4/lib/libswresample.so* > > /opt/opencv/4.5.5/lib/libopencv_core.so* > > /opt/opencv/4.5.5/lib/libopencv_calib3d.so* > > /opt/opencv/4.5.5/lib/libopencv_imgproc.so* > > > > I can get library paths and names of so-modules from dependencies: > > > > Depends { name: "lib.ffmpeg" } > > Depends { name: "lib.opencv" } > > > > How can I create such a list and put it in the package_build_info > > file? With the rules? > lib.ffmpeg and lib.opencv are modules in your projects? > >>> Yes, they are modules. I use my own QBS-extensions to include > >>> third-party assembled libraries in my projects > >>> (https://github.com/hkarel/QbsExt/tree/master/modules/lib). > >> > >> Then I think the correct way is to > >> > >> - collect these libraries in a Group in the respective module > >> > >> - mark them as target artifacts (see > >> > https://doc.qt.io/qbs/qml-qbslanguageitems-group.html#filesAreTargets-prop > ) > >> > >> - give them a suitable tag > >> > >> - on the consuming side, create a rule whose > >> inputsFromDependencies matches that tag and in this rule, do whatever > >> you need to do. > > > > Tried to follow you recommendation: > > > > --- LibModule --- > > Module { > > id: libmod > > property string prefix > > property string version: "" > > > > property bool enabled: true > > property bool useSystem: false > > > > property string includeSuffix: "/include" > > property string libSuffix: "/lib" > > > > property path includePath: (useSystem || !enabled) > >? undefined > >: prefix + (version.length ? "/" + > > version : "") + includeSuffix > > > > property path libraryPath: (useSystem || !enabled) > >? undefined > >: prefix + (version.length ? "/" + > > version : "") + libSuffix > > > > property var dynamicLibraries: ["sodium"] > > property var staticLibraries: [] > > ... > > Group { > > //name: "package-build" > > fileTags: "package-build" > > filesAreTargets: true > > files: { > > var libfiles = []; > > if (!libmod.useSystem && libmod.enabled) > > for (var i in libmod.dynamicLibraries) { > > libfiles.push( > > libmod.libraryPath + > > ("/lib{0}.so*").format(libmod.dynamicLibraries[i])) > > } > > > > console.info("=== libfiles ==="); > > console.info(libfiles); > > > > return libfiles; > > } > > } > > } // Module > > > > LibModule { > > id: sodium > > version: "1.0.x" > > prefix: "/opt/sodium" > > checkingHeaders: ["sodium.h"] > > dynamicLibraries: ["sodium"] > > staticLibraries: ["sodium"] > > } > > > > Product { > > name: "ToxPhone" > > ... > > Depends { name: "lib.sodium" } > > ... > > lib.sodium.version: project.sodiumVersion > > //lib.sodium.useSystem: project.useSystemSodium > > > > Rule { > > id: pkgbuild > > //inputs: ["package-build"] > > inputsFromDependencies: ["package-build"] > > > > Artifact { > > fileTags: ["package-build-file"] > > filePath: FileInfo.joinPaths(project.buildDirectory, > > "package_build_info") > > } > > prepare: { > > var outputFile = > > FileInfo.joinPaths(project.buildDirectory, "package_build_info"); > > > > console.info("=== outputFile ==="); > > console.info(outputFile); > > } > > } > > > > } // Product > > > > The inscription "=== outputFile ===" is never printed. What am I doing > > wrong? > > > Did you remember to connect the "package-build-file" tag to your product > type? Either by making this tag the product type or via a chain of rules. > > > Christian > > > > ___ > 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
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
On 5/10/22 15:02, Карелин Павел wrote: 05.05.2022 12:14, Christian Kandeler пишет: On 5/5/22 11:00, Карелин Павел wrote: 05.05.2022 10:47, Christian Kandeler пишет: On 5/4/22 18:18, Карелин Павел wrote: Christian, how would you solve my problem? After the project is built, the deb-package is assembled. To build the deb-package, you need a list of dependent libraries (not all, only parts, system dependencies no required). For example this list: /opt/ffmpeg/4.4/lib/libavutil.so* /opt/ffmpeg/4.4/lib/libswscale.so* /opt/ffmpeg/4.4/lib/libswresample.so* /opt/opencv/4.5.5/lib/libopencv_core.so* /opt/opencv/4.5.5/lib/libopencv_calib3d.so* /opt/opencv/4.5.5/lib/libopencv_imgproc.so* I can get library paths and names of so-modules from dependencies: Depends { name: "lib.ffmpeg" } Depends { name: "lib.opencv" } How can I create such a list and put it in the package_build_info file? With the rules? lib.ffmpeg and lib.opencv are modules in your projects? Yes, they are modules. I use my own QBS-extensions to include third-party assembled libraries in my projects (https://github.com/hkarel/QbsExt/tree/master/modules/lib). Then I think the correct way is to - collect these libraries in a Group in the respective module - mark them as target artifacts (see https://doc.qt.io/qbs/qml-qbslanguageitems-group.html#filesAreTargets-prop) - give them a suitable tag - on the consuming side, create a rule whose inputsFromDependencies matches that tag and in this rule, do whatever you need to do. Tried to follow you recommendation: --- LibModule --- Module { id: libmod property string prefix property string version: "" property bool enabled: true property bool useSystem: false property string includeSuffix: "/include" property string libSuffix: "/lib" property path includePath: (useSystem || !enabled) ? undefined : prefix + (version.length ? "/" + version : "") + includeSuffix property path libraryPath: (useSystem || !enabled) ? undefined : prefix + (version.length ? "/" + version : "") + libSuffix property var dynamicLibraries: ["sodium"] property var staticLibraries: [] ... Group { //name: "package-build" fileTags: "package-build" filesAreTargets: true files: { var libfiles = []; if (!libmod.useSystem && libmod.enabled) for (var i in libmod.dynamicLibraries) { libfiles.push( libmod.libraryPath + ("/lib{0}.so*").format(libmod.dynamicLibraries[i])) } console.info("=== libfiles ==="); console.info(libfiles); return libfiles; } } } // Module LibModule { id: sodium version: "1.0.x" prefix: "/opt/sodium" checkingHeaders: ["sodium.h"] dynamicLibraries: ["sodium"] staticLibraries: ["sodium"] } Product { name: "ToxPhone" ... Depends { name: "lib.sodium" } ... lib.sodium.version: project.sodiumVersion //lib.sodium.useSystem: project.useSystemSodium Rule { id: pkgbuild //inputs: ["package-build"] inputsFromDependencies: ["package-build"] Artifact { fileTags: ["package-build-file"] filePath: FileInfo.joinPaths(project.buildDirectory, "package_build_info") } prepare: { var outputFile = FileInfo.joinPaths(project.buildDirectory, "package_build_info"); console.info("=== outputFile ==="); console.info(outputFile); } } } // Product The inscription "=== outputFile ===" is never printed. What am I doing wrong? Did you remember to connect the "package-build-file" tag to your product type? Either by making this tag the product type or via a chain of rules. Christian ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
05.05.2022 12:14, Christian Kandeler пишет: On 5/5/22 11:00, Карелин Павел wrote: 05.05.2022 10:47, Christian Kandeler пишет: On 5/4/22 18:18, Карелин Павел wrote: Christian, how would you solve my problem? After the project is built, the deb-package is assembled. To build the deb-package, you need a list of dependent libraries (not all, only parts, system dependencies no required). For example this list: /opt/ffmpeg/4.4/lib/libavutil.so* /opt/ffmpeg/4.4/lib/libswscale.so* /opt/ffmpeg/4.4/lib/libswresample.so* /opt/opencv/4.5.5/lib/libopencv_core.so* /opt/opencv/4.5.5/lib/libopencv_calib3d.so* /opt/opencv/4.5.5/lib/libopencv_imgproc.so* I can get library paths and names of so-modules from dependencies: Depends { name: "lib.ffmpeg" } Depends { name: "lib.opencv" } How can I create such a list and put it in the package_build_info file? With the rules? lib.ffmpeg and lib.opencv are modules in your projects? Yes, they are modules. I use my own QBS-extensions to include third-party assembled libraries in my projects (https://github.com/hkarel/QbsExt/tree/master/modules/lib). Then I think the correct way is to - collect these libraries in a Group in the respective module - mark them as target artifacts (see https://doc.qt.io/qbs/qml-qbslanguageitems-group.html#filesAreTargets-prop) - give them a suitable tag - on the consuming side, create a rule whose inputsFromDependencies matches that tag and in this rule, do whatever you need to do. Tried to follow you recommendation: --- LibModule --- Module { id: libmod property string prefix property string version: "" property bool enabled: true property bool useSystem: false property string includeSuffix: "/include" property string libSuffix: "/lib" property path includePath: (useSystem || !enabled) ? undefined : prefix + (version.length ? "/" + version : "") + includeSuffix property path libraryPath: (useSystem || !enabled) ? undefined : prefix + (version.length ? "/" + version : "") + libSuffix property var dynamicLibraries: ["sodium"] property var staticLibraries: [] ... Group { //name: "package-build" fileTags: "package-build" filesAreTargets: true files: { var libfiles = []; if (!libmod.useSystem && libmod.enabled) for (var i in libmod.dynamicLibraries) { libfiles.push( libmod.libraryPath + ("/lib{0}.so*").format(libmod.dynamicLibraries[i])) } console.info("=== libfiles ==="); console.info(libfiles); return libfiles; } } } // Module LibModule { id: sodium version: "1.0.x" prefix: "/opt/sodium" checkingHeaders: ["sodium.h"] dynamicLibraries: ["sodium"] staticLibraries: ["sodium"] } Product { name: "ToxPhone" ... Depends { name: "lib.sodium" } ... lib.sodium.version: project.sodiumVersion //lib.sodium.useSystem: project.useSystemSodium Rule { id: pkgbuild //inputs: ["package-build"] inputsFromDependencies: ["package-build"] Artifact { fileTags: ["package-build-file"] filePath: FileInfo.joinPaths(project.buildDirectory, "package_build_info") } prepare: { var outputFile = FileInfo.joinPaths(project.buildDirectory, "package_build_info"); console.info("=== outputFile ==="); console.info(outputFile); } } } // Product The inscription "=== outputFile ===" is never printed. What am I doing wrong? Christian ___ 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
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
On 5/5/22 11:00, Карелин Павел wrote: 05.05.2022 10:47, Christian Kandeler пишет: On 5/4/22 18:18, Карелин Павел wrote: Christian, how would you solve my problem? After the project is built, the deb-package is assembled. To build the deb-package, you need a list of dependent libraries (not all, only parts, system dependencies no required). For example this list: /opt/ffmpeg/4.4/lib/libavutil.so* /opt/ffmpeg/4.4/lib/libswscale.so* /opt/ffmpeg/4.4/lib/libswresample.so* /opt/opencv/4.5.5/lib/libopencv_core.so* /opt/opencv/4.5.5/lib/libopencv_calib3d.so* /opt/opencv/4.5.5/lib/libopencv_imgproc.so* I can get library paths and names of so-modules from dependencies: Depends { name: "lib.ffmpeg" } Depends { name: "lib.opencv" } How can I create such a list and put it in the package_build_info file? With the rules? lib.ffmpeg and lib.opencv are modules in your projects? Yes, they are modules. I use my own QBS-extensions to include third-party assembled libraries in my projects (https://github.com/hkarel/QbsExt/tree/master/modules/lib). Then I think the correct way is to - collect these libraries in a Group in the respective module - mark them as target artifacts (see https://doc.qt.io/qbs/qml-qbslanguageitems-group.html#filesAreTargets-prop) - give them a suitable tag - on the consuming side, create a rule whose inputsFromDependencies matches that tag and in this rule, do whatever you need to do. Christian ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
05.05.2022 10:47, Christian Kandeler пишет: On 5/4/22 18:18, Карелин Павел wrote: Christian, how would you solve my problem? After the project is built, the deb-package is assembled. To build the deb-package, you need a list of dependent libraries (not all, only parts, system dependencies no required). For example this list: /opt/ffmpeg/4.4/lib/libavutil.so* /opt/ffmpeg/4.4/lib/libswscale.so* /opt/ffmpeg/4.4/lib/libswresample.so* /opt/opencv/4.5.5/lib/libopencv_core.so* /opt/opencv/4.5.5/lib/libopencv_calib3d.so* /opt/opencv/4.5.5/lib/libopencv_imgproc.so* I can get library paths and names of so-modules from dependencies: Depends { name: "lib.ffmpeg" } Depends { name: "lib.opencv" } How can I create such a list and put it in the package_build_info file? With the rules? lib.ffmpeg and lib.opencv are modules in your projects? Yes, they are modules. I use my own QBS-extensions to include third-party assembled libraries in my projects (https://github.com/hkarel/QbsExt/tree/master/modules/lib). ___ 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
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
On 5/4/22 18:18, Карелин Павел wrote: Christian, how would you solve my problem? After the project is built, the deb-package is assembled. To build the deb-package, you need a list of dependent libraries (not all, only parts, system dependencies no required). For example this list: /opt/ffmpeg/4.4/lib/libavutil.so* /opt/ffmpeg/4.4/lib/libswscale.so* /opt/ffmpeg/4.4/lib/libswresample.so* /opt/opencv/4.5.5/lib/libopencv_core.so* /opt/opencv/4.5.5/lib/libopencv_calib3d.so* /opt/opencv/4.5.5/lib/libopencv_imgproc.so* I can get library paths and names of so-modules from dependencies: Depends { name: "lib.ffmpeg" } Depends { name: "lib.opencv" } How can I create such a list and put it in the package_build_info file? With the rules? lib.ffmpeg and lib.opencv are modules in your projects? ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
> I cannot reproduce this. I began to understand further and found out that the problem manifests itself in only one project. It turned out that at the project level I have a 'Probe' section: Project { Probe { ... configure: { if (File.exists(projectBuildDirectory + "/package_build_info")) File.remove(projectBuildDirectory + "/package_build_info") } } } It turns out that when I opened the project in QtC, 'Probe' was executed from the 'PackageBuild' product (the package_build_info file was created), and when I started the build process, 'Probe' was executed from the project level (the package_build_info file was deleted). In versions QBS 1.21, 1.20, and earlier did not show this behavior. My mistake, it's good to find it:)) > but I have a suspicion that a configure script is not the right place to do whatever it is you are doing there. I agree, section 'Probe' is probably not very suitable for generating auxiliary files, but this is a very simple solution to my problem, which is why I used it. Christian, how would you solve my problem? After the project is built, the deb-package is assembled. To build the deb-package, you need a list of dependent libraries (not all, only parts, system dependencies no required). For example this list: /opt/ffmpeg/4.4/lib/libavutil.so* /opt/ffmpeg/4.4/lib/libswscale.so* /opt/ffmpeg/4.4/lib/libswresample.so* /opt/opencv/4.5.5/lib/libopencv_core.so* /opt/opencv/4.5.5/lib/libopencv_calib3d.so* /opt/opencv/4.5.5/lib/libopencv_imgproc.so* I can get library paths and names of so-modules from dependencies: Depends { name: "lib.ffmpeg" } Depends { name: "lib.opencv" } How can I create such a list and put it in the package_build_info file? With the rules? -- Pavel 04.05.2022 11:31, Christian Kandeler пишет: On 5/3/22 21:44, Карелин Павел wrote: Hello, developers. I have a small product "PackageBuild" in my projects, I use it to generate the package_build_info file. [ ... ] When I open the project in QtC 7 the file package_build_info is successfully created, but after the build process starts the file package_build_info is deleted. I cannot reproduce this. Note, however, that you should not keep untracked non-temporary files in the build directory. Generally, it should contain only proper artifacts created by rules. Of course I don't know the specifics of your project, but I have a suspicion that a configure script is not the right place to do whatever it is you are doing there. Christian ___ 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
Re: [Qbs] Failed 'PackageBuild' product on QBS 1.22
On 5/3/22 21:44, Карелин Павел wrote: Hello, developers. I have a small product "PackageBuild" in my projects, I use it to generate the package_build_info file. [ ... ] When I open the project in QtC 7 the file package_build_info is successfully created, but after the build process starts the file package_build_info is deleted. I cannot reproduce this. Note, however, that you should not keep untracked non-temporary files in the build directory. Generally, it should contain only proper artifacts created by rules. Of course I don't know the specifics of your project, but I have a suspicion that a configure script is not the right place to do whatever it is you are doing there. Christian ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs