Re: [Qbs] QtC 4.10.1 missed QBS 1.14.1!!

2019-10-09 Thread Vincent Hui
That's why I said we have 2 different Qbs 1.14.0.
I think we should consider Qbs 1.14.0 was released, otherwise we will have
more different Qbs 1.14.0.
Is Qt Creator 4.10.2 planned? We should think what is the right version of
Qbs in Qt Creator 4.10.2 and 4.11.0

Thanks
Vincent


On Wed, 9 Oct 2019 at 15:40, Ola Røer Thorsen  wrote:

>
> ons. 9. okt. 2019 kl. 09:20 skrev Christian Kandeler <
> christian.kande...@qt.io>:
>
>>
>> What is all this talk about 1.14.1? 1.14.0 has not even been released
>> yet. We expect it shortly.
>>
>>
> It was shipped with Qt Creator 4.10.0 and now 4.10.1, it appears to me
> that it just has used whatever was at the top in the 1.14 branch. (for both
> qbs binaries in Qt Creator 4.10.0 and .1 qbs --version reports 1.14.0.)
>
>
>
> Ola
>
>
> ___
> 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] QtC 4.10.1 missed QBS 1.14.1!!

2019-10-08 Thread Vincent Hui
We have 2 different Qbs 1.14.0 ,
read comments written last week.
By the way, which version of Qbs will be released next? 1.14.1 or 1.15.0 ?
Perhaps we need one more maintainer.


On Wed, 9 Oct 2019 at 05:13, Ola Røer Thorsen  wrote:

> It looks like at least some fixes were included, as I'm able to build with
> Qt 5.13.1 now (which was impossible with Qt Creator 4.10.0). But I've got
> no idea exactly which commits were included either. Maybe it's just the
> version bump commit that is missing?
>
> Ola
>
>
> tir. 8. okt. 2019 kl. 21:39 skrev Denis Shienkov  >:
>
>> Hi guys,
>> Seems, you are forgot to deliver QBS 1.14.1 with QtC 4.10.1. Right now I
>> see that it use QBS 1.14.0.
>>
>> How it happens? I was hoping for QBS 1.14.1... All my fixes go to
>> /dev/ass:((
>>
>> BR,
>>
>> Denis
>> ___
>> 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] Is version number bump for 1.14.1 missing from 1.14?

2019-10-04 Thread Vincent Hui
I hope the version of Qbs will be right when Qt Creator 4.10.1 is released
next Monday.


On Fri, 4 Oct 2019 at 16:16, Vincent Hui  wrote:

> Hi,
>
> Which version of Qbs will be released with Qt Creator 4.10.1? 1.14.1 or
> 1.15 ?
> If 1.14.1 will be released, it seems that version number bump for 1.14.1
> is missing on 1.14 branch.
>
> br,
> Vincent
>
>
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


[Qbs] Is version number bump for 1.14.1 missing from 1.14?

2019-10-04 Thread Vincent Hui
Hi,

Which version of Qbs will be released with Qt Creator 4.10.1? 1.14.1 or
1.15 ?
If 1.14.1 will be released, it seems that version number bump for 1.14.1 is
missing on 1.14 branch.

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


[Qbs] Was Qbs 4.14 release announced?

2019-10-03 Thread Vincent Hui
Hi,

Was Qbs 1.14 release announced? If not, why?

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


[Qbs] Ideas inspired by pro2cmake.py

2019-09-20 Thread Vincent Hui
Hi,

I don't know why my previous email was classified as spam. I hope this one
will not.

There is an useful python script called pro2cmake.py
. It
can converse .pro files into CMakeLists.txt files.

It seems that it is possible to develop pro2qbs.py, cmake2qbs.py and
qbs2cmake.py too. If we have  pro2qbs.py, cmake2qbs.py and qbs2cmake.py, I
think we can promote Qbs easier. However I don't know how much effort
needed to develop pro2qbs.py, cmake2qbs.py and qbs2cmake.py.

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


[Qbs] [SPAM] Ideas inspired by pro2cmake.py -> pro2qbs.py, cmake2qbs.py, qbs2cmake.py

2019-09-20 Thread Vincent Hui
Spam detection software, running on the system "mx.qt-project.org",
has identified this incoming email as possible spam.  The original
message has been attached to this so you can view it or label
similar future email.  If you have any questions, see
the administrator of that system for details.

Content preview:  Hi, There is an useful python script called pro2cmake.py 
.
   It can converse .pro files into CMakeLists.txt files. It seems that it is
   possible to develop pro2qbs.py, cmake2qbs.py and qbs2cmake.py too. If we
  have pro2qbs.py, cmake2qbs.py and qbs2cmake.py, I think we can promote Qbs
   easier. However I don't know how much effort needed to develop pro2qbs.py,
   cmake2qbs.py and qbs2cmake.py. [...] 

Content analysis details:   (4.9 points, 4.0 required)

 pts rule name  description
 -- --
 0.0 URIBL_BLOCKED  ADMINISTRATOR NOTICE: The query to URIBL was 
blocked.
See

http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information.
[URIs: pro2cmake.py]
 0.8 BAYES_50   BODY: Bayes spam probability is 40 to 60%
[score: 0.4606]
 0.0 SPF_HELO_NONE  SPF: HELO does not publish an SPF Record
 0.0 FREEMAIL_FROM  Sender email is commonly abused enduser mail 
provider
(vincenthk007[at]gmail.com)
 0.0 HTML_MESSAGE   BODY: HTML included in message
-0.0 RCVD_IN_MSPIKE_H2  RBL: Average reputation (+2)
[209.85.208.176 listed in wl.mailspike.net]
 2.4 SPOOFED_FREEMAIL   No description available.
 1.0 SUBJ_OBFU_PUNCT_MANY   Punctuation-obfuscated Subject: header
 0.7 SUBJ_OBFU_PUNCT_FEWPossible punctuation-obfuscated Subject: header

The original message was not completely plain text, and may be unsafe to
open with some email clients; in particular, it may contain a virus,
or confirm that your address can receive spam.  If you wish to view
it, it may be safer to save it to a file and open it with an editor.

--- Begin Message ---
Hi,

There is an useful python script called pro2cmake.py
. It
can converse .pro files into CMakeLists.txt files.

It seems that it is possible to develop pro2qbs.py, cmake2qbs.py and
qbs2cmake.py too. If we have  pro2qbs.py, cmake2qbs.py and qbs2cmake.py, I
think we can promote Qbs easier. However I don't know how much effort
needed to develop pro2qbs.py, cmake2qbs.py and qbs2cmake.py.

Thanks,
Vincent

https://github.com/qt/qtbase/blob/wip/cmake/util/cmake/pro2cmake.py
--- End Message ---
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Will Qbs 1.15 be developed and released by The Qt company?

2019-08-25 Thread Vincent Hui
HI Tino,

Thank you for your reply.

Would you mind answering Richard's questions about future of Qbs
? I think
many people will ask similar questions when Qbs 1.14 release.

br,
Vincent


On Thu, 22 Aug 2019 at 14:47, Tino Pyssysalo  wrote:

> On 21/08/2019, 22.23, "Qbs on behalf of Richard Weickelt" <
> qbs-boun...@qt-project.org on behalf of rich...@weickelt.de> wrote:
>
> > Further development of Qbs follows
> > https://wiki.qt.io/The_Qt_Governance_Model#Decision-making_process at
> the
> > moment. There is no roadmap because Qbs is no longer a Qt Company product
> > and all new features are currently contributed by external persons,
> probably
> > in their spare time.
>
> This is correct. Even though there is no roadmap, there is a constant
> stream of contributions, so it makes sense to have new releases.
>
> > Do you have any suggestion? Is there anything you would like to commit
> to?
>
> We can at least commit to help in releasing new Qbs versions.
> --
> Tino Pyssysalo
> Senior Product Manager
> The Qt Company
>
>
> ___
> 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] A simple project that copy an executable does not work

2019-08-19 Thread Vincent Hui
Hi Christian,

Did the doc person you asked reply you?

br,
Vincent


On Tue, 13 Aug 2019 at 19:51, Christian Kandeler 
wrote:

> On Mon, 12 Aug 2019 21:57:34 +0800
> Vincent Hui  wrote:
>
> > Do you know why the document for Rule is not updated?
> > https://doc-snapshots.qt.io/qbs/qml-qbslanguageitems-rule.html
>
> The snapshots are probably updated manually, or the script is broken. I'll
> ask a doc person.
>
>
> 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] A simple project that copy an executable does not work

2019-08-12 Thread Vincent Hui
 Hi Christian,

Do you know why the document for Rule is not updated?
https://doc-snapshots.qt.io/qbs/qml-qbslanguageitems-rule.html

Thank you.
br,
Vincent

On Fri, 9 Aug 2019 at 20:21, Christian Gagneraud  wrote:

