[QBS] qbs qt creator
Hi I have Qt Creator 3.1.1 and Qt 5.3.0 successfully compiled and installed into a single folder, called qtdevenv-5.3. I can use Qt Creator with qbs projects - no problem. But how can I install qbs in a way that - it resides in the same install folder 'qtdevenv-5.3' - it does not interfere with the version from Qt Creator - it can be called from shell - it uses the same profiles (and the same build directories) as Qt Creator uses. I was not able to do that. Some reasons: If I use the bundled Qbs from Qt Creator 3.1.1 the Qt modules are missing and (called from the shell) qbs says 'Module Qt/core could not be loaded' If I use qbs 1.1.1 (official downlod from https://login.qt.digia.com/downloads the dll's mismatch. (Qt Creator Version QBS Version) I have a lot of libraries, applications etc. I want to use batch files and shell scripts to to create all of these. And I want to use Qt Creator for development and debugging. -- Regards Kurt Keller ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] qbs qt creator
On 05/22/2014 11:32 AM, Kurt Keller wrote: I have Qt Creator 3.1.1 and Qt 5.3.0 successfully compiled and installed into a single folder, called qtdevenv-5.3. I can use Qt Creator with qbs projects - no problem. But how can I install qbs in a way that - it resides in the same install folder 'qtdevenv-5.3' - it does not interfere with the version from Qt Creator - it can be called from shell - it uses the same profiles (and the same build directories) as Qt Creator uses. Let me see whether I understand you correctly: You want to run the command-line version of qbs and use it on the same projects that you build in Qt Creator? I was not able to do that. Some reasons: If I use the bundled Qbs from Qt Creator 3.1.1 the Qt modules are missing and (called from the shell) qbs says 'Module Qt/core could not be loaded' In qbs 1.2, the modules are per-profile. Nothing is missing. If I use qbs 1.1.1 (official downlod from https://login.qt.digia.com/downloads the dll's mismatch. (Qt Creator Version QBS Version) Creator 3.1 has qbs 1.2. Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Get property from parent project
On 05/22/2014 01:26 PM, olivier musse wrote: I have a project with subproject and so on. When in a product or a subproject, how to access parent project properties. Sometimes it seems to be project.MyProperty, sometimes MyProperty Is there any documentation to clarify this point? Simple: Project properties are inherited by sub-projects. If you use the property outside of a Project item, you need to access it via the magic project property. As an example Project { property string myprop1 : val1 product{ property string myproductprop Depends{name:project.myprop1} //in this case seems the project prefix is needed Yes, because you are not directly in a Project item. myproductprop:myprop1 //in this case with project prefix it does not work and seems to works without it No, I don't think so. If you are sure about it, please file a bug report and attach the complete project. Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] qbs qt creator
On 05/22/2014 02:29 PM, Kurt Keller wrote: Am Donnerstag, den 22.05.2014 schrieb Christian Kandeler christian.kande...@digia.com: On 05/22/2014 11:32 AM, Kurt Keller wrote: I have Qt Creator 3.1.1 and Qt 5.3.0 successfully compiled and installed into a single folder, called qtdevenv-5.3. I can use Qt Creator with qbs projects - no problem. But how can I install qbs in a way that - it resides in the same install folder 'qtdevenv-5.3' - it does not interfere with the version from Qt Creator - it can be called from shell - it uses the same profiles (and the same build directories) as Qt Creator uses. Let me see whether I understand you correctly: You want to run the command-line version of qbs and use it on the same projects that you build in Qt Creator? Yes - commandline is mostly used to build the products i.e. by cron over night and Qt Creator is used for support/debugging/development. I was not able to do that. Some reasons: If I use the bundled Qbs from Qt Creator 3.1.1 the Qt modules are missing and (called from the shell) qbs says 'Module Qt/core could not be loaded' In qbs 1.2, the modules are per-profile. Nothing is missing. What does this mean? I am missing files like printsupport.qbs, xml.qbs etc. (It does work in Qt Creator magically - but I could not find out the magic to get it working from the shell) The magic is calling qbs setup-qt, just as before. Only the internals have changed with regards to file locations. But you never refer to those directly anyway. If I use qbs 1.1.1 (official downlod from https://login.qt.digia.com/downloads the dll's mismatch. (Qt Creator Version QBS Version) Creator 3.1 has qbs 1.2. Correct - but even if I use the same version - the paths for the qbs modules and plugins are different. This is due to Creator using its own settings directory, which is necessary in order to be able to run several instances of Creator without conflicts. You can see the command line equivalent of what Creator does when you click on the Details button for the qbs build step. Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] qbs qt creator
Am Donnerstag, den 22.05.2014 schrieb Christian Kandeler christian.kande...@digia.com: On 05/22/2014 02:29 PM, Kurt Keller wrote: Am Donnerstag, den 22.05.2014 schrieb Christian Kandeler christian.kande...@digia.com: On 05/22/2014 11:32 AM, Kurt Keller wrote: I have Qt Creator 3.1.1 and Qt 5.3.0 successfully compiled and installed into a single folder, called qtdevenv-5.3. I can use Qt Creator with qbs projects - no problem. But how can I install qbs in a way that - it resides in the same install folder 'qtdevenv-5.3' - it does not interfere with the version from Qt Creator - it can be called from shell - it uses the same profiles (and the same build directories) as Qt Creator uses. Let me see whether I understand you correctly: You want to run the command-line version of qbs and use it on the same projects that you build in Qt Creator? Yes - commandline is mostly used to build the products i.e. by cron over night and Qt Creator is used for support/debugging/development. I was not able to do that. Some reasons: If I use the bundled Qbs from Qt Creator 3.1.1 the Qt modules are missing and (called from the shell) qbs says 'Module Qt/core could not be loaded' In qbs 1.2, the modules are per-profile. Nothing is missing. What does this mean? I am missing files like printsupport.qbs, xml.qbs etc. (It does work in Qt Creator magically - but I could not find out the magic to get it working from the shell) The magic is calling qbs setup-qt, just as before. Only the internals have changed with regards to file locations. But you never refer to those directly anyway. If I use qbs 1.1.1 (official downlod from https://login.qt.digia.com/downloads the dll's mismatch. (Qt Creator Version QBS Version) Creator 3.1 has qbs 1.2. Correct - but even if I use the same version - the paths for the qbs modules and plugins are different. This is due to Creator using its own settings directory, which is necessary in order to be able to run several instances of Creator without conflicts. You can see the command line equivalent of what Creator does when you click on the Details button for the qbs build step. So i did a 'jom install INSTALL_ROOT=.../qtdevenv-5.3' to install the Qt Creator version of qbs (1.2) into my development directory. After that I had to copy the plugins from lib/qtcreator/qbs to lib/qbs and the modules from share/qtcreator/qbs/share/qbs to share/qbs and now I can use qbs from the shell and from qt creator. Hurra! The only drawback is that after building a product from shell qt creator does a complete rebuild and vice versa. Is there a chance to fix this too? Best Regards Kurt. ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] qbs qt creator
On 05/22/2014 03:43 PM, Kurt Keller wrote: So i did a 'jom install INSTALL_ROOT=.../qtdevenv-5.3' to install the Qt Creator version of qbs (1.2) into my development directory. After that I had to copy the plugins from lib/qtcreator/qbs to lib/qbs and the modules from share/qtcreator/qbs/share/qbs to share/qbs and now I can use qbs from the shell and from qt creator. Hurra! In Qt Creator 3.2 we will include the qbs command-line frontend, so such workarounds shouldn't be necessary anymore. The only drawback is that after building a product from shell qt creator does a complete rebuild and vice versa. Is there a chance to fix this too? Should not happen. Are you sure you are using the same build directory? Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Get property from parent project
Relatedly, how can I access properties from a Rule's prepare script? E.g. this does not work - it thinks foo is not defined. Rule { property string foo: baz prepare: { var *a = foo;* On 22 May 2014 12:40, Christian Kandeler christian.kande...@digia.comwrote: On 05/22/2014 01:26 PM, olivier musse wrote: I have a project with subproject and so on. When in a product or a subproject, how to access parent project properties. Sometimes it seems to be project.MyProperty, sometimes MyProperty Is there any documentation to clarify this point? Simple: Project properties are inherited by sub-projects. If you use the property outside of a Project item, you need to access it via the magic project property. As an example Project { property string myprop1 : val1 product{ property string myproductprop Depends{name:project.myprop1} //in this case seems the project prefix is needed Yes, because you are not directly in a Project item. myproductprop:myprop1 //in this case with project prefix it does not work and seems to works without it No, I don't think so. If you are sure about it, please file a bug report and attach the complete project. Christian ___ 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
Re: [QBS] qbs qt creator
In Qt Creator 3.2 we will include the qbs command-line frontend, so such workarounds shouldn't be necessary anymore. Btw ... are there any plans to integrate IncrediBuild + Qbs with QtCreator? By now it is very tricky to use this combination from within QtCreator. Br, Thomas ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Get property from parent project
On 05/22/2014 04:00 PM, Tim Hutt wrote: Relatedly, how can I access properties from a Rule's prepare script? E.g. this does not work - it thinks foo is not defined. Rule { property string foo: baz prepare: { var /a = foo;/ / / Yeah, Rules (much like Artifacts) are not first-class items in that they don't really support adding custom properties in a meaningful way (i.e. you can't access them later from prepare scripts). Maybe that is worth changing. Jörg, what's your opinion on this? Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Get property from parent project
Christian, The bug I was talking about (project prefix) is in a Rule artifact. I do something like (separated in multiple files but the same hierarchy) Project{ property string myProp:val Project{ Product{ Rule{ inputs:['myinputs'] Artifact { fileName:project.myProp } } } This seems to work on my side but should not according to your answer to Tim. Regards Olivier On 05/22/2014 04:00 PM, Tim Hutt wrote: Relatedly, how can I access properties from a Rule's prepare script? E.g. this does not work - it thinks foo is not defined. Rule { property string foo: baz prepare: { var /a = foo;/ / / Yeah, Rules (much like Artifacts) are not first-class items in that they don't really support adding custom properties in a meaningful way (i.e. you can't access them later from prepare scripts). Maybe that is worth changing. Jörg, what's your opinion on this? Christian ___ 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
Re: [QBS] Get property from parent project
On 05/22/2014 04:19 PM, olivier musse wrote: Property inheritance is really nice and simple. Thanks for this important information. I have succeed to verify it, but then have another question : How can I detect in the sub project if the property is already set at an higher level project. Project { property string myprop:val1 Project{ myprop: {here set to val2 if not already existing} } } This is not possible, due to how QML works. Your second line is a binding, which you can only use if a property was already declared. This information is static, and an error will be thrown if you use myprop on the left-hand side of a binding if no such property exists. About the prefix usage, I think this is not a bug in qbs. In fact, i'm working with qbs plugin in qcreator and have noticed that often, modifications in qbs files are not taken into account. I need to close qcreator, delete the build dir and .qbs.user file and reopen my project for my modif to be taken into account. The bug was a false alarm due to this qbs plugin bug. If this is Creator 3.1, then please file a bug and attach an example project and a description how to reproduce. I do not observe such problems in my daily work. Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] qbs qt creator
Am Donnerstag, den 22.05.2014 schrieb Christian Kandeler christian.kande...@digia.com: On 05/22/2014 03:43 PM, Kurt Keller wrote: So i did a 'jom install INSTALL_ROOT=.../qtdevenv-5.3' to install the Qt Creator version of qbs (1.2) into my development directory. After that I had to copy the plugins from lib/qtcreator/qbs to lib/qbs and the modules from share/qtcreator/qbs/share/qbs to share/qbs and now I can use qbs from the shell and from qt creator. Hurra! In Qt Creator 3.2 we will include the qbs command-line frontend, so such workarounds shouldn't be necessary anymore. The only drawback is that after building a product from shell qt creator does a complete rebuild and vice versa. Is there a chance to fix this too? Should not happen. Are you sure you are using the same build directory? Yes I can see it on the modification time of the file 'qtc_qt53-debug.bg'. When I build with Qt Creator the time changes and when I build with qbs from shell the time on this file changes also. Maybe the reason is, that both configurations are using different module- and plugin directories? (although the modules and plugins are the same) -- Regards Kurt ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Get property from parent project
On 05/22/2014 04:35 PM, olivier musse wrote: Christian, The bug I was talking about (project prefix) is in a Rule artifact. I do something like (separated in multiple files but the same hierarchy) Project{ property string myProp:val Project{ Product{ Rule{ inputs:['myinputs'] Artifact { fileName:project.myProp } } } This seems to work on my side but should not according to your answer to Tim. Why? There is no property declared in the Rule item in your example. Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] qbs qt creator
On 05/22/2014 04:43 PM, Kurt Keller wrote: Am Donnerstag, den 22.05.2014 schrieb Christian Kandeler christian.kande...@digia.com: On 05/22/2014 03:43 PM, Kurt Keller wrote: So i did a 'jom install INSTALL_ROOT=.../qtdevenv-5.3' to install the Qt Creator version of qbs (1.2) into my development directory. After that I had to copy the plugins from lib/qtcreator/qbs to lib/qbs and the modules from share/qtcreator/qbs/share/qbs to share/qbs and now I can use qbs from the shell and from qt creator. Hurra! In Qt Creator 3.2 we will include the qbs command-line frontend, so such workarounds shouldn't be necessary anymore. The only drawback is that after building a product from shell qt creator does a complete rebuild and vice versa. Is there a chance to fix this too? Should not happen. Are you sure you are using the same build directory? Yes I can see it on the modification time of the file 'qtc_qt53-debug.bg'. When I build with Qt Creator the time changes and when I build with qbs from shell the time on this file changes also. Maybe the reason is, that both configurations are using different module- and plugin directories? (although the modules and plugins are the same) Well, the fact that you had to copy module files around strongly suggests that. After all, Creator worked without that step,so it must pick these files up from somewhere else. Is this a self-compiled Creator or did you download it in binary form? Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] qbs qt creator
Am Donnerstag, den 22.05.2014 schrieb Christian Kandeler christian.kande...@digia.com: On 05/22/2014 04:43 PM, Kurt Keller wrote: Am Donnerstag, den 22.05.2014 schrieb Christian Kandeler christian.kande...@digia.com: On 05/22/2014 03:43 PM, Kurt Keller wrote: So i did a 'jom install INSTALL_ROOT=.../qtdevenv-5.3' to install the Qt Creator version of qbs (1.2) into my development directory. After that I had to copy the plugins from lib/qtcreator/qbs to lib/qbs and the modules from share/qtcreator/qbs/share/qbs to share/qbs and now I can use qbs from the shell and from qt creator. Hurra! In Qt Creator 3.2 we will include the qbs command-line frontend, so such workarounds shouldn't be necessary anymore. The only drawback is that after building a product from shell qt creator does a complete rebuild and vice versa. Is there a chance to fix this too? Should not happen. Are you sure you are using the same build directory? Yes I can see it on the modification time of the file 'qtc_qt53-debug.bg'. When I build with Qt Creator the time changes and when I build with qbs from shell the time on this file changes also. Maybe the reason is, that both configurations are using different module- and plugin directories? (although the modules and plugins are the same) Well, the fact that you had to copy module files around strongly suggests that. After all, Creator worked without that step,so it must pick these files up from somewhere else. Is this a self-compiled Creator or did you download it in binary form? This is a self-compiled Creator. After installing with jom install INSTALL_ROOT=./qtdevenv-5.3 it had the qbs modules in .../qtdevenv-5.3/share/qtcreator/qbs/share/qbs and the plugins in .../qtdevenv-5.3/lib/qtcreator/qbs. From there I copied the files to the places where shell-qbs expects it. So Creator uses .../qtdevenv-5.3/share/qtcreator/qbs/share/qbs .../qtdevenv-5.3/lib/qtcreator/qbs and shell-qbs uses .../qtdevenv-5.3/share/qbs .../qtdevenv-5.3/lib/qbs And to be clear: If I build with Creator twice - the second build is optimized, i.e. only modified files are build in this case. Same with shell-qbs: building twice - first build is maybe full, second creates only the modified files. Only if I build first with shell-qbs and than with Creator (or vice versa) there is no optimisation and ALL files are build. -- Kurt. ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
[QBS] How to run module rules by ordered in single-threaded mode?
Hi all.. I in process of creating a custom module to support of an Keil C51 compiler. Currently I have an very big problem: the C51.exe compiler is frequently crashed when it is invoked from the Rule of module. A crash happens if number of source files (*.c) more than one. The interesting moment that if to run compilation manually from command file (e.g. *.bat file) that a crash isn't present. Of course, I do it with the same command line options which is passed to compiler from my qbs module. I.e. command options is identically.. A main difference in that a compiler C51.exe is called by ordered in case of the BAT file. I.e. at the same time only one copy of C51.exe process can be active to compile of one source file. But in case of invoke from Qbs, are launched more than one process of C51.exe at the same time (multithreaded ??). So seems, it is brings to crashes of the C51.exe compiler, but I am not sure. Thus, my question such: whether it is possible to configure the Qbs module with some parameters to force it to work in an ordered single-threaded mode? E.g. when the following Rule (operation) can't be launched, while the previous Rule (operation) is not complete? BR, Denis ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] How to run module rules by ordered in single-threaded mode?
On 05/22/2014 05:16 PM, Denis Shienkov wrote: Hi all.. I in process of creating a custom module to support of an Keil C51 compiler. Currently I have an very big problem: the C51.exe compiler is frequently crashed when it is invoked from the Rule of module. A crash happens if number of source files (*.c) more than one. The interesting moment that if to run compilation manually from command file (e.g. *.bat file) that a crash isn't present. Of course, I do it with the same command line options which is passed to compiler from my qbs module. I.e. command options is identically.. A main difference in that a compiler C51.exe is called by ordered in case of the BAT file. I.e. at the same time only one copy of C51.exe process can be active to compile of one source file. But in case of invoke from Qbs, are launched more than one process of C51.exe at the same time (multithreaded ??). So seems, it is brings to crashes of the C51.exe compiler, but I am not sure. Thus, my question such: whether it is possible to configure the Qbs module with some parameters to force it to work in an ordered single-threaded mode? E.g. when the following Rule (operation) can't be launched, while the previous Rule (operation) is not complete? This sounds very strange. Why would the compiler care whether other instances of it are running (on different source files)? Anyway, you can force single-threaded mode by passing the -j option with a parameter of 1. In Creator, adjust the Parallel Jobs setting in the build step details. Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] qbs qt creator
On 05/22/2014 05:04 PM, Kurt Keller wrote: Is this a self-compiled Creator or did you download it in binary form? This is a self-compiled Creator. In that case it's much simpler. Just do a make install for your qbs build and set the QBS_INSTALL_DIR environment variable to the respective install root before compiling Qt Creator. Then Creator will build against the installed qbs, ignoring its own copy (you may or may not delete the git submodule, it should not make a difference). Caveat: I have not tested this configuration in a while. But it definitely used to work at some point in the not too recent past. Christian ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
[QBS] compile designer plugin
Hi, I would like to compile a designer plugin with qbs. Is that possible? If yes wake are the qmake equivalent to CONFIG+= plugin designer. Many thanks for help Regards Olivier ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs
Re: [QBS] Get property from parent project
I can reproduce this issue in many case. it's often happen. 2014-05-22 22:41 GMT+08:00 Christian Kandeler christian.kande...@digia.com : About the prefix usage, I think this is not a bug in qbs. In fact, i'm working with qbs plugin in qcreator and have noticed that often, modifications in qbs files are not taken into account. I need to close qcreator, delete the build dir and .qbs.user file and reopen my project for my modif to be taken into account. The bug was a false alarm due to this qbs plugin bug. If this is Creator 3.1, then please file a bug and attach an example project and a description how to reproduce. I do not observe such problems in my daily work. -- Best Regards YuchenI ___ QBS mailing list QBS@qt-project.org http://lists.qt-project.org/mailman/listinfo/qbs