texlive[54557] Master/texmf-dist/scripts/texdoctk/texdoctk.pl:
commits+siepo at tug.org
commits+siepo at tug.org
Thu Mar 26 12:58:31 CET 2020
Revision: 54557
http://tug.org/svn/texlive?view=revision&revision=54557
Author: siepo
Date: 2020-03-26 12:58:31 +0100 (Thu, 26 Mar 2020)
Log Message:
-----------
Windows error handling in case of missing Tk module
Modified Paths:
--------------
trunk/Master/texmf-dist/scripts/texdoctk/texdoctk.pl
Modified: trunk/Master/texmf-dist/scripts/texdoctk/texdoctk.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texdoctk/texdoctk.pl 2020-03-26 00:55:38 UTC (rev 54556)
+++ trunk/Master/texmf-dist/scripts/texdoctk/texdoctk.pl 2020-03-26 11:58:31 UTC (rev 54557)
@@ -33,10 +33,21 @@
eval { require Tk; };
if ($@) {
- if (-x "/usr/bin/xmessage") {
- `xmessage -center -buttons Quit "The program texdoctk needs the package perl-tk, please install it!"`;
+ if ($IsWin32) {
+ $ENV{'RUNSCRIPT_ERROR_MESSAGE'} = "This Perl has no Perl/Tk module; aborting...";
+ my $vbsc = "";
+ $vbsc = `kpsewhich -format texmfscripts tl-errmess.vbs`;
+ if ($vbsc ne '') {
+ $vbsc =~ s!/!\\!g;
+ system("wscript $vbsc");
+ exit(0); # 0: prevent another error message from runscript
+ }
} else {
- printf STDERR "The program texdoctk needs the package perl-tk, please install it!\n";
+ if (-x "/usr/bin/xmessage") {
+ `xmessage -center -buttons Quit "The program texdoctk needs the package perl-tk, please install it!"`;
+ } else {
+ printf STDERR "The program texdoctk needs the package perl-tk, please install it!\n";
+ }
}
exit(1);
# that didn't work out, so warn the user and continue with text mode
More information about the tex-live-commits
mailing list.