summaryrefslogtreecommitdiff
path: root/Master/tlpkg/installer/install-menu-wizard.pl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-02-04 23:53:18 +0000
committerNorbert Preining <preining@logic.at>2009-02-04 23:53:18 +0000
commit5c8afec4982eb3f53cc05cc59a340851ad9be370 (patch)
tree1dddd349f3bd29ba629544899d877c80e3965032 /Master/tlpkg/installer/install-menu-wizard.pl
parente2a159a8ffdc2564177dea3d004773e1072fc1d9 (diff)
make wizard and normal gui switch switch able
git-svn-id: svn://tug.org/texlive/trunk@12082 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer/install-menu-wizard.pl')
-rw-r--r--Master/tlpkg/installer/install-menu-wizard.pl55
1 files changed, 34 insertions, 21 deletions
diff --git a/Master/tlpkg/installer/install-menu-wizard.pl b/Master/tlpkg/installer/install-menu-wizard.pl
index cb320a44956..3d7b060041d 100644
--- a/Master/tlpkg/installer/install-menu-wizard.pl
+++ b/Master/tlpkg/installer/install-menu-wizard.pl
@@ -26,8 +26,6 @@ our $MENU_ALREADYDONE = 3;
my $return = $MENU_INSTALL;
-my $custom = 0;
-
require Tk;
require Tk::Dialog;
require Tk::DialogBox;
@@ -89,26 +87,27 @@ if (defined($::opt_lang)) {
}
-my $dest = $vars{'TEXDIR'};
+my $dest;
my $mw;
######################################################################
-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;
- };
-push @::install_packages_hook, \&wizard_update_progressbar;
-push @::install_packages_hook,
- sub { $mw->update; };
+sub setup_hooks_wizard {
+ 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;
+ };
+ push @::install_packages_hook, \&wizard_update_progressbar;
+ push @::install_packages_hook, sub { $mw->update; };
+}
sub wizard_update_status {
my ($p) = @_;
@@ -218,15 +217,23 @@ my $BOTTOM = 400;
my $INF = 300;
my $fmain;
+my $counter;
+
################# WELCOME SCREEN ######################################
sub run_menu_wizard {
$mw = Tk::MainWindow->new(-width => 640, -height => 480);
+ setup_hooks_wizard();
+
+ $dest = $vars{'TEXDIR'};
$tit = $mw->Label(-text => "TeX Live 2008 Installation");
$tit->place(-x => $LEFT, -y => $TOP);
+ $counter = $mw->Label(-text => "1/4");
+ $counter->place(-x => (640 - $LEFT), -y => $TOP, -anchor => "ne");
+
$fmain = $mw->Frame(-height => ($BOTTOM - $TOP -50), -width => 540);
#, -borderwidth => 1, -relief => "ridge");
$fmain->place(-x => $LEFT, -y => ($TOP + 30));
@@ -253,6 +260,8 @@ sub reset_start {
for ($fmain->children) {
$_->destroy;
}
+ $counter->configure(-text => "1/4");
+
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");
$inf->place(-x => 0, -y => 100);
@@ -265,11 +274,12 @@ sub ask_path {
for ($fmain->children) {
$_->destroy;
}
+ $counter->configure(-text => "2/4");
my $lab = $fmain->Label(-text => "Destination Folder:");
my $val = $fmain->Label(-textvar => \$dest);
my $but = $fmain->Button(-text => "Change", -command => \&change_path, -relief => "ridge", -width => 10);
- my $pa = $fmain->Checkbutton(-text => "Use letter-size paper instead of A4 by default", -variable => \$vars{"option_letter"});
+ 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",
-relief => "ridge",
-command => sub { $mw->destroy;
@@ -279,13 +289,14 @@ sub ask_path {
@::info_hook = ();
@::install_packages_hook = ();
require("installer/install-menu-perltk.pl");
- $return = &{$::run_menu}();
+ setup_hooks_perltk();
+ $return = run_menu_perltk();
});
calc_depends();
- $fmain->Label(-text => "The destination folder will contain the installation.\nIt is recommended to keep the year as last component.", -justify => "left")->place(-x => 0, -y => 30);
+ $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);
my $ytmp = 100;
$lab->place(-x => 0, -y => $ytmp);
@@ -368,6 +379,7 @@ sub ask_go {
for ($fmain->children) {
$_->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");
$inf->place(-x => 0, -y => 100);
@@ -381,6 +393,7 @@ sub wizard_installation_window {
for ($fmain->children) {
$_->destroy;
}
+ $counter->configure(-text => "4/4");
# create a progress bar window
# compute the height of the Text by the given font