summaryrefslogtreecommitdiff
path: root/Master/tlpkg/installer/install-menu-wizard.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/installer/install-menu-wizard.pl')
-rw-r--r--Master/tlpkg/installer/install-menu-wizard.pl133
1 files changed, 14 insertions, 119 deletions
diff --git a/Master/tlpkg/installer/install-menu-wizard.pl b/Master/tlpkg/installer/install-menu-wizard.pl
index 44738c815b1..7f92dd35d6c 100644
--- a/Master/tlpkg/installer/install-menu-wizard.pl
+++ b/Master/tlpkg/installer/install-menu-wizard.pl
@@ -68,8 +68,8 @@ require Tk::BrowseEntry;
require Tk::Dialog;
require Tk::DialogBox;
require Tk::PNG;
-require Tk::ROText;
-require Tk::ProgressBar;
+#require Tk::ROText;
+#require Tk::ProgressBar;
require Tk::Font;
use utf8;
@@ -119,44 +119,12 @@ sub menu_abort {
$mw->destroy;
}
-sub setup_hooks_wizard {
- @::info_hook = ();
- push @::info_hook,
- sub {
- return unless defined($mw);
- wizard_update_status(join(" ",@_));
- $mw->update;
- };
- push @::warn_hook,
- sub {
- return unless defined($mw);
- wizard_update_status(join(" ",@_));
- $mw->update;
- };
- @::install_packages_hook = ();
- push @::install_packages_hook, \&wizard_update_progressbar;
- push @::install_packages_hook, sub { $mw->update; };
-}
-
-sub wizard_update_status {
- my ($p) = @_;
- return unless defined($::progressw);
- $::progressw->insert("end", "$p");
- $::progressw->see("end");
-}
-sub wizard_update_progressbar {
- my ($n,$total) = @_;
- if (defined($n) && defined($total)) {
- $::progress->value(int($n*100/$total));
- }
-}
-
################# WELCOME SCREEN ######################################
sub run_menu_wizard {
$mw = Tk::MainWindow->new(-width => $MWIDTH, -height => $MHEIGHT);
$mw->protocol('WM_DELETE_WINDOW' => \&menu_abort);
- setup_hooks_wizard();
+ #setup_hooks_wizard();
my $img = $mw->Photo(-format => 'png', -file => "$::installerdir/tlpkg/installer/texlive.png");
$mw->Label(-image => $img, -background => "#0078b8")->place(-x => 0, -y => 0);
@@ -172,7 +140,7 @@ sub run_menu_wizard {
$tit->place(-x => 0, -y => 0);
- $counter = $ftitle->Label(-text => "1/5");
+ $counter = $ftitle->Label(-text => "1/4");
$counter->place(-x => $INNERWIDTH, -y => 0, -anchor => "ne");
$fmain = $mw->Frame(-height => $INNERHEIGHT, -width => $INNERWIDTH);
@@ -201,12 +169,12 @@ sub reset_start {
for ($fmain->children) {
$_->destroy;
}
- $counter->configure(-text => "1/5");
+ $counter->configure(-text => "1/4");
$prv->placeForget;
my $inf = $fmain->Label(
-text => __("Welcome to the installation of TeX Live %s\nhttp://tug.org/texlive\n\nThis wizard will guide you through the installation.", $TeXLive::TLConfig::ReleaseYear)
- . ( (win32()) ? "\n\n" . __("Best to disable your virus scanner during installation.") : "" )
+ . ( (win32()) ? "\n\n" . __("In case of trouble, try to disable your virus scanner during installation.") : "" )
. "\n\n"
. __("For an advanced, customizable installation, please consult\nthe web pages or installation guide.")
. "\n"
@@ -246,7 +214,7 @@ sub ask_mirror {
for ($fmain->children) {
$_->destroy;
}
- $counter->configure(-text => "1-1/5");
+ $counter->configure(-text => "1-1/4");
my @mirror_list;
my @netlst;
@@ -314,7 +282,7 @@ sub ask_mirror_hierarchical {
for ($fmain->children) {
$_->destroy;
}
- $counter->configure(-text => "1-1/5");
+ $counter->configure(-text => "1-1/4");
our $mirrors;
require("installer/mirrors.pl");
@@ -405,7 +373,7 @@ sub load_remote_screen {
for ($fmain->children) {
$_->destroy;
}
- $counter->configure(-text => "1-2/5");
+ $counter->configure(-text => "1-2/4");
if ($::init_remote_needed) {
my $labela = $fmain->Label(-text => __('Please wait while the repository database is loaded.'))->place(-x => 0, -y => 50);
@@ -448,7 +416,7 @@ sub ask_path {
$_->destroy;
}
- $counter->configure(-text => "2/5");
+ $counter->configure(-text => "2/4");
$dest = $vars{'TEXDIR'};
$dest_display = native_slashify($dest);
@@ -583,7 +551,7 @@ sub ask_options {
for ($fmain->children) {
$_->destroy;
}
- $counter->configure(-text => "3/5");
+ $counter->configure(-text => "3/4");
my $inf = $fmain->Label(-text => __("This screen allows you to configure some options"), -justify => "left");
$inf->place(-x => 0, -y => 20);
@@ -629,7 +597,7 @@ sub ask_go {
for ($fmain->children) {
$_->destroy;
}
- $counter->configure(-text => "4/5");
+ $counter->configure(-text => "4/4");
my $inf = $fmain->Label(-justify => "left", -text => __("We are ready to install TeX Live %s.\nThe following settings will be used.\nIf you want to change something please go back,\notherwise press the \"Install\" button.", $TeXLive::TLConfig::ReleaseYear));
@@ -656,85 +624,12 @@ sub ask_go {
$nxt->configure(-text => __('Install'),
- -command => \&wizard_installation_window);
+ -command => sub { $return = $MENU_INSTALL; $mw->destroy; });
+# -command => \&wizard_installation_window);
$prv->configure(-text => __('< Back'), -command => \&ask_options);
$can->place(-x => $LEFT, -y => ($MHEIGHT - $BOTTOM), -anchor => "sw");
}
-sub wizard_installation_window {
- for ($fmain->children) {
- $_->destroy;
- }
- $counter->configure(-text => "5/5");
- # create a progress bar window
- # compute the height of the Text by the given font
-
- $::progressw = $fmain->Scrolled("ROText", -scrollbars => "e",
- -wrap => "word");
-
- # we want to have the progressbar about 20px wide, so compute how
- # many lines of the current font do fit into the remaining area
- my $lines = int( ($INNERHEIGHT - 20) / $lineskip);
- # it seems that on Windows the computation is not right, the
- # progress bar overwrites the last line of the text widget
- # remove one line here
- $lines-- if win32();
- $::progressw->configure(-height => $lines);
- $::progressw->place(-x => 0, -y => 0, -width => $INNERWIDTH);
-
- # that is necessary otherwise the progressbar gets very strange dimensions
- $fmain->update;
-
-
- my $percent_done = 0;
-
- # compute the remaining space in pixel for the progressbar
- my $pw = $INNERHEIGHT - ($lines * $lineskip) - 5;
- # make sure that the line we remove above for Windows is not re-added
- # to the size of the progressbar. The 7 was found by trial and error
- $pw -= ($lineskip + 7) if win32();
- $::progress = $fmain->ProgressBar(-variable => \$percent_done,
- -width => $pw, -length => $INNERWIDTH,
- -from => 0, -to => 110, -blocks => 10,
- -colors => [ 0, '#0078b8' ]);
- $::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;
- $nxt->placeForget;
- #$can->configure(-text => __('Cancel'),
- # -command => sub { $return = $MENU_ABORT; $mw->destroy; });
- calc_depends();
- do_installation();
- $::progress->value(110);
- $return = $MENU_ALREADYDONE;
- my $t = __("See %s/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.", $::vars{'TEXDIR'});
- if (!win32()) {
- $t .= "\n\n" . __("Add %s/texmf-dist/doc/man to MANPATH.\nAdd %s/texmf-dist/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 the list 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");
- $::progressw->markSet("finaltext", $linechar);
- $::progressw->markGravity("finaltext", "left");
- $::progressw->insert("end", "\n$t");
- $::progressw->see("end");
- $::progressw->tagAdd("centered", $linechar, "end");
- $::progressw->tagConfigure("centered", -justify => "center");
- my $rb = $MWIDTH - $RIGHT;
- $nxt->configure(-text => __('Finish'),
- -command => sub { $mw->destroy; });
- $nxt->place(-x => ($MWIDTH - $RIGHT) ,
- -y => ($MHEIGHT - $BOTTOM), -anchor => "se")->focus();
-}
-
################### END OF MODULE RETURN 1 FOR REQUIRE ###########
1;