Hi,
If you have a working Perl + compiler combination, then the standard
stuff should work :-
Download tarball or svn for Alien-wxWidgets:
In the source:
perl Build.PL
perl Build
perl Build test
perl Build install
Download tarball or svn for Wx
In the source:
perl Makefile.PL
perl make
perl make test
perl make install
You'll need the latest ExtUtils::XSpp (0.09) so
cpan Extutils::XSpp
(or PPM or whatever)
first.
The crucial thing seems to be the "working Perl + compiler combination",
which isn't always as straightforward as it might be. There's detail on
how the PPMs for Wx are built at http://www.wxperl.co.uk/building/ which
may contain useful info, depending on your setup.
I think that for most users, if 'cpan' works in general on their setup,
then 'cpan Wx' should work too. So building from the tarballs / svn
should similarly work OK without further trouble.
regards
Mark
On 14/04/2010 18:52, Steve Cookson wrote:
Hi Mark,
Thanks again for this. I'm happy to test the revisions you very kindly
made. But I'm not clear how to start.
I've been happily coding in wxPerl for the last year or so and using Perl as
the glue to call other applications, like SWI-Prolog (which is amazing, if
you haven't tried it) and Ffmpeg to do simple video editing/processing.
wxWidgets has a wonderful array of components like wxMediaCtrl which I use
as the front-end to display what Ffmpeg is doing.
However, I've not (until now) lifted the bonnet on wxPerl and looked at what
makes it tick.
If I download the GNU tarball, can I do the usual Makefile.PL, make, make
test, make install on it, or is there another way?
I'll continue to investigate, but if you get this before I find the answer,
I'd be grateful to hear from you.
Regards
Steve
-----Original Message-----
From: Mark Dootson [mailto:mark.doot...@znix.com]
Sent: 13 April 2010 14:03
To: wxperl-users@perl.org
Cc: Mattia Barbon<mattia.bar...@libero.it>; Steve Cookson
Subject: Re: How to add a new module to Wx
Hi,
I thought I'd chip in with a populated template for Steve to test.
However, basic testing here brought up a problem. wxRichTextPrinting has
no wxRTTI information (there's no IMPLEMENT_CLASS macro) so the wxPerl
code ( wxPli_object_2_sv ) throws warnings.
The attached patch wraps wxRichTextPrinting but is not applied to SVN as
the wxRichTextPrinting constructor code is none standard. It does what
wxPli_object_2_sv would do if wxRichTextPrinting had ClassInfo. I'm
fairly sure this is OK because wxRichTextPrinting inherits directly from
wxObject and, as there is no need to wrap wxRichTextPrinting to handle
Perl virtual methods, I don't think there is anywhere else in the wxPerl
code that would attempt to reference the missing class info.
My question to Mattia is, this seems wrong and a bit of a hack. Is there
a better way to handle it?
I suppose the correct fix is to patch wxRichTextPrinting to implement
wxRTTI, but this would not help any existing 2.8.x installations.
Some simple usage has been added to wxDemo in SVN. I've tested the patch
building and with the basic wxDemo usage on msw/linux/mac with wxWidgets
2.8.10, and all seems to work OK.
Apologies to Steve if you have already been tackling this. It wasn't my
original intention to just wrap the classes, but solving the above
problem meant I ended up with the classes more or less wrapped anyway.
Regards
Mark
On 10/04/2010 09:40, Mattia Barbon wrote:
Steve Cookson wrote:
Hi,
I'm not sure whether I should be sending this to the group or directly
to Mattia
Better to the group (it will be in the archives, and there are other
people beside me that have some experience in wrapping wxWidgets classes).
but I'm trying to understand how to print a wxRichTextCtrl from
wxPerl. I understand that wxRichTextPrinting and wxRichTextPrintout
are not implemented yet in wxPerl.
Correct.
So I need to do something to access the original C++ code (maybe wrap
or re-write). Re-writing seems to be an easier route as I don't
understand the Wx XS framework that Mattia uses. However, it would be
a bit anti-social. It would be better to use the current wxPerl
framework.
I wouldn't call it antisocial, but wrapping the C++ code is definitely
more maintainable in the long run.
As far as I can see the wxPerl framework is dll driven and provides an
XS-based interface to the dlls? Is that right?
Correct.
> There seems to be some
automation/facilitation of the process, but it's not clear to me how
it works. I've also never used XS before.
Are there some instructions about how to do this available?
I'm sure I answered this on the mailing list, but can't find the mails;
I just committed some documentation that should at least get you
started; see lib/Wx/NewClass.pod. I think that wxRichTextPrinting should
be reasonably easy to wrap.
Regards,
Mattia