[Qbs] Running the target through a wrapper

2022-10-08 Thread Alberto Mardegan
Hi all! On some occasions I've found myself in need of debugging the executable under gdb, strace and valgrind. Running gdb ./default/install-root/usr/local/bin/MyApp has always worked well for me, but I wonder: 1) Would this break if the app depends on shared libraries existing in

Re: [Qbs] QBS for Ubuntu LTS releases and docker images

2022-07-19 Thread Alberto Mardegan
Добрый день, Павел! On 02/06/22 13:14, Карелин Павел wrote: It's too bad the core developers of QBS didn't do this sooner. Now the fresh compiled version of QBS can only be downloaded as an archive (and in my country even this cannot be done now). I happen to live in the same country :-)

[Qbs] QBS for Ubuntu LTS releases and docker images

2022-05-29 Thread Alberto Mardegan
Hi all! In case this is of interest to somebody else than me: I've recently updated my Ubuntu PPA containing QBS 1.22.1 for Ubuntu Xenial, Bionic, Focal and Jammy: https://launchpad.net/~mardy/+archive/ubuntu/qbs-on-lts Except for Jammy, QBS is linked statically, without using the Qt

Re: [Qbs] Strange error with QBS 1.22.1 on Android

2022-05-24 Thread Alberto Mardegan
On 24/05/22 23:31, Alberto Mardegan wrote: Here's the error: https://pastebin.com/68KdfagX Oh, I see it now, there's a lonely "-D" in the compiler command line: ... -DXDG_THUMBNAILS -D -DQT_SVG_LIB ... It came from this: cpp.defines: product.embedAsResource ? "

[Qbs] Strange error with QBS 1.22.1 on Android

2022-05-24 Thread Alberto Mardegan
Hi all, I upgraded to QBS 1.22.1 and I get a very weird errorwhen building on Android (Qt 5.15.2); the build for Linux desktop (x86_64) instead works fine. Here's the error: https://pastebin.com/68KdfagX The source code is https://gitlab.com/mardy/mappero/-/commits/qt5.12 I should also

Re: [Qbs] Selecting target architecture for Android

2022-05-23 Thread Alberto Mardegan
Hi Christian, On 23/05/22 11:12, Christian Kandeler wrote: Presumably you have set qbs.install to true somewhere in the library product, with no per-arch differentiation, leading to  a conflict. Since in the Android case the libraries are not the final build artifact, they should not get

Re: [Qbs] Selecting target architecture for Android

2022-05-23 Thread Alberto Mardegan
Hi Rafael, On 23/05/22 13:38, Raphael Cotty wrote: Hello, the libMapperoCore.so should have the architecture name like this: libMapperoCore-arch.so What type of product do you use for the MapperoCore? It's a DynamicLibrary. Is there something special which I should do to give the compiled

[Qbs] Retrieving project options

2022-05-22 Thread Alberto Mardegan
Hi again :-) Sorry for the spamming, this hopefully is an easy question: how do I find out, from within a QBS build directory, what where the command-line options which I passed to QBS to initialize the project? Like, if I ran: qbs run profile:android515 project.geotagger:false -f .. I

[Qbs] Selecting target architecture for Android

