Re: [Qbs] How to generate files like ui_main_window.h without buld all project.

2020-08-18 Thread Карелин Павел
I will answer my own question myself: I consulted with my colleagues and 
we decided that code generation is not limited only to UI files. In 
general, a project can have a variety of code generators (bison/flex/sip 
and others). Therefore, we decided to change the order of building the 
project and checking initialization of variables.

This is a little unusual, but the end result is still achieved.

--
BR, Pavel Karelin

18.08.2020 10:45, Карелин Павел пишет:

Hello, colleagues

We wrote our own code checker to check uninitialized parameters in 
header files (this kind of check is not available in either GCC or 
Clang). Already several times such a check helped us out when 
especially hasty colleagues forgot to initialize the parameters.


But today, after another revision of the project, we stepped on a 
rake: for our utility to work, all dependencies (header files) must be 
present, but our utility is launched before the project is built, and 
UI files (like ui_main_window.h) are generated only during the build 
process.


Question: is it possible in any way to generate only UI files, without 
building the entire project?


Clarification: for our utility we are already using the generation of 
files of the form: "qbs generate -g clangdb ..." Perhaps there are 
already generators for the UI as well?


--
BR, Pavel Karelin

___
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 generate files like ui_main_window.h without buld all project.

2020-08-18 Thread Карелин Павел

Hello, colleagues

We wrote our own code checker to check uninitialized parameters in 
header files (this kind of check is not available in either GCC or 
Clang). Already several times such a check helped us out when especially 
hasty colleagues forgot to initialize the parameters.


But today, after another revision of the project, we stepped on a rake: 
for our utility to work, all dependencies (header files) must be 
present, but our utility is launched before the project is built, and UI 
files (like ui_main_window.h) are generated only during the build process.


Question: is it possible in any way to generate only UI files, without 
building the entire project?


Clarification: for our utility we are already using the generation of 
files of the form: "qbs generate -g clangdb ..." Perhaps there are 
already generators for the UI as well?


--
BR, Pavel Karelin
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] Rule.Return dynamic list for outputArtifacts

2020-07-24 Thread Карелин Павел



23.07.2020 14:34, Christian Kandeler пишет:

On Thu, 23 Jul 2020 14:13:13 +0300
Карелин Павел  wrote:


Having weighed all the "pros" and "cons", I have decided not to use
qbs.Process in outputArtifacts. Now I settled on a stupidly-simple
solution: I reduced the number of generated files from 6 to 5.

But how do you know there will never be fewer than that?
I don’t know. Therefore, I called this decision stupid. I'll leave it 
like this for now, until the next rakes ;)


P.S.
It's just that now there are other problems which eat out my brain, so 
let it stay for now j=5





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


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


Re: [Qbs] Rule.Return dynamic list for outputArtifacts

2020-07-23 Thread Карелин Павел
Having weighed all the "pros" and "cons", I have decided not to use 
qbs.Process in outputArtifacts. Now I settled on a stupidly-simple 
solution: I reduced the number of generated files from 6 to 5. The 
increase in compilation time in the assembly scale of a large project is 
almost imperceptible.


Nevertheless, I want to thank Christian and Richard for their advices. 
Now I know a little more about QBS :-)


--
BR, Pavel Karelin


21.07.2020 18:42, Christian Kandeler пишет:

On Tue, 21 Jul 2020 18:32:10 +0300
Карелин Павел  wrote:


How can I execute Command from outputArtifacts?

You can't, you need to use a JavaScript command and qbs.Process.


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] Rule.Return dynamic list for outputArtifacts

2020-07-21 Thread Карелин Павел



21.07.2020 16:45, Christian Kandeler пишет:

On Tue, 21 Jul 2020 15:10:38 +0300
Карелин Павел  wrote:


I recently needed to develop a rule for a sip generator (see below).
Basically, the rule works well, but yesterday it failed. At the output,
sip-generator create 6 cpp-files of the following format:
sip_corepartX.cpp (this is justified from the point of view of parallel
compilation, cpp-file sizes can be tens of megabytes). These 6 cpp-files
are reflected in the outputArtifacts parameter. However, yesterday I
came across a small sip-file, and the generated cpp-files turned out to
be not 6, but only 5. Naturally, my rule failed.

Question: how can I resolve my situation?

Do I understand you correctly that you don't really know in advance how many 
files will be generated, i.e. the -j parameter just specifies a maximum?

Yes, exactly

Then you either need to find a way to find out the value beforehand (by 
analyzing the input in some way), or, if that is not possible, you cheat and 
call the tool already in the outputArtifactsScript; the prepare script then 
just sets up a dummy command.

How can I execute Command from outputArtifacts?


Note that this loses concurrency, as rule execution happens in the main thread. 
But this might be acceptable for short-running tools.


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


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


[Qbs] Rule.Return dynamic list for outputArtifacts

2020-07-21 Thread Карелин Павел

Hello.

I recently needed to develop a rule for a sip generator (see below). 
Basically, the rule works well, but yesterday it failed. At the output, 
sip-generator create 6 cpp-files of the following format: 
sip_corepartX.cpp (this is justified from the point of view of parallel 
compilation, cpp-file sizes can be tens of megabytes). These 6 cpp-files 
are reflected in the outputArtifacts parameter. However, yesterday I 
came across a small sip-file, and the generated cpp-files turned out to 
be not 6, but only 5. Naturally, my rule failed.


Question: how can I resolve my situation?
Of course, I can tell the sip-generator to create fewer cpp-files 
(parameter -j), but I would like to understand - are there other ways?

For example, to ignore section
{
filePath: generatedFilesDir + "/sip" + moduleSipName + "part5.cpp",
   fileTags: ["cpp"],
   cpp: {
 cxxFlags: sipCxxFlags
   }
}
if the file ("sip" + moduleSipName + "part5.cpp") does not exist

