Fun with wxMozilla

Hi all,

I've gotten wxMozilla building as a Python extension on Windows again! =) But the way I did it raised a couple questions, and so here they are:

1. wxPostscriptDC in src/printfw.i needs #ifdef'd? I used the wxPythonSrc-2.4.1.2 tarball to generate the extension, and when I re-generated the SWIG files it gave me errors about wxPostscriptDC not being found. setup.h has wxUSE_POSTSCRIPT set to 0 in the tarball, so I tried putting the wxPostscriptDC class info inside an "#ifdef wxUSE_POSTSCRIPT" block and it built fine. Is there a reason not to put the code in an #ifdef block?

2. Has the build process for the DLL versions of wxWindows changed recently, or are the instructions in BUILD.Win32.txt up to date? I ask because I was able to resolve all my link errors by d/ling the wxPythonDevel-2.4.1.2 package for Windows and using those libraries instead of the libraries I had built myself in my wxPythonSrc tree. That would mean that my build was somehow different, but I used the build instructions in BUILD.Win32.txt to build and was running from a freshly downloaded tree so there shouldn't have been any differences. (Of course, that doesn't mean there weren't - I'm just trying to check the obvious suspects first.) I haven't changed anything in my build environment (using the same versions of MSVC, MSSDK, etc.) and removed any old WXWIN defines in my environment and path, so I don't think any old libraries or includes should have made their way into the build.

One interesting thing I noticed in this process is that I was able to, after building the wxMozilla extension, paste it straight into a plain vanilla wxPython-2.4.1.2 install downloaded from wxPython.org and it worked! So this means, theoretically (^_-), that we could write a separate wxPyMozilla installer and distribute it, rather than requiring people to rebuild wxPython or requiring wxMozilla to be built/included in the main distro. =) I think we can also latch onto the Mozilla 1.4 GRE on Windows, meaning that it would be a very small package if people have Moz 1.4 installed. I'm going to setup a Windows installer and put some standalone demos for both the browser and editor and ship them out soon. I'll also see if I can figure out how to update Vaclav's RPMs to match this setup on Linux.

Now, if only we could get the OS X issues worked out... (Although they have checked in some improvements to the Mac embedding APIs for 1.4 so hopefully things will be somewhat easier.)

Thanks,

Kevin

With help of this small script i have no problems rebuilding new versions of wxPython. I can't replace Robin's wxmsw24h.dll with my though.

Niki Spahiev

setuph.py (954 Bytes)