summaryrefslogtreecommitdiff
path: root/Master/tlpkg/installer
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-07-09 11:39:06 +0000
committerNorbert Preining <preining@logic.at>2009-07-09 11:39:06 +0000
commitab471595e495323c12b4fcf31856f62269405a83 (patch)
tree4cba4dccc48f4535201066bf18c6458726d92ec7 /Master/tlpkg/installer
parent58b5e933d6749fd1a1c9bd27d8855a786a44b20e (diff)
allow option -all-options to show all options in text and
perltk mode, even those that are not really applicable use that option to actually show stuff in menu-text and menu-perltk show explanation strings for file assoc settings instead of number git-svn-id: svn://tug.org/texlive/trunk@14198 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer')
-rw-r--r--Master/tlpkg/installer/install-menu-perltk.pl34
-rwxr-xr-xMaster/tlpkg/installer/install-menu-text.pl50
-rw-r--r--Master/tlpkg/installer/install-translations.pl6
3 files changed, 54 insertions, 36 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl
index da4daf3aaf2..6edd17362d2 100644
--- a/Master/tlpkg/installer/install-menu-perltk.pl
+++ b/Master/tlpkg/installer/install-menu-perltk.pl
@@ -51,6 +51,9 @@ our %text;
our %labels;
require("installer/install-translations.pl");
+$::fileassocdesc[0] = $text{fa_dontchange};
+$::fileassocdesc[1] = $text{fa_onlynew};
+$::fileassocdesc[2] = $text{fa_all};
my $mw;
my $subframe;
@@ -73,7 +76,7 @@ my $fmtyesno = ( $vars{'option_fmt'} ? $text{'yes'} : $text{'no'} );
my $srcyesno = ( $vars{'option_src'} ? $text{'yes'} : $text{'no'} );
my $deskintyesno = ( $vars{'option_desktop_integration'} ? $text{'yes'} : $text{'no'} );
my $pathadjyesno = ( $vars{'option_path'} ? $text{'yes'} : $text{'no'} );
-my $fileassocsyesno = $vars{'option_file_assocs'};
+my $fileassocyesno = $::fileassocdesc[$vars{'option_file_assocs'}];
my $editoryesno = ( $vars{'addon_editor'} ? $text{'yes'} : $text{'no'} );
my $adminallyesno = ( $vars{'option_w32_multi_user'} ? $text{'yes'} : $text{'no'} );
my $docyesno = ( $vars{'option_doc'} ? $text{'yes'} : $text{'no'} );
@@ -274,7 +277,7 @@ sub run_menu_perltk {
$fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_path'}, \$pathadjyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
- if (win32()) {
+ if ($::opt_all_options || win32()) {
$row++;
$fr->Label(-text => $labels{'desktop_integration'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$deskintyesno)->grid(-row => $row, -column => 2, -padx => "2m");
@@ -282,10 +285,10 @@ sub run_menu_perltk {
$row++;
$fr->Label(-text => $labels{'fileassocs'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
- $fr->Label(-anchor => 'w', -textvariable => \$vars{'option_file_assocs'})->grid(-row => $row, -column => 2, -padx => "2m");
+ $fr->Label(-anchor => 'w', -textvariable => \$fileassocyesno)->grid(-row => $row, -column => 2, -padx => "2m");
$fr->Button(-text => $text{'change'}, -command => sub { menu_edit_file_assocs(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
- if (admin()) {
+ if ($::opt_all_options || admin()) {
$row++;
$fr->Label(-text => $labels{'w32admallusers'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$adminallyesno)->grid(-row => $row, -column => 2, -padx => "2m");
@@ -481,18 +484,31 @@ sub menu_edit_file_assocs {
$sw->transient($mainwindow);
$sw->grab();
my $key = 'option_file_assocs';
- my $var = $vars{$key};
+ my $var = $::fileassocdesc[$vars{$key}];
$sw->Label(-text => $labels{"fileassocs"})->pack(-padx => "2m", -pady => "2m");
my $opt = $sw->BrowseEntry(-autolistwidth => 1,
-variable => \$var);
- $opt->insert("end", "0 -- $text{fa_dontchange}");
- $opt->insert("end", "1 -- $text{fa_onlynew}");
- $opt->insert("end", "2 -- $text{fa_all}");
+ for my $i (0..2) {
+ $opt->insert("end", $::fileassocdesc[$i]);
+ }
$opt->pack(-padx => "2m", -pady => "2m");
my $f = $sw->Frame;
my $okbutton = $f->Button(-text => $text{"ok"},
- -command => sub { $vars{$key} = substr($var,0,1); $sw->destroy; })->pack(-side => "left", -padx => "2m", -pady => "2m");
+ -command => sub {
+ my $idx;
+ if ($var eq $::fileassocdesc[0]) {
+ $idx = 0;
+ } elsif ($var eq $::fileassocdesc[1]) {
+ $idx = 1;
+ } elsif ($var eq $::fileassocdesc[2]) {
+ $idx = 2;
+ } else {
+ die "How that could happen!\n";
+ }
+ $vars{$key} = $idx;
+ $fileassocyesno = $::fileassocdesc[$idx];
+ $sw->destroy; })->pack(-side => "left", -padx => "2m", -pady => "2m");
my $cancelbutton = $f->Button(-text => $text{"cancel"}, -command => sub { $sw->destroy; })->pack(-side => "left", -padx => "2m", -pady => "2m");
$f->pack;
$sw->bind('<Return>', [ $okbutton, 'Invoke' ]);
diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl
index dda898c645a..7a3823831ba 100755
--- a/Master/tlpkg/installer/install-menu-text.pl
+++ b/Master/tlpkg/installer/install-menu-text.pl
@@ -27,7 +27,6 @@ our $MENU_QUIT = 2;
my $RETURN = $MENU_CONTINUE;
-
# issue welcome message on end of installation
push @::end_install_hook,
sub { if (win32()) { print TeXLive::TLUtils::welcome(); }
@@ -726,7 +725,7 @@ EOF
print " <S> install font/macro source tree: $b_src\n";
}
if (!$vars{'from_dvd'}) {
- if (unix()) {
+ if (unix() || $::opt_all_options) {
print <<"EOF";
<L> create symlinks in standard directories: $b_path
binaries to: $t_sys_bin
@@ -740,10 +739,10 @@ EOF
EOF
;
}
- if (win32()) {
+ if (win32() || $::opt_all_options) {
print " <M> install menu items, shortcuts, etc: $b_deskint\n";
- print " <N> update file associations: [$vars{'option_file_assocs'}]\n";
- if (admin()) {
+ print " <N> update file associations: [$::fileassocdesc[$vars{'option_file_assocs'}]]\n";
+ if ($::opt_all_options || TeXLive::TLWinGoo::admin()) {
# if we are admin we allow normal user installation, too
print " <U> make installation available to all users: $b_admin\n";
}
@@ -792,27 +791,30 @@ EOF
return $command{'self'};
}
}
- if ("\u$answer" eq 'M') {
- toggle 'option_desktop_integration';
- return $command{'self'};
+ if (win32() || $::opt_all_options) {
+ if ("\u$answer" eq 'M') {
+ toggle 'option_desktop_integration';
+ return $command{'self'};
- } elsif ("\u$answer" eq 'N') {
- print "New value for file_assocs:\n";
- print " 0 -- don't tweak the file associations\n";
- print " 1 -- only add new file associations, don't overwrite old ones\n";
- print " 2 -- always create file associations to TeX Live programs\n";
- print "New value for file_assocs [$vars{'option_file_assocs'}]: ";
- chomp (my $a = <STDIN>);
- if ($a eq "0" || $a eq "1" || $a eq "2") {
- $vars{'option_file_assocs'} = $a;
- }
- return $command{'self'};
+ } elsif ("\u$answer" eq 'N') {
+ print "New value for file_assocs:\n";
+ print " 0 -- don't tweak the file associations\n";
+ print " 1 -- only add new file associations, don't overwrite old ones\n";
+ print " 2 -- always create file associations to TeX Live programs\n";
+ print "New value for file_assocs [$vars{'option_file_assocs'}]: ";
+ chomp (my $a = <STDIN>);
+ if ($a eq "0" || $a eq "1" || $a eq "2") {
+ $vars{'option_file_assocs'} = $a;
+ }
+ return $command{'self'};
- } elsif ("\u$answer" eq 'U') {
- toggle 'option_w32_multi_user';
- return $command{'self'};
+ } elsif ("\u$answer" eq 'U') {
+ toggle 'option_w32_multi_user';
+ return $command{'self'};
+ }
+ }
- } elsif ("\u$answer" eq 'P') {
+ if ("\u$answer" eq 'P') {
toggle 'option_letter';
return $command{'self'};
@@ -831,7 +833,7 @@ EOF
} elsif (defined $command{"\u$answer"}) {
return $command{"\u$answer"};
- } elsif (("\u$answer" eq 'E') && win32()) {
+ } elsif (("\u$answer" eq 'E') && ($::opt_all_options || win32())) {
toggle 'addon_editor';
return $command{'self'};
diff --git a/Master/tlpkg/installer/install-translations.pl b/Master/tlpkg/installer/install-translations.pl
index d31f7597440..5da5e5c1600 100644
--- a/Master/tlpkg/installer/install-translations.pl
+++ b/Master/tlpkg/installer/install-translations.pl
@@ -105,9 +105,9 @@ our %text = (title => 'TeX Live 2009 Installation',
instshort => 'Install',
wizard => 'Go to Wizard',
optiontitle => 'This screen allows you to configure some options',
- fa_dontchange => "Don't change any file association",
- fa_onlynew => "Create only new file associations",
- fa_all => 'Create all file associatons',
+ fa_dontchange => "None",
+ fa_onlynew => "Only new",
+ fa_all => 'All',
);