[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 "a" is lost.


But "a" is, in my case, the important bit of information, because I need 
to look up some files in the filesystem based on which dependency is 
specified. Looking at the QBS source code 
(src/lib/corelib/language/moduleloader.cpp), it does not look like there 
is any way to get the full dependency name.


Did I overlook something? If not, would you consider the addition of a 
"relativeName" property, which QBS would set to the second part of the 
name (the one currently being left out, that is "a" in this example), if 
I provide the code for it?


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


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 almost working. As a matter of facts, it indeed works for 
the example I posted before, but my problem is that the source files are 
generated at build time (by the Qt resource system), and it looks like 
they are not being picked up by the Group:


Export {
Group {
fileTagsFilter: ["cpp"]
}
}

I will experiment a bit more with the QBS.Exporter module, because it 
might be exactly what I'm looking for (or maybe I'll just got for a 
module, as you suggested!).


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


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

2020-07-30 Thread Jochen Ulrich
Hi Alberto!

Did you try using a Module instead of a Product?
https://doc.qt.io/qbs/qml-qbslanguageitems-module.html
https://doc.qt.io/qbs/custom-modules.html

Module {
Depends { name: "cpp" }
Group {
name: "a"
files: [ "one.cpp" ]
}
}

Or export from a Product (which also creates a Module internally):

Product {
name: "a"
Export {
Depends { name: "cpp" } // Maybe not needed?!
Group {
name: "a sources"
files: [ "one.cpp" ]
}
}
}

Not sure if this works, though. :-)

Best
 Jochen


´╗┐Am 29.07.20, 22:52 schrieb "Qbs im Auftrag von 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 the "qt.core.resource_data" tag, which causes a
"qrc_a.cpp" to be generated)

And I'm trying to use it from a product B:

CppApplication {
name: "b"
Depends { name: "a" }
...
}

Now, I would like that the cpp files from product A would be used when
building product B, that is as if product A was a Group. But it looks
like the Depends item is not effective.

I also tried to change the product's type to "obj", and this at least
causes the files in product A to be compiled; but they are still not
added to product B.

Indeed, it all works if I change product's A type to "staticlibrary",
but that forces me to use Q_INIT_RESOURCE, which I was trying to avoid.

Any ideas?

(the reason why I'm using a product and not a Group is that, under some
configurations, this could indeed be a separate product like a loadable
module)

Ciao,
  Alberto


-- 
http://www.mardy.it - Geek in un lingua international
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs

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


[Qbs] (no subject)

2020-07-30 Thread Dan Pat
Is qbs supposed to work with Qt WebAssembly (I cannot get it to work)? If
not, are there plans to add support?
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs