Re: [Qbs] Application with QML_ELEMENT in library, problem with plugins.qmltypes
Oh thanks, i miss that property and i was trying to install through a group like this: Group { fileTagsFilter: "qt.qml.types" qbs.install: true } Yes it seems QtCreator look for those only in the application build directory (in the shadow build) but that path is not available afaik from other plugins/libraries. My workaround is to deploy to the installRoot like a qml module: - subdirectory with module name (or more if module name is dot separated) - building a qmldir file with "typeinfo plugins.qmltypes" - deploy both qmldir and "plugins.qmltypes" (and i was hitting the wall on this one) - set "qmlImportPaths" to the installRoot That's a lot of plumbering but it works. Thanks Christian ! STÉPHANE FABRY , C.O.O. & Software Manager T: +32 4 367 07 92 [tel:+3243670792] _X-Ray Imaging Solutions_ | www.xris.eu [http://www.xris.eu/] Le 2024-05-14T13:43:52.000+02:00, Christian Kandeler via Qbs a écrit : > On 5/14/24 10:11 AM, Stéphane Fabry wrote: >>> -> i took the "plugins.qmltypes" located in >>> "Release_Desktop__6bebb707edc597ff\carlib.83bede55" and copy >>> paste manually in the app build dir >>> ("Release_Desktop__6bebb707edc597ff\app.7d104347") and there it >>> is working. >> >> But i have no clue on how to ask the library to >> build/install/deploy its own qmltypes in the build directory of >> the application :/ > > You need to arrange this yourself by defining suitable *install* > > locations that are shared among the products involved, e.g. via a > > project-level property. > > So if the application and the qmltypes file have to be at the same > > location (surely that's not the canonical way? but I'm not a QML > > expert), then they need to get the same qbs.installDir value. > Installing > > the .qmltypes file is achieved by setting Qt.qml.typesInstallDir > (see > > https://doc.qt.io/qbs/qml-qbsmodules-qt-qml.html#typesInstallDir-prop). > > 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] Application with QML_ELEMENT in library, problem with plugins.qmltypes
I want QtCreator to load both app.qmltypes and all plugins.qmltypes of the dependent libraries (this small project i have only one). -> i took the "plugins.qmltypes" located in "Release_Desktop__6bebb707edc597ff\carlib.83bede55" and copy paste manually in the app build dir ("Release_Desktop__6bebb707edc597ff\app.7d104347") and there it is working. But i have no clue on how to ask the library to build/install/deploy its own qmltypes in the build directory of the application :/ STÉPHANE FABRY , C.O.O. & Software Manager T: +32 4 367 07 92 [tel:+3243670792] _X-Ray Imaging Solutions_ | www.xris.eu [http://www.xris.eu/] Le 2024-05-14T09:51:45.000+02:00, Christian Kandeler via Qbs a écrit : > On 5/14/24 9:17 AM, Stéphane Fabry via Qbs wrote: >> The projet is running fine, the problem lies in the QtCreator >> loading >> >> the qmltypes. >> >> It loads correctly the "app.qmltypes" located next to the app.exe >> but >> >> it won't load the library "plugins.qmltypes" located next to the >> dll. >> >> Did I miss something ? > > You mean you want Qt Creator to pick up the import that is being > > generated when building that very same project to which Main.qml > belongs? > > 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
[Qbs] Application with QML_ELEMENT in library, problem with plugins.qmltypes
Hi, Here is a small example project with a QtQuick app and a C++ library. Both are separate Product in the qbs Project, both define a class declared with QML_ELEMENT and are imported into the Main.qml The Qml import is declared with: Qt.qml.importName: "People" Qt.qml.importVersion: "1.0" The projet is running fine, the problem lies in the QtCreator loading the qmltypes. It loads correctly the "app.qmltypes" located next to the app.exe but it won't load the library "plugins.qmltypes" located next to the dll. Did I miss something ? I'm very close to heaven, does someone has an idea how to solve this ? Thanks Main.qml import QtQuick import People 1.0 import Cars 1.0 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Person { id: bob name: "Bob Jones" shoeSize: 12 } Lotus { id: car name: "emira" mainColor: "blue" } Text { anchors.centerIn: parent text: bob.name + " drives " + car.name } } STÉPHANE FABRY , C.O.O. & Software Manager T: +32 4 367 07 92 [tel:+3243670792] _X-Ray Imaging Solutions_ | www.xris.eu [http://www.xris.eu/] <> ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
[QBS] Clean install directory
Hi, I have some files installed by qbs this way, inside a group of file: qbs.install:true qbs.installDir:project.binInstall But if files are removed from the group later on, they remains installed, they are not cleaned. I'd like to add a rule to clean those directories but didn't succeeded. Here's my trial, the rule is executed, but the files not removed... Product{ name:"Cleaninstall" type:["install"] Rule{ multiplex:true alwaysRun:true Artifact{ fileTags:["install"] } prepare:{ varcmd=newJavaScriptCommand(); cmd.binInstall=project.binInstall+"/" cmd.pluginInstall=project.pluginInstall+"/" cmd.sourceCode=function(){ console.info("removing:"+binInstall); File.remove(binInstall) File.remove(pluginInstall) } cmd.description="Cleanbinandplugindirectories" returncmd; } } } Thanks Stéphane ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Join some locale into one QM with 3th name
You are right each ts is inside it's own product so i suppose it will work unchanged :) Le 12-11-15 09:46, Christian Kandeler a écrit : On 11/12/2015 09:09 AM, Stéphane Fabry wrote: The basic usage is one ts mapped to one qm file. I didn't know it was possible to merge ts files into one qm file. It should remain an option and the default being as it is now. But can you not simply make one product per qm file then? Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs -- New address : starting December 5, 2015: _Rue d'Abhooz 25 - 4040 Herstal - Belgium_ *Stéphane Fabry*, Project & IT Manager +32 (0)4 367 07 92 *X-RIS* | /X-Ray Imaging Solutions/ www.xris.eu/contact.html ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Join some locale into one QM with 3th name
The basic usage is one ts mapped to one qm file. I didn't know it was possible to merge ts files into one qm file. It should remain an option and the default being as it is now. Stéphane Le 10-11-15 16:27, Christian Kandeler a écrit : On 11/10/2015 04:11 PM, a...@obukhoff.su wrote: I have several projects with a common library with its own file transfer. During building I combine multiple ts files into one qm. Visual Studio build simple call CMD file having the following content: lrelease "..\libs\Project1\src\locale\Project1_en.ts" "..\Project2\common_en.ts" -qm "build\locale\Project3_en.qm" How to realize it on the qbs. Hm, the qm rule does not have the multiplex property set. At first glance, it looks like it should. Anything speaking against that? Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs -- New address : starting December 5, 2015: _Rue d'Abhooz 25 - 4040 Herstal - Belgium_ *Stéphane Fabry*, Project & IT Manager +32 (0)4 367 07 92 *X-RIS* | /X-Ray Imaging Solutions/ www.xris.eu/contact.html ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
[QBS] Export cpp.defines
Hi, I just ran into problem by upgrading to QtCreator 3.4.1 and Qt 5.4.2 I have different libraries which exports some cpp defines this way: Export{ Depends { name: cpp } cpp.includePaths: src cpp.defines: QWT_DLL } Then I have a product that depends on those libraries, and now depending on the order of the Depends statement in the product, the defines of the first are hidden by the defines of the next one... Any suggestions, ideas ? Thanks ! Stéphane ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Always build an artifact
Hi Christian, I confirm I get it working with Qt-creator and qbs from master. But I also experienced repeated crashes when opening some qbs files in qtcreator... So maybe I will way this get's released before using in production. Is it planned to have qbs 1.4 in next Qt 5.4 release ? Thanks for your help solving this. Stéphane Le 05-12-14 10:15, Christian Kandeler a écrit : On 12/05/2014 08:53 AM, Stéphane Fabry wrote: - Depends{name:obj} does not seems to work, it says Product dependency 'obj' not found for profile ... Huh? obj is an input tag to your rule, not a product. It's the tag that qbs gives to object files created by the compiler. - I updated the my example to use output.filePath but in either way I can't get the buildtag.txt file, the command is run but I can't found the generated file... is the example too trivial (no source to build ?) It's where you specified it to be in the Artifact item. Note that relative paths are anchored at the product build directory. - I can download and build qbs from master but then how should I configure QtCreator to use the version I've just build ? Is it just the qbs.exe to copy into the Tools directory ? No, you'd have to use Creator from the master branch as well. Christian Le 04-12-14 16:13, Christian Kandeler a écrit : On 12/04/2014 03:00 PM, Stéphane Fabry wrote: I tried to do what you explained, but can't get it working. Sorry, I made two mistakes in my explanation: 1) You don't need a pseudo-artifact. Just set alwaysUpdated to false in your real artifact. 2) This works only in master, not in 1.3. So, what's a workaround you can use in 1.3? Maybe have a dependency on the obj tag? If no object file changes, you won't have a new build, right? Christian (Btw., in your example you create the build.txt file not at the place you specified in the Artifact item. To prevent such inconsistencies, we recommend using the outputs variable to access these paths.) Here is the minimal project I tried: importqbs1.0 import qbs.TextFile import qbs.FileInfo Product { name: Build Tag type: buildtag targetName: buildtag.txt Group { name: Fake input files: fake.in fileTags: [in_tag] } Rule { inputs: [in_tag] Artifact { filePath: buildtag.txt fileTags: buildtag } Artifact { alwaysUpdated: false filePath: fakeOutput } prepare: { var cmd = new JavaScriptCommand(); cmd.description = Update build date tag ! cmd.sourceCode = function() { var file = new TextFile(./buildtag.txt, TextFile.WriteOnly); var today = new Date() file.writeLine(today.toISOString()); file.close(); } return cmd; } } } Thanks Le 04-12-14 10:59, Christian Kandeler a écrit : On 12/03/2014 10:18 PM, Stéphane Fabry wrote: I'm trying to create an artefact (a simple text file) that contain the last date of build, so i just need to write the date 'now' each time the project is build. The problem is I don't know how to tell qbs to rebuild the artefact each time the project is build (or partially build) ? Has someone an idea how to do this ? Yeah, we really should add some rule property that makes this kind of thing straightforward. You could file a bug report to enhance the visibility of this issue. I assume you are using a Transformer item now? The workaround is to use a rule instead (give some random input tag, as there needs to be at least one) and in this rule, in addition to your real output artifact, declare a second one that you will never create and set its alwaysUpdated property to false (the filePath can be anything, as long as it's uniqe). This should achieve what you want. Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs -- *Stéphane Fabry*, Project IT Manager +32 (0)4 367 07 92 *X-RIS* | /X-Ray Imaging Solutions/ www.xris.eu/contact.html ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs -- *Stéphane Fabry*, Project IT Manager +32 (0)4 367 07 92 *X-RIS* | /X-Ray Imaging Solutions/ www.xris.eu/contact.html ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs -- *Stéphane Fabry*, Project IT Manager +32 (0)4 367 07 92 *X-RIS* | /X-Ray Imaging Solutions/ www.xris.eu/contact.html
Re: [QBS] What is the semantic difference between Rule and Transformer?
A transformer can be used without input, just to produce an output artifact from nothing. Le 08-11-14 14:44, Tim Hutt a écrit : As far as I can see, a Transformer isn't aware of file tags - they act on specific file names rather than file types, but yeah they seem to overlap a lot and the use case for Transformers isn't totally clear from the documentation. On 8 Nov 2014 13:39, Smirnov Vladimir map...@yandex.ru mailto:map...@yandex.ru wrote: From docs: -A /multiplex rule/ creates one /transformer/ that takes all input artifacts with the matching input file tag and creates one or more artifacts. -A /simplex rule/ creates one transformer per matching input file. -A /transformer/ takes zero or more inputs and produces one or more output artifacts from them. So I can imagine that Rule wraps some Transformer's functionality. But why don't just use only Rules? What can i do with Transformer that Rule couldn't cover? ___ QBS mailing list QBS@qt-project.org mailto:QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs -- *Stéphane Fabry*, Project IT Manager +32 (0)4 367 07 92 *X-RIS* | /X-Ray Imaging Solutions/ www.xris.eu/contact.html ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] libFilePath in custom module
Hi, The prl file is present, here is the content: /QMAKE_PRL_BUILD_DIR = C:/xris/maestro_qbs/qtparameter/src/parameter// //QMAKE_PRO_INPUT = parameter.pro// //QMAKE_PRL_TARGET = Qt5Parameter// //QMAKE_PRL_CONFIG = lex yacc depend_includepath testcase_targets import_plugins import_qpa_plugin incremental_off windows qt warn_on release link_prl incremental flat precompile_header autogen_precompile_source debug_and_release embed_manifest_dll embed_manifest_exe copy_dir_files release shared rtti no_plugin_manifest qpa win32 msvc pcre release compile_examples sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 largefile prefix_build force_independent create_prl link_prl prepare_docs qt_docs_targets no_private_qt_headers_warning QTDIR_build exceptions_off testcase_exceptions release ReleaseBuild Release build_pass git_build need_fwd_pri qt_install_module qt_install_headers qmake_cache target_qt debug_and_release build_all create_cmake skip_target_version_ext release ReleaseBuild Release build_pass have_target dll exclusive_builds no_autoqmake thread uic opengl moc resources// //QMAKE_PRL_VERSION = 5.0.0/ The only difference with for example QtNetwork prl is the first line with the /QMAKE_PRL_BUILD_DIR entry./ Thanks, Stéphane PS: Sorry for the delay, I had a week off. Le 23-10-14 17:25, Christian Kandeler a écrit : On 10/23/2014 05:07 PM, Stéphane Fabry wrote: I have a custom Qt module that is a module compiled and installed in qt directory just like any other qt module (eg serialport). When I try to use QBS and put a Depends { name: Qt.mymodule } it reach a problem where libFilePath is not defined. I found out that in the module.qbs that is generated by QtCreator (in user appData directory) the libFilePath is not filled for that module. All other modules of Qt have the path correctly defined, but for mine it is empty. That probably means that your module generates no prl file. qbs requires one to be present to find out the file path of the library. Christian I can fill it by hand and it solves the problem but i would like it to be done automatically. I build and install the module by the classic 'qmake' 'make' 'make install' process. I found this change, but I'm not sure it is linked to the problem or not: https://qt.gitorious.org/qt-labs/qbs/commit/938d9159810b5525e09325ce61759b29fa3d51af If someone has an hint to the solution... Thanks :) Stéphane ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs -- *Stéphane Fabry*, Project IT Manager +32 (0)4 367 07 92 *X-RIS* | /X-Ray Imaging Solutions/ www.xris.eu/contact.html ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Translations from qbs
There is no qbs integration for this yet. Seehttps://bugreports.qt-project.org/browse/QBS-486. We've done a bit of research on the topic lately, and some interesting problems came up. We still aim to have this working in 1.4, though. Christian -- Ok, hope we have a solution soon, until there I need to maintain both qbs and pro projects files... It is certainly not as simple but could we copy-paste the lupdate code into qbs in some manner to create the ts files directly from qbs ? (kind of flag qbs.translate: true like the qbs.install: true in file groups, or global product/project flag) Is the lupdate tool so complicated and frequently evolving that it is needed to keep it as a separate tool ? Stéphane. -- *Stéphane Fabry*, Project IT Manager +32 (0)4 367 07 92 *X-RIS* | /X-Ray Imaging Solutions/ www.xris.eu/contact.html ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
[QBS] Project sourceDirectory
Hi, I hit another small problem, I can't have access to project.sourceDirectory inside a module file. The variable is said undefined ... I saw the QBS-567 bug that should be resolved as 1.3.0 and i have 1.3.1 but it seems it does not work yet :) Could somebody confirm before I comment on bugreports ? Thanks -- *Stéphane Fabry*, Project IT Manager +32 (0)4 367 07 92 *X-RIS* | /X-Ray Imaging Solutions/ www.xris.eu/contact.html ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Rule and the usings property
Hi, thanks, I solved the problem in two steps : - first rule as you said mostly does nothing but create an artifact the second rule can catch - second multiplex rule does the job by catching target artifacts of the first one Glad to see a change will improve this in the future ! And congrats for qbs, I'm just trying to switch from qmake, and now mostly done with a lot more flexibility, readability, functionnality and performance that the qmake solution i have. Keep up the good work. Regards ! Stéphane ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs