summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-08-29 23:02:14 +0000
committerNorbert Preining <preining@logic.at>2009-08-29 23:02:14 +0000
commit4363ef3017f037bf6df59ca5a6f4337839105418 (patch)
tree619433dd41024a3735c23b2d12c30ef05fc01100 /Master
parent6f37c04f51c440a424da1ea98a70b71e827fa1c7 (diff)
make it easier to add a new user visible option to the wizard,
and show infos at the last screen for all selected options git-svn-id: svn://tug.org/texlive/trunk@14945 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/installer/install-menu-wizard.pl107
1 files changed, 70 insertions, 37 deletions
diff --git a/Master/tlpkg/installer/install-menu-wizard.pl b/Master/tlpkg/installer/install-menu-wizard.pl
index 3d7d93d1bdc..92ffa85e291 100644
--- a/Master/tlpkg/installer/install-menu-wizard.pl
+++ b/Master/tlpkg/installer/install-menu-wizard.pl
@@ -13,6 +13,24 @@ my $svnrev = '$Revision: 11925 $';
$svnrev =~ m/: ([0-9]+) /;
$::menurevision = $1;
+#
+# the following lists define which options are shown in the Option screen
+# for unix and windows. On W32 with admin privileges both @w32 list options
+# are shown
+my @unix_opts = qw/letter/;
+my @w32_opts = qw/letter desktop_integration/;
+my @w32_admin_opts = qw/w32_multi_user/;
+
+my @opts_list = ();
+if (win32()) {
+ push @opts_list, @w32_opts;
+ if (admin()) {
+ push @opts_list, @w32_admin_opts;
+ }
+} else {
+ push @opts_list, @unix_opts;
+}
+
our %vars;
our $tlpdb;
@@ -297,6 +315,14 @@ sub callback_change_texdir {
################## OPTIONS SCREEN ################################
+my %opts_to_str = (
+ "letter" => "Use letter size instead of A4 by default",
+ "desktop_integration" => "Add shortcuts to menu and desktop",
+ "file_assocs" => "Change file associations",
+ "path" => "Adjust PATH setting in registry",
+ "w32_multi_user" => "Installation for all users",
+);
+
sub ask_options {
for ($fmain->children) {
$_->destroy;
@@ -306,45 +332,37 @@ sub ask_options {
my $inf = $fmain->Label(-text => __("This screen allows you to configure some options"), -justify => "left");
$inf->place(-x => 0, -y => 20);
- my $bletter = $fmain->Checkbutton(-text => __("Use letter size instead of A4 by default"),
- -variable => \$vars{"option_letter"});
-
- my $bdesk = $fmain->Checkbutton(-text => __("Add shortcuts to menu and desktop"),
- -variable => \$vars{"option_desktop_integration"});
-
- my $bassocs = $fmain->Checkbutton(-text => __('Change file associations'),
- -variable => \$vars{"option_file_assocs"});
-
- my $bpath = $fmain->Checkbutton(-text => __('Adjust PATH setting in registry'),
- -variable => \$vars{"option_path"});
-
- my $bmulti = $fmain->Checkbutton(-text => __('Installation for all users'),
- -variable => \$vars{"option_w32_multi_user"});
-
+# my %opt_cb;
+#
+# $opt_cb{"letter"} = $fmain->Checkbutton(
+# -text => __("Use letter size instead of A4 by default"),
+# -variable => \$vars{"option_letter"});
+#
+# $opt_cb{"desktop_integration"} = $fmain->Checkbutton(
+# -text => __("Add shortcuts to menu and desktop"),
+## -variable => \$vars{"option_desktop_integration"});
+#
+# $opt_cb{"file_assocs"} = $fmain->Checkbutton(
+# -text => __('Change file associations'),
+## -variable => \$vars{"option_file_assocs"});
+#
+# $opt_cb{"path"} = $fmain->Checkbutton(
+# -text => __('Adjust PATH setting in registry'),
+# -variable => \$vars{"option_path"});
+#
+# $opt_cb{"w32_multi_user"} = $fmain->Checkbutton(
+## -text => __('Installation for all users'),
+# -variable => \$vars{"option_w32_multi_user"});
+#
calc_depends();
-
my $ytmp = 60;
- $bletter->place(-x => 0, -y => $ytmp);
- if (win32()) {
+ for my $o (@opts_list) {
+ $fmain->Checkbutton(-text => __($opts_to_str{$o}),
+ -variable => \$vars{"option_$o"})->place(-x => 0, -y => $ytmp);
+ # $opt_cb{$o}->place(-x => 0, -y => $ytmp);
$ytmp += 50;
- $bdesk->place(-x => 0, -y => $ytmp);
-
- # now that we only create assocs if there aren't any other by default
- # we don't ask that anymore
- #$ytmp += 50;
- #$bassocs->place(-x => 0, -y => $ytmp);
-
- # disabled after discussion, PATH will be set up automatically
- # when using the wizard
- # $ytmp += 50;
- # $bpath->place(-x => 0, -y => $ytmp);
-
- if (admin()) {
- $ytmp += 50;
- $bmulti->place(-x => 0, -y => $ytmp);
- }
}
$prv->configure(-text => __('< Back'), -command => \&ask_path );
@@ -365,13 +383,28 @@ sub ask_go {
$_->destroy;
}
$counter->configure(-text => "4/5");
- my $inf = $fmain->Label(-justify => "left", -text => __("We are ready to install TeX Live 2009.\nThe following settings will be used.\nIf you want to change something please go back,\notherwise press the \"Install\" button.") . "\n\n" . __('Destination folder:') . " $dest");
+ my $inf = $fmain->Label(-justify => "left", -text => __("We are ready to install TeX Live 2009.\nThe following settings will be used.\nIf you want to change something please go back,\notherwise press the \"Install\" button."));
+
+
+ $inf->place(-x => 0, -y => 80);
+
+ my $ytmp = 170;
+
+ $fmain->Label(-justify => "left",
+ -text => __("Destination folder:") . "\t $dest")->place(-x => 0, -y => $ytmp);
+ $ytmp += 20;
+
+ for my $o (@opts_list) {
+ $fmain->Label(-justify => "left",
+ -text => __($opts_to_str{$o}) . ":\t" . ($vars{"option_$o"} ? __("Yes") : __("No")))->place(-x => 0, -y => $ytmp);
+ $ytmp += 20;
+ }
+
- $inf->place(-x => 0, -y => 100);
$nxt->configure(-text => __('Install'),
-command => \&wizard_installation_window);
- $prv->configure(-text => __('< Back'), -command => \&ask_path);
+ $prv->configure(-text => __('< Back'), -command => \&ask_options);
}
sub wizard_installation_window {