> On Fri, 9 Aug 2019 at 13:28, Иван Комиссаров  wrote:
> >
> > I guess, documentation is updated manually as a part of the release
> process (which did not happen yet AFAIK).
> > Christian should know better, he is the maintainer:)
> > I hope that some day when we will have a proper CI for Qbs, we can
> update doc on a daily basis
>
> Isn't it what https://doc-snapshots.qt.io/ is for?
>
> Qbs master doc is available at https://doc-snapshots.qt.io/qbs/index.html
>
> Chris
>
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] A simple project that copy an executable does not work

2019-08-08 Thread Vincent Hui
Hi Ivan,

Do you know why the document for Rule is not updated? Your commit was
merged, am I right?
https://doc-snapshots.qt.io/qbs/qml-qbslanguageitems-rule.html

Thank you again for making a complete example for Rule.

br,
Vincent


On Sat, 6 Jul 2019 at 23:15, Иван Комиссаров  wrote:

> https://codereview.qt-project.org/c/qbs/qbs/+/267333
>
> > 6 июля 2019 г., в 15:51, Иван Комиссаров  написал(а):
> >
> > Ivan.
>
> ___
> 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] Will Qbs 1.15 be developed and released by The Qt company?

2019-08-07 Thread Vincent Hui
Hi,

Thanks to The Qt company and all Qbs contributors, we know Qbs 1.14 release
is around the corner.

I think it should be the time to let Qbs contributors and users to know
more the future of Qbs.

Will Qbs 1.15 be developed and released by The Qt company?

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


Re: [Qbs] How to download and uncompress files with Qbs directly?

2019-08-06 Thread Vincent Hui
Hi Oswald and Richard,

Thank both of you for your replies.

Some packages I need are not available on bintray. Therefore I need to
download those packages on GitHub.

Do you think I can use Network Access API of Qt to download files and
QByteArray::qUncompress to uncompress files in Qbs code?

br,
Vincent


On Mon, 5 Aug 2019 at 23:42, Richard Weickelt  wrote:

>
> >> Another automated and platform-independent library interface would be
> Conan
> >> or vcpgkg. Have you searched for packages on bintray?
> >>
> > these are some of the services that would need wrapping.
>
> Why would you wrap these tools with Qbs and not use them side-by-side or -
> the other way round - use them as a wrapper for Qbs? It is my understanding
> that configuration/dependency/package management sits on top of build
> automation. Conan provides a recipe containing versions and configuration
> options for each dependency. It downloads all dependencies and generates
> something that can be consumed by your build system. In case of Qbs, see
> https://docs.conan.io/en/latest/integrations/build_system/qbs.html. That
> defines a sharp boundary between build automation and
> configuration/dependency/package management. I don't say that Conan is
> particularly beautiful, but I think it's a reasonable approach.
>
> I haven't used vcpkg. Is it different?
>
> >> If all that is not an option, then you might implement your own
> download &
> >> install solution.
> >>
> > i would recommend that "your own" be something contributable upstream,
> > to get https://bugreports.qt.io/browse/QBS-62 resolved.
> >
> > note that a key feature for configuration management is the ability to
> > pin the sources and versions of modules, which is why the "grown-ups"
> > from the java world (at least maven and bazel, and i presume also
> > gradle) support it. conversely, linux distributors *hate* it - they want
> > abstract package names and ranges of acceptable versions, based on
> > binary compatibility promises. a good implementation would permit strict
> > and relaxed operation with the same project files, and per-module
> > overrides from the outside to support selective unbundling (see also
> > QBS-61).
>
> Given the current manpower behind Qbs, I have serious doubts that this is
> going to happen any time soon.
>
> Richard
> ___
> 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] How to download and uncompress files with Qbs directly?

2019-08-04 Thread Vincent Hui
Hi,

Does Qbs support downloading and uncompressing files directly?

For example, I need to use Eigen 3.3.7
 in my project, and
install it in the build folders of my projects. How to achieve my goal?

Thank you.

Best regards,
Vincent
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Qbs (way) faster than cmake (or benchmark issue)

2019-07-22 Thread Vincent Hui
Hi Chris,

Thank you for your benchmark.

Would you mind writing a blog post to record your benchmark in order to
promote Qbs?

By the way, I think we need to come up with good ideas for promoting Qbs.

Vincent


On Tue, 23 Jul 2019 at 07:31, Christian Gagneraud  wrote:

