diff options
author | Norbert Preining <preining@logic.at> | 2008-01-09 15:54:25 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-01-09 15:54:25 +0000 |
commit | 49fa2cd8d6520b43948cf132877a1fe8745642a3 (patch) | |
tree | 8ddaddda63e43706f84a51dca8963498e45f90d1 /Master/install-tl.pl | |
parent | 491a6a6a4cf0ebf82cba3621b6045655dc01164b (diff) |
check the loading of Tk and if it does not work continue without GUI
git-svn-id: svn://tug.org/texlive/trunk@6166 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl.pl')
-rwxr-xr-x | Master/install-tl.pl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl index 3809f077c5f..f457da0febb 100755 --- a/Master/install-tl.pl +++ b/Master/install-tl.pl @@ -174,6 +174,18 @@ if ($opt_profile eq "") { our $MENU_ABORT = 1; our $MENU_QUIT = 2; if ($opt_gui) { + # try to load Tk.pm, but don't die if it doesn't work + eval { require Tk; }; + if ($@) { + # that didn't work out, so warn the user and continue with text mode + warn "Cannot load Tk, maybe something is missing!\n"; + warn "Error message from loading Tk:\n"; + warn "$@"; + warn "Continuing in Text Mode...\n"; + $opt_gui = 0; + } + } + if ($opt_gui) { require("TeXLive/install-menu-perltk.pl"); } else { require("TeXLive/install-menu-text.pl"); |