diff options
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl index 0b6648c3b11..29717fba3fb 100755 --- a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl @@ -28,12 +28,40 @@ use TeXLive::TLPDB; use TeXLive::TLConfig; use TeXLive::TLUtils qw(setup_programs platform_desc win32); use Getopt::Long qw(:config no_autoabbrev require_order); -use Tk; -use Tk::Dialog; -use Tk::NoteBook; -use Tk::BrowseEntry; -use Tk::ROText; -use Tk::Balloon; + + +# +# ok we try to load Tk and break and give a decent message if it does not +# work: +# +#use Tk; +eval { require Tk; }; +if ($@) { + # that didn't work out, give some usefull error message and stop + if (win32()) { + printf STDERR "Cannot load Tk, that should not happen as we ship it! +How did you start tlmgrgui??\n"; + } else { + printf STDERR " +Cannot load Tk, thus the GUI cannot be started! +The Perl/Tk module is not shipped with the TeX Live installation. +You have to install it to get tlmgr GUI running. +"; + } + exit 1; +} + +# now require the others ... +#use Tk::Dialog; +#use Tk::NoteBook; +#use Tk::BrowseEntry; +#use Tk::ROText; +#use Tk::Balloon; +require Tk::Dialog; +require Tk::NoteBook; +require Tk::BrowseEntry; +require Tk::ROText; +require Tk::Balloon; my $opt_location; my $opt_debug = 0; |