--
BR, Pavel Karelin

    Rule {
    multiplex: true
    inputs: ["sip"]
    outputFileTags: ["cpp", "hpp", "pyi"]
    outputArtifacts: {
    var baseSipFile = product.sip.baseSipFile;
    var moduleSipName = product.sip.moduleSipName
    var generatedFilesDir = product.sip.generatedFilesDir

    var baseSipName = FileInfo.baseName(baseSipFile);

    //console.info("sip_corepart: " + generatedFilesDir + 
"/sip" + moduleSipName + "part0.cpp")

    //console.info("sip 1 :")

    var sipCxxFlags = [
    "-Wno-deprecated-declarations",
    "-Wno-deprecated",
    "-Wno-unused-variable",
    "-Wno-switch",
    //"-Wno-unused-function",
    //"-Wno-unused-but-set-variable",
    //"-Wno-unused-parameter",
    ]

    return [{ // sip_corepart0.cpp
    filePath: generatedFilesDir + "/sip" + moduleSipName + 
"part0.cpp",

    fileTags: ["cpp"],
    cpp: {
    cxxFlags: sipCxxFlags
    }
    },{
    filePath: generatedFilesDir + "/sip" + moduleSipName + 
"part1.cpp",

    fileTags: ["cpp"],
    cpp: {
    cxxFlags: sipCxxFlags
    }
    },{
    filePath: generatedFilesDir + "/sip" + moduleSipName + 
"part2.cpp",

    fileTags: ["cpp"],
    cpp: {
    cxxFlags: sipCxxFlags
    }
    },{
    filePath: generatedFilesDir + "/sip" + moduleSipName + 
"part3.cpp",

    fileTags: ["cpp"],
    cpp: {
    cxxFlags: sipCxxFlags
    }
    },{
    filePath: generatedFilesDir + "/sip" + moduleSipName + 
"part4.cpp",

    fileTags: ["cpp"],
    cpp: {
    cxxFlags: sipCxxFlags
    }
    },{
    filePath: generatedFilesDir + "/sip" + moduleSipName + 
"part5.cpp",

    fileTags: ["cpp"],
    cpp: {
    cxxFlags: sipCxxFlags
    }
    },{ // sipAPI_core.h
    filePath: generatedFilesDir + "/sipAPI" + moduleSipName 
+ ".h",

    fileTags: ["hpp"],
    cpp: {
    cxxFlags: sipCxxFlags
    }
    },{ // core.pyi
    filePath: project.buildDirectory + "/python/" + 
baseSipName + ".pyi",

    fileTags: ["pyi"],
    }];
    }

    prepare: {
    var baseSipFile = product.sip.baseSipFile;
    var moduleSipName = product.sip.moduleSipName;
    var generatedFilesDir = product.sip.generatedFilesDir;

    var baseSipName = FileInfo.baseName(baseSipFile);

    // usr/bin/sip -w -e -x ANDROID -x ARM -x MOBILITY_LOCATION 
-n sip -t WS_X11 -t Qt_5_12_4 -g -o

    // -a /home/hkarel/CProjects/QGIS/build2/python/qgis.core.api
    // -n sip
    // -y 
/home/hkarel/CProjects/QGIS/build2/output/python/qgis/core.pyi

    // -j 6
    // -c /home/hkarel/CProjects/QGIS/build2/python/core
    // -I /home/hkarel/CProjects/QGIS/build2/python/core
    // -I /usr/share/sip/PyQt5
    // /home/hkarel/CProjects/QGIS/build2/python/core/core.sip

    var args = ["-w", "-e", "-g", "-o", "-j", "6", "-n", "sip"];
    args = args.concat(["-x", "ANDROID", "-x", "ARM", "-x", 
"MOBILITY_LOCATION"]);

    args = args.concat(["-t", "WS_X11", "-t", "Qt_5_12_4"])

    args.push("-c");
    args.push(generatedFilesDir);

    args.push("-I");
    args.push(generatedFilesDir);

    args.push("-I");
    args.push(project.buildDirectory + "/python");

    args.push("-I");
    args.push("/usr/share/sip/PyQt5");

    args.push("-y");
 

Re: [Qbs] QBS script parsing speed

2020-07-01 Thread Карелин Павел
I updated QtC to version 4.12.3 (QBS 1.16.0). After that, parsing my 
project from scratch took 4-7 seconds. With this times  is possible to 
work quite comfortably. Thanks for speeding up! :)))


--
BR, Pavel Karelin


30.06.2020 18:09, Jochen Ulrich пишет:

Nice!
It brings a ~44% speed improvement in the problematic case according to your 
numbers:

Resolving withLeafExports/9-2-implicit

real0m43.592s
real0m24.494s

Thanks, Richard!

So for "medium" projects in terms of depth of the dependency tree, it's 
sensible to use transitive dependencies now:
withLeafExports/4-8-implicit:
real0m18.180s
vs.
withAdditionalDepends/4-8-explicit:
real0m19.319s

However, for "large" projects, the workaround still seems to be 25% faster:
withLeafExports/9-2-implicit:
real0m24.494s
vs.
withAdditionalDepends/9-2-explicit:
real0m18.149s


Best
Jochen
  


Am 30.06.20, 15:09 schrieb "Richard Weickelt" :

 Jochen,

 >> Well [the time] goes into "Handling Products". So it is 
ModuleLoader::handleProduct().
 >> And there, it could be the ModuleMerger. But speculation is dangerous 
when discussing about performance.
 > See https://lists.qt-project.org/pipermail/qbs/2019-August/002546.html
 >
 > You can find my test results together with the scripts to generate the 
projects here:
 > 
https://gist.github.com/j-ulrich/35f345007809c77403a8ee88f4d9db11#file-results-md

 Then you might be happy to hear that the ModuleMerger was completely
 rewritten for Qbs 1.16.0
 (https://codereview.qt-project.org/c/qbs/qbs/+/284737). Running your
 benchmark with Qbs 1.16.0 (Qt Creator 4.12) gives me significantly better
 results in case of transitive dependencies. See below.

 I am not sure whether this has any noticable effect on real-world projects.
 But if ModuleMerger was ever a bottleneck, then it should not longer be.

 -
 i5-2520M CPU @ 2.50GHz Xubuntu 16.04)
 First line: Qbs 1.15.1
 Second line: Qbs 1.16.0

 > Resolving 4-8-direct
 real0m3.089s
 real0m2.669s

 > Resolving 4-8-implicit
 real0m4.808s
 real0m3.409s

 > Resolving 4-8-explicit
 real0m3.898s
 real0m3.085s

 > Resolving withLeafExports/4-8-direct
 real0m16.508s
 real0m13.793s

 > Resolving withLeafExports/4-8-implicit
 real0m25.907s
 real0m18.180s

 > Resolving withLeafExports/4-8-explicit
 real0m21.393s
 real0m15.844s

 > Resolving withLeafExports/9-2-direct
 real0m13.992s
 real0m10.750s

 > Resolving withLeafExports/9-2-implicit
 real0m43.592s
 real0m24.494s

 > Resolving withLeafExports/9-2-explicit
 real0m26.019s
 real0m17.589s

 > Resolving withAdditionalDepends/4-8-direct
 real0m25.096s
 real0m18.892s

 > Resolving withAdditionalDepends/4-8-implicit
 real0m28.369s
 real0m19.868s

 > Resolving withAdditionalDepends/4-8-explicit
 real0m29.164s
 real0m19.319s

 > Resolving withAdditionalDepends/9-2-direct
 real0m19.110s
 real0m17.264s

 > Resolving withAdditionalDepends/9-2-implicit
 real0m20.887s
 real0m19.269s

 > Resolving withAdditionalDepends/9-2-explicit
 real0m18.359s
 real0m18.149s

 > Resolving 9-2-direct
 real0m2.500s

 > Resolving 9-2-implicit
 real0m6.393s

 > Resolving 9-2-explicit
 real0m3.833s
 real0m2.326s



___
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] QBS script parsing speed

2020-06-30 Thread Карелин Павел

I already use the second variant.
The maximum that I export this:
    Export {
    Depends { name: "cpp" }
    cpp.includePaths: product.exportIncludePaths
    }

