diff options
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/install-tl | 28 | ||||
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 7 | ||||
-rw-r--r-- | Master/tlpkg/installer/install-menu-wizard.pl | 6 |
3 files changed, 36 insertions, 5 deletions
diff --git a/Master/install-tl b/Master/install-tl index a8de5124ced..3cc9388cb49 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -19,9 +19,6 @@ # (that, and maybe some others can be done with the waitVariableX # thingy as described in the Perl/Tk book in the chapter that can be # found on the net) (Werner 28.10.08) -# - at the end of the installation after the welcome message if there -# was an error during installation (grep for Error in the logfile) -# then give a warning. (email hh tlbuild 2009-06-03) my $svnrev = '$Revision$'; $svnrev =~ m/: ([0-9]+) /; @@ -95,6 +92,9 @@ use strict; # global list of lines that get logged (see TLUtils.pm::_logit). @::LOGLINES = (); +# global list of warnings +@::WARNLINES = (); + # we play around with the environment, place to keep original my %origenv = (); @@ -592,6 +592,7 @@ exit(0); ################################################################### sub do_installation { + install_warnlines_hook(); if (win32()) { non_admin() if !$vars{'option_w32_multi_user'}; } @@ -638,6 +639,7 @@ sub do_installation { } else { print welcome_paths(); } + print warnings_summary(); } # do_postinst_stuff has to fix up the texmf tree and install some missing @@ -1866,6 +1868,26 @@ EOF # +# remember the warnings issued +sub install_warnlines_hook { + push @::warn_hook, sub { push @::WARNLINES, @_; }; +} + +# +# a summary of warnings if there were any +sub warnings_summary { + return '' unless @::WARNLINES; + my $summary = <<EOF; + + There were some warnings during the installation process. + Here is a summary of warning messages: +EOF + $summary .= ' ' . join(' ', @::WARNLINES) . "\n"; + return $summary; +} + + +# # some helper fucntion sub select_collections { my $varref = shift; diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index 9a1890ca421..b238fc27981 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -106,7 +106,6 @@ sub setup_hooks_perltk { update_status(join(" ",@_)); $mainwindow->update; }; - @::warn_hook = (); push @::warn_hook, sub { return unless defined $mainwindow ; @@ -385,6 +384,12 @@ sub installation_window { if (!win32()) { $t .= "\n\n" . __("Add %s/texmf/doc/man to MANPATH.\nAdd %s/texmf/doc/info to INFOPATH.\nMost importantly, add %s/bin/%s\nto your PATH for current and future sessions.", $::vars{'TEXDIR'}, $::vars{'TEXDIR'}, $::vars{'TEXDIR'}, $::vars{'this_platform'}); } + if (@::WARNLINES) { + $t .= "\n\n" . __("There were some warnings during the installation process.\nHere is a summary of warning messages:") . "\n"; + $t .= join('', @::WARNLINES); + $t =~ s/\n\z//; + } + $t .= "\n\n" . __("Welcome to TeX Live!"); #$t =~ s/\\n/\n/g; $::progressw->insert("end", "\n"); diff --git a/Master/tlpkg/installer/install-menu-wizard.pl b/Master/tlpkg/installer/install-menu-wizard.pl index b38e52a4897..7b7a2c6836a 100644 --- a/Master/tlpkg/installer/install-menu-wizard.pl +++ b/Master/tlpkg/installer/install-menu-wizard.pl @@ -105,7 +105,6 @@ sub setup_hooks_wizard { wizard_update_status(join(" ",@_)); $mw->update; }; - @::warn_hook = (); push @::warn_hook, sub { return unless defined($mw); @@ -499,6 +498,11 @@ sub wizard_installation_window { if (!win32()) { $t .= "\n\n" . __("Add %s/texmf/doc/man to MANPATH.\nAdd %s/texmf/doc/info to INFOPATH.\nMost importantly, add %s/bin/%s\nto your PATH for current and future sessions.", $::vars{'TEXDIR'}, $::vars{'TEXDIR'}, $::vars{'TEXDIR'}, $::vars{'this_platform'}); } + if (@::WARNLINES) { + $t .= "\n\n" . __("There were some warnings during the installation process.\nHere is a summary of warning messages:") . "\n"; + $t .= join('', @::WARNLINES); + $t =~ s/\n\z//; + } $t .= "\n\n" . __('Welcome to TeX Live!'); #$t =~ s/\\n/\n/g; my $linechar = $::progressw->index("end"); |