Re: [QBS] Use case of "action" targets (QBS-262)

2015-10-05 Thread Christian Kandeler
On 10/05/2015 11:25 AM, Denis Shienkov wrote:
>  > See for instance share/qbs/imports/qbs/base/AutotestRunner.qbs, which
> implements qbs's equivalent of "make check".
>
> Thanks, but I do not understand:
> * how to run this "equivalent of "make check"" from the command line?
> * and how to run this, using QtCreator, for example?

See the documentation:
http://doc.qt.io/qbs/autotestrunner-item.html
In Creator, you run ("build") the respective AutotestRunner instance by 
right-clicking on the product name and choosing "build" from the context 
menu.


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


Re: [QBS] Use case of "action" targets (QBS-262)

2015-10-05 Thread Christian Kandeler
On 10/04/2015 05:34 PM, Denis Shienkov wrote:
> Could someone explain about this feature:
> https://bugreports.qt.io/browse/QBS-262 ?
> Is there are any examples how to use it?

See for instance share/qbs/imports/qbs/base/AutotestRunner.qbs, which 
implements qbs's equivalent of "make check".


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


Re: [QBS] Creator code style

2015-09-28 Thread Christian Kandeler
On 09/28/2015 09:58 AM, Tyler Daniel wrote:
> Both the qmake and qbs projects in my workspace build fine.
>
> I understand that the code style settings are not logically related to the 
> build system.  But I observe that custom settings have no effect on the 8 qbs 
> projects and do have effect on the 3 qmake projects in my workspace.
> I was hoping that someone else using qbs and Creator might try to change the 
> indent, for example, and see if it works.  If it doesn’t I’ll report it as a 
> bug.

Wow, you are right, it has no effect with qbs projects. Consider me stunned.
Please file a bug to Qt Creator, component "C++ support".


Thanks,
Christian

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


Re: [QBS] Creator code style

2015-09-28 Thread Christian Kandeler
> Does Creator’s code style work for anyone when using qbs?
> I’ve tried creating custom settings and applying them at the global and 
> project level (and both) but the settings are never applied.  (E.g., I set 
> indent to be two spaces in the custom settings, but indent always inserts 
> four.)
> The settings work as expected with qmake-based projects open in the same 
> workspace.

These settings are not related to the build system. The only possible 
explanation I have is that the Kit you use with qbs is invalid so that 
Creator does not find some included file and the C++ parser gets 
confused. In that case, your project should not compile either.


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


Re: [QBS] Help on rule usage

2015-09-04 Thread Christian Kandeler
On 09/03/2015 07:43 PM, olivier musse wrote:
>>> Product {
>>> type:['dynamicLibrary','mylib']
>> I assume you really have an artifact with the tag "mylib"?
> I added it because for the rule I have tried as artifact fileTags both
> "myapp" and "mylib" so this is in my sample not useful
>>
>>> name:'myLibrary'
>>> }
>>>
>>> Product {
>>> type:['application','myapp']
>>>
>>> Rule{
>>>inputs:['dynamicLibrary']
>>> inputsFromDependencies:['myLibrary']
>> This is the name of your library, not a file tag.
> You are right I was thinking it must be a library name and the
> associated filetags in inputs.
> I do no understand how to specify a filetags associated to the output of
> myLibrary (the generated dll file) ?
>> Also, I don't see a dependency on the library anywhere.
> Yes sorry I forgot to write it in the mail but of course there is a
> Depends{name:"myLibrary"} in my application product

Please provide a complete minimal project that exhibits the problem. 
Attach (or copy-paste) actual files, not approximations. Otherwise it's 
hard to find out where the problem lies exactly.


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


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

2015-09-04 Thread Christian Kandeler
On 09/03/2015 06:16 PM, Tyler Daniel wrote:
> I’ve tried using the project wizards to create several kinds of qbs-built 
> projects on Win7.  I’ve tried 3.5.0 and 3.4.2.  In both cases Creator can’t 
> even parse the generated qbs file.

What does "can't parse" mean? What is the output?
Are you sure you have a valid Kit attached to your project?

> The same releases on my Mac work fine.

There is nothing OS-specific about this.

> If I take a qbs project that works on my Mac and copy it over, I run into the 
> problem that the profiles that Creator uses don’t have a compiler or 
> toolchain directory defined.

The qbs profiles are derived from Creator's Kits. If the profile does 
not have a toolchain, then the Kit usually has no compiler set. Or 
perhaps it was misdetected in some way; hard to say without concrete 
data. You'd have to show us at least your Kit and the qbs profile that 
Creator made from it.


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


Re: [QBS] On the use of "Depends" keyword

2015-09-04 Thread Christian Kandeler
On 09/04/2015 03:59 AM, Jake Petroules wrote:
> Product {
>  type: ["dynamiclibrary"]
>  name: "lib2"
>  Depends { name: "Qt.core" }
>  Depends { name: "lib1"; required: false }

Note that "required" works only for modules at the moment; this is 
tracked in QBS-610.


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


Re: [QBS] Help on rule usage

2015-09-03 Thread Christian Kandeler
On 09/03/2015 05:00 PM, olivier musse wrote:
> I would like, in a rule of a product (application), apply some
> modification on the target files of another product (dynamic library) on
> which the application depends.
> I tried using inputsFromDependencies as following but is does not works.

Note that "does not work" is the least helpful description possible.

> Product {
>   type:['dynamicLibrary','mylib']

I assume you really have an artifact with the tag "mylib"?

>   name:'myLibrary'
> }
>
> Product {
>   type:['application','myapp']
>
>   Rule{
>  inputs:['dynamicLibrary']
>   inputsFromDependencies:['myLibrary']

This is the name of your library, not a file tag.
Also, I don't see a dependency on the library anywhere.

>   Artifact{
> filePath:input.filePath
> fileTags:"myapp"
>   }
>   prepare: .
>   }
> }

Christian

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


Re: [QBS] Rule generating lots of files

2015-08-26 Thread Christian Kandeler
On 08/26/2015 05:24 PM, Stephan Gatzka wrote:
> My problem is, that I can't specify wildcards in the outputArtifacts
> property, so currently I only see to specify every single file by hand
> in outputArtifacts, which is rather tedious and in addition might change
> because depending from the inputs.
>
> Is there a clever way to achieve this? A workaround might be to generate
> a list of C files in the prepare script and hand over that list to
> outputArtifacts?

The outputArtifacts script is called first, and the prepare script gets 
its information about what the outputs are from there.
For the case where the Rule cannot know in advance which outputs will be 
generated (e.g. because that depends on the contents of input files 
and/or the logic to derive the file paths would duplicate lots of code 
from the tool to run), there are the following approaches:
 a) Ideally, the tool provides some sort of "dry run" mode where it
only generates the information about which files it would create.
You would call the tool in that mode in the outputArtifacts
script.
 b) You call the tool twice. The first run happens in the
outputArtifacts script and is only used to find out which
files were generated. Can be tolerable if running the tool is
cheap.
 c) If b) is too expensive, you can cheat and do the actual work
in the outputArtifacts script, making the prepare script
a no-op. I think Jake Petroules has worked on a somwhat cleaner
version of this approach recently: he might want to chime in
here.


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


[QBS] qbs 1.4.2 released

2015-08-24 Thread Christian Kandeler
Hi,

qbs 1.4.2 is out. This release fixes a number of bugs, the most 
important ones probably being those related to module dependencies in 
Export items.
Source packages and a binary package for Windows are available at 
http://download.qt.io/official_releases/qbs/1.4.2.
This version of qbs is also part of Qt Creator 3.5.0.


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


Re: [QBS] Setting multiple profiles for sub-projects

2015-08-10 Thread Christian Kandeler
On 08/09/2015 07:19 PM, Stephan Gatzka wrote:
> I setup successfully qbs to build my cjet project. For continuous
> integration I'd like to setup a "surrounding" qbs file which sets the
> profiles the cjet project:
>
> Project {
> name: "cjet CI"
> minimumQbsVersion: "1.4.0"
>
> SubProject {
>   filePath: "cjet.qbs"
>   Properties {
> name: "cjet"
> profiles: ["gcc", "clang"]

The Project item has no "profiles" property. You might want to report it 
as a bug if you don't get a warning here.

>   }
> }
>
> Product {
>   name: "cjet continuous integration"
>   Depends { name: "cjet" }
>   profiles: ["gcc", "clang"]
> }
> }
>
>
> If I use this file. I get the error:
> Product dependency 'cjet' not found for profile 'gcc'.
>
> So it only seem to work if I also set profiles in the cjet.qbs file. But
> that is something I didn't want to because I often have to cross compile
> this program and don't know the profile beforehand.
>
> Nevertheless, for a continuous build a selection of some pre-defined
> profiles would be helpful. Is that possible to be specified in a qbs
> file like above or do I have to run qbs repeatedly with different profiles?

It seems to me that what you are trying to do is not what the "profiles" 
property is for. The use case it is intended to support is projects that 
need to incorporate different architectures in the same build (e.g. 
Android projects or cross-compiled projects that need to build host 
tools as well). Your use case, if I understand correctly, is much 
simpler in that you just want to build your entire project for different 
profiles. This is achieved by just giving the profiles on the command line:
 $ qbs build profile:gcc profile:clang
This will create two separate builds in parallel.


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


Re: [QBS] Using qbs for in-source build

2015-08-05 Thread Christian Kandeler
On 08/05/2015 10:31 AM, Joerg Bornemann wrote:
> On 04-Aug-15 22:14, Orgad Shaneh wrote:
>
>>* If I delete the output file it is not regenerated (unless I delete
>>  the build graph, which regenerates all the files)
>
> The timestamps are stored in the build graph for performance reasons
> (esp. for Windows). If you mess around with the contents of the build
> dir you must pass --check-timestamps to qbs.

But note that this is merely a quick fix for the "I have screwed up" 
case. We do not recommend using it as part of your regular process.

>>* If the source file is modified, but the target file has a newer date
>>  (e.g. pbuilder was invoked from the shell), it is still regenerated.
>
> Probably because the target file path in your output artifact is never
> generated. You said pbuilder will generate files in the source dir.
> You could add a rule "html" -> "html-copy" that copies each HTML file
> into the build dir. Then a rule "html-copy" -> "html-cpp" runs pbuilder
> in the build dir where the cpp files will end up.

I think what Orgad meant is that -- much like in the scenario above -- 
he updates the output file outside of qbs. So the same answer would 
apply here.


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


Re: [QBS] Console appears

2015-08-05 Thread Christian Kandeler
On 08/05/2015 01:10 AM, Julien Kirsch wrote:
> Hi,
> in my recent project I need to get the rid of the console, since I have
> use for it.
> I took a look at your "examples" and found the following code fragment:
>
> "consoleApplication: true"
>
> It looked like a simple solution, but soon I found out, that has
> actually no effect.
> When it is set to "false", I still have a "console" appear on my screen.

I'm not sure I'm following. Are you talking about Qt Creator?


Christian

>
> These are my build files I use:
> [Noir.qbs]
>
> import qbs
>
> Product{
>
> name: "Noir"
> type: "application"
> consoleApplication: "false"
> files: [
> "src/Noir.cpp"]
> Depends{ name: "cpp" }
> Depends{ name: "Noir.Graphics" }
> cpp.includePaths: "include"
> Group{
> qbs.install: true
> fileTagsFilter: "application"
> }
> }
>
> [Graphics.qbs]
>
> import qbs
>
> Product{
>
> name: "Noir.Graphics"
> type: "dynamiclibrary"
> files: ["src/Window.cpp"]
> Depends{ name: "cpp" }
> cpp.includePaths: "include"
> cpp.defines:{
> // Apply diffrent macros for each platform
> if(qbs.targetOS == "windows")
> return ["OS_WINDOWS","LIB_EXPORTS"]
> else if(qbs.targetOS == "linux")
> error("Module 'Graphics' not implemented for linux yet!")
> // return ["OS_LINUX"]
> else if(qbs.targetOS == "osx")
> error("Module 'Graphics' not implemented for osx yet!")
> //return ["OS_X"]
> }
> cpp.staticLibraries:{
> // Apply diffrent libraries for each platform
> if(qbs.targetOS == "windows")
> return ["user32.lib","opengl32.lib"]
> else if(qbs.targetOS == "linux")
> error("Module 'Graphics' not implemented for linux yet!")
> // return ""
> else if(qbs.targetOS == "osx")
> error("Module 'Graphics' not implemented for osx yet!")
> // return ""
> }
> Export{
> Depends{ name: "cpp" }
> cpp.includePaths: "include"
> }
>
> Group{
> qbs.install: true
> fileTagsFilter: "dynamiclibrary"
> }
> }
>
>
> I tried to set the "consoleApplication" value to false in both modules;
> simultanously and seperately.
>
> What am I missing?
>
> Sincerely,
> J.A. Kirsch
>
>
>
>
> ___
> 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] ReferenceError: Can't find variable: type

2015-07-29 Thread Christian Kandeler
On 07/29/2015 10:38 AM, Denis Shienkov wrote:
>  > so the example you posted is not valid code and the error
> message is correct.
>
> 1) Why then this does not work even when I add the "product.type"
> instead of "type" inside the module?

I don't know. That's a different issue that would need to be investigated.

> BTW,
> This bug is in "reported" state about a month..
> Or do you think that it not a hard error and it shouldn't be fixed at all?

The bug you reported is about the WiX module, which seems to have a 
simple typo. Anything else belongs into a different bug report.


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


Re: [QBS] ReferenceError: Can't find variable: type

2015-07-29 Thread Christian Kandeler
On 07/29/2015 09:43 AM, Denis Shienkov wrote:
> Hi folks,
>
> is there are any progress with this?

Please don't cross-post. There is also no need to duplicate JIRA issues 
on the mailing list.
As I have pointed out before, there is no such thing as "type" in that 
context, so the example you posted is not valid code and the error 
message is correct.


Christian

>
> BR,
> Denis
>
> 2015-07-15 11:32 GMT+03:00 Denis Shienkov  >:
>
> Hi all.
>
> Can someone look on this bug: https://bugreports.qt.io/browse/QBS-832 ?
>
> There is an epic bug which can be reproduced so:
>
>
> =
> 
> c:\Qt\Qt5.5.0-msvc\Tools\QtCreator\share\qtcreator\qbs\share\qbs\modules\foo\FooModule.qbs
> =
>
> import  qbs
> import  qbs.ModUtils
>
> Module {
>  property stringList example: type.contains("bla") ? ["123"] : ["456"]
> }
>
> === test.qbs ==
>
> import  qbs
>
> Project {
>  Product {
>  name:"Bar"
>  Depends {name:"foo"  }
>  foo.example: ["789"]// <<< this fails  }
> }
>
>
> In this case unable to open the QBS project at all, because can not
> parse:
>
> "ReferenceError: Can't find variable: type"
>
> This does not work on Windows 8x32, QtCreator 3.4.2.. But works with
> QtCreator 3.4.1.
>
> What is it? :((
>
> BR,
> Denis
>
> //
>
>

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


Re: [QBS] Execute dependent rule

2015-07-23 Thread Christian Kandeler
On 07/23/2015 04:59 PM, Waldschmidt, Stefan wrote:
> I am struggling for a while trying to trigger a Rule on completion of an
> Application.
> In any way I tried it, the Rule is never executed.
> Here is a small example, which do not work for me, because the Rule is
> never executed.
>
> import qbs 1.0
> import qbs.File
> import qbs.FileInfo
>
> Project {
>  name: "mainproject"
>  minimumQbsVersion: "1.4.0"
>
>
>  Product {
>  name: "helloworld"
>  type: "application"
>  files: "main.c"
>  Depends { name: "cpp" }
>  }
>
>  Product {
>  name: "copy"
>  type: ["custom-image"]
>  Depends { name:"helloworld" }
>
>  Rule {
>  multiplex: true
>  inputsFromDependencies: ["application"]
>
>  prepare: {
>  var cmds = [];
>
>  var cmd = new JavaScriptCommand();
>  cmd.description = "deploy " + input.filePath;
>  cmd.highlight = "codegen";
>  cmd.sourceCode = function() {
>  File.copy(input.filePath, "/tmp/helloworld");
>  }
>  cmds.push(cmd);
>  return cmds;
>  }
>  }
>  }
> }
>
> Probably I am making a noob's mistake. I would be very glad for any hint.

Your rule is missing an output artifact. There always needs to be a 
chain of file tags leading to your product type. In your case, this 
should do the trick:
 Artifact {
 filePath: "/tmp/helloworld"
 fileTags: ["custom-image"]
 }
And then use output.filePath in the command's source code.


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


Re: [QBS] Dependency to Transformer Artifact

2015-07-20 Thread Christian Kandeler
On 07/19/2015 12:06 PM, Stephan Gatzka wrote:
> I wrote a small qbs module to generate version information from an
> version input file. So I have a Module consisting of a Transformer which
> has an Artifact item with fileTags: ["version"].
>
> The version.h file is correctly generated but the c file including
> version.h is not rebuild.

I cannot reproduce that. I've changed the product version, and both 
version.h and main.c were regenerated. What exactly did you try?
(But see below for some other possible improvements in your module.)

> Module {
>Transformer {

I'd suggest using a Rule instead of a Transformer here. Working on input 
tags instead of hardcoded files gives you more flexibility. In general, 
Rules are preferable whenever inputs exist.

>  inputs: "version.h.in"
>
>  Artifact {
>filePath: "version.h"
>fileTags: ["version"]

The tag should be "hpp".

>  }
>
>  prepare: {
>var cmd = new JavaScriptCommand();
>cmd.description = "Processing '" + input.fileName + "'";
>cmd.highlight = "codegen";
>cmd.sourceCode = function()  {
>  var file = new TextFile(input.fileName);

You should use input.filePath here. input.fileName is really just the 
name of the file, which is not what you want.

>  var content = file.readAll();
>  file.close()
>  content = content.replace(/##VERSION_STR##/g, product.version);
>  file = new TextFile(output.fileName,  TextFile.WriteOnly);

output.filePath, as above.


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


Re: [QBS] How to redirect Command output into file

2015-07-20 Thread Christian Kandeler
On 07/20/2015 04:00 AM, Andrii Anpilogov wrote:
> Yup. I tried to use TextFile and got next error:
> :-1: warning: Error when calling output filter function: ReferenceError:
> Can't find variable: TextFile

Hm, that's a bug then, Apparently, the our extensions are not available 
in the filter function. Could you please file a report?
You can work around this problem by using a JavaScriptCommand and 
employing qbs.Process there to call the nm tool.


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


Re: [QBS] How to redirect Command output into file

2015-07-17 Thread Christian Kandeler
On 07/17/2015 01:43 PM, Andrii Anpilogov wrote:
> I could not find a way to generate symbol file with QBS and GCC.

See http://doc.qt.io/qbs/jsextension-textfile.html


Christian

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


Re: [QBS] Merging exported cpp properties

2015-07-15 Thread Christian Kandeler
On 07/13/2015 06:10 PM, Ilya Lyubimov wrote:
> I found that new version of qbs now merges identical compiler flags in
> dependent products. This removes duplicated flags, but unfortunately
> it doesn't work properly for flags consisting of two strings, for
> example "-arch i386 -arch x86_64" becomes "-arch i386 x86_64". This
> behaviour was introduced in 16404c356b0e160243de315c48975a82cc343893.
>
> I can fix it locally by removing "lst.removeDuplicates();" from
> insertExportedModuleProperties function in projectresolver.cpp. But I
> don't know the proper way for solving this issue.

Yeah, merging list properties is an "interesting" problem in general. 
This particular issue should disappear as a side effect of a patch that 
is currently in progress and will fix a whole bunch of Export-related bugs.


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


Re: [QBS] Install group doesn't work

2015-07-09 Thread Christian Kandeler
On 07/09/2015 04:56 PM, Иван Комиссаров wrote:
> Hi everybody.
> I have a simple group that installs an icns file:
>
> Application {
>
> Group{
>
> name:".icns"
>
> condition:qbs.targetOS.contains("osx")
>
> files:"LiMon.icns"
>
> qbs.install:true
>
> qbs.installDir:install_data_path
>
> }
>
> }

I assume this is not the complete project. In that case, see 
https://bugreports.qt.io/browse/QBS-830.


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


Re: [QBS] Build android apk project

2015-07-09 Thread Christian Kandeler
On 07/09/2015 10:02 AM, olivier musse wrote:
> 1.5 seems to be planned on September, this is not so far away.

Does it say that in JIRA? Please do not pay attention to these dates, 
they are quite random for non-patch releases. September is the date of 
the "next qbs release", which will be 1.4.2, as our main effort is 
currently on bugfixing.


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


Re: [QBS] Build android apk project

2015-07-09 Thread Christian Kandeler
On 07/08/2015 07:12 PM, olivier musse wrote:
> Many thanks for these details so now we know why it does not work. We
> have migrated from qmake to qbs for all our project for desktop
> (windows,mac, linux) and are really happy. Qbs is really fast and
> powerfull.
> The idea to go back to qmake is a bad news. So my question is : have you
> planned to support android in QCreator in  the future ?

There are no concrete plans at the moment, as we do not have enough 
resources for this. The Android support in qbs is essentially a proof of 
concept, demonstrating that it is possible to use qbs for that platform. 
We do intend to keep it working, but we are not actively polishing or 
extending it at the moment.
In order to have sensible support in Qt Creator, we'd first need to 
replace the somewhat ad-hoc approach to how we deal with the 
"sub-profile" problem. This is tentatively planned for 1.5, but that 
release is still some time away.


Christian

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


Re: [QBS] Build android apk project

2015-07-08 Thread Christian Kandeler
On 07/08/2015 05:08 PM, Jicquel Dorian wrote:
> I'm currently trying to build an apk with qbs using newly introduced
> AndroidApk module with last qt for android (5.5.0) with gcc 4.9 (arch
> armv7) qt creator 3.4.2 (qbs 1.4.1 ?)

Sorry, there is no support for using qbs with Android in Qt Creator. The 
setup-android tool is command-line only and has no connection to Qt 
Creator's kits. Also, Qt Creator's Android plugin assumes qmake. I 
suppose you could make it work by letting the setup-android tool create 
your profiles in the Qt Creator settings directory and manually setting 
up the properties for the top-level Android profile, but obviously 
that's not a workflow anyone will be comfortable with.


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


Re: [QBS] Qbs install done by default

2015-07-07 Thread Christian Kandeler
On 07/07/2015 09:49 AM, Christian Kandeler wrote:
> On 07/07/2015 09:32 AM, Stéphane Fabry wrote:
>> First, I would say that this kind of information is well hidden and
>> should have better visibility when there is a new QtCreator release.
>> Because of qbs version being hidden by qtcreator version, no one can
>> tell which qbs version it uses,
>
> /bin/qbs --version
>
>> and what will happen when you upgrade
>
> Well, that is generally unknown with every software.
>
>> That said, the problem I ran into is that now if I build my app on
>> windows and it is already running, it cause a problem at the install
>> step because on Windows you can't update exe or dll while in use !
>> What
>> happen is that QtCreator build process remains at full CPU usage when
>> linking, QtCreator GUI is still responsive but unable to kill the build
>> process (stop button does not work and closing QtCreator does not kill
>> the process neither). That makes me blame QtCreator for that but maybe
>> the root cause is the change in qbs.
>>
>> Now I'd like first a solution to desactivate the default installation
>> step,
>
> How about clicking on the checkbox in the build settings that says
> "install"? Afterwards you should add an install stepp in the deploy
> settings, and everything is as it was before-
>
>> and also maybe it is not a good behaviour to lock QtCreator in
>> such a situation.
>
> Yes, we should remove the call to lockCreator()...
> Seriously, neither have I seen such behavior nor do I know what would
> cause it.

Update: Problem is identified, fix is here: 
https://codereview.qt-project.org/#/c/120817/

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


Re: [QBS] Qbs install done by default

2015-07-07 Thread Christian Kandeler
On 07/07/2015 09:32 AM, Stéphane Fabry wrote:
> First, I would say that this kind of information is well hidden and
> should have better visibility when there is a new QtCreator release.
> Because of qbs version being hidden by qtcreator version, no one can
> tell which qbs version it uses,

/bin/qbs --version

> and what will happen when you upgrade

Well, that is generally unknown with every software.

> That said, the problem I ran into is that now if I build my app on
> windows and it is already running, it cause a problem at the install
> step because on Windows you can't update exe or dll while in use !
> What
> happen is that QtCreator build process remains at full CPU usage when
> linking, QtCreator GUI is still responsive but unable to kill the build
> process (stop button does not work and closing QtCreator does not kill
> the process neither). That makes me blame QtCreator for that but maybe
> the root cause is the change in qbs.
>
> Now I'd like first a solution to desactivate the default installation
> step,

How about clicking on the checkbox in the build settings that says 
"install"? Afterwards you should add an install stepp in the deploy 
settings, and everything is as it was before-

> and also maybe it is not a good behaviour to lock QtCreator in
> such a situation.

Yes, we should remove the call to lockCreator()...
Seriously, neither have I seen such behavior nor do I know what would 
cause it. It's a simple file copying operation that on my Windows (7) 
machine results in the usual error message "failed to copy file" or 
something along these lines.


Christian

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


Re: [QBS] Usage qbs for editing Qt sources

2015-07-06 Thread Christian Kandeler
On 07/06/2015 09:51 AM, Christian Kandeler wrote:
> On 07/04/2015 03:28 PM, Smirnov Vladimir wrote:
>> I just tried some strange things which I want to share with others.
>> 1. I downloaded latest (5.5) Qt Sources, including all Addons.
>> 2. I created qbs file:
>> CppApplication
>> {
>> Depends { name: "Qt"; submodules: ['core', 'gui', 'widgets', 'network'] }
>> name: 'qt-source'
>> files: ['**/*.c','**/*.cc','**/*.cpp', '**/*.h']
>> }
>> and placed in qt Src root.
>
> Note that this is a bit dubious, as these files do not really belong to
> the same product.
>
>> 3. Opened It in QtCreator 3.4.2.
>> Project consumed 3.5 Gb RAM and after some minutes displayed all
>> contents. "Parsing C++ files" takes dozens of minutes.

I tested this on the command line. It took two seconds. So almost all of 
the time is spent in Qt Creator there.

>> I counted files in projects list, around 70 000 source files (Flat view
>> and then counting approx.).
>> 4. Viewing and editing  - no lags.
>> 5. Now i try to build "qmakeglobals.cpp" from qtbase/qmake lib.
>> 6.
>>
>> 19:37:20: Running steps for project qt-src...
>>
>> compiling qmakeglobals.cpp
>>
>> 20:54:25: Elapsed time: 1:17:05.
>
> Hm, this is a bit suprising. Not sure where that time is spent.

Ah, probably because all the rules are being executed. I think if you 
try this again (with any file), it will be much faster.


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


Re: [QBS] Usage qbs for editing Qt sources

2015-07-06 Thread Christian Kandeler
On 07/04/2015 03:28 PM, Smirnov Vladimir wrote:
> I just tried some strange things which I want to share with others.
> 1. I downloaded latest (5.5) Qt Sources, including all Addons.
> 2. I created qbs file:
> CppApplication
> {
> Depends { name: "Qt"; submodules: ['core', 'gui', 'widgets', 'network'] }
> name: 'qt-source'
> files: ['**/*.c','**/*.cc','**/*.cpp', '**/*.h']
> }
> and placed in qt Src root.

Note that this is a bit dubious, as these files do not really belong to 
the same product.

> 3. Opened It in QtCreator 3.4.2.
> Project consumed 3.5 Gb RAM and after some minutes displayed all
> contents. "Parsing C++ files" takes dozens of minutes.
> I counted files in projects list, around 70 000 source files (Flat view
> and then counting approx.).
> 4. Viewing and editing  - no lags.
> 5. Now i try to build "qmakeglobals.cpp" from qtbase/qmake lib.
> 6.
>
> 19:37:20: Running steps for project qt-src...
>
> compiling qmakeglobals.cpp
>
> 20:54:25: Elapsed time: 1:17:05.

Hm, this is a bit suprising. Not sure where that time is spent.

> Also, during the build (one file), memory consumption raised to 6.3Gb (i
> think it is a BG).

Have you tried doing the same with qmake? The project files don't 
support wildcards, but you could generate one using a script.


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


Re: [QBS] Error messages when opening a project in Qt Creator 3.4.2

2015-07-06 Thread Christian Kandeler
On 07/04/2015 09:24 PM, Hristo Hristov wrote:
> I am getting these messages in General Messages when I open a project in
> Qt Creator:
>
> updatePchInfo: switching to none
> Warnings while parsing QML type information of /opt/Qt/5.5/gcc_64/qml:
> :1:24: Reading only version 1.1 parts.
> :10:5: Expected only Component and
> ModuleApi object definitions.
>
> Is this a bug or a problem?

You should ask in the Qt Creator mailing list, as this is not related to 
qbs.


Christian

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


[QBS] qbs 1.4.1 released

2015-07-03 Thread Christian Kandeler
Hi,

qbs 1.4.1 is out now. As usual, it adds a number of bugfixes and minor 
improvements to 1.4.0. Source packages and a binary Windows package can 
be found at http://download.qt.io/official_releases/qbs/1.4.1/.
This version of qbs is also bundled in Qt Creator 3.4.2.


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


Re: [QBS] Install only product don't get run

2015-07-02 Thread Christian Kandeler
On 07/02/2015 07:21 PM, Thebault, Remi wrote:
> In fact, I have this problem when "Deploy" depends on my main exe (this was 
> working with previous qbs versions)
> If I invert dependencies, my main exe depending on "Deploy", everything's 
> fine again.

I don't see why this should matter.

> Is this a feature, or must I still file a bug?

Please file a bug.


Christian

>
> Thank you
> Rémi
>
> Le 02/07/2015 16:30, Christian Kandeler a écrit :
>> On 07/02/2015 04:10 PM, Thebault, Remi wrote:
>>> I have in one QBS project a few dll, test executables, one main
>>> executable and a "Deploy" product that only consist in staging binary
>>> dependencies in install-root during the deploy step.
>>> Purpose is to have a complete installed product that I can run without
>>> tweaking the path or run some script (I run on Windows).
>>>
>>> Since I switched from Qt Creator 3.3.0 to 3.4.1, the Deploy product is
>>> not deployed anymore.
>>> (not sure of QBS versions)
>>>
>>>   [ ...]
>>>
>>> Do you have an idea of what got wrong?
>> No. We use the deployment functionality pretty much everywhere, and I
>> haven't seen anything go wrong there.
>> You are sure that this particular product is included in the project you
>> are building? And you did not uncheck the "install" checkbox in the
>> build configuration?
>>
>>> Should I file a bug?
>> Yes. Please attach a minimal project that exhibits the problem, as I was
>> not able to reproduce with a trivial 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


Re: [QBS] Install only product don't get run

2015-07-02 Thread Christian Kandeler
On 07/02/2015 04:10 PM, Thebault, Remi wrote:
> I have in one QBS project a few dll, test executables, one main
> executable and a "Deploy" product that only consist in staging binary
> dependencies in install-root during the deploy step.
> Purpose is to have a complete installed product that I can run without
> tweaking the path or run some script (I run on Windows).
>
> Since I switched from Qt Creator 3.3.0 to 3.4.1, the Deploy product is
> not deployed anymore.
> (not sure of QBS versions)
>
>  [ ...]
>
> Do you have an idea of what got wrong?

No. We use the deployment functionality pretty much everywhere, and I 
haven't seen anything go wrong there.
You are sure that this particular product is included in the project you 
are building? And you did not uncheck the "install" checkbox in the 
build configuration?

> Should I file a bug?

Yes. Please attach a minimal project that exhibits the problem, as I was 
not able to reproduce with a trivial example.


Christian

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


Re: [QBS] Export cpp.defines

2015-06-29 Thread Christian Kandeler
On 06/28/2015 10:33 AM, Stéphane Fabry wrote:
> To resume, here is what is wrong and what is good
>
> Export{
>
> Depends{name:"cpp"}
>
> cpp.includePaths:"src"
>
> cpp.defines:base.concat(["QWT_DLL"])  < Good
>
> cpp.defines:base.concat("QWT_DLL")< Wrong
>
> cpp.defines:"QWT_DLL" < Wrong

Hm, that looks a bit strage. If you can provide a minimal complete 
example that shows this behavior, I'd appreciate a bug report.


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


Re: [QBS] Printing product.buildDirectory to STDOUT

2015-05-29 Thread Christian Kandeler
On 05/21/2015 11:51 PM, Карелин Павел wrote:
> How I could output to STDOUT a value of product.buildDirectory, to use
> it in my bash-script?

That seems like a rather dubious thing to want... Anway, if you don't 
care about Windows, you could just open a TextFile for "/dev/stdout" and 
write to that.


Christian

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


Re: [QBS] Dynamic libraries built with qmake

2015-05-12 Thread Christian Kandeler
On 05/12/2015 10:33 AM, Lars Ivar Igesund wrote:
>  > I'm in the process of converting a largish QMake based project to
> QBS.
>  > Part of the project are two 3rd party libraries that we have to build
>  > ourselves, but that comes with .pro files. With QMake this was very
>  > simple, just subdirs them, but with QBS things are a bit more
> cumbersome.
>  >
>  > What I have done is to create a Module that can do the building, and
>  > then define a product that depends on that module with the
> pro-file in
>  > the files-list.
>  >
>  > One feature I wanted, was that when our part of the project
> depends on
>  > these qmake-products, then the resulting library files should be
> picked
>  > up and automatically linked (as if they were built with qbs).
>  >
>  > Currently it works in fresh builds, but there are some quirks and
> issues.
>  > 1) I was not able to make the automatic linking work unless I set
> output
>  > fileTags to be dynamiclibrary_copy (rather than dynamiclibrary),
> which
>  > seems wrong as long as I had to dig in the source to find that
>  > particular tag.
>
> The copy is what gets linked against. When qbs builds a dynamic library,
> it only updates the copy if the list of global symbols has changed, in
> order to not relink unnecessarily. A better tag name would by
> dynamiclibrary_import, like for MSVC's .lib files.
>
>
> If I use dynamiclibrary_import rather than _copy, it doesn't link. With
> _copy it links.

Sure, that's the actual name of the tag. I was talking about what would 
perhaps have been a better name.

>  > 2) When running clean and/or rebuild, things fails for some
> reason. The
>  > built libraries are cleaned, but they are not rebuilt. Looking at the
>  > output, it shows that make says "Nothing to be done".
>
> So qbs is doing its job by calling qmake and make.
>
>   > Maybe this is
>  > because I don't scan or otherwise set up proper dependencies for
> these
>  > projects as a whole? But I would think that since make generates the
>  > actual library, it should also figure out that its end target is
> missing.
>
> If make says that its targets are up to date, then the file it believes
> to be the top-level artifact is still there. Possibly some problem
> related to DESTDIR? E.g. qbs has removed the file in DESTDIR, but there
> is a copy lying around somewhere that make considers its output
> artifact? I can only guess here.
>
>
> The reason was versioning, such that I got libFoo.so, libFoo.so.1, etc.
> It seems like it is somewhat clumsy to avoid generating the version
> numbers with Qmake, although it is possible. I see that this doesn't
> appear to be the default behaviour of of QBS - how would I go about
> getting the symlink set that Qmake generates?

Not sure. qbs creates as many symlinks as the product's version has 
components (up to three). Perhaps qmake's VERSION variable behaves 
similarly; you'll have to try.

 > And in this case, would I
> have to make an artifact for each to map them into QBS?

Presumably. The tag is "dynamiclibrary_symlink".

>  >  Artifact {
>  >// NOTE: Use a subdirectory to avoid default install
> behaviour of
>  > moving then deleting potentially
>  >// causing product itself to be deleted
>
> ???
> Nothing gets deleted when installing.
>
>
> If all destdirs are set to nothing, the folder it tries to install the
> library from is the same folder that it already has been written to.
> Then it deletes the old installed library, before copying the in the new
> one, but then it isn't there because the old library was actually tne
> new one ;) So, yes, probably caused by how I set DESTDIR when I started
> on this.

Installing has nothing to do with DESTDIR.


Christian

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


Re: [QBS] Dynamic libraries built with qmake

2015-05-08 Thread Christian Kandeler
On 05/08/2015 03:43 PM, Lars Ivar Igesund wrote:
> Hi,
>
> I'm in the process of converting a largish QMake based project to QBS.
> Part of the project are two 3rd party libraries that we have to build
> ourselves, but that comes with .pro files. With QMake this was very
> simple, just subdirs them, but with QBS things are a bit more cumbersome.
>
> What I have done is to create a Module that can do the building, and
> then define a product that depends on that module with the pro-file in
> the files-list.
>
> One feature I wanted, was that when our part of the project depends on
> these qmake-products, then the resulting library files should be picked
> up and automatically linked (as if they were built with qbs).
>
> Currently it works in fresh builds, but there are some quirks and issues.
> 1) I was not able to make the automatic linking work unless I set output
> fileTags to be dynamiclibrary_copy (rather than dynamiclibrary), which
> seems wrong as long as I had to dig in the source to find that
> particular tag.

The copy is what gets linked against. When qbs builds a dynamic library, 
it only updates the copy if the list of global symbols has changed, in 
order to not relink unnecessarily. A better tag name would by 
dynamiclibrary_import, like for MSVC's .lib files.

> 2) When running clean and/or rebuild, things fails for some reason. The
> built libraries are cleaned, but they are not rebuilt. Looking at the
> output, it shows that make says "Nothing to be done".

So qbs is doing its job by calling qmake and make.

 > Maybe this is
> because I don't scan or otherwise set up proper dependencies for these
> projects as a whole? But I would think that since make generates the
> actual library, it should also figure out that its end target is missing.

If make says that its targets are up to date, then the file it believes 
to be the top-level artifact is still there. Possibly some problem 
related to DESTDIR? E.g. qbs has removed the file in DESTDIR, but there 
is a copy lying around somewhere that make considers its output 
artifact? I can only guess here.

> Here is the module, and below a sample product:
>
> import qbs
> import qbs.File
> import qbs.PathTools
>
> Module {
>FileTagger {
>  patterns: ["*.pro"]
>  fileTags: ["qmake-pro"]
>}
>
>Rule {
>  inputs: ["qmake-pro"]
>
>  Artifact {
>// NOTE: Use a subdirectory to avoid default install behaviour of
> moving then deleting potentially
>// causing product itself to be deleted

???
Nothing gets deleted when installing.

>filePath: product.destinationDirectory + "/.build/" +
> PathTools.dynamicLibraryFilePath(product)
>fileTags: ["dynamiclibrary_copy"]
>  }
>
>  prepare: {
>var cmds = [];
>if (!File.exists(product.destinationDirectory))
>{
>  var mkdirCmd = new Command("mkdir", ["-p",
> product.destinationDirectory + "/.build"]);
>  mkdirCmd.description = "Creating directory " +
> product.destinationDirectory;
>  cmds.push(mkdirCmd);

Should not be necessary, as qbs creates the directory part of artifacts 
itself.


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


Re: [QBS] Internal libraries, RPATH and Qt Creator

2015-04-30 Thread Christian Kandeler
On 04/30/2015 06:03 AM, Christian Gagneraud wrote:
> I think I got confused by how Qtc is doing it:

I'll comment on the Linux-specific parts as an example.

> QtcLibrary.qbs:
>   cpp.rpaths: qbs.targetOS.contains("osx")
>   ? ["@loader_path/..", "@executable_path/.."]
>   : ["$ORIGIN", "$ORIGIN/.."]

This specifies where Qt Creator's libraries find other Qt Creator 
libraries: At their own location ("$ORIGIN") and at the directory above 
-- I must admit I am currently unsure why the latter is needed. Perhaps 
we used to have stuff in lib/ as well as in lib/qtcreator/?

> QtcPlugin.qbs:
>   cpp.installNamePrefix: "@rpath/PlugIns/"
>   cpp.rpaths: qbs.targetOS.contains("osx")
>   ? ["@loader_path/..", "@loader_path/", "@executable_path/.."]
>   : ["$ORIGIN", "$ORIGIN/.."]

This specifies where Creator's plugins find other plugins (at their own 
location, "$ORIGIN", which will be /lib/qtcreator/plugins/), and other Creator libraries 
("$ORIGIN/..", which will be /lib/qtcreator/).

There's also QtcTool.qbs and app.qbs, which specify where executables 
find Creator libraries: ["$ORIGIN/../" + project.ide_library_path].

You get the idea. You dedice how your project is laid out, and then you 
set rpath so that the dependency binary is found relative to the one 
that requires it at runtime.


Christian

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


Re: [QBS] Qbs 1.4.0 is now available in MacPorts and Homebrew

2015-04-28 Thread Christian Kandeler
On 04/28/2015 06:32 PM, Erik Schilling wrote:
>
>
> On 04/28/2015 07:14 AM, Jake Petroules wrote:
>
>> Linux packages (Debian and Fedora) are still in the works.
>
> Note that on Fedora qbs is already included by the qt-creator package at
> the moment (it kind of sneaked in since qt-creator ships with a bundeled
> qbs version :)).

Yeah, same thing on ArchLinux.


Christian

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


[QBS] qbs 1.4.0

2015-04-28 Thread Christian Kandeler
Hi everybody,

version 1.4.0 of qbs is out. Read all about it at 
http://blog.qt.io/blog/2015/04/28/qbs-1-4-0-released/.


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


Re: [QBS] Building Qt with QBS

2015-04-02 Thread Christian Kandeler
On 04/01/2015 11:31 PM, Andrew Knight wrote:
> Is there is already a way to create a QBS profile (using
> multiplexing) that lets you specify the compiler/sdk for host tools and
> a separate combo for the target platform? That's another problem I've
> chosen to ignore thus far, but Christian has suggested that it might be
> doable already.

The Product item has a "profiles" property. The envisioned use is 
something like this:
Project {
 name: "Qt"
 property string hostProfile
 property string targetProfile
}
Product {
 name: "QtBootstrap"
 profiles: [project.hostProfile]
 // ...
}
Product {
 name: "QtWidgets" // etc
 profile: [project.targetProfile]
 // ...
}
$ qbs build -f qt.qbs project.hostProfile:myHostProfile 
project.targetProfile:myTargetProfile

Our first experience with using this feature (in the Android modules) 
suggests that is probably desirable to have some sort of "sub-profiles" 
that are "aggregated" by a parent profile. (This sounds blurry, because 
it is.)


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


Re: [QBS] Adding resources to .UI files in Qt Creator?

2015-03-10 Thread Christian Kandeler
On 03/09/2015 08:02 PM, Hristo Hristov wrote:
> 1. Use the Project wizard to create a new Qt Widgets Application project 
> (qmake).2. Use the Project wizard to add a new Qt Resource file to the 
> project.This step produces the following qmake construct:
> RESOURCES += \
>  resources.qrc3. Add some images to the resource.qrs (these will be used 
> as icons)4. Open the mainwindow.ui file (the default that was created) in Qt 
> Creator Design mode.5. I use the "Type Here" feature on the QMenuBar on the 
> Design surface/canvas (whatever it is called) to add a new QMenu item and 
> then to add a QAction.Now if I select the QAction item and go to the property 
> editor. I can select the icon property and click on the "...V" button to open 
> a "Select Resource" dialog. Here I can select the desired icon from the 
> resource and set it to the QAction item.
> This is basically what I want to do with my qbs Qt Widgets project. I added a 
> resource file like that: 1. Right-click on the project tree, select "Add New" 
> then add a Qt Resource file to the project.2. Add images to the resource 
> file.I actually moved the resource file to a Group item in the qbs project:   
>  Group {name: "Resources"files: [
> "res/imagepuzzles.qrc",]}Now I want to do the same I've described 
> in Step 5 above (to edit my MainWindow.ui in Design Mode and add resources 
> from a resource file). Unfortunately "Select Resource" dialog is empty and 
> does not display the Resource file and I cannot set the images from the 
> resources this way.

Thanks, I understand now. The behavior you are seeing is due to a 
shortcoming in the qbs API. I have created a task here: 
https://bugreports.qt.io/browse/QBS-762
This is easy to implement, but too intrusive to put it into 1.4.0, so it 
will take a bit before the fix makes it into Qt Creator.
Thanks for the report.


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


Re: [QBS] Adding resources to .UI files in Qt Creator?

2015-03-09 Thread Christian Kandeler
On 03/09/2015 04:37 PM, Hristo Hristov wrote:
> I have added a .qrc file with icons to my project. Now I want to add icons to 
> my actions defined in the .UI files but the resource editor does not display 
> my resources (unlike if I use qmake .pro file).Is this feature supported yet 
> and how do I add the resources to my forms?

Could you explain in more detail what you are trying to do and how? I'm 
afraid I haven't fully grasped it. In particular, what are the steps you 
took and how does the result differ from what yaou expected? Plus, which 
qmake construct(s) did you use whose qbs counterpart(s) you are looking for?


Christian

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


[QBS] FYI: 1.4 branched

2015-03-06 Thread Christian Kandeler
Just a short heads-up that we have created the branch for the 1.4 
relase today. Contributors are asked to use this one for bug fixes and 
master for (non-trivial) features. The release is tentatively scheduled 
for early April.


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


Re: [QBS] run script after building products

2015-03-03 Thread Christian Kandeler
On 03/02/2015 08:16 PM, Stephan Gatzka wrote:
> I've to build a bare metal project, consisting of two elf binaries and
> an FPGA image.
>
> Building both elf binaries worked like charm. But after building both
> elf binaries I have to combine both elf files and the pre-built FPGA
> image into a single image. This involves some fancy calls to objcopy
> and dd.
>
> Now I'm struggling with the task how to implement that in a qbs product.
>
> This is my current structure:
> Project {
>name: "productName"
>
>Application {
>  name: "app1"
>  ...
>}
>
>Application {
>  name: "app2"
>  ...
>}
>
>Product {
>  name: "image"
>
>  Depends {
>name:"app1"
>required:true

"true" is the default.

>  }
>  Depends {
>name:"app2"
>required:true
>  }
>
>}
> }
>
> Inside the image product I tried to make the calls to objcopy and dd
> in the prepare script of a Rule or a Transformer. I think I haven't
> totally understood the behavior or intention of the usings and input
> directives.

"usings" has a bad name and it will be called "inputsFromDependencies" 
in qbs 1.4, which tells you what it means.
Your use case sounds rather straightforward to implement, but it's hard 
to say what it should look like exactly without concrete knowledge about 
your project. Anyway, here's a rough sketch:
Product {
 name: "image"
 type: ["custom-image"]
 Rule {
 usings: ["application"] // Provided you want to call objcopy on 
the exeutables
 Artifact {
 filePath: ... // Whatever your output is
 fileTags: ["custom-image"]
 }
 ... // Possibly more artifacts here
 prepare: {
 var cmds = [];
 // Add your Process commands here.
 // The application products are available as 
inputs["application"][0] and inputs["application"][1] (but not in a 
guaranteed order).
 return cmds;
 }
 }
}

Hope this helps a little.


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


[QBS] qbs 1.3.4 released

2015-03-02 Thread Christian Kandeler
Hi,

we have released qbs 1.3.4 today, which fixes a number of bugs. As 
usual, source package and a binary package for Windows are available at 
http://download.qt.io/official_releases/qbs/1.3.4/.


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


Re: [QBS] rebuild / automatic scan dependencies

2015-02-25 Thread Christian Kandeler
On 02/24/2015 12:14 PM, Schmidt, Jan wrote:
> I try'd to build helloworld-minimal from 1.3.3:
>
> after that, the binary exists. If I remove that file,
> qbs does not rebuild it.

You should not interfere with the contents of the build directory; it's 
supposed to be under the build system's control. There is the 
--check-timestamps switch to force qbs to re-evaluate the timestamps of 
output artifacts, but this is not recommended except to re-sync the 
build graph after such an external modification of the build directory.

> Second:
> Is there a way to scan the dependencies automatically?
> With make,I add a Compiler-Switch (-MMD for gcc). Then the
> compiler creates a file .d wich I can include in the
> makefile.
> If I touch such header and re-run make, the file is compiled
> again.

This functionality is built in.

> With qbs this is not happen.

I dispute this. Please file a bug report if you can demonstrate the problem.

> I don't want to add each header to the qbs-file per hand.

This is completely unrelated to the issue above. All header files become 
dependencies of the files that include them, whether they are part of 
the project or not.
(Independent of that, it is of course a rather short-sighted decision to 
give the build system an incomplete list of files; e.g. such headers 
won't show up in an IDE's project overview.)


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


Re: [QBS] Ambiguous behaviour

2015-02-10 Thread Christian Kandeler
On 01/20/2015 01:33 PM, Alexander Giss wrote:
> Hello,
> I was making my project when I realized that in code below Properties{}
> item works without errors and Group{} give a error undefined variable
>   'project_type'.  As I understand it should be project.project_type in
> both cases, but Properties{} works in this case too.
>
> import qbs
>
> Project {
> property string project_type: ""
>
> Properties {
> condition: project_type === "qwerty"
> }
>
> Group {
> condition: project_type === "qwerty"
> files: [ "formedit-16x16.png" ]
> qbs.install: true
> qbs.installDir: "share/icons/"
> }
> }

Please paste real code (stripped down to the essentials from your actual 
project, if possible). The one above has e.g. a Group item directly 
under a Project, which can never work.


Christian

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


Re: [QBS] Is it possible to compile non-Qt Win32 and Linux applications?

2015-02-10 Thread Christian Kandeler
On 01/14/2015 11:53 PM, Hristo Hristov wrote:
> Is it possible to use qbs as general build system for Win32 and Linux
> applications with:
>
> - Visual C++
> - MinGW
> - GCC
> - clang

It should be.

> I tried to build an application on Windows with Visual C++ but I cannot
> get past this:
> msvcrtd.lib(crtexe.obj):-1: error: LNK2019: unresolved external symbol
> main referenced in function __tmainCRTStartup

Hard to say without any context. Are you sure this is build system related?


Christian

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


Re: [QBS] Failure to build qbs self? qbs master branch.

2015-02-02 Thread Christian Kandeler
On 01/23/2015 01:19 PM, Yuchen Deng wrote:
> linking HelloWorld-minimal.exe
> linking qbs_qt_scanner.dll
> qhelpgenerator qbs.qhp
> ERROR: D:\qpSOFT\MyDEV\bin\amd64\link.exe /nologo /DLL
> 
> /IMPLIB:D:\qpSOFT\Projects\BuildQbs\qt64-release\lib\qbs\plugins\qbs_qt_scanner.lib
> /INCREMENTA
> L:NO /OSVERSION:5.02 /SUBSYSTEM:CONSOLE,5.02
> 
> D:\qpSOFT\Projects\BuildQbs\qt64-release\qbs-qt-scanner.qt64.282b3a7b\.obj\3a52ce780950d4d9\qtscanner.cpp
> .obj Shell32.lib *D:/qpSOFT/MyDEV/sdk/qt/amd64/lib/qtmain.lib.lib
> 
> */OUT:D:\qpSOFT\Projects\BuildQbs\qt64-release\lib\qbs\plugins\qbs_qt_scanner.dll
> /LI
> BPATH:D:\qpSOFT\MyDEV\sdk\qt\amd64\lib
> LINK : fatal error LNK1181: cannot open input file '.lib'
> linking HelloWorld-Qt.exe
> ERROR: Process failed with exit code 1181.

Please file a bug report describing also what kind of toolchain and Qt 
you are using.


Christian

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


Re: [QBS] How to use linking dependences of the third-party libraries [part2]

2015-02-02 Thread Christian Kandeler
On 02/01/2015 08:35 PM, Denis Shienkov wrote:
> Ahhh... Seems, it works with "dynamiclibrary_copy" instead of
> "dynamiclibrary_import ",
> but I'm not sure that it is correctly..

Yes, that's what we link against for gcc-like toolchains. It's a bit of 
an implementation detail, though.


Christian

> 01.02.2015 22:22, Denis Shienkov пишет:
>> Hi all.
>>
>> I want to create a wrapper around of existing 3rd DLL on windows as a
>> separate product.
>> This solution works only with the MSVC compiler, as says in here (in
>> previous thread):
>>
>> http://lists.qt-project.org/pipermail/qbs/2014-May/000807.html
>>
>> My current snippet:
>>
>> = dllwrap.qbs =
>>
>> importqbs
>> import  qbs.FileInfo
>> import  qbs.File
>> DynamicLibrary  {
>>  name:  "mhstcan"
>>  Transformer  {
>>  Artifact  {
>>  filePath:  product.targetName  +  ".dll"  << existing runtime 
>> library
>>  fileTags:  "dynamiclibrary"
>>  }
>>  Artifact  {
>>  filePath:  product.targetName  +  ".lib"  << existing import 
>> library
>>  fileTags:  "dynamiclibrary_import"
>>  }
>>  prepare:  {
>>  var  commands  =  []
>>  for  (var  tag  in  outputs)  {
>>  for  (var  index  in  outputs[tag])  {
>>  var  artifact  =  outputs[tag][index];
>>  var  cmd  =  new  JavaScriptCommand();
>>  cmd.sourceFile  =  product.sourceDirectory  +  "/"  +
>>  FileInfo.fileName(artifact.filePath);
>>  cmd.description  =  "copying  "  +
>>  FileInfo.fileName(cmd.sourceFile);
>>  cmd.highlight  =  "codegen";
>>  cmd.targetFilePath  =  artifact.filePath;
>>  cmd.sourceCode  =  function()  {
>>  File.copy(sourceFile,  targetFilePath);  }
>>  commands.push(cmd);
>>  }
>>  }
>>  return  commands;
>>  }
>>  }
>> }
>>
>> == app.qbs ==
>>
>> import  qbs
>>
>>
>> Application  {
>>  name:  "app"
>>  Depends  {  name:  "cpp"  }
>>  Depends  {  name:  "mhstcan"  }
>>
>>
>>  files:  [
>>  "app.cpp",
>>  ]
>> }
>>
>>
>> Briefly: I want to wrap the existing shared library mhstcan.dll (with import
>> mhstcan.lib), which is compiled in MSVC, but to using in MinGW compiler. But 
>> all
>> attempts are fails, because the linker does not called never.
>>
>> Seems, that "dynamiclibrary_import"  is defined only for the MSVC compiler.
>> But the MinGW has nothing similar.
>>
>> I tried to:
>>
>> * use the "staticlibrary" instead of "dynamiclibrary_import"
>> * convert the *.lib import file to the *.a import file and to pass to 
>> Artifact with
>>the "*.a" suffix
>>
>> but nothing successfully - no linker called.
>>
>> So, my question: is any trick for it?
>>
>> PS: I use QBS from the QtCreator 3.3.0 + Qt 4.8.6
>>
>> BR,
>> Denis
>>
>

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


Re: [QBS] qbs install for project

2015-02-02 Thread Christian Kandeler
On 02/01/2015 06:48 PM, McGillion, Brian wrote:
> Hi all,
>
> When using "qbs install", I have the following layout (simplified):
>
> ├── bin
> │   ├── test_app
> ├── lib
> │   ├── libCommonApi.so
>
>
> test_app is dynamically linked to libCommonApi.so.  However, ldd of
> test_app shows "libCommonApi.so => not found".  How can I make the
> install resolve the respective paths, similar to what "make install"
> does with an autotools based project.  Of course I am trying to avoid
> having to add .../lib to the LD_LIBRARY_PATH as that somewhat nulifies
> the benefit of having --install-root flag IMO.

qbs does not manipulate files during installation. If you want your 
application to find the library by itself and be relocatable, you should 
use a relative rpath (e.g. via ORIGIN on Linux).


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


Re: [QBS] propagate compiler options

2015-01-22 Thread Christian Kandeler
On 01/21/2015 07:46 PM, Marcel Mulder wrote:
> There is one tiny thing I do not understand. In my main product about I have 
> the line:
>
>  cpp.executableSuffix:  ".out"
>
> If I have that line in de ccflags.qbs than the output file will be .a
> instead of .out. So he is ignoring the line in de ccflags.qbs but all
> other flags are used.
> Something I do not comprehend.

This is most likely due to https://bugreports.qt.io/browse/QBS-726.


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


Re: [QBS] error: Property 'cxxLanguageVersion' is not declared.

2015-01-20 Thread Christian Kandeler
On 01/20/2015 10:14 AM, Yuchen Deng wrote:
> import  qbs
>
> CppApplication  {
>  name:  "Test"
>  cpp.cxxLanguageVersion:  "c++11"
>  files:  "Main.cpp"
> }

This property is new in 1.4. You are most likely using qbs 1.3 to build 
your project.


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


Re: [QBS] User defined target action

2015-01-19 Thread Christian Kandeler
On 01/19/2015 11:22 AM, Andrii Anpilogov wrote:
> Is there any way to do it with current release?
> For example add Transformer item into Product and control it's execution
> somehow?
> For example add condition by environment variable?

Interesting idea. Why don't you just try it?


Christian

>
> Regards
>
> 2015-01-19 17:46 GMT+08:00 Christian Kandeler
>  <mailto:christian.kande...@theqtcompany.com>>:
>
> On 01/19/2015 08:28 AM, Andrii Anpilogov wrote:
>
>  > Is there any way to redefine "run" target or define custom one?
>  > For example I would like to flash project into device by "qbs run":
>  > openocd -f board/mydevkit.cfg -c "flash write_image erase
>  > ./build/armgcc/project/prpject.elf" -c shutdown
>  >
>  > I haven't find anything like that in documentation...
>
> qbs 1.4 will introduce a new Product property "builtByDefault", which
> you can set to false for products you don't want to build generally (see
> http://doc-snapshot.qt-project.org/qbs/product-item.html). This is
> useful for stuff like packaging and also your use case. Just put a
> Transformer item into such a product that runs your command, and then
> "building" the product will execute that command.
>
>
> Christian
>
> ___
> QBS mailing list
> QBS@qt-project.org <mailto:QBS@qt-project.org>
> http://lists.qt-project.org/mailman/listinfo/qbs
>
>
>
>
> --
> --
> WBR,
>Andrii Anpilogov
>Phone: +86 186-1660-3720
>Skype: anpilogov.andrey
>mailto:anpi...@gmail.com <mailto:anpi...@gmail.com>,
> andrii.anpilo...@mesheven.com <mailto:andrii.anpilo...@mesheven.com>
>

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


Re: [QBS] How to use Qt Charts module

2015-01-19 Thread Christian Kandeler
On 01/19/2015 10:23 AM, Kurt Keller wrote:
> How can I use the Qt Charts module with qbs?
>
>Depends { name: 'Qt';
>  submodules: ['core','gui','test','widgets','charts'] }
>
> does not work, the error message is: "Module Qt/charts could not be loaded".

Which Qt version is that?


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


Re: [QBS] QBS environment configuration

2015-01-19 Thread Christian Kandeler
On 01/19/2015 08:36 AM, Andrii Anpilogov wrote:
> Is there any way to set settings directory by environment variables?
> I use qbs from command line and with Qt Creator and it sucks to
> copy-paste build/clean commands from Qt Creator each time.

No, but you could just use a script that forwards the settings directory 
to qbs. And that script could read the path from the environment.


Christian

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


Re: [QBS] User defined target action

2015-01-19 Thread Christian Kandeler
On 01/19/2015 08:28 AM, Andrii Anpilogov wrote:

> Is there any way to redefine "run" target or define custom one?
> For example I would like to flash project into device by "qbs run":
> openocd -f board/mydevkit.cfg -c "flash write_image erase
> ./build/armgcc/project/prpject.elf" -c shutdown
>
> I haven't find anything like that in documentation...

qbs 1.4 will introduce a new Product property "builtByDefault", which 
you can set to false for products you don't want to build generally (see 
http://doc-snapshot.qt-project.org/qbs/product-item.html). This is 
useful for stuff like packaging and also your use case. Just put a 
Transformer item into such a product that runs your command, and then 
"building" the product will execute that command.


Christian

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


Re: [QBS] QBS Process readStdOut UTF8 encoding

2015-01-15 Thread Christian Kandeler
On 01/15/2015 04:30 PM, Jicquel Dorian wrote:
> Hi,
> I'm currently using svn info with a qbs process to retrieve some
> repository informations under OS X 10.9 (subversion 1.8.10) but the
> output show some display issues like the accents.(using throw
> process.readStdOut)
> The problem is i can't retrieve some informations due to these encoding
> problems , and the fact that it is working well with os x terminal , i
> suppose it could be qbs having some issues with utf8 output.

Have you tried calling setCodec() on the process?


Christian

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


Re: [QBS] Additional import path

2015-01-09 Thread Christian Kandeler
On 01/09/2015 09:58 AM, Andrey Anpilogov wrote:
> Is there any way to define extra search path for imports?

Yes, qbsSearchPaths.

> It looks like qbsSearchPaths works only for modules.

No, that's not true. Please explain what you've tried and we can sort 
out the problem.


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


Re: [QBS] what about path magic variable?

2015-01-08 Thread Christian Kandeler
On 01/08/2015 09:22 AM, Smirnov Vladimir wrote:
> I have found such an example of Export Item:
> (https://codereview.qt-project.org/#/c/103016/2/examples/app-and-lib/lib/lib.qbs)
>
> Export {
>Depends { name: "cpp" }
>cpp.includePaths: [path]
> }
>
> What is a "path" magic? it does not appear in Product item or Export
> item docs.

"path" is the directory that the current project file is located in.

> In Language introduction nothing too.
> Where could I find info about it?

It's not documented because it is a terrible name that needs to change. 
See https://bugreports.qt.io/browse/QBS-246.


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


Re: [QBS] Install subdirectory tree

2015-01-07 Thread Christian Kandeler
On 01/07/2015 12:10 PM, Dmitry Volosnykh wrote:
> were could we read the details of the discussion?

On the whiteboard in our office ;)
In summary, it involves allowing a function as the value of 
qbs.installDir (with a suitable default definition that does what one 
typically wants).


Christian


> On Wed, Jan 7, 2015 at 1:24 PM, Christian Kandeler
>  <mailto:christian.kande...@theqtcompany.com>> wrote:
>
> On 01/07/2015 11:04 AM, Stéphane Fabry wrote:
> > I'd like to install some files and directories that form a directory 
> tree.
> >
> > Example:
> >
> > Group {
> >
> >  name:  "IMAGERs"
> >  prefix:  "IMAGERs/**/"
> >  files:  "*"
> >  qbs.install:  true
> >  qbs.installDir:  project.calibInstall  +  "/IMAGERs"
> > }
> > The imager directory has two subdirectories that contains files, after
> > the install all files are mixed in IMAGER's and subdirectories are not
> > created.
>
> Yes, this is a known problem that comes up regularly.
>
> > The only solution I have now is to make a group for each leaf 
> subdirectory.
>
> That is one possible workaround. The other one is to simply set the
> "files" property to the root of the directory tree you want to install.
> In your case:
>
> Group {
>   name:  "IMAGERs"
>   files:  "IMAGERs"
>   qbs.install:  true
>   qbs.installDir:  project.calibInstall
> }
>
> This has the drawback that now qbs does not know the files in this
> directory, so they won't show up in your project tree in Qt Creator. And
> of course, if they are not purely run-time resources, but actual
> sources, this approach won't work.
>
> > Do you have a solution ?
>
> We have discussed some promising ideas and I'm confident we will have
> something ready for 1.4.
>
>
> Christian
> ___
> 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


Re: [QBS] Install subdirectory tree

2015-01-07 Thread Christian Kandeler
On 01/07/2015 11:04 AM, Stéphane Fabry wrote:
> I'd like to install some files and directories that form a directory tree.
>
> Example:
>
> Group {
>
>  name:  "IMAGERs"
>  prefix:  "IMAGERs/**/"
>  files:  "*"
>  qbs.install:  true
>  qbs.installDir:  project.calibInstall  +  "/IMAGERs"
> }
> The imager directory has two subdirectories that contains files, after
> the install all files are mixed in IMAGER's and subdirectories are not
> created.

Yes, this is a known problem that comes up regularly.

> The only solution I have now is to make a group for each leaf subdirectory.

That is one possible workaround. The other one is to simply set the 
"files" property to the root of the directory tree you want to install. 
In your case:

Group {
 name:  "IMAGERs"
 files:  "IMAGERs"
 qbs.install:  true
 qbs.installDir:  project.calibInstall
}

This has the drawback that now qbs does not know the files in this 
directory, so they won't show up in your project tree in Qt Creator. And 
of course, if they are not purely run-time resources, but actual 
sources, this approach won't work.

> Do you have a solution ?

We have discussed some promising ideas and I'm confident we will have 
something ready for 1.4.


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


Re: [QBS] Android support in Qbs

2015-01-06 Thread Christian Kandeler
On 01/05/2015 09:53 PM, Jake Petroules wrote:
> Hey,
>
> So I’ve tried out the new Android support and so far there are some
> major issues (I think). Since I haven’t really used profile multiplexing
> yet, I’m not sure if how I’m invoking Qbs is correct:
>
> qbs profile:android
>
> With this I receive:
>
> *ERROR: */share/qbs/modules/cpp/linux-gcc.qbs:4 TypeError: Result of
> expression 'qbs.toolchain' [undefined] is not an object.
>
> Maybe that’s a bug, but suppressing that I still receive an error when
> running:
>
> qbs profile:android qbs.toolchain:gcc
>
> *ERROR: *[REDACTED].qbs:3:1 Product dependency 'jsoncpp' not found for
> profile 'android'.
>
> Since this is a closed source project I can’t really give a more
> concrete example, but even if I explicitly try to build jsoncpp (which
> is based on a StaticLibrary item) the build fails, even if the entire
> contents are removed:
>
> // jsoncpp.qbs
> import qbs
> StaticLibrary {}
> // jsoncpp.qbs
>
> qbs -p jsoncpp profile:android qbs.toolchain:gcc

I cannot reproduce this, and I suspect that your qbs build is screwed up 
(Library.qbs not up to date?). If you can really reproduce the problem 
with a clean qbs build, please file a bug report, preferaby with a small 
example that exhibits the problem.
(And of course you don't need to set qbs.toolchain explicitly.)


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


[QBS] qbs 1.3.3 released

2014-12-11 Thread Christian Kandeler
Hi,

the patch release 1.3.3 of qbs is out now. It fixes a number of issues 
uncovered since 1.3.2. It's also part of the new 3.3.0 release of Qt 
Creator.
Source packages and a binary Windows package can be found at 
http://download.qt-project.org/official_releases/qbs/1.3.3/.


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


Re: [QBS] Always build an artifact

2014-12-08 Thread Christian Kandeler
On 12/06/2014 02:13 PM, Stéphane Fabry wrote:
> I confirm I get it working with Qt-creator and qbs from master.
> But I also experienced repeated crashes when opening some qbs files in
> qtcreator...

This shouldn't happen. If you have a stack trace, please file a bug report.

> So maybe I will way this get's released before using in production.
> Is it planned to have qbs 1.4 in next Qt 5.4 release ?

qbs is not tied to Qt releases. There always is a qbs version per 
Creator release, but 1.4 will be aligned to Creator 3.4 (not the 
upcoming 3.3, which will come with qbs 1.3.3).


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


Re: [QBS] QBS not compiling with our compiled Qt version

2014-12-05 Thread Christian Kandeler
On 12/05/2014 02:14 PM, olivier musse wrote:
> If we do not install  : qbs is not working : we got the "Module
> "Qt/designer-private" could not be loaded" if we add dependency to
> module DesignerComponents

And why is that? Is there no pri file for this module? (And why don't 
you just do a prefix build and install it?)


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


Re: [QBS] QBS not compiling with our compiled Qt version

2014-12-05 Thread Christian Kandeler
On 12/05/2014 01:57 PM, olivier musse wrote:
> Finally the response on bug
>
> https://bugreports.qt-project.org/browse/QTBUG-42959
>
> says that we must not run an install on a Qt compiled without a prefix (which 
> is the default on windows).
>
> So if we just configure and compile Qt with default settings (so don't 
> install) we can not used the compiled version of Qt with QBS.

Why not? I though your prl problem was due to installing?


Christian

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


Re: [QBS] Always build an artifact

2014-12-05 Thread Christian Kandeler
On 12/05/2014 08:53 AM, Stéphane Fabry wrote:
> - Depends{name:"obj"}  does not seems to work, it says "Product
> dependency 'obj' not found for profile ..."

Huh? "obj" is an input tag to your rule, not a product. It's the tag 
that qbs gives to object files created by the compiler.

> - I updated the my example to use output.filePath but in either way I
> can't get the buildtag.txt file, the command is run but I can't found
> the generated file... is the example too trivial (no source to build ?)

It's where you specified it to be in the Artifact item. Note that 
relative paths are anchored at the product build directory.

> - I can download and build qbs from master but then how should I
> configure QtCreator to use the version I've just build ? Is it just the
> qbs.exe to copy into the Tools directory ?

No, you'd have to use Creator from the master branch as well.


Christian

> Le 04-12-14 16:13, Christian Kandeler a écrit :
>> On 12/04/2014 03:00 PM, Stéphane Fabry wrote:
>>> I tried to do what you explained, but can't get it working.
>> Sorry, I made two mistakes in my explanation:
>>   1) You don't need a pseudo-artifact. Just set "alwaysUpdated" to
>>  false in your real artifact.
>>   2) This works only in master, not in 1.3.
>> So, what's a workaround you can use in 1.3? Maybe have a dependency on
>> the "obj" tag? If no object file changes, you won't have a new build, right?
>>
>>
>> Christian
>>
>> (Btw., in your example you create the "build.txt" file not at the place
>> you specified in the Artifact item. To prevent such inconsistencies, we
>> recommend using the outputs variable to access these paths.)
>>
>>> Here is the minimal project I tried:
>>>
>>> importqbs1.0
>>>
>>> import  qbs.TextFile
>>>
>>> import  qbs.FileInfo
>>>
>>> Product  {
>>>
>>>   name:  "Build  Tag"
>>>
>>>   type:  "buildtag"
>>>
>>>   targetName:  "buildtag.txt"
>>>
>>>   Group  {
>>>
>>>   name:  "Fake  input"
>>>
>>>   files:  "fake.in"
>>>
>>>   fileTags:  ["in_tag"]
>>>
>>>   }
>>>
>>>   Rule  {
>>>
>>>   inputs:  ["in_tag"]
>>>
>>>   Artifact  {
>>>
>>>   filePath:  "buildtag.txt"
>>>
>>>   fileTags:  "buildtag"
>>>
>>>   }
>>>
>>>   Artifact  {
>>>
>>>   alwaysUpdated:  false
>>>
>>>   filePath:  "fakeOutput"
>>>
>>>   }
>>>
>>>   prepare:  {
>>>
>>>   var  cmd  =  new  JavaScriptCommand();
>>>
>>>   cmd.description  =  "Update  build  date  tag  !"
>>>
>>>   cmd.sourceCode  =  function()  {
>>>
>>>   var  file  =  new  TextFile("./buildtag.txt",  
>>> TextFile.WriteOnly);
>>>
>>>   var  today  =  new  Date()
>>>
>>>   file.writeLine(today.toISOString());
>>>
>>>   file.close();
>>>
>>>   }
>>>
>>>   return  cmd;
>>>
>>>   }
>>>
>>>   }
>>>
>>> }
>>>
>>>
>>> Thanks
>>>
>>>
>>>
>>> Le 04-12-14 10:59, Christian Kandeler a écrit :
>>>> On 12/03/2014 10:18 PM, Stéphane Fabry wrote:
>>>>> I'm trying to create an artefact (a simple text file) that contain the
>>>>> last date of build,
>>>>> so i just need to write the date 'now' each time the project is build.
>>>>>
>>>>> The problem is I don't know how to tell qbs to rebuild the artefact each
>>>>> time the project is build (or partially build) ?
>>>>>
>>>>> Has someone an idea how to do this ?
>>>> Yeah, we really should add some rule property that makes this kind of
>>>> thing straightforward. You could file a bug report to enhance the
>>>> visibility of this issue.
>>>> I assume you are using a Transformer item now? The workaround is to use
>>>> a rule instead (give some random input tag, as there needs to be at
>>>> least one) and in this rule, in addition to your real output artifact,
>>>> declare a second one that you will never create and set its
>>>> "alwaysUpdated" property to false (the filePath can be anything, as long
>>>> as it's uniqe). This should achieve what you want.
>>>>
>>>>
>>>> Christian
>>>>
>>>> ___
>>>> QBS mailing list
>>>> QBS@qt-project.org
>>>> http://lists.qt-project.org/mailman/listinfo/qbs
>>> --
>>> *Stéphane Fabry*, Project & IT Manager
>>> +32 (0)4 367 07 92
>>> *X-RIS* | /X-Ray Imaging Solutions/
>>> www.xris.eu/contact.html
>> ___
>> QBS mailing list
>> QBS@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/qbs
>
> --
> *Stéphane Fabry*, Project & IT Manager
> +32 (0)4 367 07 92
> *X-RIS* | /X-Ray Imaging Solutions/
> www.xris.eu/contact.html
>
>
> ___
> QBS mailing list
> QBS@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>

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


Re: [QBS] Always build an artifact

2014-12-04 Thread Christian Kandeler
On 12/04/2014 03:00 PM, Stéphane Fabry wrote:
> I tried to do what you explained, but can't get it working.

Sorry, I made two mistakes in my explanation:
 1) You don't need a pseudo-artifact. Just set "alwaysUpdated" to
false in your real artifact.
 2) This works only in master, not in 1.3.
So, what's a workaround you can use in 1.3? Maybe have a dependency on 
the "obj" tag? If no object file changes, you won't have a new build, right?


Christian

(Btw., in your example you create the "build.txt" file not at the place 
you specified in the Artifact item. To prevent such inconsistencies, we 
recommend using the outputs variable to access these paths.)

> Here is the minimal project I tried:
>
> importqbs1.0
>
> import  qbs.TextFile
>
> import  qbs.FileInfo
>
> Product  {
>
>  name:  "Build  Tag"
>
>  type:  "buildtag"
>
>  targetName:  "buildtag.txt"
>
>  Group  {
>
>  name:  "Fake  input"
>
>  files:  "fake.in"
>
>  fileTags:  ["in_tag"]
>
>  }
>
>  Rule  {
>
>  inputs:  ["in_tag"]
>
>  Artifact  {
>
>  filePath:  "buildtag.txt"
>
>  fileTags:  "buildtag"
>
>  }
>
>  Artifact  {
>
>  alwaysUpdated:  false
>
>  filePath:  "fakeOutput"
>
>  }
>
>  prepare:  {
>
>  var  cmd  =  new  JavaScriptCommand();
>
>  cmd.description  =  "Update  build  date  tag  !"
>
>  cmd.sourceCode  =  function()  {
>
>  var  file  =  new  TextFile("./buildtag.txt",  
> TextFile.WriteOnly);
>
>  var  today  =  new  Date()
>
>  file.writeLine(today.toISOString());
>
>  file.close();
>
>  }
>
>  return  cmd;
>
>  }
>
>  }
>
> }
>
>
> Thanks
>
>
>
> Le 04-12-14 10:59, Christian Kandeler a écrit :
>> On 12/03/2014 10:18 PM, Stéphane Fabry wrote:
>>> I'm trying to create an artefact (a simple text file) that contain the
>>> last date of build,
>>> so i just need to write the date 'now' each time the project is build.
>>>
>>> The problem is I don't know how to tell qbs to rebuild the artefact each
>>> time the project is build (or partially build) ?
>>>
>>> Has someone an idea how to do this ?
>> Yeah, we really should add some rule property that makes this kind of
>> thing straightforward. You could file a bug report to enhance the
>> visibility of this issue.
>> I assume you are using a Transformer item now? The workaround is to use
>> a rule instead (give some random input tag, as there needs to be at
>> least one) and in this rule, in addition to your real output artifact,
>> declare a second one that you will never create and set its
>> "alwaysUpdated" property to false (the filePath can be anything, as long
>> as it's uniqe). This should achieve what you want.
>>
>>
>> Christian
>>
>> ___
>> QBS mailing list
>> QBS@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/qbs
>
> --
> *Stéphane Fabry*, Project & IT Manager
> +32 (0)4 367 07 92
> *X-RIS* | /X-Ray Imaging Solutions/
> www.xris.eu/contact.html

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


Re: [QBS] Always build an artifact

2014-12-04 Thread Christian Kandeler
On 12/03/2014 10:18 PM, Stéphane Fabry wrote:
> I'm trying to create an artefact (a simple text file) that contain the
> last date of build,
> so i just need to write the date 'now' each time the project is build.
>
> The problem is I don't know how to tell qbs to rebuild the artefact each
> time the project is build (or partially build) ?
>
> Has someone an idea how to do this ?

Yeah, we really should add some rule property that makes this kind of 
thing straightforward. You could file a bug report to enhance the 
visibility of this issue.
I assume you are using a Transformer item now? The workaround is to use 
a rule instead (give some random input tag, as there needs to be at 
least one) and in this rule, in addition to your real output artifact, 
declare a second one that you will never create and set its 
"alwaysUpdated" property to false (the filePath can be anything, as long 
as it's uniqe). This should achieve what you want.


Christian

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


Re: [QBS] QTPLUGIN variable counterpart in qbs

2014-11-20 Thread Christian Kandeler
On 11/19/2014 09:28 PM, Yuriy Makarov wrote:
> I’m trying to build an iOS static library with QSql dependency via qbs.
> Qt is also built as a static library. In the app log I see the following
> warning:
> QSqlDatabase: QSQLITE driver not loaded
> Trying to manually load sqlite plugin via Q_IMPORT_PLUGIN causes link
> error on attempt to resolve qt_static_plugin_qsqlite() symbol.
>
> According to Qt documentation
> (http://qt-project.org/doc/qt-5/plugins-howto.html), to use plugins in
> static configuration, one should set QTPLUGIN in the corresponding .pro
> file. I wonder if there’s a support for static plugins in qbs. If so,
> what’s the counterpart for QTPLUGIN / import_plugins variables?

In qbs, plugins are a special kind of module, so you just use a dependency:
 Depends {
 name: "Qt.qsqlite"
 condition: Qt.core.staticBuild
 }
(Perhaps a convenience item would be helpful here that gets rid of the 
need to write out the condition.)


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


Re: [QBS] qbs autotest-runner and qpa platforms

2014-11-17 Thread Christian Kandeler
On 11/17/2014 05:36 PM, Aleksey Sidorov wrote:
> Yes, of course. Qbs simply ignore environment variable.

Ok. One solution would be to simply expose the command environment in a 
product property of the AutotestRunner item.


Christian

>
> 12:32, 17 ноября 2014 г., Christian Kandeler :
>
> On 11/16/2014 10:26 AM, Aleksey Sidorov wrote:
>
>   I tried to use qbs autotest-runner on debian testing without X
> and faced with the need to use offscreen qpa platform. How can I
> say that qbs need to use a different qpa platform instead xcb.
>
> Have you tried using the QT_QPA_PLATFORM environment variable?
>
>
> Christian
> ___
> QBS mailing list
> QBS@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>
>
>
> Отправлено из мобильной Яндекс.Почты: http://m.ya.ru/ymail

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


Re: [QBS] Installing Visual Studio debug files (.pdb)

2014-11-17 Thread Christian Kandeler
On 11/13/2014 05:43 PM, Thomas Epting wrote:
> >  Group {
> >  fileTagsFilter: [ "debugFiles" ]
> >  qbs.installDir: "bin"
> >  qbs.install: true
> >  }
>
> Yeah, that would be the general approach. I assume the problem is that
> we don't keep track of pdb files even though they are created by the
> compiler (meaning you can't refer to them)?
>
>
> What about changing the applicationLinker ruleto conditionally producea
> debugFile artifact,depending on the current tool chain and the status of
> thedebugInformation property?

Sure, that would be the fix. qbs should be aware of all build artifacts, 
so I think this is just an oversight. You might want to file a bug report.


Christian

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


Re: [QBS] qbs autotest-runner and qpa platforms

2014-11-17 Thread Christian Kandeler
On 11/16/2014 10:26 AM, Aleksey Sidorov wrote:
> I tried to use qbs autotest-runner on debian testing without X and faced with 
> the need to use offscreen qpa platform. How can I say that qbs need to use a 
> different qpa platform instead xcb.

Have you tried using the QT_QPA_PLATFORM environment variable?


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


Re: [QBS] Installing Visual Studio debug files (.pdb)

2014-11-13 Thread Christian Kandeler
On 11/13/2014 08:41 AM, Thomas Epting wrote:
> In specific scenarios (e.g. for remote debugging), I need to install the
> .pdb files along with the binaries. However, I could not find a way to
> do this with Qbs. I was thinking of of a file tag comparable to
> "application" (e.g. "debugFiles"), which I can use like this:
>
>  Group {
>  fileTagsFilter: [ "debugFiles" ]
>  qbs.installDir: "bin"
>  qbs.install: true
>  }

Yeah, that would be the general approach. I assume the problem is that 
we don't keep track of pdb files even though they are created by the 
compiler (meaning you can't refer to them)?


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


Re: [QBS] libFilePath in custom module

2014-10-23 Thread Christian Kandeler
On 10/23/2014 05:07 PM, Stéphane Fabry wrote:
> I have a custom "Qt module" that is a module compiled and installed in
> qt directory just like any other qt module (eg serialport).
>
> When I try to use QBS and put a "Depends { name: "Qt.mymodule" }"
> it reach a problem where "libFilePath" is not defined.
 > I found out that in the "module.qbs" that is generated by QtCreator
 > (in user appData directory) the libFilePath is not filled for that
 > module. All other modules of Qt have the path correctly defined, but
 > for mine it is empty.

That probably means that your module generates no prl file. qbs requires 
one to be present to find out the file path of the library.


Christian

>
> I can fill it by hand and it solves the problem but i would like it to
> be done automatically.
> I build and install the module by the classic 'qmake' 'make' 'make
> install' process.
>
> I found this change, but I'm not sure it is linked to the problem or
> not:
> https://qt.gitorious.org/qt-labs/qbs/commit/938d9159810b5525e09325ce61759b29fa3d51af
>
>
> If someone has an hint to the solution... Thanks :)
>
> Stéphane
>
>
> ___
> QBS mailing list
> QBS@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>

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


Re: [QBS] How to preserve commas in toolchain profiles

2014-10-22 Thread Christian Kandeler
On 10/21/2014 11:23 PM, Richard Weickelt wrote:
> Hi,
>
> let's consider the following line of a toolchain profile (exported format)
>
>profiles.atmega.cpp.linkerFlags: -Wl,--gc-sections
>
> -Wl tells g++ (running as linker driver) to pass an additional flag towards
> the linker. When importing a profile with the above line using "qbs config
> --import", each comma is converted into a white space instead. Commas
> usually mark a list of values, but in this case, the comma is important and
> needs to be preserved.
>
> How can I achieve this? When I quote the above flag, qbs will escape all
> quotes during import which leads to an invalid profile, too. As a
> workaround, I edit the imported qbs configuration file manually and add
> surrounding quotes directly. But this works only on linux when using the
> init format for profiles.

When using the command line (or the UI tool) to set values, qbs config 
understands JavaScript expressions. Everything that cannot be parsed as 
one is taken to be a string. It seems that when these semantics were 
introduced, we simply forgot to consider the import/export 
functionality. We will provide a fix for this in the next patch release. 
Until then, I'm afraid import/export is simply broken; we probably even 
lose information on a round trip.


Christian

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


Re: [QBS] Static build with QBS under Ubuntu (14.04)

2014-10-21 Thread Christian Kandeler
On 10/21/2014 02:55 PM, Jicquel Dorian wrote:
> Thank you very much it works now , but i've one last issue , i'm using
> ico files in my menu bar and i suspect the qico imageformat to not be
> linked to my application.
> I searched for a solution and found Q_IMPORT_PLUGIN macro and QTPLUGIN
> += pluginname but there is no equivalent in qbs and static linking of
> libqico.a doesn't work (cpp.staticLibraries:
> Qt.core.pluginPath+"/imageformats/libqico.a")

Depends {
 name: "Qt.qico"
 condition: Qt.core.staticBuild // If project should also build 
against non-static Qt
}


Christian

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


Re: [QBS] Static build with QBS under Ubuntu (14.04)

2014-10-21 Thread Christian Kandeler
On 10/21/2014 12:17 PM, Jicquel Dorian wrote:
> I've created a simple project with qbs to confirm that the issue is
> always there :
>
> import qbs 1.0
>
> CppApplication{
>   Depends{name:"Qt";submodules:['core','gui','widgets']}
> files:['main.cpp','mainwindow.cpp','mainwindow.h','mainwindow.ui']
> }

What happens if you use QtGuiApplication instead of CppApplication? This 
item has a dependency on the platform plugin in case of a static build.


Christian


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


Re: [QBS] Project sourceDirectory

2014-10-21 Thread Christian Kandeler
On 10/20/2014 10:14 PM, Stéphane Fabry wrote:
> I hit another small problem, I can't have access to
> project.sourceDirectory inside a module file.
> The variable is said "undefined" ...

I cannot reproduce this. Please open a bug report and attach a minimal 
but complete project that exhibits the behavior.


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


Re: [QBS] Static build with QBS under Ubuntu (14.04)

2014-10-21 Thread Christian Kandeler
On 10/21/2014 10:43 AM, Jicquel Dorian wrote:
> I've already mailed the mailing list before concerning my problem during
> my build with a static build qt.
> It seems that now with QBS 1.3.2 and Qt 5.3.2 the linking issue is not
> here anymore but i've always an error at runtime related to the "xcb"
> platform plugin.

What does your product look like?


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


Re: [QBS] Artifact filePath

2014-10-20 Thread Christian Kandeler
On 10/20/2014 04:32 PM, Kurt Keller wrote:
> What would be the best way, to define the property 'filePath'
> for generated artifacts like header files (xxx.h) in a manner which
> does not depend on qbs implementation details.
>
> Background: In pre 1.3.2 versions qbs included automatically the
> option '-I .../GeneratedFiles/' when calling the compiler.

No, it did not. The Qt module added this path to the list of include 
paths because it knows that some headers it generates will end up there.

> So I have put my generated include files there.

That was a mistake. The exact value of that path is an implementation 
detail and can change at any time. If your module (or product) generates 
headers, then your module (or product) is responsible for making these 
available to whoever is going to include them.
For example: You have a module with a rule that creates a header file:
 Artifact { filePath: "includes/header.h" }
Now your module needs to adapt the list of include paths as well:
 cpp.includePaths: product.buildDirectory + "/includes"
For products it's basically the same, with the cpp.includePaths property 
in an Export block if the headers should be accessible from dependent 
products.


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


Re: [QBS] Translations from qbs

2014-10-20 Thread Christian Kandeler
On 10/20/2014 10:00 AM, Stéphane Fabry wrote:
> I hit a small but biggg problem, can't find any way of updating
> translation ts files with lupdate or another tool.
>
> Because lupdate is still asking for a .pro file... how can I do it in qbs ?

There is no qbs integration for this yet.
See https://bugreports.qt-project.org/browse/QBS-486.
We've done a bit of research on the topic lately, and some interesting 
problems came up. We still aim to have this working in 1.4, though.


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


Re: [QBS] QBS not compiling with our compiled Qt version

2014-10-17 Thread Christian Kandeler
On 10/17/2014 12:21 PM, olivier musse wrote:
> It's a big issue on our side since we have many different versions of Qt
> we have compiled and not having the .prl files well filed in.
> At this point, after our last QBS upgrade, we can no more compile and so
> distribute any new version of our products to our customers.
> So please, as a first step help, may you tell me which .prl files are
> analyzed by QBS and what is used inside so that I can generate them
> properly.

There is no fixed list. qbs looks at all the .pri files in /mkspecs/modules/ and gathers information about modules from there. 
Basically, for every qt_lib_*.pri file that does not have "no_link" in 
its config there must be a corresponding library and prl file, and from 
the prl file we gather additional information.
I must stress again that there is something seriously wrong with your Qt 
build if the prl files are empty (I have never seen such a thing), and 
other things beside qbs will also not work properly then. You should 
file a bug report for Qt and have this investigated.


Christian

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


Re: [QBS] Rule and the "usings" property

2014-10-17 Thread Christian Kandeler
On 10/17/2014 02:17 PM, Stéphane Fabry wrote:
> thanks, I solved the problem in two steps :
> - first rule as you said mostly does nothing but create an artifact the
> second rule can catch
> - second multiplex rule does the job by catching target artifacts of the
> first one
>
> Glad to see a change will improve this in the future !

Polished patch has now been merged and the functionality will be in 1.4.

> And congrats for qbs, I'm just trying to switch from qmake, and now
> mostly done with a lot more flexibility, readability, functionnality and
> performance that the qmake solution i have.

That's good to hear. Please keep us informed about any problems you 
encounter.


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


Re: [QBS] QBS not compiling with our compiled Qt version

2014-10-16 Thread Christian Kandeler
On 10/16/2014 03:18 PM, olivier musse wrote:
> We got an issue with QBS last version (1.3.2) really similar to
> https://snusmumriken.qtproject.c.bitbit.net/browse/QBS-689 but while
> using Qt 5.3.2.
> We finally found the reason of the issue since it only appears in a Qt
> version we compiled ourself and not in the official one (commercial
> version).
> It comes from the fact that .prl files in our compiled version are
> empty.

That must never happen. The Qt build is probably incomplete, for 
instance because you forgot to run make install. If you are sure that's 
not the case, please provide detailed instructions about how you built 
this Qt.


Christian

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


Re: [QBS] Rule and the "usings" property

2014-10-16 Thread Christian Kandeler
On 10/15/2014 11:23 PM, Stéphane Fabry wrote:

[...]

> I tried to use the "usings" property, from the docs it seems it should
> de the job, but without success...

As opposed to what the documentation says "usings" only matches target 
artifacts of the product that the dependency is on. This should probably 
be changed (this patch tries to do something related: 
https://codereview.qt-project.org/#/c/93771/).

> How can i achieve this ?

Not at all at the moment, I'm afraid. At least not in a sane manner; 
perhaps some hackery involving product.dependencies or some "null 
transformer" that just copies files, attaches tags to the copy and makes 
the outputs target artifacts could work.


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


Re: [QBS] qbs 1.3.2 released

2014-10-15 Thread Christian Kandeler
On 10/15/2014 04:19 AM, Yuchen Deng wrote:
> Does any news to support Android deployment?

Certainly not in a patch release.
The tentative plan is to have at least all the prerequisites for an 
Android module in 1.4, perhaps even a first implementation.


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


[QBS] qbs 1.3.2 released

2014-10-14 Thread Christian Kandeler
Hi,

we have released qbs 1.3.2 today. It fixes a number of bugs in the 
previous release and is also part of Qt Creator 3.2.2.
The usual packages can be downloaded from 
http://download.qt-project.org/official_releases/qbs/1.3.2/.


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


Re: [QBS] how to use qbs in huge projects

2014-10-09 Thread Christian Kandeler
On 10/09/2014 04:46 PM, Kurt Keller wrote:
>>> By implementing a qbs hierarchy like this, I encounter the following
>>> problems:
>>> - qtcreator needs ages to load the qbs file in the base directory
>>> (50+ sub-qbs files)
>
>> I don't know what "ages" means. If you use a release build of Creator
> (built
>> against a release version of Qt, more importantly), things should be
> reasonably fast.
>
> "ages" means up to 60 seconds on Intel I7 / 16 GB Mem / SSD Hard Disk / Win
> 8/64
> Qt Creator & Qt are release builds. (There are in one case more than 3800
> C++
> Source files and some  1100 C++ Header files referenced by the main QBS
> file.)

Qt Creator is of comparable size and takes a little more than ten 
seconds to load on my somewhat older Windows machine. It's hard to say 
from here why it's so slow for you.

>>> - once qtcreator has parsed the complete qbs hierarchy, I could not
>>> find a way
>>>   to compile & debug a subproject only. (i.e. "set as active
>>> project" is not available)
>
>> Right-click on any project in the tree, click "Build".
>
> Yes, building is not the problem, but how to debug (execute) such a sub
> project
> application?

You are aware of run configurations, right? You can choose them either 
via the target selector or via the "Run" part of the Projects pane.

>>> - in addition I want to be able, to do: 'cd subproject/subsubproject;
> qbs'
>>> in a cmd
>>>   window which is not possible, because subsubproject does not know
>>> the properties
>>>   of higher level projects.
>
>> Same thing. But even if it does work, you should be aware that this build
> is
>> entirely separated from any build of the top-level project, so that seems
> like
>> a rather questionable thing to do anyway. Instead, you should probably run
>
>> qbs for the top-level project and select the products you are interested
> in.
>> Admittedly, we don't have a "--projects" switch analagous to "--products",
>> but this could be implemented.
>
> This is another annoying point. When 'qbssing' in the middle of the project
> tree (i.e. to compile a set of libraries which belong together) qbs creates
> a
> build directory in the working directory. After a while there are lots of
> build directories - scattered over the whole directory tree.

Well, that's simply not the intended usage pattern.

> Would you always call qbs in the qt root directory, when doing a bug fix
> in qlist.cpp?

Sure. Opening the sub-project is a crutch people use because recursive 
make is slow. That's not applicable to qbs.

>>> So I created modules, to store 'global properties'. My
>>> sub{sub+}projects depend on this modules and know therefore the
>>> 'global' properties. But as soon as relative pathnames (upward paths,
>>> like '../../../include' or '../../lib/Debug') are used, this practice
>>> does not work very well. ('cd subdir; qbs' will not work (cannot find
>>> include files) while 'cd subdir/subdir/subdir; qbs' will find the
>>> include files or vice
>>> versa)
>>> Switching to absolute path names is a problem too, because there is a
>>> base dir for every release of the project. (project-5.0, project-5.1,
>>> ...) So I have to change all absolute path names when starting a new
>>> release...
>
>> I didn't understand this. You aren't saying you're anchoring your relative
>
>> paths at the working directory, are you?
>
> Yes I do. How can I anchor upward paths (../../public/include/files) on
> anything else? How can I get (in a module) the absolute path of my
> current qbs working directory?

Your module should never care about any working directory; that's simply 
wrong and cannot work at all if you use, for instance, the -d option. 
You probably want project.sourceDirectory.


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


Re: [QBS] how to use qbs in huge projects

2014-10-08 Thread Christian Kandeler
On 10/08/2014 05:08 PM, Kurt Keller wrote:

 > My projects are structured in sub directories: starting from a base
 > directory
 > there are subdirectories for binaries (debug and release, libraries
 > (.so, .dll) and  .lib and .pdb files) as well as a subdirectory
 > structure for application and library source code.

This sounds weird already. The binaries should not be considered part of 
your project tree.

> I understand the concept, that there should be one qbs file in the project
> base
> directory, which defines properties and references the qbs files in
> subdirectories
> which in turn inherit these properties and so on.
>
> By implementing a qbs hierarchy like this, I encounter the following
> problems:
>- qtcreator needs ages to load the qbs file in the base directory (50+
> sub-qbs files)

I don't know what "ages" means. If you use a release build of Creator 
(built against a release version of Qt, more importantly), things should 
be reasonably fast.

>- once qtcreator has parsed the complete qbs hierarchy, I could not find a
> way
>  to compile & debug a subproject only. (i.e. "set as active project" is
> not available)

Right-click on any project in the tree, click "Build".

>- it is not possible, to open subprojects directly with qt creator:
>qtcreator subproject/subsubproject/subsubproject.qbs
>  there always will be some properties missing.

If you access parent project properties inside your project, then you 
are declaring that that project cannot live on its own. Whether or not 
that is the right decision depends on your project.

>- in addition I want to be able, to do: 'cd subproject/subsubproject; qbs'
> in a cmd
>  window which is not possible, because subsubproject does not know the
> properties
>  of higher level projects.

Same thing. But even if it does work, you should be aware that this 
build is entirely separated from any build of the top-level project, so 
that seems like a rather questionable thing to do anyway. Instead, you 
should probably run qbs for the top-level project and select the 
products you are interested in. Admittedly, we don't have a "--projects" 
switch analagous to "--products", but this could be implemented.


> So I created modules, to store 'global properties'. My sub{sub+}projects
> depend on
> this modules and know therefore the 'global' properties. But as soon as
> relative
> pathnames (upward paths, like '../../../include' or '../../lib/Debug') are
> used, this
> practice does not work very well. ('cd subdir; qbs' will not work (cannot
> find include files)
> while 'cd subdir/subdir/subdir; qbs' will find the include files or vice
> versa)
> Switching to absolute path names is a problem too, because there is a base
> dir for
> every release of the project. (project-5.0, project-5.1, ...) So I have to
> change all
> absolute path names when starting a new release...

I didn't understand this. You aren't saying you're anchoring your 
relative paths at the working directory, are you?


Christian

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


Re: [QBS] Target pathnames getting too long on Windows

2014-09-25 Thread Christian Kandeler
On 09/25/2014 03:16 PM, Thomas Epting wrote:
>  > > Now with the new target structure introduced in Qbs 1.3 one can easily
>  > > exceed this limit. In this version, the target structure is composed of
>  > > these these parts (at least for MSVC):
>  > >
>  > >
> D:\\-release\.\.obj\\.cpp.obj
>
> Let me follow up on this. First, please note that I like the new target
> structure very much. It's simple, clean and comprehensible. However it's
> a shame that Windows still has this 260 character limitation.
>
> Maybe the second occurence of  can be avoided. It seems to be
> redundant to me, and leaving it out helps a bit with the 260 char
> problem.

Not really possible, because products can have a different profile than 
the overall project. But we could shorten the name. In qbs master, we 
currently append a hash to a "clean" product name. I suppose this name 
could be shortened to some fixed length without the danger of 
introducing clashes.

> Another idea would be to find a suitable way to shorten .

Yes. What a module really means when it says "put the output file at 
 + http://lists.qt-project.org/mailman/listinfo/qbs


Re: [QBS] Target pathnames getting too long on Windows

2014-09-22 Thread Christian Kandeler
On 09/22/2014 03:52 PM, Thomas Epting wrote:
> Hi all,
>
> I had never thought that, but even on current versions of Windows there
> is a 260 character limit for file paths (see
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx).
> This means that each single file path passed as an argument (e.g. to
> compiler or linker) cannot be longer than 260 characters.
>
> Now with the new target structure introduced in Qbs 1.3 one can easily
> exceed this limit. In this version, the target structure is composed of
> these these parts (at least for MSVC):
>
> *D:\**\**-release\**.**\.obj\**\**.cpp.obj*

Can you name an example for ?


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


Re: [QBS] Compiling Qt project with qbs + Qt Creator

2014-09-22 Thread Christian Kandeler
On 09/19/2014 04:13 PM, Христо Христов wrote:
> I'm trying to learn qbs and use it for Qt projects in Qt Creator. What
> is wrong with my project file?  I get the following error:
>
> :-1: error: cannot find -lC:/SDKs/Qt/5.3/mingw482_32/lib/Qt5Cored
> :-1: error: cannot find -lC:/SDKs/Qt/5.3/mingw482_32/lib/Qt5Guid
> :-1: error: cannot find -lC:/SDKs/Qt/5.3/mingw482_32/lib/Qt5Widgetsd

This is probably https://bugreports.qt-project.org/browse/QBS-688. We 
don't have a test machine running mingw, so these break more easily than 
others.


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


Re: [QBS] A way to reuse Depends item's value by Export item?

2014-09-22 Thread Christian Kandeler
On 09/19/2014 09:31 PM, Dmitrii Volosnykh wrote:
> As of now I have to duplicate Depends item inside Product and Export
> items in order to make the original product and any dependent ones
> compile nicely.
>
> Is there a way to specify something like follows?
> Export {
>  Depends: product.depends
> }

No. And while such a thing can probably be added, I'm not so sure it 
would be a good idea: Most of the time a product's dependencies are not 
identical with what its dependents need, and offering a simple way to 
make the two things the same would probably lead to a lot of people 
exporting too much in order to save keystrokes.
Something like this would not have that drawback:
Depends {
 name: "xyz"
 export: true
}
Although it seems a bit questionable that now export information is 
outside the Export block.


Christian

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


[QBS] qbs 1.3.1 released

2014-09-17 Thread Christian Kandeler
Hi,

version 1.3.1 of qbs was released today. It adds a number of bugfixes 
and other improvements on top of 1.3.0. It's also part of Qt Creator 
3.2.1. Source packages and a binary package for Windows can be 
downloaded from
http://download.qt-project.org/official_releases/qbs/1.3.1 .


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


Re: [QBS] Can't build project with mingw

2014-09-17 Thread Christian Kandeler
On 09/16/2014 02:35 PM, Slyshyk Oleksiy wrote:
> In QtCreator 3.2.1 can't build project with mingw using qbs.
> this is because, it is wrong to define the path to the libraries.
> For add library used "libFilePath" , but need use "libNameForLinker" in
> Qt modules.

Please file a bug report. Make sure that you are including the actual 
error message and compiler/linker command line, rather than your 
interpretation.


Christian

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


Re: [QBS] Strange incremental build in QtC 3.2 qbs.

2014-09-08 Thread Christian Kandeler
On 09/06/2014 04:39 PM, Smirnov Vladimir wrote:
> On 06.09.2014 19:00, qbs-requ...@qt-project.org wrote:
>> Do you have the "check timestamps" option enabled?
> Hmm, i didn't noticed that option before :) I see now it disabled by
> default. I will enable in on Monday and see if it helps!

Err, no, please don't. It's supposed to be off by default. If it had 
been on, that could have been a possible problem source.


Christian

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


Re: [QBS] Strange incremental build in QtC 3.2 qbs.

2014-09-05 Thread Christian Kandeler
On 09/05/2014 12:56 PM, Smirnov Vladimir wrote:
>> Sorry, I cannot follow. What does that mean, "instantly rebuilding"?
> Please explain
>- what you do
>- what you expect to happen
>- what happens instead.
>
>
> -I opening my project ion QtC and press build. Project builds. Then i press 
> build again.
> -I expect nothing happens and no file rebuilds.
> -Instead, some files rebuild again. and again. Instantly.

Do you have the "check timestamps" option enabled?

> I miss '-vv' support in QtC build option :(

The output would completely overflow Creator's output panes, so that's 
not really feasible.


Christian

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


Re: [QBS] Strange incremental build in QtC 3.2 qbs.

2014-09-05 Thread Christian Kandeler
On 09/04/2014 10:50 PM, Smirnov Vladimir wrote:
> Hi everyone,
>
> I have now strange bug (maybe not in qbs, not sure), after upgrading
> Creator to 3.2 (just downloaded Win installer).
> When build executed, SOMETIMES qbs instantly starting rebuilding one of
> the files.

Sorry, I cannot follow. What does that mean, "instantly rebuilding"? 
Please explain
 - what you do
 - what you expect to happen
 - what happens instead.

> Any idea how to debug it, get more info?

Depending on what the problem is, running qbs from the command line with 
the exact same arguments as displayed in the "Equivalent Command Line" 
widget of the Qt Creator build settings, plus "-vv" and redirecting the 
(massive) output to a file can often help. For instance, it will tell 
you why a file was or wasn't rebuilt.


Christian

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


<    1   2   3   4   5   6   7   >