> On Mon, 22 Jul 2019 at 22:10, Oswald Buddenhagen
>  wrote:
> >
> > On Mon, Jul 22, 2019 at 11:00:07AM +1200, Christian Gagneraud wrote:
> > > At the 20 jobs mark, cmake start to stagnate, whereas qbs still make
> > > use of parallelism, at the 30 jobs mark, cmake completely stopped
> > > reducing overall build time, whereas qbs start to stagnate. At the 40
> > > jobs mark, both systems are stale.
> > >
> > that means that qbs creates a build graph with fewer bottlenecks. cmake
> > certainly could do that with relatively little effort as well, at the
> > likely cost of slightly increased null rebuild times (due to the graph
> > being bigger).
>
> Should i plot qbs vs cmake null rebuild times? That would be funny if
> qbs was faster again... :P
>
> Just kidding...
>
> I think the build graph generated by cmake is too big/complex.
> By default, Qbs doesn't track dependencies on system header files for
> example.
>
> We shouldn't see such a big difference b/w cmake/ninja and qbs.
> Although i like Qbs very much, i do not believe that it implements
> revolutionary algorithms compared to ninja.
> Ninja website is actually very interesting (eg. w/ references to
> http://gittup.org/tup/ and https://github.com/apenwarr/redo) and my
> gut feeling is that this tool is really efficient in executing it's
> input.
>
> I think (on of) the problem is what cmake generates, as mentioned in
> an earlier email, I find suspicious that ninja has to call cmake to
> handle moc. And this moc aggregation is certainly one of the
> bottleneck (again, just gut feelings).
>
> > some suggestions for making a diagram where the interesting stuff isn't
> > crammed into a narrow strip at the bottom:
> > - a logarithmic job count axis
>
> Doesn't really help on it's own, but log on both axes kind of do, see
> attached document.
>
> > - build speed per job vs. job count
> > - cpu utilization per core vs. job count
>
> The main issue here is that i've used '-j' to control jobs, which is
> not good, i should have used docker --cpus instead.
> Nonetheless all the data is attached if someone fancy some data mining.
>
> > - 
>
> I don't think i'll spend more time on this. But feel free to play with
> that if you (or anyone else) want.
> https://gitlab.com/chgans/cubicninjas
>
> Nothing fancy really, it's just a Dockerfile and a build script.
>
> I've attached the csv files, there's lot of potentially interesting
> data in build-qtcreator-stats.csv (see
> https://linux.die.net/man/1/time, i've dumped everything)
> The other file (build-qtcreator-dstat.csv) is data collected by dstat
> for the whole duration of the builds (see
> https://linux.die.net/man/1/dstat, i've dumped disk, load and cpu
> data).
> Again, it's full of potential useful data, it just needs some mining...
>
> Docker command:
> cd /path/to/qt-creator
> git clone https://gitlab.com/chgans/cubicninjas.git
> docker build -t cubicninjas cubicninjas
> mkdir builds
> docker run -it -v $PWD:$PWD -w $PWD --mount
> type=tmpfs,destination=/tmp --mount type=tmpfs,destination=$PWD/builds
> cubicninjas $PWD/cubicninjas/build.sh
>
> basic gnuplot command for build-qtcreator-stats.csv:
> set datafile separator ","
> set logscale x
> set logscale y
> plot 'build-qtcreator-stats.csv' every 2::1 using 2:19 with
> linespoints title 'ninja', '' every 2::0 using 2:19 with linespoints
> title 'qbs'
>
> Enjoy and my apologies for the grumpy email yesterday.
>
> Chris
> ___
> 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] How to check whether a project is a subproject of another project?

2019-07-19 Thread Vincent Hui
Hi Christian,

Thank you very much for your reply.

I am sorry for not stating my question clearly. Perhaps I should use
isStandalone
instead of isSubProject, my motivation is to facilitate users of my
libraries which are stored in individual git repository. The main product
of my qbs project is a library, other products are examples and tests.

To reduce build time for whole source tree, I prefer examples and tests of
my project are not built if my qbs project is not a standalone project.
That means my qbs project is added by other projects as a git module. To
save time and code of users of my projects, I prefer users of my projects
do not need to override properties of my qbs project in order not to build
examples and tests. Therefore I need a property to know whether my qbs
project is a standalone project.

By the way, why path is undocumented? Is it because path is private? Why
not make it public? Should path be renamed? path being a property name (
https://github.com/qbs/qbs/blob/master/src/lib/corelib/buildgraph/buildgraph.cpp#186
line#186) and a type name is a bit confusing I think.

Thank you again,
Vincent


On Thu, 18 Jul 2019 at 00:08, Christian Kandeler 
wrote:

> On Wed, 17 Jul 2019 23:25:49 +0800
> Vincent Hui  wrote:
>
> > I want to check whether a project is a subproject of another project. If
> a
> > project is not a subproject, its examples and tests are built. If a
> project
> > is a subproject, its examples and tests are not built.
>
> Declare a property in your project that controls this. Override this
> property from the containing project. Done.
>
> > It seems that the method for checking whether a project is a subproject
> is
> > undocumented.
>
> There is no such method, and I don't think it would be a good idea to have
> it.
>
> > I came up with a method to check whether a project is a subproject. It is
> > checking whether  sourceDirectory is equal to path. I tried a simple
> > project, my method works.
> >
> > "
> > Project {
> > readonly property bool isSubProject: (sourceDirectory === path) ?
> false
> > : true;
> > ..
> > "
> >
> > Can my method work in complicated projects?
>
> No. The parent project could be in the same directory.
>
>
> 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] How to check whether a project is a subproject of another project?

2019-07-17 Thread Vincent Hui
 Hi,

I want to check whether a project is a subproject of another project. If a
project is not a subproject, its examples and tests are built. If a project
is a subproject, its examples and tests are not built.

It seems that the method for checking whether a project is a subproject is
undocumented.

I came up with a method to check whether a project is a subproject. It is
checking whether  sourceDirectory is equal to path. I tried a simple
project, my method works.

"
Project {
readonly property bool isSubProject: (sourceDirectory === path) ? false
: true;
..
"

Can my method work in complicated projects?
Is there a simpler method checking whether a project is a subproject of
another project?

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


Re: [Qbs] Improving qbs resolve performance

2019-07-11 Thread Vincent Hui
Perhaps QThreadPooler
 can
help accelerating building products with inter-product dependencies.


On Thu, 11 Jul 2019 at 20:46, Christian Kandeler 
wrote:

> On Thu, 11 Jul 2019 12:18:30 +
> Maximilian Hrabowski  wrote:
>
> > I have a fairly large project with a root projects that pulls in several
> SubProjects, altogether with unit tests its about 313 qbs files that are
> pulled in.
>
> The number of project files is not all that important by itself. Qt
> Creator, for instance, has a comparable number, and resolves much faster
> than your project.
>
> > Let root.qbs be the root qbs file of my project and depend.qbs a
> subproject that many other subprojects depend on.
> >
> > With a single profile and single config I encounter the following
> duration for qbs resolve on my macbook pro with 12 logical CPUs:
> >
> > 1) qbs resolve (clean, new build directory, so includes creating a build
> graph):  ~1m 25s
>
> qbs --log-time might give some hints as to where that time is spent.
>
> > 2) qbs resolve (no changes): ~0.5 s
> > 3) qbs resolve after "touch root.qbs" (restores build graph): ~1m 15 s
> > 4) qbs resolve after “touch depend.qbs” (restores build graph): ~1m 15s
> >
> > From the durations i would expect that there is some room for
> improvement. To me it seems (by looking at 3 and 4) that qbs rebuilds the
> whole build graph if it detects any change to any qbs file in the project.
>
> Yes, there is no partial re-resolve.
>
> > If this is the case i wonder how difficult it would be to improve this
> and what the right approach would be. Maybe looking at “Depends {}” would
> be enough to determine the “dirty path”.
>
> I suspect this is hopeless. In general, there are too many possible
> interdependencies for a statement like "if file x has changed, we know what
> only product y can be affected". At the very least, much more now-temporary
> data from the resolve stage would have to be stored for such logic to work.
>
> > Fortunately QtC 4.9.x seems to cache something now since opening a qbs
> project will no longer cause a full resolve.
>
> I don't think anything has changed there recently. qbs re-resolved when it
> thinks that's necessary, i.e. a project file or a property or the
> environment has changed.
>
> > Any ideas or maybe even someone looking at that already?
>
> The only remote possibility that I see is somehow making use of
> concurrency when resolving, e.g. have one thread per product. It would not
> be trivial, though, due to inter-product dependencies etc; also, you'd need
> a dedicated script engine per thread. I don't remember the details, but
> whenever I though about this topic, I quickly stopped again after examining
> what we do in the ModuleLoader, which is by far the most expensive stage of
> project resolving these days, and thus the only one worth optimizing.
> (I certainly don't want to to dissuade anyone from trying, it's just that
> you need to be prepared for a disappointing outcome. For a much
> lower-hanging fruit in the area of performance improvement, take a look at
> https://bugreports.qt.io/browse/QBS-1448.)
>
>
> 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] A simple project that copy an executable does not work

