Re: [Qbs] Using ConanfileProbe with yocto cross compiling toolchain

2020-05-23 Thread Raphael Cotty
Hi, I pushed some scripts in issue QBS-1188 . They allow to compile qbs inside yocto and also to use qbs to compile inside a recipe (just by inheriting from qbs). But when developing code using qtc this is not very convenient so I have a script that

Re: [Qbs] Using ConanfileProbe with yocto cross compiling toolchain

2020-05-22 Thread Christian Gagneraud
On Sat, 23 May 2020 at 07:34, Richard Weickelt wrote: > > Thus I don't think that it should be made into the official Qbs codebase. > > Maybe this code could be used in some How-To section or something. > > What's your experience in using Qbs with Yocto? Once you solved the >

Re: [Qbs] Using ConanfileProbe with yocto cross compiling toolchain

2020-05-22 Thread Richard Weickelt
> I archived my goal with the following code: Good to hear. Thanks for posting the code. > But this code has some restrictions (like using bash or zsh but not fish). I wouldn't consider it a restriction not to support an exotic shell. > Thus I don't think that it should be made into the

Re: [Qbs] Using ConanfileProbe with yocto cross compiling toolchain

2020-05-18 Thread Kai Dohmen via Qbs
Hello. I archived my goal with the following code: Yocto_Conan_Qbs.qbs: import qbs import qbs.File import qbs.FileInfo import qbs.Probes import qbs.Process import qbs.TextFile import qbs.Utilities Project { references: conanFileProbe.generatedFilesPath + "/conanbuildinfo.qbs" Probe {

Re: [Qbs] Using ConanfileProbe with yocto cross compiling toolchain

2020-05-15 Thread Richard Weickelt
> Sorry. I meant how to extract the environment variables from the yocto script. > My idea was to source the script in a process > with https://doc.qt.io/qbs/jsextension-process.html  > and then just query all the process environment variables with >

Re: [Qbs] Using ConanfileProbe with yocto cross compiling toolchain

2020-05-15 Thread Kai Dohmen via Qbs
> > Do you know how I can easily extract the environment variables? > > https://doc.qt.io/qbs/jsextension-environment.html#currentenv seems like a > > solution but I don't know how to access a process environment with this. > > Which environment variables? If I understood you correctly, then you

Re: [Qbs] Using ConanfileProbe with yocto cross compiling toolchain

2020-05-15 Thread Richard Weickelt
> I will try this approach. But maybe I use `conan install -e` instead of > setting the environment variables for the complete process. If the result is the same, then why not. > Do you know how I can easily extract the environment variables? >  

Re: [Qbs] Using ConanfileProbe with yocto cross compiling toolchain

2020-05-15 Thread Kai Dohmen via Qbs
> 1. Add an additionalEnvironmentVariables property to ConanfileProbe > 2. Append these to the process environment in ConanfileProbe. See >https://doc.qt.io/qbs/jsextension-process.html#setenv > 3. Add an additional Probe item in your project file that extracts >the environment variables

Re: [Qbs] Using ConanfileProbe with yocto cross compiling toolchain

2020-05-15 Thread Christian Gagneraud
On Fri, 15 May 2020 at 19:46, Kai Dohmen via Qbs wrote: > > Hello, > > I just stumbled across a scenario in which we use with multiple profiles for > different cross compiling toolchains. Yocto creates a script which exports > environment variables. We normally just extract the needed values

Re: [Qbs] Using ConanfileProbe with yocto cross compiling toolchain

2020-05-15 Thread Richard Weickelt
> I just stumbled across a scenario in which we use with multiple profiles for > different cross compiling toolchains. Yocto creates a script which exports > environment variables. We normally just extract the needed values from the > script and set them as additional qbs profile settings. > This

[Qbs] Using ConanfileProbe with yocto cross compiling toolchain

2020-05-15 Thread Kai Dohmen via Qbs
Hello, I just stumbled across a scenario in which we use with multiple profiles for different cross compiling toolchains. Yocto creates a script which exports environment variables. We normally just extract the needed values from the script and set them as additional qbs profile settings. This