diff options
-rwxr-xr-x | Master/install-tl | 20 | ||||
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 21 | ||||
-rwxr-xr-x | Master/tlpkg/installer/install-menu-text.pl | 5 |
3 files changed, 23 insertions, 23 deletions
diff --git a/Master/install-tl b/Master/install-tl index dae929aa4f4..5e701e9958c 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -1807,6 +1807,26 @@ sub select_scheme { calc_depends(); } +# try to give a decent order of schemes, but be so general that +# if we change names of schemes nothing bad happnes (like forgetting one) +sub schemes_ordered_for_presentation { + my @scheme_order; + my %schemes_shown; + for my $s ($tlpdb->schemes) { $schemes_shown{$s} = 0 ; } + # first try the size-name-schemes in decreasing order + for my $sn (qw/full medium small basic minimal/) { + if (defined($schemes_shown{"scheme-$sn"})) { + push @scheme_order, "scheme-$sn"; + $schemes_shown{"scheme-$sn"} = 1; + } + } + # now push all the other schemes if they are there and not already shown + for my $s (sort keys %schemes_shown) { + push @scheme_order, $s if !$schemes_shown{$s}; + } + return @scheme_order; +} + sub update_numbers { $vars{'n_collections_available'}=0; $vars{'n_collections_selected'} = 0; diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index b21870ab560..5384e94496f 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -737,26 +737,7 @@ sub menu_select_scheme { $vars{"$pkg"}=($vars{'selected_scheme'} eq $pkg)? 1:0; } } - # try to give a decent order of schemes, but be so general that - # if we change names of schemes nothing bad happnes (like forgetting one) - my %schemes_shown; - for my $s (@schemes) { $schemes_shown{$s} = 0 ; } - my @scheme_order; - # first try the size-name-schemes in decreasing order - for my $sn (qw/full medium small basic minimal/) { - if (defined($schemes_shown{"scheme-$sn"})) { - push @scheme_order, "scheme-$sn"; - $schemes_shown{"scheme-$sn"} = 1; - } - } - # now push all the other schemes if they are there and not already shown - for my $s (sort @schemes) { - if (defined($schemes_shown{$s}) && !$schemes_shown{$s}) { - push @scheme_order, $s; - } - } - # @schemes=sort @schemes; - # add the last one + my @scheme_order = schemes_ordered_for_presentation(); push @scheme_order, "scheme-custom"; my $selected = $vars{'selected_scheme'}; $sw->Label(-text => __("Selected scheme"))->pack(-padx => "2m", -pady => "2m"); diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index 580e2dcd0e3..68a7947526f 100755 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -326,11 +326,10 @@ sub scheme_menu { menu_head 'Select scheme:'; - foreach my $pkg ($tlpdb->schemes) { - push @schemes, $pkg; + @schemes = schemes_ordered_for_presentation(); + foreach my $pkg (@schemes) { $vars{"$pkg"}=($vars{'selected_scheme'} eq $pkg)? 1:0; } - @schemes=sort @schemes; push @schemes, "scheme-custom"; foreach my $scheme (@schemes) { |