2019-07-07 Thread Vincent Hui
Hi Richard and Ivan,

I tried a project called qbs-autoproject
that can generate qbs
files automatically. I modified the example to try whether multiple
executables can be generated without adding CppApplication by myself, the
result was that multiple executables were generated successfully without
adding CppApplication by myself on Ubuntu 18.04. After qbs-autoproject had
been parsed in Qt Creator,
qbs-autoproject/.autoproject/example.autoproject.qbs was generated. Two
executables "app1d" and "app2d" were generated when the project was built.

You can try the example I modified, the project is attached.

The next thing I want to do is investigating whether qbs-autoproject can be
used in complicated projects.

Thanks,
Vincent


On Mon, 8 Jul 2019 at 00:33, Richard Weickelt  wrote:

> > No, this is not possible. The reason is that in common case those
> products
> > (applications, libraries) will diverge in some way. For example, you
> might
> > want to use different resources - icons (you probably do not want to name
> > them icon1.png and icon2.png, right?), .desktop entires on Linux, plist
> > files on Mac…
> >
> > However, you might want to share some properties among those
> applications -
> > that can be achieved via inheritance - you inherit the CppApplication
> item
> > in a file, say, MyApplication.qbs, specify common properties
> (cpp.cxxFlags,
> > cpp.cxxLanguageVersion, etc…) and then instantiate MyApplication and only
> > specify only what’s different (files: «main1.cpp» and files: «main2.cpp»
> in
> > your case). That way you don’t need to write all that boilerplate code
> over
> > and over again.
>
> Some links to illustrate what Ivan just explained:
>
>
> https://doc.qt.io/qbs/custom-modules.html#making-qbs-aware-of-custom-modules-and-items
>
> A customized Product item:
> https://code.qt.io/cgit/qbs/qbs.git/tree/src/app/qbs/qbs.qbs
>
> The related base item:
> https://code.qt.io/cgit/qbs/qbs.git/tree/qbs-resources/imports/QbsApp.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] A simple project that copy an executable does not work

