← Back to team overview

kicad-developers team mailing list archive

Re: Scripting build on Windows

 

On 26 October 2012 10:20, Miguel Angel Ajo Pelayo <miguelangel@xxxxxxx> wrote:
> Thanks for your effort Brian,
>
>     Not sure if it's possible to remove the Cairo dependency in wxPython may
> be it's worth trying.
>
>    In the other hand, I had some usage planned for Cairo (like SVG
> rendering, which could be *cool* when we wanted to build web services based
> in pcbnew libraries or similar, for example).
>
>   What do you think? :)
>
> 2012/10/26 Brian Sidebotham <brian.sidebotham@xxxxxxxxx>
>>
>> On 25 October 2012 11:50, Brian Sidebotham <brian.sidebotham@xxxxxxxxx>
>> wrote:
>> > On 25 October 2012 11:40, Miguel Angel Ajo Pelayo <miguelangel@xxxxxxx>
>> > wrote:
>> >>
>> >> You're right Brian, that's the reason why you couldn't see the
>> >> scripting
>> >> console button at the toolbar
>> >> and pcbnew didn't incorporate the scripting "ui" things inside, the
>> >> lack of
>> >> wxPython (that as far as I know
>> >> just substitute wx itself).
>> >>
>> >> I think there is another compile switch you must enable yet for
>> >> scripting:
>> >>
>> >> KICAD_SCRIPTING  <-- enables scripting inside pcbnew
>> >>
>> >> KICAD_SCRIPTING_MODULES <--- builds a pcbnew.dll for standalone python
>> >>
>> >> KICAD_SCRIPTING_WXPYTHON  <---- builds all the UI stuff dependent on
>> >> wxPython inside pcbnew
>> >>
>> >>
>> >> Thanks a lot for taking care of the windows build!! :)
>> >>
>> >
>> > Hi Miguel,
>> >
>> > I cheated by shifting the wxpython headers in to my wxWidgets source
>> > directory quickly and after building, PCBNEW failed to start because
>> > it couldn't init wxPython. So tonight I'll build wxPython from source
>> > and point KiCad towards it. That should get me a sane build on Windows
>> > and we can see how it goes from there.
>> >
>> > Luckily wxPython have a 2.9.4 source tree, which is what we need on
>> > Windows.
>> >
>> > Thanks for adding scripting support to KiCad! :-D
>> >
>> > Best Regards, Brian.
>>
>> I didn't have much time last night, but I pointed KiCad to wxPython
>> instead of wxWidgets for building. It got so far and choked because
>> wxPython appears to have a dependency on Cairo. It required too much
>> time to investigate last night, but I'll try and look at it again
>> tonight to see if that is a requirement, or if it is optional.
>>
>> If Cario's optional it'd be good to get rid of it, otherwise it'll be
>> another dependency to add to the list.
>>
>> Best Regards, Brian.

Well, removing Cairo didn't appear to harm the build, but I get the
following error when trying to start PCBNEW:

***** Error importing the wxPython API! *****

which is from /scripting/python_scripting.cpp

So further investigation is required as to why that is occurring. I
installed the _pcbnew.pyd lib under the python install in the DLLs
directory as I'm pretty sure that's the default PYTHONPATH.

...

Oh, the above error ocurrs after another error - "An application has
made an attempt to load the C runtime library incorrectly". I think
this is a rather large brick wall. The problem appears to stem from
the fact that python is built with Visual Studio, and I'm compiling
with MinGW. The C runtimes are incompatible as far as I'm aware, and
in which case the only solution (if Windows support is required) is to
build everything with Visual Studio, the same as Python - or else
compile our own Python and include it in the distribution on Windows.
The latter is how Inkscape deals with this problem.

That's what Google suggests anyway.

...

So further along, but not at the candy yet! ;-)

Best Regards, Brian.


Follow ups

References