But to connect files, I use wildcard mask almost everywhere. In topic 
"Improving qbs resolve performance" 
(https://lists.qt-project.org/pipermail/qbs/2019-July/002481.html) 
Christian Kandeler does not recommend doing this. But now I can’t do it 
differently - there are a lots of files, and I can’t connect them all 
individually.


--
BR, Pavel Karelin


30.06.2020 11:24, Jochen Ulrich пишет:

We faced similar problems but our resolve times were even higher (30 s to 2 
mins).

We were able to work around this and significantly reduce the resolve times by 
avoiding transitive dependencies (meaning exporting dependencies).

So instead of this:

Product {
 name: “A”
 Depends { name: "B" }
}

Product {
 name: “B”
 Depends { name: "C" }
 Export {
 Depends { name: "C" }
 }
}

Product {
 name: “C”
 Depends { name: "SomeLibNeededEverywhere" }
 Export {
 Depends { name: "SomeLibNeededEverywhere" }
 }
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

You do it like this

Product {
 name: “A”
 Depends { name: "B" }
 Depends { name: "C" }
 Depends { name: "SomeLibNeededEverywhere" }
}

Product {
 name: “B”
 Depends { name: "C" }
 Depends { name: "SomeLibNeededEverywhere" }
}

Product {
 name: “C”
 Depends { name: "SomeLibNeededEverywhere" }
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Of course it is ugly because you have to maintain the transitive dependencies 
manually.
However, if you have cases where a dependency is needed in many places, you can 
create custom products that include it.
For example:
// qbs/imports/MyBaseApplication.qbs
CppApplication {
 Depends { name: "SomeLibNeededEverywhere" }
}

// in other .qbs files use MyBaseApplication instead of CppApplication
MyBaseApplication {
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

See also this thread on the mailing list:
https://lists.qt-project.org/pipermail/qbs/2019-July/002477.html
and the follow up:
https://lists.qt-project.org/pipermail/qbs/2019-August/002544.html

Kind regards
Jochen Ulrich


Von: Qbs  im Auftrag von Карелин Павел 

Datum: Dienstag, 30. Juni 2020 um 09:45
An: "qbs@qt-project.org" 
Betreff: [Qbs] QBS script parsing speed

Hello.

Now I'm trying to write a QBS build script for a fairly large project (QGIS). 
After making every change to the build script - the project tree is rebuilt and 
QtCreator freezes for 10-15 seconds.
It seems that 10-15 is not so much, but since I have to make a lot of changes 
in the script, in the aggregate the slowdown turns out to be quite significant.
I suppose I was not the only one who faced a similar problem on large projects. 
I would like to know if any measures are being planned to increase the speed of 
re-parsing a project?
I am using QtCreator 4.11.2 (QBS 1.15.1)


--
BR, Pavel Karelin


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


[Qbs] QBS script parsing speed

2020-06-30 Thread Карелин Павел

Hello.

Now I'm trying to write a QBS build script for a fairly large project 
(QGIS). After making every change to the build script - the project tree 
is rebuilt and QtCreator freezes for 10-15 seconds. It seems that 10-15 
is not so much, but since I have to make a lot of changes in the script, 
in the aggregate the slowdown turns out to be quite significant.
I suppose I was not the only one who faced a similar problem on large 
projects. I would like to know if any measures are being planned to 
increase the speed of re-parsing a project?

I am using QtCreator 4.11.2 (QBS 1.15.1)

--
BR, Pavel Karelin

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


Re: [Qbs] Construction project.buildDirectory

2020-05-15 Thread Карелин Павел

Richard, Christian, hello.

I am in the process of moving from Ubuntu 14.04 to Ubuntu 20.04.
I got the opportunity to use QtC 4.11.2 and check your fix: access to 
project parameters through the prefix 'project'.

Everything works as expected, thanks for the fix.

--
BR, Pavel Karelin


06.02.2020 19:02, Карелин Павел пишет:

Richard, Christian, thanks for the information.
How will I have the opportunity to upgrade to the new version of QtC - 
I will  look at this fix


--
BR, Pavel Karelin


06.02.2020 18:44, Christian Kandeler пишет:

On Thu, 6 Feb 2020 16:08:42 +0100
Richard Weickelt  wrote:


sorry for breaking this. The issue has been fixed by
https://codereview.qt-project.org/c/qbs/qbs/+/289271  and the fix will be in
Qt Creator 4.11.1 which is about to be released this week. You may try
http://download.qt.io/snapshots/qtcreator/4.11/4.11.1/187/  or just wait for
the official release.

I have to take that back. Qt creator 4.11.1 still ships Qbs 1.15.0. The tag
was unfortunately made from an older commit. However,
http://download.qt.io/snapshots/qtcreator/4.11/4.11.1/187/  contains an
updated Qbs (1.15.1) containing the fix. We are aiming for Qbs 1.16.0
together with Qt Creator 4.12.0.

Plus, I suppose, an actual qbs 1.15.1 release with Creator 4.11.2.


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] Construction project.buildDirectory

2020-02-06 Thread Карелин Павел

Richard, Christian, thanks for the information.
How will I have the opportunity to upgrade to the new version of QtC - I 
will  look at this fix


--
BR, Pavel Karelin


06.02.2020 18:44, Christian Kandeler пишет:

On Thu, 6 Feb 2020 16:08:42 +0100
Richard Weickelt  wrote:


sorry for breaking this. The issue has been fixed by
https://codereview.qt-project.org/c/qbs/qbs/+/289271 and the fix will be in
Qt Creator 4.11.1 which is about to be released this week. You may try
http://download.qt.io/snapshots/qtcreator/4.11/4.11.1/187/ or just wait for
the official release.

I have to take that back. Qt creator 4.11.1 still ships Qbs 1.15.0. The tag
was unfortunately made from an older commit. However,
http://download.qt.io/snapshots/qtcreator/4.11/4.11.1/187/ contains an
updated Qbs (1.15.1) containing the fix. We are aiming for Qbs 1.16.0
together with Qt Creator 4.12.0.

Plus, I suppose, an actual qbs 1.15.1 release with Creator 4.11.2.


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] Construction project.buildDirectory

2019-12-19 Thread Карелин Павел



19.12.2019 16:46, Christian Kandeler пишет:

On Thu, 19 Dec 2019 16:35:22 +0300
Карелин Павел  wrote:


My colleague decided to try QtCreator 4.11 (QBS 1.15), and faced a problem.
At this project the QtCreator 4.11 issues a mistake:

import qbs
Project {
      minimumQbsVersion: "1.12.0"

      Probe {
      id: projectProbe

      readonly property string projectBuildDirectory:
project.buildDirectory
      readonly property string projectSourceDirectory:
project.sourceDirectory

      configure: {
      // ...
      }
      }
}

Some code has been moved around to fix a different problem with Project-level 
probes, so this appears to be a side effect of that.
However, you can just leave off the "project.", and it will work both with 1.15 
and 1.14.
Yes, i did so. But I wanted to find out if the previous behavior would 
be restored. This is about syntactic sugar: I would like for the whole 
project to have a uniform construction of "project.buildDirectory"


--
Pavel




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


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


[Qbs] Construction project.buildDirectory

2019-12-19 Thread Карелин Павел

Hello

My colleague decided to try QtCreator 4.11 (QBS 1.15), and faced a problem.
At this project the QtCreator 4.11 issues a mistake:

import qbs
Project {
    minimumQbsVersion: "1.12.0"

    Probe {
    id: projectProbe

    readonly property string projectBuildDirectory: 
project.buildDirectory
    readonly property string projectSourceDirectory: 
project.sourceDirectory


    configure: {
    // ...
    }
    }
}


At the same time, on Qt Creator 4.10.2 this project opens normally.
Why is the "project.buildDirectory" construct no longer valid at the 
project level?


--
BR, Pavel Karelin
___
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 Карелин Павел

+1

14.05.2019 11:54, Алексей Скородумов пишет:

Hi,

Is it hard to make "donate" button on "QBS site" as a part of 
"transition to community"?

I can't contribute time right now, but would like to support the project.

--
Best regards,
Aleksei Skorodumov

___
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] Running a helper application right after it is build

2018-08-14 Thread Карелин Павел

Christian, thanks for the explanations

--
BR, Pavel Karelin


14.08.2018 14:53, Christian Kandeler пишет:

On Tue, 14 Aug 2018 14:27:35 +0300
Карелин Павел  wrote:


Today, with a fresh head, I decided to shorten the script a little (see
below). At me all has turned out - the project was builded. But last
night at me this version of the scenario hasn't earned, the problem was
that the rule for "sonnet-parse-trigrams-run" was executed earlier than
the utility sonnet_parsetrigrams was created (maybe I made a mistake
somewhere else ...)

That's not possible with the code you have pasted here. If the tool's tag is an 
input to a rule, then that rule will always wait for the rule which produces 
the tool.


I had a question: the rules for the "type" property are executed in the
same order as they are declared or they can be executed in parallel.

Everything is potentially run in parallel unless an ordering is introduced by a rule. You 
have such an ordering, because you tell qbs that "sonnet-parse-trigrams" is an 
input to your rule. Therefore, the application will be built before your rule runs.


      Product {
      id: sonnetParseTrigrams
      //type: "application"
      type: ["application", "sonnet-parse-trigrams-run"]
      consoleApplication: true
      destinationDirectory: "./bin"

      name: "SonnetParseTrigrams"
      targetName: "sonnet_parsetrigrams"

      Depends { name: "cpp" }
      Depends { name: "SonnetCore" }
      Depends { name: "Qt"; submodules: ["core"] }

      cpp.defines: sonnet.cppDefines

      cpp.cxxLanguageVersion: "c++14"
      cpp.cxxFlags: sonnet.cxxFlags

      files: [
      "data/parsetrigrams.cpp"
      ]

      Group {
      fileTagsFilter: "application"
      fileTags: "sonnet-parse-trigrams"
      }

      Rule {
      inputs: ["sonnet-parse-trigrams"]

      // no inputs -> just a generator
      //multiplex: true

      Artifact {
      fileTags: ["sonnet-parse-trigrams-run"]
      filePath:
FileInfo.joinPaths(product.destinationDirectory, "trigrams.map")
      }
      prepare: {
      var runUtl = input.filePath;
      var sourceDir =
FileInfo.joinPaths(product.sourceDirectory, "data/trigrams");
      var outputFile =
FileInfo.joinPaths(product.destinationDirectory, "trigrams.map");

      console.info("=== runUtl ===");
      console.info(runUtl);
      console.info(sourceDir);
      console.info(outputFile);

      var cmd = new Command(runUtl, [sourceDir,
outputFile]); cmd.description = "sonnet parse trigrams";
      cmd.highlight = "filegen";
      return cmd;
      }
      }
      }


14.08.2018 12:23, Christian Kandeler пишет:

On Tue, 14 Aug 2018 02:03:28 +0300
Карелин Павел  wrote:
  

I found a solution, but I would like to know how it is optimal:

Yes, that looks about right.
  

       Product {
       id: sonnetParseTrigrams
       //type: "application"
       type: ["application", "sonnet-parse-trigrams-run"]
       consoleApplication: true
       destinationDirectory: "./bin"

       name: "SonnetParseTrigrams"
       targetName: "sonnet_parsetrigrams"

       Depends { name: "cpp" }
       Depends { name: "SonnetCore" }
       Depends { name: "Qt"; submodules: ["core"] }

       cpp.defines: sonnet.cppDefines

       cpp.cxxLanguageVersion: "c++14"
       cpp.cxxFlags: sonnet.cxxFlags

       files: [
       "data/parsetrigrams.cpp"
       ]

       Group {
       fileTagsFilter: "application"
       fileTags: "sonnet-parse-trigrams"
       }
       }

       Product {
       type: "sonnet-parse-trigrams-run"
       name: "SonnetParseTrigramsRun"
       Depends { name: "SonnetParseTrigrams" }
       }

       Rule {
       inputs: ["sonnet-parse-trigrams"]

       // no inputs -> just a generator
       //multiplex: true

       Artifact {
       fileTags: ["sonnet-parse-trigrams-run"]
       filePath:
FileInfo.joinPaths(product.destinationDirectory, "trigrams.map")
       }
       prepare: {
       var runUtl = input.filePath;
       var sourceDir =
FileInfo.joinPaths(product.sourceDirectory, "data/trigrams");
       var outpu

Re: [Qbs] Running a helper application right after it is build

2018-08-13 Thread Карелин Павел

I found a solution, but I would like to know how it is optimal:

    Product {
    id: sonnetParseTrigrams
    //type: "application"
    type: ["application", "sonnet-parse-trigrams-run"]
    consoleApplication: true
    destinationDirectory: "./bin"

    name: "SonnetParseTrigrams"
    targetName: "sonnet_parsetrigrams"

    Depends { name: "cpp" }
    Depends { name: "SonnetCore" }
    Depends { name: "Qt"; submodules: ["core"] }

    cpp.defines: sonnet.cppDefines

    cpp.cxxLanguageVersion: "c++14"
    cpp.cxxFlags: sonnet.cxxFlags

    files: [
    "data/parsetrigrams.cpp"
    ]

    Group {
    fileTagsFilter: "application"
    fileTags: "sonnet-parse-trigrams"
    }
    }

    Product {
    type: "sonnet-parse-trigrams-run"
    name: "SonnetParseTrigramsRun"
    Depends { name: "SonnetParseTrigrams" }
    }

    Rule {
    inputs: ["sonnet-parse-trigrams"]

    // no inputs -> just a generator
    //multiplex: true

    Artifact {
    fileTags: ["sonnet-parse-trigrams-run"]
    filePath: FileInfo.joinPaths(product.destinationDirectory, 
"trigrams.map")

    }
    prepare: {
    var runUtl = input.filePath;
    var sourceDir = FileInfo.joinPaths(product.sourceDirectory, 
"data/trigrams");
    var outputFile = 
FileInfo.joinPaths(product.destinationDirectory, "trigrams.map");


    console.info("=== runUtl ===");
    console.info(runUtl);
    console.info(sourceDir);
    console.info(outputFile);

    var cmd = new Command(runUtl, [sourceDir, outputFile]);
    cmd.description = 'sonnet parse trigrams ';
    cmd.highlight = "filegen";
    return cmd;

    }
    }


13.08.2018 18:47, Карелин Павел пишет:



13.08.2018 11:31, Christian Kandeler пишет:

On Sun, 12 Aug 2018 22:56:31 +0300
Карелин Павел  wrote:


I have a project in which, in addition to the main application,
auxiliary utilities are builded. In this regard, I have two questions:

1) How do I run an auxiliary utility right after his built, so that it
could generate necessary data?

It works the same way as always: You trigger creation of the data by giving it 
some tag, and the tool's tag appears as some sort of input in the respective 
rule (which has the data as outputs).

That's the problem, that I do not have clear how to do it.
Not so long ago I made a rule for compiling cuda-files. Here is a 
shortened version:


Module {
    id: cuda
    Depends { name: "cpp" }

    FileTagger {
    patterns: "*.cu"
    fileTags: ["cuda"]
    }

    Rule {
    id: cudaCompiler
    inputs: ["cuda"]
    auxiliaryInputs: ["hpp"]

    Artifact {
    fileTags: ["obj"]
    filePath: FileInfo.joinPaths(".obj", 
Utilities.getHash(input.baseDir), input.fileName + ".o")

    }

    prepare: {
    var args = [];
    args.push(...);

    var cmd = new Command("/usr/bin/nvcuda", args);
    cmd.description = 'cuda compiling ' + input.fileName;
    cmd.highlight = "compiler";
    return cmd;
    }
    }
}

Everything is clear: there are files with the extension 'cu', the 
files are connected to the project. And there is a cuda compiler: 
/usr/bin/nvcuda.


In the current project, instead of /usr/bin/nvcuda, the newly-built 
utility should be used (call it sonnet_parsetrigrams). I do not 
understand how to write it down. Also what should I write in the 
FileTagger section? Files do not have an extension, these files are 
not connected to the project. All that is - the name of the directory 
in which these files are located.  The call of the utility is as 
follows: sonnet_parsetrigrams MyProjectDir/trigramsDir > trigrams.map



2) How to pass parameters to the auxiliary utility? The matter is that
the utility has one parameter - a directory name. It directory contains
text files without expansion, the utility has to process these files.
The output should be one file with the extension 'map'

You rule has to take care of that when creating the Command.


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


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


Re: [Qbs] Running a helper application right after it is build

2018-08-13 Thread Карелин Павел



13.08.2018 11:31, Christian Kandeler пишет:

On Sun, 12 Aug 2018 22:56:31 +0300
Карелин Павел  wrote:


I have a project in which, in addition to the main application,
auxiliary utilities are builded. In this regard, I have two questions:

1) How do I run an auxiliary utility right after his built, so that it
could generate necessary data?