2019-07-07 Thread Vincent Hui
Hi Ivan,

Thank you very much for creating a complete example in Rule document. That
definitely helps new qbs users.

I have another question that I didn't find answers after reading qbs doc.

Is it possible to create CppApplication dynamically to generate multiple
executables?

For example, I have two cpp files "main1.cpp" "main2.cpp" containing one
main functions respectively inside "apps" folders. I want my project can
add all cpp files automatically can build all executables "main1.exe"
"main2.exe" respectively.

I know I can add all cpp files automatically by using Group. However, I
don't know how to build 2 executables without hardcode 2 CppApplication.

Thank you again,
Vincent


On Sat, 6 Jul 2019 at 23:15, Иван Комиссаров  wrote:

> https://codereview.qt-project.org/c/qbs/qbs/+/267333
>
> > 6 июля 2019 г., в 15:51, Иван Комиссаров  написал(а):
> >
> > Ivan.
>
> ___
> 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] A simple project that copy an executable does not work

2019-07-06 Thread Vincent Hui
Hi Richard,

Thank you very much for your reply.

I am creating toy projects for learning how to use qbs.

In the document of Rule, A simple example is not a complete example. It
does not tell user to assign the product type to "txt_output" explicitly.

I hope the document can be improved in the future.

Thank you again,
Vincent


On Sat, 6 Jul 2019 at 19:40, Richard Weickelt  wrote:

> > I created a simple project to copy an executable generated by
> > CppApplication. However the executable is not copied.
> >
> > I cannot figure out why? Can anyone tell me why?
>
> Please read
>
> https://doc.qt.io/qbs/qml-qbslanguageitems-rule.html#rules-and-product-types
>
> Your rule is not executed because the product type is "application" and
> there is most likely no other product or rule that depends on an .out file.
>
> You should assign a file tag to the rule's output artifact and add this
> file
> tag to the product type. Something like this:
>
> CppApplication {
> type: [ "outfile"]
> // ...
> Rule {
> Artifact {
> filePath: input.fileName + ".out"
> fileTags: [ "outfile" ]
> }
> // ...
> }
> }
>
> Why do you want to copy an application executable into an .out file? That
> seems pointless. Do you maybe want to change the executable suffix? There
> is
> an undocumented property cpp.executableSuffix which you could try:
>
> CppApplication {
> cpp.executableSuffix: ".out"
> // ...
> }
>
> I don't know why it is undocumented. Maybe some linkers do not allow to
> change the suffix.
>
>
> ___
> 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] Is there a feature similar with cmake option?

2019-07-06 Thread Vincent Hui
Hi Chris,

I cannot agree with you more. I created an issue
. Hope cmake option like feature
and qbs GUI can be implemented in the future.

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


[Qbs] A simple project that copy an executable does not work

2019-07-06 Thread Vincent Hui
Hi,

I created a simple project to copy an executable generated by
CppApplication. However the executable is not copied.

I cannot figure out why? Can anyone tell me why?

Thank you very much.

Regards,
Vincent

my qbs file
"
import qbs.base
import qbs.File
import qbs.FileInfo

CppApplication {
name: "myapp"
consoleApplication: true
files: "main.cpp"
Depends { name: "Qt.core" }

Group { // Properties for the produced executable
fileTagsFilter: "application"
qbs.install: true
qbs.installDir: "bin"
}

Rule {
inputs: ["application"]
Artifact {
filePath: input.fileName + ".out"
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = "generating " +
FileInfo.fileName(output.filePath);
cmd.sourceCode = function() {
File.copy(input.filePath, output.filePath);
}
return cmd;
}
}
}
"
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Is there a feature similar with cmake option?

2019-07-05 Thread Vincent Hui
Hi Richard,

Thank you for your reply,

Sorry, I am not a cmake expert. I cannot explain what CMakeCache.txt is
used for. What I can tell is that cmake users either edit CMakeCache.txt
directly to change values of options or use CMake GUI to build a project in
interactive mode, I am thinking whether we need qbs GUI in order to  let
users build a project in interactive mode.

Why GUI is needed to let users build projects in interactive mode in cmake.
" Using CMake to build a project in non-interactive mode is a simple
process if the project does not have many options. For larger projects like
VTK, using ccmake, cmake -i, or CMakeSetup is recommended. This is because
as you change options in the CMakeCache.txt file, cmake may add new entries
to that file. It can be difficult to know when to stop the run cmake, edit
the cache file cycle without the aid of an interface."
https://cmake.org/runningcmake/

Thanks,
Vincent


On Fri, 5 Jul 2019 at 22:06, Richard Weickelt  wrote:

>
> >> Cmake options can be overridden by CMakeCache.txt files inside build
> >> folders. Is there similar feature in qbs?
> >
> > No, and it sounds like a horrible idea.
>
> Regardless of the CMake inherent beauty. If you (Victor) want to have a
> profound answer to your question, you should explain what CMakeCache.txt is
> used for. It would be also helpful if you come up with an understandable
> example of your use-case.
>
> I found this explanation:
>
> https://stackoverflow.com/questions/42160117/what-is-cmakecache-txt-and-why-it-overrides-my-variables
>
> And it sounds like CMakeCache.txt is used to prevent from typing a CMake
> command line with lots of -D. Is that correct? There is no direct
> equivalent in Qbs.
>
> You can override project, product and module options on command line:
> https://doc-snapshots.qt.io/qbs/cli-build.html#parameters
>
> Nothing stops you from putting your custom overrides into a text file and
> then insert them right in place:
>
> # options.txt
> modules.cpp.optimization:fast project.myCoolFeatureEnabled:true
>
> # my-qbs-invocation-script.sh
> qbs build $(cat options.txt)
>
> Richard
> ___
> 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] Is there a feature similar with cmake option?

2019-07-05 Thread Vincent Hui
Hi Christian,

Thank you for your reply.

Cmake options can be overridden by CMakeCache.txt files inside build
folders. Is there similar feature in qbs?

Thanks,
Vincent


On Fri, 5 Jul 2019 at 19:51, Christian Kandeler 
wrote:

> On Fri, 5 Jul 2019 16:01:02 +0800
> Vincent Hui  wrote:
>
> > In qbs, is there a feature similar with cmake option
> > <https://cmake.org/cmake/help/v3.13/command/option.html>?
>
> Doesn't that just map to properties?
>
>
> 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] Is there a feature similar with cmake option?

2019-07-05 Thread Vincent Hui
Hi,

In qbs, is there a feature similar with cmake option
?

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


Re: [Qbs] How to add -pthread option into projects? a bug in qbs ?

2019-07-05 Thread Vincent Hui
Hi,

Thank all of you for your replies.

I can build my project with cpp.driverFlags: "-pthread".

My next question is how to fix the bug in conan qbs generator? driverFlags
does not exist in conan qbs generator.

Thanks,
Vincent


On Thu, 4 Jul 2019 at 16:07, Christian Kandeler 
wrote:

