Re: [Qbs] Who compared build times of Qt Creator with CMake and qbs?

2019-05-15 Thread Orgad Shaneh
Probably because cmake aggregates files, while qbs builds each one
separately.

בתאריך יום ד׳, 15 במאי 2019, 19:00, מאת Иван Комиссаров ‏:

> Interesting. Any idea why Qbs is so slow with ccache?
>
> Иван Комиссаров
>
> 15 мая 2019 г., в 17:29, Orgad Shaneh  написал(а):
>
> du -shc build-qtc-qbs
> 15G build-qtc-qbs
> 15G total
> du -shc build-qtc-cmake
> 4.0Gbuild-qtc-cmake
> 4.0Gtotal
>
> The number of jobs is default. For qbs it's 40, ninja uses 42.
>
> I tried again without autotests, as Christian suggested:
>
> time qbs -f ../qt-creator/qtcreator.qbs profile:qt-5-11-1
> modules.cpp.compilerWrapper:ccache project.withAutotests:false
> cold ccache:
> real4m58.383s
> user114m45.623s
> sys 15m38.866s
>
> warm cache:
> real1m20.800s
> user16m20.307s
> sys 3m57.194s
>
> time cmake ../qt-creator -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
> -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -G Ninja
> real0m8.256s
> user0m7.425s
> sys 0m0.827s
>
> time ninja
> cold cache:
> real5m23.413s
> user128m25.457s
> sys 16m11.551s
>
> time ninja:
> warm cache:
> real0m45.964s
> user7m12.563s
> sys 2m23.616s
>
>
> On Wed, May 15, 2019 at 5:50 PM Vincent Hui 
> wrote:
>
>> How many number of threads were used? Is the number of threads used by
>> Qbs equal to the number of threads used by CMake?
>>
>>
>> On Wed, 15 May 2019 at 22:11, Christian Kandeler <
>> christian.kande...@qt.io> wrote:
>>
>>> On Thu, 16 May 2019 02:01:21 +1200
>>> Christian Gagneraud  wrote:
>>>
>>> > As well, please note that the current CMake doesn't build as much
>>> > stuff as the qbs one. Not sure the difference is huge, but you need to
>>> > compare "equal jobs".
>>>
>>> For instance, all autotests are missing from the cmake build, so this
>>> alone accounts for a difference of ~100 products. You need to set
>>> "project.withAutotests:false" when building with qbs.
>>>
>>>
>>> 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 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] Who compared build times of Qt Creator with CMake and qbs?

2019-05-15 Thread Orgad Shaneh
du -shc build-qtc-qbs
15G build-qtc-qbs
15G total
du -shc build-qtc-cmake
4.0Gbuild-qtc-cmake
4.0Gtotal

The number of jobs is default. For qbs it's 40, ninja uses 42.

I tried again without autotests, as Christian suggested:

time qbs -f ../qt-creator/qtcreator.qbs profile:qt-5-11-1
modules.cpp.compilerWrapper:ccache project.withAutotests:false
cold ccache:
real4m58.383s
user114m45.623s
sys 15m38.866s

warm cache:
real1m20.800s
user16m20.307s
sys 3m57.194s

time cmake ../qt-creator -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -G Ninja
real0m8.256s
user0m7.425s
sys 0m0.827s

time ninja
cold cache:
real5m23.413s
user128m25.457s
sys 16m11.551s

time ninja:
warm cache:
real0m45.964s
user7m12.563s
sys 2m23.616s


On Wed, May 15, 2019 at 5:50 PM Vincent Hui  wrote:

> How many number of threads were used? Is the number of threads used by Qbs
> equal to the number of threads used by CMake?
>
>
> On Wed, 15 May 2019 at 22:11, Christian Kandeler 
> wrote:
>
>> On Thu, 16 May 2019 02:01:21 +1200
>> Christian Gagneraud  wrote:
>>
>> > As well, please note that the current CMake doesn't build as much
>> > stuff as the qbs one. Not sure the difference is huge, but you need to
>> > compare "equal jobs".
>>
>> For instance, all autotests are missing from the cmake build, so this
>> alone accounts for a difference of ~100 products. You need to set
>> "project.withAutotests:false" when building with qbs.
>>
>>
>> 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 mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Who compared build times of Qt Creator with CMake and qbs?

