summaryrefslogtreecommitdiff
path: root/Master/tlpkg/installer/install-menu-wizard.pl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-02-05 11:19:45 +0000
committerNorbert Preining <preining@logic.at>2009-02-05 11:19:45 +0000
commita4dedfcdb3afa877d3f8b32a328a119716f0ec97 (patch)
treed4ec13fbe40fedc65b35b2db48f6bd5a33c745fe /Master/tlpkg/installer/install-menu-wizard.pl
parentd624b74050bcfd840e4ed178b9d83457972a2bb0 (diff)
various wizardries
git-svn-id: svn://tug.org/texlive/trunk@12092 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer/install-menu-wizard.pl')
-rw-r--r--Master/tlpkg/installer/install-menu-wizard.pl69
1 files changed, 43 insertions, 26 deletions
diff --git a/Master/tlpkg/installer/install-menu-wizard.pl b/Master/tlpkg/installer/install-menu-wizard.pl
index ac20e0bba7d..4a931130718 100644
--- a/Master/tlpkg/installer/install-menu-wizard.pl
+++ b/Master/tlpkg/installer/install-menu-wizard.pl
@@ -161,6 +161,14 @@ my %text = ( title => 'TeX Live 2008 Installation',
finished => 'See TEXDIR/index.html for links to documentation.\nThe TeX Live web site (http://tug.org/texlive/) contains any updates and corrections. TeX Live is a joint project of the TeX user groups around the world; please consider supporting it by joining the group best for you. The list of groups is available on the web at http://tug.org/usergroups.html.',
finishedpath => 'Add TEXDIR/texmf/doc/man to MANPATH.\nAdd TEXDIR/texmf/doc/info to INFOPATH.\nMost importantly, add TEXDIR/bin/PLATFORM\nto your PATH for current and future sessions.',
welcome => 'Welcome to TeX Live!',
+ next => 'Next >',
+ prev => '< Back',
+ wizhello => "Welcome to the installation of TeX Live 2008\nhttp://tug.org/texlive\n\nThis wizard will guide you through the installation.",
+ destfolder => 'Destination folder:',
+ advcustom => 'Advanced customization',
+ pathinfo => "The destination folder will contain the installation.\nIt is strongly recommended to keep the year as the last component.",
+ readyinst => "We are ready to install TeX Live 2008.\nThe following settings will be used.\nIf you want to change something please go back,\notherwise press the \"Install\" button.",
+ instshort => 'Install',
);
@@ -199,6 +207,7 @@ if (($::lang ne "en") && ($::lang ne "C")) {
if (!utf8::decode($b)) {
warn("decoding string to utf8 didn't work:$b\n");
}
+ $b =~ s/\\n/\n/g;
$trans{"$a"} = "$b";
}
close(LANG);
@@ -244,7 +253,7 @@ sub run_menu_wizard {
$ftitle->update;
$ftitle->place(-x => $LEFT, -y => $TOP);
- $tit = $ftitle->Label(-text => "TeX Live 2008 Installation");
+ $tit = $ftitle->Label(-text => $text{'title'});
$usedfont= $tit->cget("-font");
$lineskip = $usedfont->metrics("-linespace");
@@ -259,10 +268,10 @@ sub run_menu_wizard {
$fmain->place(-x => $LEFT, -y => ($TOP + $TITLEHEIGHT));
- $can = $mw->Button(-width => 10, -relief => "ridge", -text => "Cancel",
+ $can = $mw->Button(-width => 10, -relief => "ridge", -text => $text{'cancel'},
-command => sub { $return = $MENU_ABORT; $mw->destroy; });
- $nxt = $mw->Button(-width => 10, -relief => "ridge", -text => "Next >");
- $prv = $mw->Button(-width => 10, -relief => "ridge", -text => "< Back");
+ $nxt = $mw->Button(-width => 10, -relief => "ridge", -text => $text{'next'});
+ $prv = $mw->Button(-width => 10, -relief => "ridge", -text => $text{'prev'});
$can->place(-x => $LEFT, -y => ($MHEIGHT - $BOTTOM), -anchor => "sw");
@@ -284,10 +293,10 @@ sub reset_start {
$counter->configure(-text => "1/4");
$prv->placeForget;
- my $inf = $fmain->Label(-text => "Welcome to the installation of TeX Live 2008\nhttp://tug.org/texlive\n\nThis wizard will guide you through the installation.", -justify => "left");
+ my $inf = $fmain->Label(-text => $text{'wizhello'}, -justify => "left");
$inf->place(-x => 0, -y => 100);
- $nxt->configure(-text => "Next >", -command => \&ask_path );
+ $nxt->configure(-text => $text{'next'}, -command => \&ask_path );
$nxt->configure(-state => "normal");
}
@@ -300,12 +309,14 @@ sub ask_path {
$_->destroy;
}
$counter->configure(-text => "2/4");
- my $lab = $fmain->Label(-text => "Destination Folder:");
+ my $lab = $fmain->Label(-text => $text{'destfolder'});
my $val = $fmain->Label(-textvar => \$dest);
- my $but = $fmain->Button(-text => "Change", -command => \&change_path, -relief => "ridge", -width => 10);
+ my $but = $fmain->Button(-text => $text{'change'}, -command => \&change_path,
+ -relief => "ridge", -width => 10);
- my $pa = $fmain->Checkbutton(-text => "Use letter-size paper by default, instead of A4", -variable => \$vars{"option_letter"});
- my $cb = $fmain->Button(-text => "Advanced customization",
+ my $pa = $fmain->Checkbutton(-text => $labels{'optletter'},
+ -variable => \$vars{"option_letter"});
+ my $cb = $fmain->Button(-text => $text{'advcustom'},
-relief => "ridge",
-command => sub { $mw->destroy;
#undef &run_menu;
@@ -321,7 +332,8 @@ sub ask_path {
calc_depends();
- $fmain->Label(-text => "The destination folder will contain the installation.\nIt is strongly recommended to keep the year as the last component.", -justify => "left")->place(-x => 0, -y => 30);
+ $fmain->Label(-text => $text{'pathinfo'},
+ -justify => "left")->place(-x => 0, -y => 30);
my $ytmp = 100;
$lab->place(-x => 0, -y => $ytmp, -anchor => "w");
@@ -341,12 +353,12 @@ sub ask_path {
$cb->place(-x => $INNERWIDTH, -y => $INNERHEIGHT, -anchor => "se");
- $fmain->Label(-text => "Total size needed: $vars{'total_size'} MB",
+ $fmain->Label(-text => "$text{'diskreq'}: $vars{'total_size'} MB",
-justify => "left"
)->place(-x => 0, -y => $fmain->height, -anchor => "sw");
- $prv->configure(-text => "< Prev", -command => \&reset_start );
- $nxt->configure(-text => "Next >", -command => \&ask_go );
+ $prv->configure(-text => $text{'prev'}, -command => \&reset_start );
+ $nxt->configure(-text => $text{'next'}, -command => \&ask_go );
my $rb = $MWIDTH - $RIGHT;
$rb -= $nxt->width;
@@ -422,13 +434,13 @@ sub ask_go {
$_->destroy;
}
$counter->configure(-text => "3/4");
- my $inf = $fmain->Label(-justify => "left", -text => "We are ready to install TeX Live 2008.\nThe following settings will be used.\nIf you want to change something please go back,\notherwise press the \"Install\" button.\n\nDestination folder: $dest");
+ my $inf = $fmain->Label(-justify => "left", -text => $text{'readyinst'} . "\n\n" . $text{'destfolder'} . ": $dest");
$inf->place(-x => 0, -y => 100);
- $nxt->configure(-text => "Install",
+ $nxt->configure(-text => $text{'instshort'},
-command => \&wizard_installation_window);
- $prv->configure(-text => "< Prev", -command => \&ask_path);
+ $prv->configure(-text => $text{'prev'}, -command => \&ask_path);
}
sub wizard_installation_window {
@@ -442,23 +454,30 @@ sub wizard_installation_window {
$::progressw = $fmain->Scrolled("ROText", -scrollbars => "e",
-wrap => "word");
- my $lines = int( ($fmain->height - 20) / $lineskip);
+ my $lines = int( ($INNERHEIGHT - 20) / $lineskip);
- $::progressw->configure(-height => $lines); #, -width => $wd);
+ $::progressw->configure(-height => $lines);
- my $pw = $fmain->height - ($lines * $lineskip) - 5;
+ my $pw = $INNERHEIGHT - ($lines * $lineskip) - 5;
- $::progressw->place(-x => 0, -y => 0, -width => $fmain->width);
+ $::progressw->place(-x => 0, -y => 0, -width => $INNERWIDTH);
my $percent_done = 0;
$fmain->update;
- print "fmain width = ", $fmain->width, "\n";
$::progress = $fmain->ProgressBar(-variable => \$percent_done,
- -width => $pw, -length => ($fmain->width),
+ -width => $pw, -length => $INNERWIDTH,
-from => 0, -to => 110, -blocks => 10,
-colors => [ 0, '#0078b8' ]);
- $::progress->place(-x => 0, -y => $fmain->height, -anchor => "sw");
+ $::progress->place(-x => 0, -y => $INNERHEIGHT, -anchor => "sw");
+
+ #
+ # change the buttons so that the Prev disappears, the Next becomes
+ # Cancel, and the Cancel button disappears
+ $prv->placeForget;
+ $can->placeForget;
+ $nxt->configure(-text => $text{'cancel'},
+ -command => sub { $return = $MENU_ABORT; $mw->destroy; });
# set the vars
calc_depends();
@@ -473,8 +492,6 @@ sub wizard_installation_window {
$t =~ s/TEXDIR/$::vars{'TEXDIR'}/g;
$t =~ s/PLATFORM/$::vars{'this_platform'}/g;
$t =~ s/\\n/\n/g;
- $can->placeForget;
- $prv->placeForget;
my $linechar = $::progressw->index("end");
$::progressw->markSet("finaltext", $linechar);
$::progressw->markGravity("finaltext", "left");