[tex-live] [Fwd: Re: TeXLive Perl + latexmk (windows)]
George N. White III
gnwiii at gmail.com
Tue May 4 18:13:42 CEST 2010
On Fri, Apr 16, 2010 at 9:57 AM, George N. White III <gnwiii at gmail.com> wrote:
> On Thu, Apr 15, 2010 at 8:12 PM, Adam R. Maxwell <amaxwell at mac.com> wrote:
>>
>> [...]
>>>> Unfortunately I don't have a Mac. As far as I understand MacTeX
>>>> adapts tlmgr's GUI. But is tlmgr's CLI kept intact? I hope so.
>>>>
>>> tlmgr is intact, including its gui (but, as I understand it, the gui will only
>>> work for people who previously installed Perl/Tk hence X11, not installed by
>>> default, and I'm not sure which proportion of OS X user it represents).
>>
>> Correct. The CLI is intact and works out of the box, but Perl/Tk has to be installed manually.
>
> In my experience, Perl/Tk is fragile on MacOSX. It worked for tlmgr
> early on, but now:
>
> $ tlmgr --gui
> no event type or button # or keysym at
> /Library/Perl/5.8.8/darwin-thread-multi-2level/Tk/Widget.pm line 1105.
> at /usr/local/texlive/2009/texmf/scripts/texlive/tlmgrgui.pl line 222
> Compilation failed in require at /usr/texbin/tlmgr line 3193.
I tracked this down. A workaround is to comment out lines 1104 and 1105
in /Library/Perl/5.8.8/darwin-thread-multi-2level/Tk/Widget.pm, which read:
$mw->Tk::bind($class, '<MouseWheel>',
[ sub { $_[0]->yview('scroll',-($_[1]/120)*3,'units') },
Tk::Ev("D")]);
On my system I still get scrolling (using a M$ wheelmouse), presumably from
the unix button mappings.
There is another way to get the same error
<http://rt.cpan.org/Public/Bug/Display.html?id=38746>
with some older versions of tk for people who have updated X11 but not tk:
"In x11proto-core 7.0.13, a new event (``GenericEvent'') was added at the
end of the list, after ``MappingNotify''. Since the Tk toolkit's event
management was poorly designed, older versions of the Tk toolkit and
current version of Perl-Tk fail at runtime with the message "no event
type or button # or keysym" when compiled against (or even run under ?)
an X11 server with the new event list."
The suggested (workaround) is a patch:
--- pTk/mTk/generic/tk.h.orig 2007-05-05 20:41:02.000000000 +0200
+++ pTk/mTk/generic/tk.h 2008-08-27 03:16:31.000000000 +0200
@@ -677,17 +677,15 @@
*
*---------------------------------------------------------------------------
*/
-#define VirtualEvent (LASTEvent)
-#define ActivateNotify (LASTEvent + 1)
-#define DeactivateNotify (LASTEvent + 2)
-#define MouseWheelEvent (LASTEvent + 3)
-#define TK_LASTEVENT (LASTEvent + 4)
+#define VirtualEvent (MappingNotify + 1)
+#define ActivateNotify (MappingNotify + 2)
+#define DeactivateNotify (MappingNotify + 3)
+#define MouseWheelEvent (MappingNotify + 4)
+#define TK_LASTEVENT (MappingNotify + 5)
#define MouseWheelMask (1L << 28)
-
#define ActivateMask (1L << 29)
#define VirtualEventMask (1L << 30)
-#define TK_LASTEVENT (LASTEvent + 4)
/*
> A simple script works:
>
> #!/usr/bin/env perl
>
> use Tk;
> use strict;
> use warnings;
>
> my $mw = new MainWindow;
> $mw->title( 'Hello' );
>
> $mw->Label( -text => 'Hello World' )->pack;
> $mw->Button( -text => "Done", -command => sub { exit } )->pack;
>
> MainLoop;
> ----------------------------------------------------------------
>
> $ tlmgr -v -version
> tlmgr revision 17611 (2010-03-30 01:21:59 +0200)
> tlmgr using installation: /usr/local/texlive/2009
> TeX Live (http://tug.org/texlive) version 2009
>
> Revision of modules:
> TLConfig: 16713
> TLUtils: 17495
> TLPOBJ: 17183
> TLPDB: 17589
> TLMedia: 17443
> TLPaper: 16743
> TLWinGoo: 16713
>
>
>
> --
> George N. White III <aa056 at chebucto.ns.ca>
> Head of St. Margarets Bay, Nova Scotia
>
--
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia
More information about the tex-live
mailing list