2019-05-15 Thread Orgad Shaneh
I compared qbs and cmake/ninja, and got these results (Debug build, no
QbsPM and no Clang):

Notice that qbs builds unit tests, which cmake doesn't.

time qbs -f ../qt-creator/qtcreator.qbs profile:qt-5-11-1
modules.cpp.compilerWrapper:ccache
cold ccache:
real5m26.149s
user125m3.443s
sys 16m55.134s

warm cache:
real1m40.335s
user17m20.419s
sys 4m12.409s

time cmake ../qt-creator -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -G Ninja
real0m8.256s
user0m7.425s
sys 0m0.827s

time ninja
cold cache:
real5m23.413s
user128m25.457s
sys 16m11.551s

time ninja:
warm cache:
real0m45.964s
user7m12.563s
sys 2m23.616s

- Orgad

On Wed, May 15, 2019 at 2:24 PM Epting, Thomas 
wrote:

>  > I would like to see qbs as a supported build system in Creator for as
> long as it does not
>  > cause too much hassle to do so. That is no different to any of the
> other plugins Creator
>  > has.
>
> Side note: I plan to take care of the qbsprojectmanager plugin (not Qbs
> itself) in the future. I also plan to do Qt6 adaptions to that plugin, if
> needed, and to keep the cmake build up to date. I've already spent some
> substantial effort in improving the plugin, it's just not yet pushed
> upstream because I don't have any time for doing so at the moment.
>
> Thomas
>
> ___
> 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] bare-metal: Need help with adding of SDCC compiler

2019-03-01 Thread Orgad Shaneh
On Thu, Feb 21, 2019 at 9:52 PM Denis Shienkov 
wrote:

> Hi guys.
>
> I have planns to add support for SDCC [1] compiler to QBS/QtC for
> bare-metal devices.
>
> But problem is that this compiler supports multiple different arcitectures:
>
> c:\SDCC\bin>sdcc -v
> SDCC :
> mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8
> 3.8.0 #10562 (MINGW32)
> published under GNU General Public License (GPL)
>
> The target architecture is specified trough the flag -m... So, in
> different cases we wil get a different predefined macroses, e.g:
>
... snip ...

> So, it is problematic to define a compiler ABI and etc...
>
> Has anybody any suggestions how to solve this? Is any similar cases in
> QtC/QBS?
>
Why should Qbs care about the predefined macros? Qtc needs them for the
code model, but it passes -m flags (at least now with
https://codereview.qt-project.org/254118).

So in the kit you can set the default ABI (if any, or unknown otherwise),
and the code model will pick up the correct ABI according to the compiler
flags.

- Orgad
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


[Qbs] Creating many products from a list

2018-09-13 Thread Orgad Shaneh
Hi,

I have a bunch of single-file example apps, which I need to build.

I'd like to create a project with many products, provided by a list.

I can do something like:

--- Example.qbs ---

import qbs


CppApplication {

files: name + ".cpp"

}


--- Examples.qbs ---

import qbs


Project {

Example { name: "ex1" }

Example { name: "ex2" }

...

}

But I'm looking for something more dynamic. Is there a way to have a
list-driven products generator?


- Orgad
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] Compiling QtCreator QbsProjectManager plugin with Qbs

2017-02-20 Thread Orgad Shaneh
בתאריך 21 בפבר׳ 2017 01:29,‏ "Wolfgang Baron"  כתב:

Hi all,

I am trying to compile QtCreator for debugging and I like Qbs, so I tried
compiling QtCreator using the Qbs project file using QtCreator-4.2.1 and
Qt-5.8 msvc2015 32 bits on Windows 10 (current version installed through
web installer). In fact, I also tried 64 bits with the same result.

All seemed well, but then I noticed, QbsProjectManager was not there, which
was the main reason I compiled QtCreator in the first place. The project
manager shows QbsProjectManager in grey, implying an ignored state. A check
on why this could be lead me to property "condition" of the
QbsProjectManager product. I replaced the condition with:

condition: {
console.info("buildQbsProjectManager " +
project.buildQbsProjectManager);
return project.buildQbsProjectManager;
}

This printed "true". I changed the calculation of buildQbsProjectManager in
the surrounding "src.qbs" and also got the information, that
QbsProjectManager should be built. Nonetheless, it is grey in the QtCreator
project view and is not built.
What is happening here? How can I persuade QtCreator/Qbs to build
QbsProjectManager nontheless?