> On Thu, 4 Jul 2019 14:20:09 +0800
> Vincent Hui  wrote:
>
> > cpp.cppFlags: ["-pthread"]
>
> cpp.driverFlags: "-pthread"
>
>
> 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] How to add -pthread option into projects? a bug in qbs ?

2019-07-03 Thread Vincent Hui
Hi,

I am using qbs 1.13.1. When I built a simple project generated by Qt
Creator, I got an error message.
"cc1plus: error: command line option ‘-pthread’ is valid for the driver but
not for C++"

I encountered this error too when use qbs file generated by conan to add
dependency of opencv 4.0.1 to my project.

How to add -pthread option into projects?

Thanks,
Vincent

my qbs file
"
import qbs

CppApplication {
consoleApplication: true
files: "main.cpp"
cpp.cppFlags: ["-pthread"]

Group { // Properties for the produced executable
fileTagsFilter: "application"
qbs.install: true
qbs.installDir: "bin"
}
}
"
main.cpp
"
#include 

using namespace std;

int main()
{
cout << "Hello World!" << endl;
return 0;
}
"
___
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 Vincent Hui
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


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

2019-05-14 Thread Vincent Hui
Another issue is that Qt Creator will not ship with Qt Script if Qt Script
will be dropped in Qt 6. Don't know whether Qt Creator team is willing to
ship a forked Qt Script library.

Vincent


On Tue, 14 May 2019 at 19:51, Christian Gagneraud  wrote:

> On Tue, 14 May 2019 at 23:10, Joerg Bornemann 
> wrote:
> >
> > On 5/14/19 12:04 PM, Christian Gagneraud wrote:
> > > On Tue, 14 May 2019 at 22:02, Joerg Bornemann 
> wrote:
> > >>
> > >> On 5/14/19 10:57 AM, Tobias Hunger wrote:
> > >>
> > >>> The challenge will be Qt 6: Creator will use Qt 6 ASAP and since qbs
> is linked
> > >>> into Creator, that will also need to be ported to Qt 6 to stay
> feasible.
> > >>
> > >> ...which shouldn't pose a challenge at all given that Qt 6 is to keep
> > >> source incompatible changes minimal.
> > >
> > > Unless they drop QtScript...
> >
> > This is bound to happen anyway. It can be forked.
>
> But can it be maintained? Can it be ported to Qt6?
> By 'can', i mean who will do that? Who has the time, the resources?
>
> Chris
> ___
> 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] Donation to QBS developers/maintainers/contributes

2019-05-14 Thread Vincent Hui
If I am right, one urgent task is to remove the dependency of Qt Script.

Vincent


On Tue, 14 May 2019 at 17:51, Christian Gagneraud  wrote:

> On Tue, 14 May 2019 at 21:46, Иван Комиссаров  wrote:
> >
> > +1
> >
> > However, will this help to get new developers? Right now, there are not
> that many contributors.
>
> I agree, how much money do you want to raise? And what for?
> For now Qbs can use Qt (company/project) infra, so there's no need to
> manage an infra.
>
> Chris
> ___
> 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-14 Thread Vincent Hui
We can see Qbs development is active.
https://github.com/qbs/qbs/commits/master?before=ca4987ae21f3cb30fde699448abc213b37b90214+35
Therefore I don't think it is dead.


On Tue, 14 May 2019 at 16:09, Pier Luigi Fiorini <
pierluigi.fior...@gmail.com> wrote:

> Il giorno mar 14 mag 2019 alle ore 10:04 Ola Røer Thorsen <
> o...@silentwings.no> ha scritto:
>
>>
>> tir. 14. mai 2019 kl. 09:45 skrev Vincent Hui :
>>
>>> Hi,
>>>
>>> Qt Creator was ported to CMake
>>> <https://codereview.qt-project.org/#/c/261437/>. It is interesting to
>>> compare build times of Qt Creator with CMake and Qbs.
>>>
>>> Did anyone benchmark qbs against cmake?
>>>
>>>
>> I'd like to know if Qt Creator will phase out Qbs support completely,
>> seeing the comments and summary in that commit ("Qbs is dead"). Would be
>> really bad for at least my team, if they did.
>>
>
> This comes as a surprise.
>
> I thought Qbs was neither dead nor obsolete, it was just transitioning
> from The Qt Company to the community.
>
> --
> https://liri.io
> ___
> 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] Who compared build times of Qt Creator with CMake and qbs?

2019-05-14 Thread Vincent Hui
Hi,

Qt Creator was ported to CMake
. It is interesting to
compare build times of Qt Creator with CMake and Qbs.

Did anyone benchmark qbs against cmake?
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs