From ffe78ef6e053636ed25aa649d8b7fb8136646d91 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 13 Jun 2008 06:10:51 +0000 Subject: installer: warn if no lang collection is installed (text and gui mode) git-svn-id: svn://tug.org/texlive/trunk@8703 c570f23f-e606-0410-a88d-b1316a301751 --- Master/install-tl | 8 ++++++++ Master/tlpkg/installer/install-menu-perltk.pl | 14 ++++++++++++-- Master/tlpkg/installer/install-menu-text.pl | 8 ++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Master/install-tl b/Master/install-tl index 1e988095ceb..5d7c66ff696 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -1160,6 +1160,14 @@ sub flushlog { } } +sub check_on_lang_collection_installed { + # we check that at least one lang collection is installed: + foreach my $c (@collections_lang) { + return 1 if $vars{"$c"}; + } + return 0; +} + __END__ =head1 NAME diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index 0cfe9c592cb..f876df16ddc 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -71,6 +71,7 @@ my $texmfsysvartext; my $texmfsysconfigtext; my $texmfhometext; my $texdirtext; +my $langcoltext; my $symlinktext; my $optletterstate; my $optfmtstate; @@ -144,7 +145,8 @@ my %text = ( title => 'TeX Live 2008 Installation', yes => 'Yes', no => 'No', notwritable => '(default not writable - please change!)', - changetexdir => '(please change TEXDIR first!)' + changetexdir => '(please change TEXDIR first!)', + nolangcol => '(no language col selected!)', ); @@ -263,7 +265,8 @@ sub run_menu { # lang collection line my $flang = $fr->Frame; $flang->pack; $flang->Label(-text => $labels{'langcoll'}, -width => $a, -anchor => 'w')->pack(-side => 'left'); - $flang->Label(-width => $b)->pack(-side => 'left'); + # $flang->Label(-width => $b)->pack(-side => 'left'); + $langcoltext = $flang->Label(-width => $b, -anchor => 'w')->pack(-side => 'left'); $flang->Button(-width => $c, -text => $text{'change'}, -command => sub { menu_select_lang_collections(); })->pack(-side => 'left'); $collectionstext = $fr->Label(); @@ -615,6 +618,13 @@ sub menu_set_collections_text { } sub menu_set_pathes_text { + if (check_on_lang_collection_installed()) { + # good + menu_set_text($langcoltext, ""); + } else { + # bad + menu_set_text($langcoltext, $text{'nolangcol'}, -foreground => "red"); + } if (TeXLive::TLUtils::texdir_check($vars{'TEXDIR'})) { menu_set_text($texdirtext, "$vars{'TEXDIR'}", -foreground => "black"); } else { diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index e228c0d7043..17997e0345d 100755 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -836,6 +836,14 @@ EOF standard collections language collections $vars{'n_collections_selected'} collections out of $vars{'n_collections_available'}, disk space required: $vars{'total_size'} MB +EOF +; + if (!check_on_lang_collection_installed()) { + print " !! No language specific collection selected!\n"; + print " !! If you only write English documentes that is fine!\n"; + } + + print <<"EOF"; directories: TEXDIR (the main TeX directory): -- cgit v1.2.3