It works the same way as always: You trigger creation of the data by giving it 
some tag, and the tool's tag appears as some sort of input in the respective 
rule (which has the data as outputs).

That's the problem, that I do not have clear how to do it.
Not so long ago I made a rule for compiling cuda-files. Here is a 
shortened version:


Module {
    id: cuda
    Depends { name: "cpp" }

    FileTagger {
    patterns: "*.cu"
    fileTags: ["cuda"]
    }

    Rule {
    id: cudaCompiler
    inputs: ["cuda"]
    auxiliaryInputs: ["hpp"]

    Artifact {
    fileTags: ["obj"]
    filePath: FileInfo.joinPaths(".obj", 
Utilities.getHash(input.baseDir), input.fileName + ".o")

    }

    prepare: {
    var args = [];
    args.push(...);

    var cmd = new Command("/usr/bin/nvcuda", args);
    cmd.description = 'cuda compiling ' + input.fileName;
    cmd.highlight = "compiler";
    return cmd;
    }
    }
}

Everything is clear: there are files with the extension 'cu', the files 
are connected to the project. And there is a cuda compiler: /usr/bin/nvcuda.


In the current project, instead of /usr/bin/nvcuda, the newly-built 
utility should be used (call it sonnet_parsetrigrams). I do not 
understand how to write it down. Also what should I write in the 
FileTagger section? Files do not have an extension, these files are not 
connected to the project. All that is - the name of the directory in 
which these files are located.  The call of the utility is as follows: 
sonnet_parsetrigrams MyProjectDir/trigramsDir > trigrams.map





