<div dir="ltr"><div><div class="im"><div>> Well I guess it is fairly special - I'm compiling stuff for a microcontroller using gcc for arm embedded.<br><br></div></div>As
 I know, you can create a custom *.config file in which to specify paths
 to your toolchain, and then pass to qbs this your config file. Then qbs
 will take your profile as default profile..<br>
If I am not mistaken...<br><br>PS: For me too very interestingly any HOWTO for setup of custom toolchain/profile for qbs. So, I also join to this question. :)<br><br><br></div>BR,<br>Denis</div><div class="gmail_extra"><br>
<br><div class="gmail_quote">2014-05-15 13:44 GMT+04:00 Tim Hutt <span dir="ltr"><<a href="mailto:tdhutt@gmail.com" target="_blank">tdhutt@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Well I guess it is fairly special - I'm compiling stuff for a microcontroller using gcc for arm embedded. It needs specific flags and linker scripts and so on. Is there any documentation on profiles? The only thing I could find was on listing them with the qbs binary which I don't have (since I'm using Qt Creator). If I made a profile would I be able to make it automatically find the arm gcc, and could I distribute it with my code easily?<div>


<br></div><div>Thanks for the info Denis!</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 15 May 2014 10:33, Christian Kandeler <span dir="ltr"><<a href="mailto:christian.kandeler@digia.com" target="_blank">christian.kandeler@digia.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 05/15/2014 10:30 AM, Tim Hutt wrote:<br>
> I have a QBS script that depends on using the GNU Arm toolchain, and I<br>
> want it to automatically find them (on Windows for now).<br>
<br>
</div>Are you sure that's really what you want? Toolchain information<br>
typically comes from the "outside" via a profile, and then it just works<br>
automatically and its properties are available via the cpp module.<br>
Unless you use your toolchain in a very "special" way (i.e. not to<br>
compile your sources), then your current approach is probably wrong.<br>
<br>
<br>
Christian<br>
<div><br>
<br>
In my QBS I<br>
> have this line:<br>
><br>
>       property  string  gnuToolsDir:  "C:/Program  Files/GNU  Tools  ARM  Embedded/4.8  2014q1"<br>
><br>
><br>
> And then I use that elsewhere. I want to set it to be a function, like this:<br>
><br>
>       function  findGnuToolsDir()<br>
><br>
>       {<br>
><br>
>               //  TODO:  Fancy  searching  function.<br>
><br>
>               return  "C:/Program  Files/GNU  Tools  ARM  Embedded/4.8  2014q1";<br>
><br>
>       }<br>
><br>
><br>
><br>
>       property  string  gnuToolsDir:  findGnuToolsDir();<br>
><br>
><br>
</div>> But that doesn't work (says it can't find the function).Additionally, I can't seem to access the property in my Rules - it says the variable doesn't exist.<br>
<div>><br>
><br>
><br>
>       Rule  {<br>
><br>
>               //  ...<br>
><br>
><br>
><br>
>               prepare:  {<br>
><br>
><br>
>                       //  None  of  these  work:<br>
><br>
><br>
><br>
>                       var  objCopyPath  =  gnuToolsDir  +  "/bin/arm-none-eabi-objcopy.exe";<br>
><br>
><br>
><br>
>                       var  objCopyPath  =  parent.gnuToolsDir  +  "/bin/arm-none-eabi-objcopy.exe";<br>
><br>
><br>
><br>
>                       var  objCopyPath  =  product.gnuToolsDir  +  "/bin/arm-none-eabi-objcopy.exe";<br>
><br>
><br>
><br>
><br>
>                       //  ...<br>
><br>
><br>
><br>
>               }<br>
><br>
>       }<br>
><br>
><br>
><br>
><br>
> Any ideas? I've seen the Probe item but it doesn't seem suitable - as far as I can tell it just determines the existence of a library or tool rather than its location.<br>
><br>
><br>
> Cheers,<br>
><br>
><br>
> Tim<br>
><br>
><br>
><br>
</div>> _______________________________________________<br>
> QBS mailing list<br>
> <a href="mailto:QBS@qt-project.org" target="_blank">QBS@qt-project.org</a><br>
> <a href="http://lists.qt-project.org/mailman/listinfo/qbs" target="_blank">http://lists.qt-project.org/mailman/listinfo/qbs</a><br>
><br>
<br>
_______________________________________________<br>
QBS mailing list<br>
<a href="mailto:QBS@qt-project.org" target="_blank">QBS@qt-project.org</a><br>
<a href="http://lists.qt-project.org/mailman/listinfo/qbs" target="_blank">http://lists.qt-project.org/mailman/listinfo/qbs</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
QBS mailing list<br>
<a href="mailto:QBS@qt-project.org">QBS@qt-project.org</a><br>
<a href="http://lists.qt-project.org/mailman/listinfo/qbs" target="_blank">http://lists.qt-project.org/mailman/listinfo/qbs</a><br>
<br></blockquote></div><br></div>