Mark Dootson wrote:

  Hi,

I'd like to propose the attached patch.

Its purpose is to make it simpler for packaging applications to work and to allow creation of binary distributions of wxWidgets dlls for Wx.

The patch is mainly pod - which explains how it would be used.

I've tested building Wx and running Wx demo on Win32 and Linux. Ive tested with PAR, PDK and Wx::Perl::Packager.

I've not written any additional tests as the changes concern running Wx::_start() which is called in various ways whenever Wx is started.

The patch is OK, one tiny nit: could you move the handling of $load_fun/$unload_fun to the standard loader? This way a custom loader will have precedence over the callbacks set via set_load_function/set_end_function.

The patch does make one functional change - it restores loading plugin dlls on platforms other that Win32 (excluding MacOSX) - which I think is necessary for Wx::Html ( at least ) to work correctly.

Unfortunately, this won't work, since on Linux (and I suspect other unices) you can't know the name of the dynamic object, which is the reason dynamic loading was disabled for Linux. You are correct that loading the dynamic object as plugins is required for Wx::Html to work correctly (and probably Wx::XRC, Wx::RichText and Wx::DocView).

One way around it might be to locally replace DynaLoader::dl_load_file with a version that loads DLLs as if they were plugins. I will experiment with that.

Some background:

I'd like to produce a Wx::Binary distribution with the idea that a given Wx::Binary distribution version has a set of libraries built with the same flags and options across Linux/Win32/MacOSX as far as possible. The binary bits would live separately from Perl to make distributing a wxPerl application more straightforward - e.g. make an install of 'wxp-binary' a prerequisite of your packaged app, then you don't have to bundle the whole of wxWidgets with every exec.

I'd like remove much of the evil from Wx::Perl::Packager. PAR::Packer will be straightforward to 'adjust' for, and I'll beg Jan D to make 'more' changes to PDK.
>
I have PPMs for Linux and will investigate MacOSX soon.

Hopefully this will make getting started with Wx more attractive to many and provide some simple straightforward routes for distributing cross platform GUI apps

Thanks!
Mattia

Reply via email to