2) How to pass parameters to the auxiliary utility? The matter is that
the utility has one parameter - a directory name. It directory contains
text files without expansion, the utility has to process these files.
The output should be one file with the extension 'map'

You rule has to take care of that when creating the Command.


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


[Qbs] Running a helper application right after it is build

2018-08-12 Thread Карелин Павел

Hi, guys

I have a project in which, in addition to the main application, 
auxiliary utilities are builded. In this regard, I have two questions:


1) How do I run an auxiliary utility right after his built, so that it 
could generate necessary data?
2) How to pass parameters to the auxiliary utility? The matter is that 
the utility has one parameter - a directory name. It directory contains 
text files without expansion, the utility has to process these files. 
The output should be one file with the extension 'map'


--
BR, Pavel Karelin

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


Re: [Qbs] QBS usage

2018-06-18 Thread Карелин Павел

Hi,

I use only QBS (for both workers and for my own projects).
On the previous place of work through QBS I builded billing system (The 
project was quite voluminous, though simple in structure).
On the current work with QBS I successfully build the Caffe-framework 
(with NVIDIA GPU support).


It would be desirable that new versions of QBS appeared in the form of 
SNAP of packages. Now I was already accustomed to collect new versions 
of QBS at the assembly stands, but at the beginning of a way it was a 
big problem. I think that the need to compile QBS independently for 
Linux/Unix systems is one of the limiting factors (albeit not the most 
significant) in the transition to QBS.

Also I would like to have a QBS-SNAP package without GUI dependencies.

--
BR, Pavel Karelin


16.06.2018 06:58, Tino Pyssysalo пишет:


Hello everyone,

I’m Tino Pyssysalo, the new product owner of QBS at the Qt Company.

I’d like to conduct a small survey about QBS usage in the community to 
make investment and feature decisions to the product.


I’d like to know, if you have used or are using QBS as a build system 
in real projects and all feedback and suggestions would be mostly 
welcome. This is a great opportunity to affect the future of QBS. 
Obviously, we are closely following QBS issues in Jira and in this 
mailing list, so there’s no need to report any known issues, unless 
you want to emphasize something extremely important to you.


Thanks in advance for everyone for helping me.

--

Best regards,

Tino Pyssysalo

Senior Manager

Product Management

The Qt Company

Hämeenkatu 14 C 25

33100 Tampere, Finland

tino.pyssys...@qt.io 

+358 40 8615475

http://qt.io 

The future is Written with Qt

---



___
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] Load qt-plugins

2017-12-21 Thread Карелин Павел

Hi, everyone

For my project, in addition to linking qt libraries, it also requires 
qt-plugins.
Where I can be placed the qt-plugins so that they can be seen the main 
qt libraries?


For example.
Main dir project: /opt/myproj
Qt-libs: /opt/myproj/lib

Where should the directory with plugins be located?

--
BR, Pavel Karelin

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


Re: [Qbs] "Multi" Properties

2017-12-18 Thread Карелин Павел

OK, understood.
Thank you!

18.12.2017 14:15, Christian Kandeler пишет:

On Mon, 18 Dec 2017 14:04:21 +0300
Карелин Павел <hka...@yandex.ru> wrote:


In my project, I use the following construction:

      cpp.defines: {
      var def = [];
      if (project.simdDebug)
      def.push("SIMD_DEBUG");

      if (project.useSimd)
      def.push("USE_SIMD");

      return def;
      }

It works fine.
But I decided to experiment and do the same through "Properties"

      Properties {
      condition: project.simdDebug
      cpp.defines: outer.concat(["SIMD_DEBUG"])
      }
      Properties {
      condition: project.useSimd
      cpp.defines: outer.concat(["USE_SIMD"])
      }

As a result, I get either SIMD_DEBUG or USE_SIMD at the output, but not
both at once.
Is it possible to get both values immediately using "Properties"?

No, the Properties items form an implicit "else if" chain, so the conditions 
should be mutually exclusive if the same property appears in more than one of them. They 
are not well-suited for additive semantics like in your example.


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


[Qbs] "Multi" Properties

2017-12-18 Thread Карелин Павел

Hi,

In my project, I use the following construction:

    cpp.defines: {
    var def = [];
    if (project.simdDebug)
    def.push("SIMD_DEBUG");

    if (project.useSimd)
    def.push("USE_SIMD");

    return def;
    }

It works fine.
But I decided to experiment and do the same through "Properties"

    Properties {
    condition: project.simdDebug
    cpp.defines: outer.concat(["SIMD_DEBUG"])
    }
    Properties {
    condition: project.useSimd
    cpp.defines: outer.concat(["USE_SIMD"])
    }

As a result, I get either SIMD_DEBUG or USE_SIMD at the output, but not 
both at once.

Is it possible to get both values immediately using "Properties"?

--
BR, Pavel Karelin
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] qm-file build as internal resource

2017-12-12 Thread Карелин Павел



12.12.2017 11:49, Christian Kandeler пишет:

On Mon, 11 Dec 2017 19:58:27 +0300
Карелин Павел <hka...@yandex.ru> wrote:


I'm build a third-party project. The peculiarity of the project is that
qm-files are represented as internal resources.
Now I solved the problem with a terrible hack:
1) Created the 'Translations' product
Product {
      name: "Translations"
      type: "qm"
      destinationDirectory: project.sourceDirectory + "/translations"

      Depends { name: "Qt.core" }
      files: ["*.ts"]
}

2) The results of the work 'Translations' are located in the
project.sourceDirectory + "/translations" directory
3) The main product made dependent on 'Translations'
Depends { name: "Translations" }

4) In the main product I cling the created qm-files through a qrc-resource
      Group {
      name: "translations"
      files: ["translations/translations.qrc"]
      }

Is it possible to solve this task in another way?
qm-resources should be placed by the path ":translations/"

You left out some details, so I have to take a guess. I assume you are listing the qm 
files "manually" in the qrc file, and that's what you want to get rid of?
In that case, something like the following looks adequate:

QtApplication { // Or whatever the main product is
 Group {
 name: "translations"
 files: ["/*.ts"]
 }
 Group {
 fileTagsFilter: ["qm"]
 fileTags: ["qt.core.resource_data"]
 }

 // See doc.qt.io/qbs/qt-modules.html#core-properties
 // for details.
 Qt.core.resourceSourceBase: Qt.core.qmDir
 Qt.core.resourcePrefix: "translations"
}

This should auto-generate the qrc file.
Christian, you were right in your guess. Indeed, the file 
translations.qrc is filled manually. Sorry that did not write about this 
at once. But unfortunately your recipe did not work. I see that qm-files 
are created in the assembly directory, but there is no resulting 
qrc-file. In addition, I have a couple more groups with resources. Will 
these groups be handled correctly?


    Group {
    name: "smileys"
    files: {
    var f = [];
    if (project.useSmileys === "yes")
    f = ["smileys/emojione.qrc"];
    else if (project.useSmileys === "min")
    f = ["smileys/smileys.qrc"];
    return f;
    }
    }

    Group {
    name: "resources"
    files: [
    "res.qrc",
    ]
    }


P.S. I can provide a link to the project on github, if that helps.




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


[Qbs] qm-file build as internal resource

2017-12-11 Thread Карелин Павел

Hi,

I'm build a third-party project. The peculiarity of the project is that 
qm-files are represented as internal resources.

Now I solved the problem with a terrible hack:
1) Created the 'Translations' product
Product {
    name: "Translations"
    type: "qm"
    destinationDirectory: project.sourceDirectory + "/translations"

    Depends { name: "Qt.core" }
    files: ["*.ts"]
}

2) The results of the work 'Translations' are located in the 
project.sourceDirectory + "/translations" directory

3) The main product made dependent on 'Translations'
Depends { name: "Translations" }

4) In the main product I cling the created qm-files through a qrc-resource
    Group {
    name: "translations"
    files: ["translations/translations.qrc"]
    }

Is it possible to solve this task in another way?
qm-resources should be placed by the path ":translations/"

--
BR, Pavel Karelin
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


[Qbs] Linking dynamic library with version

2017-12-09 Thread Карелин Павел

Hi,

I need to connect the dynamic library 'soxr' to the QBS project.
The system has a symlink of libsoxr.so.0 (with the version), but not 
libsoxr.so

How can I connect to the project libsoxr.so.0?

--
BR, Pavel Karelin
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] Licensing of my own QBS modules

2017-11-21 Thread Карелин Павел



21.11.2017 21:26, Карелин Павел пишет:



21.11.2017 20:03, Jake Petroules пишет:

Hi Pavel,

As the author and copyright holder, you're free to use whatever 
license you want. MIT is certainly a good choice.

Ok, this is great!



However, depending on the kind of functionality your modules provide, 
you may even like to upstream them to the Qbs project for inclusion 
in the official release. Perhaps you could upload the modules and we 
can take a look and see if it's a fit?
Xm, I do not think that you will find in my modules that it is really 
valuable :)  These are just small utilities. I did not intend to 
publish them, but so were the circumstances.

The modules are attached.

--
Pavel.

P.S.
I work in the Russian-language segment, so all comments are in 
Russian. If an incredible thing happens, and you like something, then 
you are ready to make explanations in English.

Sorry: "I" are ready to make explanations in English.




Cheers.


On Nov 21, 2017, at 3:10 AM, Карелин Павел <hka...@yandex.ru> wrote:

Hi, guys!

I wrote several modules that slightly extend the functionality of 
QBS. I want to place them on GitHub, for using their in both open 
source and commercial projects. Under what license should I place my 
modules?

Can I use a MIT license?

--
BR, Pavel Karelin


___
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] Licensing of my own QBS modules

2017-11-21 Thread Карелин Павел

Hi, guys!

I wrote several modules that slightly extend the functionality of QBS. I 
want to place them on GitHub, for using their in both open source and 
commercial projects. Under what license should I place my modules?

Can I use a MIT license?

--
BR, Pavel Karelin


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


Re: [Qbs] How build 32 bit application on 64 host OS

2017-10-18 Thread Карелин Павел

Good afternoon, guys

Thank you for your responses. They gave me some food for thought.

Yesterday I spent half a day trying to substitute package qmake (from 64 
bit to 32 bit). But I did not achieve much success.
In addition to the problems with creating Qt-profile in QtCreator for 
qmake-32, were added problems with resolution of header files for 32 bit 
libraries. For me, it remains a mystery why header files for 32-bit 
libraries are located in /usr/lib/x86_64-linux-gnu directory, while the 
libraries themselves are in /usr/lib/i386-linux-gnu ...


The funny thing about this situation is that the program should work on 
OrangePi One (architecture armv7). But since OrangePi had an emulator 
for Intel architecture 32 bit (ExaGear), then I thought why should I not 
immediately compile a program for Intel-32 on my working computer...  So 
I started this adventure ...


While I decided to stay on the native assembly on OrangePi

--
BR, Pavel Karelin



18.10.2017 07:54, Christian Gagneraud пишет:

On 18/10/2017 12:09 AM, Christian Kandeler wrote:

On Tue, 17 Oct 2017 12:20:12 +0300 Карелин Павел <hka...@yandex.ru>
wrote:


I'm working in Ubuntu 14.04, 64 bit. I use QtCreatir 4.4.1 Now I
needed to build a small qbs project for two architectures: intel 64
and 32 bits. I have installed qt4 system libraries, 64 and 32 bits
respectively. qmake - only 64 bits. Simultaneously install the
qmake to 64 and 32 bits - I can not, packages are mutually
exclusive.


Hm, doesn't that mean that one of the two Qt installations is
incomplete with regards to developing for it? You cannot build qmake
projects with the 32-bit version either, right? At the moment, qmake
is our entry point for setting up the Qt modules using setup-qt. If
you are working on the command line only, you might get away with
installing the two packages one after the other (both with their
associated qmake), calling setup-qt while they are "complete".
However, in Qt Creator you always need the right qmake.


I have similar problem, and i'm starting to think that Ubuntu is 
broken (17.04).


You cannot even compile qt for x86_32 on a x86_64 host without 
breaking your distro due to package conflicts (Thiago told me it is 
doable on OpenSuse).


BTW, Qt has dropped linux-32 support starting with Qt-5.6 ...

I am now using a 32 bits VM in the mean time for my dev, If you build 
a 32 bits version of Qt within the 32 bits VM, then when you install 
it on linux-64 system it won't work, qmake cannot be run (something to 
do with rpath and/or ld.so), i have wasted lot of time on this, and i 
still don't have a solution.


Anyway, this is not a qbs-specific nor a qtc-specific problem, it is a 
qmake and/or ubuntu issue.


Карелин, you might want to resend your message to the "interest" 
mailing list.



chris
___
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] How build 32 bit application on 64 host OS

2017-10-17 Thread Карелин Павел

Hi,

I'm working in Ubuntu 14.04, 64 bit. I use QtCreatir 4.4.1
Now I needed to build a small qbs project for two architectures: intel 
64 and 32 bits.
I have installed qt4 system libraries, 64 and 32 bits respectively. 
qmake - only 64 bits.
Simultaneously install the qmake to 64 and 32 bits - I can not, packages 
are mutually exclusive.

Tell me how to assemble the project simultaneously for 64 and 32 bits?

--
BR, Pavel Karelin
___
Qbs mailing list
Qbs@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qbs


Re: [Qbs] How to pass a GCC parameter '--param inline-unit-growth=120'

2017-07-31 Thread Карелин Павел



31.07.2017 13:11, Christian Kandeler пишет:

On Mon, 31 Jul 2017 12:54:43 +0300
Карелин Павел <hka...@yandex.ru> wrote:


For a GCC compiler, I need to pass a parameter: --param
inline-unit-growth=120
I do this as follows
cpp.driverFlags: [
  "--param inline-unit-growth=120",
]

Why are you passing this as one string? Clearly, these are two separate 
command-line arguments:
 cpp.driverFlags: ["--param", "inline-unit-growth=120"]
Because logical - it's a uniform parameter. And I haven't guessed that 
it should be transmitted in two parts.

Thanks for the advice - it works

--
Pavel





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


[Qbs] How to pass a GCC parameter '--param inline-unit-growth=120'

2017-07-31 Thread Карелин Павел

Hi,

For a GCC compiler, I need to pass a parameter: --param 
inline-unit-growth=120

I do this as follows
cpp.driverFlags: [
"--param inline-unit-growth=120",
]

When I build, I get the following error message:

/usr/bin/g++ -O2 -Wall -Wextra*'--param inline-unit-growth=120'* -m64 
-pipe -fexceptions -fvisibility=default -std=c++11 -ggdb3 -Winline -Wall 
-Wextra -Wno-unused-parameter -DNDEBUG -DVERSION_PROJECT=0.9.13 
-DVERSION_PROJECT_MAJOR=0 -DVERSION_PROJECT_MINOR=9 
-DVERSION_PROJECT_PATCH=13 '-DGIT_REVISION="e3f7fd9"' 
-DQ_DATA_STREAM_VERSION=QDataStream::Qt_4_8 -DBPROTOCOL_VERSION_LOW=0 
-DBPROTOCOL_VERSION_HIGH=1 '-DUDP_SIGNATURE="27FR"' 
'-DCONFIG_DIR="27FacesRetail"' -DCPU_ONLY -DUSE_MKL -D_7ZIP_ST 
-D_7ZIP_ASM -DLZMA_COMPRESSION -DPPMD_COMPRESSION -DQT_CORE_LIB 
-DQT_NO_DEBUG -DQT_NETWORK_LIB 
-I/home/hkarel/CProjects/27FacesRetail/src/27fretaild 
-I/home/hkarel/CProjects/27FacesRetail/src 
-I/home/hkarel/CProjects/27FacesRetail/src/3rdparty 
-I/home/hkarel/CProjects/27FacesRetail/src/common 
-I/home/hkarel/CProjects/27FacesRetail/src/compression/src 
-I/usr/include/qt4 -I/usr/include/qt4/QtCore 
-I/usr/share/qt4/mkspecs/linux-g++-64 
-I/home/hkarel/CProjects/27FacesRetail/build/qtc_Qt_486_d423b044-release/27Faces-Retail.qtc-Qt-486-d423b044.05dbb98f/qt.headers 
-I/usr/include/qt4/QtNetwork 
-I/home/hkarel/CProjects/27FacesRetail/src/shared 
-I/home/hkarel/CProjects/27FacesRetail/src/shared/shared 
-I/home/hkarel/CProjects/27FacesRetail/build/qtc_Qt_486_d423b044-release/SharedLib.qtc-Qt-486-d423b044.72e7795c/qt.headers 
-isystem/home/hkarel/CProjects/27FacesRetail/src/27fretaild 
-isystem/home/hkarel/CProjects/27FacesRetail/src 
-isystem/home/hkarel/CProjects/27FacesRetail/src/3rdparty 
-isystem/home/hkarel/CProjects/27FacesRetail/src/common 
-isystem/home/hkarel/CProjects/27FacesRetail/src/compression/src 
-isystem/usr/include/qt4 -isystem/usr/include/qt4/QtCore 
-isystem/usr/share/qt4/mkspecs/linux-g++-64 
-isystem/home/hkarel/CProjects/27FacesRetail/build/qtc_Qt_486_d423b044-release/27Faces-Retail.qtc-Qt-486-d423b044.05dbb98f/qt.headers 
-isystem/usr/include/qt4/QtNetwork 
-isystem/home/hkarel/CProjects/27FacesRetail/src/shared 
-isystem/home/hkarel/CProjects/27FacesRetail/src/shared/shared 
-isystem/home/hkarel/CProjects/27FacesRetail/build/qtc_Qt_486_d423b044-release/SharedLib.qtc-Qt-486-d423b044.72e7795c/qt.headers 
-isystem/opt/opencv/3.3.0/include -isystem/opt/intel/caffe/1.0.2/include 
-isystem/home/hkarel/CProjects/27FacesRetail/src/3rdparty/cereal/1.1.1/include 
-isystem/home/hkarel/CProjects/27FacesRetail/src/3rdparty/jda/1.0.0/include 
-isystem/home/hkarel/CProjects/27FacesRetail/src/yaml/include 
-isystem/home/hkarel/CProjects/27FacesRetail/src/3rdparty/liblinear/1.0.0 
-isystem/home/hkarel/CProjects/27FacesRetail/src/3rdparty/pico/1.0.0 
-isystem/home/hkarel/CProjects/27FacesRetail/src/3rdparty/superviseddescent/0.4.1/include 
-isystem/home/hkarel/CProjects/27FacesRetail/src/3rdparty/eigen/3.2.8 
-isystem/home/hkarel/CProjects/27FacesRetail/src/3rdparty/vlfeat/0.9.20 
-isystem/home/hkarel/CProjects/27FacesRetail/src/3rdparty/vlfeat/0.9.20/vl 
-o 
/home/hkarel/CProjects/27FacesRetail/build/qtc_Qt_486_d423b044-release/27Faces-Retail.qtc-Qt-486-d423b044.05dbb98f/.obj/73489b871e127538/moc_27fretail_appl.cpp.o 
-c 
/home/hkarel/CProjects/27FacesRetail/build/qtc_Qt_486_d423b044-release/27Faces-Retail.qtc-Qt-486-d423b044.05dbb98f/qt.headers/moc_27fretail_appl.cpp


g++: error: unrecognized command line option ‘--param 
inline-unit-growth=120’



If I pass '-param inline-unit-growth = 120' without quotes in commsnd 
line - this errordoes not occur:


/usr/bin/g++ -O2 -Wall -Wextra *--param inline-unit-growth=120* -m64 
-pipe -fexceptions -fvisibility=default -std=c++11 -ggdb3 -Winline -Wall 
-Wextra -Wno-unused-parameter -DNDEBUG -DVERSION_PROJECT=0.9.13 
-DVERSION_PROJECT_MAJOR=0 -DVERSION_PROJECT_MINOR=9 
-DVERSION_PROJECT_PATCH=13 '-DGIT_REVISION="e3f7fd9"' 
-DQ_DATA_STREAM_VERSION=QDataStream::Qt_4_8 -DBPROTOCOL_VERSION_LOW=0 
-DBPROTOCOL_VERSION_HIGH=1 '-DUDP_SIGNATURE="27FR"' 
'-DCONFIG_DIR="27FacesRetail"' -DCPU_ONLY -DUSE_MKL -D_7ZIP_ST 
-D_7ZIP_ASM -DLZMA_COMPRESSION -DPPMD_COMPRESSION -DQT_CORE_LIB 
-DQT_NO_DEBUG -DQT_NETWORK_LIB 
-I/home/hkarel/CProjects/27FacesRetail/src/27fretaild 
-I/home/hkarel/CProjects/27FacesRetail/src 
-I/home/hkarel/CProjects/27FacesRetail/src/3rdparty 
-I/home/hkarel/CProjects/27FacesRetail/src/common 
-I/home/hkarel/CProjects/27FacesRetail/src/compression/src 
-I/usr/include/qt4 -I/usr/include/qt4/QtCore 
-I/usr/share/qt4/mkspecs/linux-g++-64 
-I/home/hkarel/CProjects/27FacesRetail/build/qtc_Qt_486_d423b044-release/27Faces-Retail.qtc-Qt-486-d423b044.05dbb98f/qt.headers 
-I/usr/include/qt4/QtNetwork 
-I/home/hkarel/CProjects/27FacesRetail/src/shared 
-I/home/hkarel/CProjects/27FacesRetail/src/shared/shared 
-I/home/hkarel/CProjects/27FacesRetail/build/qtc_Qt_486_d423b044-release/SharedLib.qtc-Qt-486-d423b044.72e7795c/qt.headers 

Re: [QBS] module for KDSoap

2016-09-20 Thread Карелин Павел

Hello, Ioan.


20.09.2016 12:35, Ioan Calin Borcoman пишет:

Adding to both the module and the project using it:

   Depends { name: "Qt"; submodules: ["core", "network"]}

didn't solve the problem, unfortunately.

I have reported this as https://bugreports.qt.io/browse/QBS-1021.

Regarding your suggestion b), how can I do it? I haven't seen any qbs
examples returning multiple executables for the same rule. Also, from
what I understand, the "wsdl_foo.h" should be tagged as "hpp", while
the "wsdl_foo.cpp" as "cpp". Is my understanding correct? Can I do
this using a single rule? How?
I also had a similar problem on generation the soap- cpp/h files. I 
managed to solve this problem.
I have attached an example of his QBS-module. Perhaps he will prompt you 
how to solve the problem.


Thank you,

Ioan

On Tue, Sep 20, 2016 at 3:51 AM, Christian Kandeler
 wrote:

Ioan Calin Borcoman  wrote:


I'm trying to write a module that generates wsdl_foo.h and
wsdl_foo.cpp from foo.wsdl, using KDSoap's kdwsdl2cpp
(https://github.com/KDAB/KDSoap).

After it is generated, the wsdl_foo.h should be parsed by moc, as it
contains an QObject based class.
The problem is that moc is sometimes called and sometimes isn't. If I
delete the build tree and try to run qbs from scratch, the moc is not
run and the build fails.

But if I touch my kdsoap.qbs module, even if I don't change anything
in it, and then run again qbs, the moc is run and my project builds.

Two observations:
a) Your module does not have a Qt dependency. Does your product have one?
b) (Probably unrelated to your problem) It is confusing (though not technically 
wrong) that you declare two rules. You should have only one rule that creates 
two commands.

If your answer to a) is "yes", then please file a bug at bugreports.qt.io and 
attach a complete (i.e. including source files), but minimal 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


--
Best regards,
Pavel Karelin.

import qbs
import qbs.File
import qbs.TextFile
import qbs.ModUtils


Module {
id: gsoap
condition: true

Depends { name: "cpp" }

property string namespace: undefined
property string modulePath: ""
property string importPath: ""
property string soapcpp2: ""
property bool   debug: false

property string generatedFilesDir: {
return product.buildDirectory + "/." + (namespace === undefined ? "soap" : namespace);
}

property string includePaths: {
return generatedFilesDir;
}

PropertyOptions {
name: "namespace"
description: "Определяет имя пространства имен для функций soap-движка."
}
PropertyOptions {
name: "modulePath"
description: "Директория расположения файлов stdsoap2.h, stdsoap2.cpp"
}
PropertyOptions {
name: "importPath"
description: "Директория расположения файлов импорта gsoap"
}
PropertyOptions {
name: "soapcpp2"
description: "Утилита soapcpp2"
}
PropertyOptions {
name: "debug"
description: "Сборка в режиме отладки"
}
PropertyOptions {
name: "generatedFilesDir"
description: "Директория размещения сгенерированных файлов, так же \
  в эту директорию копируются файлы stdsoap2.h, stdsoap2.cpp"
}

cpp.defines: {
var def = [
"WITH_COOKIES",
"WITH_GZIP",
"WITH_OPENSSL",
];

if (debug === true)
def.push("SOAP_DEBUG");

return def;
}

cpp.includePaths: {
return this.includePaths;
}

validate: {
var validator = new ModUtils.PropertyValidator("gsoap");
//validator.setRequiredProperty("namespace", namespace);
validator.setRequiredProperty("modulePath", modulePath);
validator.setRequiredProperty("importPath", importPath);
validator.setRequiredProperty("soapcpp2", soapcpp2);
validator.validate();

if (!File.exists(modulePath + "/stdsoap2.h"))
throw "Base soap-header file not found: " + modulePath + "/stdsoap2.h";

if (!File.exists(modulePath + "/stdsoap2.cpp"))
throw "Base soap-source file not found: " + modulePath + "/stdsoap2.cpp";
}

 //FileTagger {
 //patterns: ["*.wsdl"]
 //fileTags: ["wsdl"]
 //}

FileTagger {
patterns: "*.soap.h"
fileTags: ["soap"]
}

Rule {
inputs: ["soap"]
outputFileTags: ["cpp", "hpp"]

[QBS] Directive import qbs. Whether it is necessary to define a version?

2015-05-16 Thread Карелин Павел

Hi, guis!

Almost always qbs-scripts is beginning from a directive import qbs. In 
some scripts, the version is assigned (import qbs 1.0), but in others 
- is no (import qbs).

In what cases, is need to specify the version?

--
Best regards,
Pavel Karelin.
___
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 Карелин Павел

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 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-19 Thread Карелин Павел


20.10.2014 00:00, Orgad Shaneh пишет:


Qt Creator requires Qt 5.3 starting from 3.3.

I do not mind Qt5, only problem with fonts I would like to see is 
fixed.  Eyes do not last  forever ...




- Orgad

בתאריך 19 באוק 2014 22:58, Карелин Павел hka...@yandex.ru 
mailto:hka...@yandex.ru כתב:


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 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 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


[QBS] Qt 4.8.6 mingw482. Qt-profiles can't be created (bugreport QBS-629).

2014-06-22 Thread Карелин Павел

Hello,

I installed qt-opensource-windows-x86-mingw482-4.8.6-1.exe. Next step - 
cloning QBS from git-repository. Then build QBS (branch 1.2); 
configuring QBS-profiles. When run qbs-setup-qt.exe --detect I receive a 
mistake: mkspec '${MINGW482_INSTDIR}/mkspecs/win32-g++-4.6' does not exist




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