Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

doubi (9222)

doubi
  (email not shown publicly)

Journal of doubi (9222)

Saturday August 08, 2009
09:30 PM

Wx::WebKit: Linux imminent, Windows postponed, testing want!

[ #39425 ]

As I mentioned last time, there are lots of little things that are only obvious once you know them, and if you don't it's quite difficult to find the snippet of critical information that'll let you move on. I've come across a few more in the past couple of weeks, for which the attendant error messages were entirely unhelpful.

For instance, mingw32-make won't play nice with (Wx) MakeMaker on Windows, you need dmake. You can't use (C-style?) comments below the package / module declarations in XS files (the error this generates misdirects attention to the next function after the comment). The requirement for __declspec() in function declarations on Windows; this demanded an extra -Ddefine in MakeMaker.PL, which I'd thought was handled internally by wxWidgets. Finally, I was thrown off for a while by the fact that Strawberry expects library files in the format lib.a - sure I can just rename my .libs, but to have to do so on Windows it seems a little counter-intuitive. None of these are things that take any time to fix, but they're quite confounding until someone taps you on the shoulder and tells you your shoe is untied.

perlxstut, well written as it is, leaves a rather steep learning curve for getting to grips with wxPerl, which I feel I have yet to do. I spent some time working off the example of Wx::ActiveX, which was a fascinating process, but eventually outdid me. I'd adapted the following from PlActiveX.h:

wxPliClassInfo wxPliWebKit::ms_classInfo((wxChar *) wxT("wxPliWebKit"),
&wxWebKit::ms_classInfo, NULL, (int) sizeof(wxPliWebKit),
(wxPliGetCallbackObjectFn) wxPliGetSelfForwxPliWebKit);

The only place I could find wxPliGetSelfFor[...] elsewhere was in helpers.h in the main Wx package in the WXPLI_IMPLEMENT_DYNAMIC_CLASS_ macro. My function wasn't playing ball and I thought that macro should have been the key, but I couldn't find it used anywhere in the Wx::ActiveX package... which befuddled me. So I threw out my carefully constructed Wx::Ax mimicry and went back to working off Dan Sugalski's OSX-only Wx::WebKit, tweaked a function call name at random which fixed an &Wx::WebKit::constant is undefined error I'd been getting before, and badda-bing, Wx::WebKit is now working under Linux! :-)

That's the good news. The bad news is that wxWebKit compilation on Windows currently only supports MSVC, meaning that it's currently impossible to create wxWebKit .dlls compatible with Strawberry Perl on Windows. They could in theory work with some ActivePerl installs I suppose if they've been made with Visual Studio, but my own recently acquired version seems to have been built on Vista with GCC, meaning it should be incompatible too.

So what's to be done? Well, wxWebKit is on the verge of transfering to a new version control system (waf) which the maintainer has suggested could make the process of porting it from MSVC to MinGW a much easier process. However, I've never attempted anything like that before; I don't know what's involved (not that I'm not looking forward to learning) and it's probably not feasible for me to do in the last few days of GSoC.

So in the remaining time I propose to get a *nix-happy version finalised and docs written. I should have a version available for download by Monday night PST, which I'll announce here. Help with testing would be very much appreciated, especially for BSD, Mac (I think I can get one to test on this week but I'm not sure) and Windows !~ /XP/.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.