Thanks for any advice!


Hi,

Assuming you got the sources from git, did you clone the qbs submodule?

If not, run git submodule update --init

- Orgad
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [QBS] Qbs not working in Creator on Win7

2015-09-03 Thread Orgad Shaneh
On Thu, Sep 3, 2015 at 7:16 PM, Tyler Daniel 
wrote:

> Hi all,
>
> I’ve tried using the project wizards to create several kinds of qbs-built
> projects on Win7.  I’ve tried 3.5.0 and 3.4.2.  In both cases Creator can’t
> even parse the generated qbs file.
>
> The same releases on my Mac work fine.
>
> If I take a qbs project that works on my Mac and copy it over, I run into
> the problem that the profiles that Creator uses don’t have a compiler or
> toolchain directory defined.
>
> Should qbs work on windows??  I’d really like to use it, especially after
> investing so much time, but I’m at a loss and need to get real work done
> soon.  :( :(
>
> Any suggestions would be greatly appreciated!
>
>
I've noticed that sometimes when I open a qbs project it is unconfigured
(no kits are configured). Try switching to Projects mode. If the view is
empty, click Add Kit ->  then it should be fine.

- Orgad
___
QBS mailing list
QBS@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


[QBS] Using qbs for in-source build

2015-08-04 Thread Orgad Shaneh
Hi,

I have a code generator that transforms html (and html-related files like
css) to cpp.

The source files are located in some nested directory tree, and the
generator is in its top level (named pbuilder).

The code generator produces its artifacts in the source directory. I can't
control it (it's a closed binary executable).

I'd like to compare timestamps of the input and output file, and generate
iff the input is newer.

This is what I have so far:

import qbs 1.0

import qbs.FileInfo


Product {

type: "html-cpp"


Group {

name: "Input Files"

files: "**/*.htm*"

fileTags: ["html"]

}


Rule {

inputs: ["html"]

Artifact {

fileTags: ["html-cpp"]

filePath: FileInfo.path(input.filePath) + '/' +
FileInfo.baseName(input.filePath) + ".cpp"

}

prepare: {

var pbuilderPath = project.path + "/pbuilder";

var cmd = new Command(pbuilderPath, input.filePath);

cmd.description = 'pbuilding ' + input.fileName;

cmd.highlight = 'compiler';

return cmd;

}

}

}


When I execute it for the first time, it generates all the files.
Later, as long as I don't modify the qbs file or delete the build
graph, only source files that were modified are regenerated, which is
good.


The problems I'm facing are:


   - If I delete the output file it is not regenerated (unless I
delete the build graph, which regenerates all the files)
   - If the source file is modified, but the target file has a newer
date (e.g. pbuilder was invoked from the shell), it is still
regenerated.
   - On the first run, I'd like to avoid regenerating up-to-date
targets. I can live with that though.
   - In my example, I simplified the generator's output. The generator
actually produces 2 files: input.c and input_v.cpp. After it finishes,
I need to rename input.c -> input.cpp (overwriting the existing one),
and delete input_v.cpp.

I'm currently using a rather ugly Makefile for this, which works quite
well, but is hard to maintain.

How can this be done correctly?

- Orgad
___
QBS mailing list
QBS@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [QBS] Do you use Qt4 to build qbs?

2014-10-19 Thread Orgad Shaneh
Qt Creator requires Qt 5.3 starting from 3.3.

- Orgad
בתאריך 19 באוק 2014 22:58, "Карелин Павел"  כתב:

>  Hi,
> Some time ago such theme was discussed in mailing for Qt-creator
> As I understand, building of QtCreator on Qt4 still remains, because Qt
> 5.x have problems with font rendering. (
> https://bugreports.qt-project.org/browse/QTBUG-37749)
> If your drop support for building qbs with Qt4 - how build QtCreator on
> Qt4?
>
> --
> Pavel Karelin
>
>
> 17.10.2014 13:51, Joerg Bornemann пишет:
>
> Hi,
>
> we're contemplating to drop support for building qbs with Qt4.
> This will enable us to remove a tiny bit of legacy code, reduce the load
> on our test machines and - most importantly - use more Qt5 features,
> like QJSEngine etc.
>
> If you have a strong argument why you need to build qbs with Qt4, please
> speak now, or forever hold your peace.
>
>
> Cheers,
>
> Joerg
> ___
> QBS mailing 
> listQBS@qt-project.orghttp://lists.qt-project.org/mailman/listinfo/qbs
>
>
>
> ___
> 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] Do you use Qt4 to build qbs?

2014-10-17 Thread Orgad Shaneh
On Fri, Oct 17, 2014 at 5:27 PM, Denis Shienkov 
wrote:

> Hi Joerg.
>
> Please do not drop of Qt4 support :)
>
> I'm recently replace a big project (based on Qt4) to QBS from MSVC. Nobody
> want to port (won't pay me to additional work) this project on Qt5 from Qt4
> for QBS support, besides, this porting is a big risk.
>
> Currently we use QBS in own Qt4 project to build of the WIX installer on
> Windows, and to build the deb packages on Linux.
>
> If you will drop QBS then it will be big problem for us.. :)
>
> BR,
> Denis
>
> 2014-10-17 13:51 GMT+04:00 Joerg Bornemann <
> joerg.bornem...@theqtcompany.com>:
>
>> Hi,
>>
>> we're contemplating to drop support for building qbs with Qt4.
>> This will enable us to remove a tiny bit of legacy code, reduce the load
>> on our test machines and - most importantly - use more Qt5 features,
>> like QJSEngine etc.
>>
>> If you have a strong argument why you need to build qbs with Qt4, please
>> speak now, or forever hold your peace.
>>
>>
>> Cheers,
>>
>> Joerg
>> ___
>> 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
>
>
He meant building Qbs itself, not the projects it builds...

- Orgad
___
QBS mailing list
QBS@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [QBS] Corrupted object files on qbs builds.

2014-09-08 Thread Orgad Shaneh
On Mon, Sep 8, 2014 at 3:15 PM, Smirnov Vladimir  wrote:

> Hello,
>
> I noticed that in latest QtC 3.2 (win7), after cancelling build (or
> build failed during compile errors), rarely i get "Invalit or corruped
> object file" linker errors.
> Toolchain MSVS 2010, compiling project with Qt 4.8 lib. I am using qbs
> and this toolchain past last year, but such errors appeared (i noticed
> these for 5 times already).
> Sometimes corrupted more than one file. Timestamp checl was enabled, i
> have disabled it, will see if it helps.
>
> What reasons could lead to that behavior?
> ___
> QBS mailing list
> QBS@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>

Hi,

I've also noticed it, but only on some of the machines here (my machine for
example has Win7 with the same setup, and it doesn't happen to me).

I remember having these corruptions when we changed
 the Cancel Build to send
Ctrl-Break instead of Ctrl-C, but this was reverted
.

- Orgad
___
QBS mailing list
QBS@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [QBS] how to generating ui file moc file along with the source files

2014-01-07 Thread Orgad Shaneh
On Wed, Jan 8, 2014 at 6:45 AM, 罗勇刚(Yonggang Luo) wrote:

> So when we can include the ui_SomeWidget.h directly and the code complete
> component IDE can works properly without setting the include path.
>
> ___
> QBS mailing list
> QBS@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>
>
That's not the right way to solve it. Qt Creator 3.0.0 supports completion
for ui files.

- Orgad
___
QBS mailing list
QBS@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [QBS] Retreive git describe result to set cpp.defines value

2013-09-09 Thread Orgad Shaneh
On Mon, Sep 9, 2013 at 10:30 AM, Joerg Bornemann
wrote:

> On 07/09/2013 16:17, Raphael Cotty wrote:
>
> > I am porting a large project using cmake to qbs.
> > We use cmake EXECUTE_PROCESS to retrieve the the git tag value and set a
> > variable with it.
> > The variable is then used to create a #define.
>
> There's the Probe item which can be used for things like that.
> The following example adds a GITREV define that contains the latest
> commit id of your repository.
>
> ---snip---
> import qbs 1.0
> import qbs.Process
>
> Application {
>  Probe {
>  id: revprobe
>  property string revision
>
>  configure: {
>  revision = "I don't know";
>  var p = new Process();
>  if (p.exec("git.exe", ["rev-parse", "HEAD"]) === 0)
>  revision = p.readStdOut().trim();
>  }
>  }
>
>  Depends { name: "cpp" }
>  cpp.defines: ['GITREV="' + revprobe.revision + '"']
>  files: ["main.cpp"]
> }
> ---snap---
>
> Seems that we should eventually document the Probe items...
>
> I just noticed two small problems: this example will only work correctly
> if qbs is called from the source directory. To make this work correctly,
> we have to tell git where the repository is by either
>
> 1) setting the working dir of the Process object - a feature we've
> forgotten to provide (QBS-385).
> 2) or calling git with the --git-dir opion and pass
> product.sourceDirectory, which is not accessible within Probe items
> unfortunately (QBS-386).
>
>
> Best Regards,
>
> Joerg
>
> --
> Joerg Bornemann
> Digia, Qt
> http://qt.digia.com/
>
> ___
> QBS mailing list
> QBS@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>

If there's a way to pass environment variables, you can also set GIT_DIR
(but then again, you need access to product.sourceDirectory).

- Orgad
___
QBS mailing list
QBS@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [QBS] How to call lrelease in qbs project?

2013-06-23 Thread Orgad Shaneh
On Mon, Jun 24, 2013 at 8:30 AM, Alexey Obukhov wrote:

> I try to add my *.ts into project, but does nothing
>
> files: [
> "src/*.cpp",
> "src/*.h",
> "src/*.ui",
> "src/*.qrc",
> "src/*.rc",
> "src/locale/*.ts"
> ]
>
> How to add files of translation to the project?
>
> --
> Alexey Obukhov
>
> ___
> QBS mailing list
> QBS@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>

Does 
thishelp?

- Orgad
___
QBS mailing list
QBS@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [QBS] Questions about QBS best practices

2013-06-14 Thread Orgad Shaneh
Use 2.8, master.hasn't been merged for quite a while.

- Orgad
בתאריך 2013 6 14 13:38, מאת "Smirnov Vladimir" :

> 13.06.2013 23:40, Tobias Hunger пишет:
>
>> you might want to update your creator to a copy from today: You will
>> find support for Qbs properties in the Qbs build step then.
>>
>> I had a bug report for that, so implementing this was a bug fix and
>> definitely not a new feature. I am sure everybody here will agree:)
>>
>>  What do you mean by properties support?I've downloaded latest trunks of
> qbs and QtC just an hour ago, compiled them together, but haven't noticed
> any changes.
>
> QtC qbs plugin creates such a profile in qbs.conf:
> ...
> qtc_Desktop\qbs\architecture=**x86_64
> qtc_Desktop\qbs\targetOS=linux
> qtc_Desktop\qbs\toolchain=gcc
>
> [preferences]
> qtcreator\kit\%7B249e2e7c-**2990-493d-8e84-bdbd4212a46b%**7D=qtc_Desktop
>
> if i replace some values, or just add line
>
> qtc_Desktop\baseProfile=gcc
>
> it disappearing just as before.
>
> Moreover, i couldn't just pass custom buildVariant to qbs! (screen
> attached) or any other parameters... (i can do that for make - oh, i
> understand that it is separate tool, but... its annoing).
>
> I shill wondered, what is a correct way (without system ENV settings) set
> dozen of absolute path. For all build variants... qbs config still useless
> with QtC ;)
>
> ___
> 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


[QBS] Project structure

2013-05-22 Thread Orgad Shaneh
Hi,

I would like to use qbs for my project.

The project consists of 2 static libraries (call them lib1 and lib2) and a
target executable (call it app).

I need some advice regarding the preferred qbs project structure.

   1. lib1 and app share some of the defines and include paths (lib2 is
   somewhat disjoint).
   2. I have multiple build variants. All of them are debug builds, but
   each variant uses a different define and 2 of the variants exclude some of
   the source files.
   3. I would like to have some sort of configuration that outsources the
   actual build operation to an external script. I do need though to have
   defines and include paths correctly parsed (in Creator) and for external
   builds I also have multiple configurations (some flags are strings, some
   are booleans). With qmake I use PRE_TARGETDEPS and place the sources in a
   dummy scope. Is there a way to do this with qbs?
   4. The include paths list is quite long. Is there a way to use a
   wildcard for it like it is done for sources?

Thanks,
- Orgad
___
QBS mailing list
QBS@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs