[QBS] Newbie to QBS
olivier musse
olivier.musse at sfr.fr
Tue May 13 13:57:37 CEST 2014
Hi Joerg,
First thanks, its really amazing to see how people answer quick and
precisely in this list. Hope I will be one day able to help also.
- About post build process, your solution is working nice but I do not
understand : I can understand that inputs is "application" filetags but
why do I need to change my product type to "myapp" and set it as output
of the rule. May you explain me that point ?
- windeployqt is amazing and works perfectly. I tried it in the post
build process as followed
Rule{
inputs:["application"]
Artifact {
fileName: input.baseName
fileTags: "myapp"
}
prepare: {
var cmd = new Command("windeployqt", input.fileName);
cmd.description = "Post build process" + input.fileName;
cmd.highlight = "Post build processing";
return cmd;
}
}
But in fact I would like to deploy not after the build but after application deployment step
Group {
name: "MyApplication"
fileTagsFilter: "application"
qbs.install: true
qbs.installDir: "bin"
}
How can I do that ?
- About install-root, yes I would like to affect it from the qbs file itself.
In fact I'm using Qcreator plugin and the install-root is defined in qbs.user which we do not share among developer (subversion) : I read that it is not good to share this file.
Moreover I need to deploy in many different directory (one for the final product, one for the test environnement) which are always relative to the main qbs file.
So I would like to be able to deploy in subfolders of the qbs file without taking into account the install-root defined automatically in qbs.user file by QCreator.
Perhaps I'm not thinking the right way but this is how we were working with qmake.
> On 13-May-14 10:37, olivier musse wrote:
>
>> If somebody have time to help hereafter is a list of questions :
>> - When compiling a project with QBS it always start a command windows.
>> How to remove this behavior?
>
> You can set consoleApplication to false in your product. That will
> result in adding the /SUBSYSTEM:WINDOWS switch to the linker.
>
>> - How can I perform a post link process as it can be done with
>> QMAKE_POST_LINK
>
> There's not a post link step in qbs.
> But you can achieve the same by doing these steps:
> - set your product type to something like "myapp"
> - create a rule that takes "application" as input and creates
> "myapp" outputs
> - specify your post link commands in that rule
>
>> - what is the simplest way to install the list of Qt libraries (only
>> needed ones) beside the executable ?
>
> In Qt5 is a tool named windeployqt for that purpose. That's not
> restricted to qbs and can be used independent of the build tool.
>
>> - is there any way to override the install root from the qbs file ?
>
> The install root is passed as parameter to the "qbs install" command.
> E.g. qbs install --install-root C:\somewhere\else
> This is usually an absolute path on the build machine which is most
> likely unknown to the author of the project files.
> You want to set the default for that in your project file?
>
>
> BR,
>
> Joerg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20140513/3a6035de/attachment.html>
More information about the Qbs
mailing list