From 74b985b0bf91f9e9c24d95eb513320cc547cd948 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 31 Jul 2008 17:19:10 +0000 Subject: install-tl: try to catch errors when perl/Tk is not useable by creating a main window and if that doesn't work continue in text mode git-svn-id: svn://tug.org/texlive/trunk@9946 c570f23f-e606-0410-a88d-b1316a301751 --- Master/install-tl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Master/install-tl b/Master/install-tl index a02a65e5eaa..2c6134c1db3 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -401,6 +401,17 @@ if ($opt_profile eq "") { tlwarn("Continuing in text mode...\n"); $opt_gui = 0; } + eval { my $foo = Tk::MainWindow->new; $foo->destroy; }; + if ($@) { + tlwarn("perl/Tk unusable, cannot create main windows.\n"); + if (platform() eq "universal-darwin") { + tlwarn("That could be a consequence of not having X Windows installed!\n"); + } + tlwarn("Error message from creating MainWindow:\n"); + tlwarn(" $@\n"); + tlwarn("Continuing in text mode...\n"); + $opt_gui = 0; + } } if ($opt_gui && !$opt_nogui) { require("installer/install-menu-perltk.pl"); -- cgit v1.2.3