2022-05-22 Thread Alberto Mardegan
Hi there! So far I've built my Android application using Qt 5.12, for the arm architecture only, and everything has worked fine. Today I tried migrating to 5.15, which supports multiarch, and I'm getting an issue: after building all the files for all the four supported architectures ("Qt

Re: [Qbs] Build and run a AuxiliaryApplication before build a MainApplication

2021-02-11 Thread Alberto Mardegan
On 11/02/21 10:58, Карелин Павел wrote: > But then I found out that the assembly of the project depends on the > order of declaring sections 'Depends' Unfortunately I don't have a recent enough version of QBS (still at 1.16), so I'm unable to try your project, but can you please paste the error

Re: [Qbs] Build and run a AuxiliaryApplication before build a MainApplication

2021-02-10 Thread Alberto Mardegan
Just got some more thoughts: On 10/02/21 11:48, Карелин Павел wrote: > --- parsetrigrams.qbs --- > import qbs > import qbs.FileInfo > > Product { >     name: "SonnetParseTrigrams" >     targetName: "sonnet_parsetrigrams" >     condition: true > >     type: "application" You can add an

Re: [Qbs] Build and run a AuxiliaryApplication before build a MainApplication

2021-02-10 Thread Alberto Mardegan
On 10/02/21 11:48, Карелин Павел wrote: >     Group { >     fileTagsFilter: ["trigrams-map"] >     //fileTagsFilter: ["sonnet-parse-trigrams-run"] >     fileTags: ["qt.core.resource_data"] >     } Does it help if you remove this Group and instead add outputFileTags:

Re: [Qbs] How to use texttemplate module?

2020-09-09 Thread Alberto Mardegan
On 09/09/20 11:25, Christian Kandeler wrote: > But it has to be, or at least appear as a dependency of the product type > somewhere. > Otherwise there's no path from the source artifact to the product type. > A detailed explanation is here: >

[Qbs] How to use texttemplate module?

2020-09-08 Thread Alberto Mardegan
Hi all, I'm having some trouble using the texttemplate module, because I cannot get its rule to execute. If I run the test file from https://code.qt.io/cgit/qbs/qbs.git/tree/tests/auto/blackbox/testdata/texttemplate then everything works. But if I modify that file and change the Product type

Re: [Qbs] How to get the full dependency name in a ModuleProvider?

2020-08-01 Thread Alberto Mardegan
On 31/07/20 11:03, Christian Kandeler wrote: > There's probably no harm in adding a "fullName" property containing the > string from the Depends item. Possibly it could even be the value of "name", > but I'd have to take a closer look to determine what makes more sense > semantically. Maybe we

Re: [Qbs] How to get the full dependency name in a ModuleProvider?

2020-07-31 Thread Alberto Mardegan
Il 31.07.2020 11:28, Jochen Ulrich ha scritto: We also stumbled over this and a few more shortcomings of ModuleProviders when writing a ModuleProvider to integrate the Conan package manager with Qbs. See this thread: https://lists.qt-project.org/pipermail/qbs/2020-February/002649.html

Re: [Qbs] How to get the full dependency name in a ModuleProvider?

2020-07-31 Thread Alberto Mardegan
Adding one more question, to make sure I do not misunderstand the role of a ModuleProvider: Il 30.07.2020 23:32, Alberto Mardegan ha scritto:   I started playing with ModuleProvider, and I find the "name" property a bit confusing: if the dependency was specified as     Depe

[Qbs] How to get the full dependency name in a ModuleProvider?

2020-07-30 Thread Alberto Mardegan
Hi again! I started playing with ModuleProvider, and I find the "name" property a bit confusing: if the dependency was specified as Depends { name: "myprovider.a" } the the module provider in "module-providers/myprovider/provider.qbs" only sees "myprovider" as "name" property -- the

Re: [Qbs] Building a product's files into another product

2020-07-30 Thread Alberto Mardegan
Hi Ulrich, Il 30.07.2020 14:04, Jochen Ulrich ha scritto: Hi Alberto! Did you try using a Module instead of a Product? Not yet, because it would require some deeper refactoring of my QBS project, but: Or export from a Product (which also creates a Module internally): yes, this is

[Qbs] Building a product's files into another product

2020-07-29 Thread Alberto Mardegan
Hi! The subject is a bit convoluted, but the meaning is this one: I have product A defined like this: Product { type: "linkme" name: "a" Depends { name: "cpp" } files: ["one.cpp"] } (in reality, the situation is more complex than this and the input files are static files with

Re: [Qbs] Conditionally adding a file tag

2020-07-29 Thread Alberto Mardegan
Hi Ulrich, On 29/07/20 10:07, Jochen Ulrich wrote: > I guess the issue here is that FileTaggers are disabled in this case: > >> File taggers are disabled if file tags are set explicitly in a product or >> group. >> For example, the "cpp" tag is not attached to the .cpp files in the >>

[Qbs] Conditionally adding a file tag

2020-07-28 Thread Alberto Mardegan
Hi all! I have a Product consisting of static files (images, QML and JSON); you can see the base item here: https://gitlab.com/mardy/mappero/-/blob/fd935d58a55523bf7d6b281f2728f055704a2b26/qbs/imports/QmlPlugin.qbs and a trivial QBS file in which it's used:

Re: [Qbs] Android and shared libraries in APK

2020-07-11 Thread Alberto Mardegan
On 11/07/20 13:18, Alberto Mardegan wrote: > I guess that the desired outcome is that there is only one shared > library whose name matches the product.name; is my understanding correct? This appears to be working for me: https://codereview.qt-project.org/c/qbs/qbs/+/307513 Ciao, A

[Qbs] Android and shared libraries in APK

2020-07-11 Thread Alberto Mardegan
Hi all, sorry for the week-end spamming :-) My project consists of an executable file and two shared libraries. The Android build is failing right at the end, with this message: ERROR: Qt applications for Android support only one native binary per package. On the other hand, the documentation

[Qbs] Android API level

2020-07-11 Thread Alberto Mardegan
Hi all, While trying to build one of my existing projects for Android, I was getting a build error: == In file included from /home/mardy/Android/Sdk/ndk/20.1.5948944/sources/android/support/include/math.h:32:

Re: [Qbs] Mingw issues

2020-04-12 Thread Alberto Mardegan
On 07/04/20 23:04, Richard Weickelt wrote: > I think qbs-setup-toolchains got confused by the "." in the toolchain > prefix. It is usually not expected. The heuristics have been improved in Qbs > 1.16. Could you try if it works with the release candidate of Qt Creator > 4.12 and otherwise submit a

[Qbs] Binary stripping

2020-04-09 Thread Alberto Mardegan
Hi all! Sorry for spamming the list :-) I noticed that binaries generated by mingw are quite large, and when I ran the "strip" command on them, the size was reduced by more than half, without losing functionality. I'm building my application with the `config:release` option. Shouldn't that run

Re: [Qbs] Changing the default value of consoleApplication

2020-04-08 Thread Alberto Mardegan
On 08/04/20 13:21, Oswald Buddenhagen wrote: > i'm not convinced. qt.widgets and qt.quick could reasonably do that, but > gui is perfectly suitable for console-only apps. mmm... you are right, there might be a QtGuiApplication which uses QImage to do some processing but never creates a window.

Re: [Qbs] Q_INIT_RESOURCE on Windows

2020-04-08 Thread Alberto Mardegan
On 08/04/20 00:33, Иван Комиссаров wrote: > From the Qt documentation: > > "The Q_INIT_RESOURCE() macro is necessary on some platforms for > resources stored in a *static* library.» Oops! Sorry for the noise, and thanks for the pointer! :-) Ciao, Alberto -- http://www.mardy.it - Geek in un

[Qbs] Changing the default value of consoleApplication

2020-04-07 Thread Alberto Mardegan
Hi there! I've recently built a Windows application with QBS, and was a bit surprised that it was built as a console application (the terminal opened when running it). Would anyone object if I submit a change to the QtGuiApplication item, so that it unconditionally sets the `consoleApplication`

Re: [Qbs] Mingw issues

2020-04-06 Thread Alberto Mardegan
On 05/04/20 22:48, Richard Weickelt wrote: > Does your toolchain setup work without Qt? Maybe build a plain c++ hello > world app. > > Is the deduced qbs.architecture correct? The architecture is unset (I cannot see it with `qbs config`, at least). But looking at the configuration I understood

[Qbs] Mingw issues

2020-04-05 Thread Alberto Mardegan
Hi all! I've a feeling I've met this problem before, but I cannot remember what the solution was. So here I am again :-) I'm trying to build an application for Linux, using QBS with MXE. I've setup my toolchain like this: MXE_DIR=/mnt/Lavoro/mxe/mxe-qt5.9 qbs setup-toolchains

Re: [Qbs] Using QBS with an nonexistent $HOME

2020-03-03 Thread Alberto Mardegan
On 29/02/20 19:17, Wookey wrote: > I have written a wiki page about using QBS to build debian packages: > https://wiki.debian.org/Qbs > > I deal with QBS's desire to store a profile in the home directory by setting > --settings-dir to either /tmp (potential security risk as other can change >

[Qbs] Using QBS with an nonexistent $HOME

2020-02-28 Thread Alberto Mardegan
Hi there! I'm trying to build a Debian/Ubuntu package of a QBS project in launchpad.net; the site uses sbuild, which has the peculiarity of setting "HOME=/sbuild-nonexistent". I'm stuck at the step "qbs setup-qt", which fails with this error: Setting up Qt profile 'qt5' failed: Cannot create

Re: [Qbs] Passing paths to properties

2020-02-04 Thread Alberto Mardegan
On 03/02/20 15:37, Christian Kandeler wrote: >> >> This and in addition - since the documentation already calls the property a >> "path" [1] - introduce a path property type in Qbs which does that >> automatically for us in its toString() method. > >

[Qbs] Passing paths to properties

2020-01-31 Thread Alberto Mardegan
Hi there! I was trying to customize the location of my Android resources within a project, by playing with the resourcesDir and sourceSetDir properties. It took me a while (and a look at the QBS Android.sdk module sources) to realize that I should pass an *absolute* path to these properties.

Re: [Qbs] Error after running tests

2020-01-15 Thread Alberto Mardegan
On 14/01/20 22:56, Jochen Ulrich wrote: > So instead of > $ qbs run -p check > > you should do > $ qbs build -p check Oh, indeed, I should have known better! :-) Thanks a lot! Ciao, Alberto ___ Qbs mailing list Qbs@qt-project.org

[Qbs] Error after running tests

2020-01-14 Thread Alberto Mardegan
Hi there! I'm using the AutotestRunner to run the unit tests in my project [1]. The tests run successfully, but then QBS tries to install them (why?) and fails: === $ qbs project.enableCoverage:true project.buildTests:true [...] $ qbs run -p check Restoring build graph

Re: [Qbs] Qbs 1.15.0 released

2020-01-02 Thread Alberto Mardegan
Hi Richard, On 02/01/20 14:20, Richard Weickelt wrote: > I'd like to announce the release of Qbs 1.15.0. Source and binary > packages as well as a change log can be found at > https://download.qt.io/official_releases/qbs/1.15.0/. > This release of Qbs is also shipped as part of Qt Creator 4.11.0.

Re: [Qbs] Deployment and dependency bundling

2019-12-28 Thread Alberto Mardegan
Ho Oswald, On 27/12/19 21:24, Oswald Buddenhagen wrote: > you're mixing up two separate issues. > > "deployment" (you actually mean dependency embedding) is just a special > form of "linking" dependencies. you should be able to make a fully > static build or a bundle with embedded dlls and

Re: [Qbs] Deployment and dependency bundling

2019-12-27 Thread Alberto Mardegan
On 27/12/19 15:15, Oswald Buddenhagen wrote: > dependency embedding should be a property of the Depends item (based on > https://bugreports.qt.io/browse/QBS-585). the way this is actually > handled is platform-dependent and needs to be properly abstracted >

Re: [Qbs] Deployment and dependency bundling

2019-12-23 Thread Alberto Mardegan
On 28/11/19 23:08, Alberto Mardegan wrote: > Whether one prepares macOS bundles, AppImage files of MSI installers, > one has to go through the dependency collection step, which is largely > similar for all platforms. To be more explicit, I'm referring to the > kind of job t

[Qbs] Deployment and dependency bundling

2019-11-28 Thread Alberto Mardegan
Hi again :-) Whether one prepares macOS bundles, AppImage files of MSI installers, one has to go through the dependency collection step, which is largely similar for all platforms. To be more explicit, I'm referring to the kind of job that on macOS is performed by the macdeployqt tool, and that

Re: [Qbs] Module adding source files to a project

2019-11-28 Thread Alberto Mardegan
Hi Richard, On 28/11/19 01:17, Richard Weickelt wrote: > Ideally, I think, the user would just invoke some tool and use a prebuilt > binary and not need to build the run-time from source. If building from > source is required, let the user install AppImageKit somewhere and just > point Qbs to the

[Qbs] Module adding source files to a project

2019-11-27 Thread Alberto Mardegan
Hi there! I'd like to write a QBS module to package Linux applications into the AppImage format. This is a format in which the all application's files (and non-trivial dependencies) are packed into a single executable file, which, when executed, unpacks the application data by mounting into a

Re: [Qbs] Understanding installation rules

2019-11-18 Thread Alberto Mardegan
On 19/11/19 00:27, Richard Weickelt wrote: [...] > Does it work with the change suggested above? Yes. Wow. Thanks :-) Alberto -- http://www.mardy.it - Geek in un lingua international ___ Qbs mailing list Qbs@qt-project.org

[Qbs] Understanding installation rules

2019-11-18 Thread Alberto Mardegan
Hi all! About a couple of weeks ago I posted a message to this list about a module I've written to handle freedesktop.org desktop files. I thought it was working really well, until I noticed the following problem: if I manually delete the directory tree which I was as installRoot and I run QBS

Re: [QBS] Is that possible to getting qbs to running with NodeJS?

2015-10-29 Thread Alberto Mardegan
On 10/28/2015 03:04 PM, 罗勇刚(Yonggang Luo) wrote: > The Qt binaries are too big to ship If you want to ship the buildable source code, why do you need to ship Qt binaries as well? Just let people get them from the Qt site. Ciao, Alberto -- http://blog.mardy.it <- geek in un lingua