summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-05-07 19:58:00 +0000
committerNorbert Preining <preining@logic.at>2008-05-07 19:58:00 +0000
commit6c95c06831d20d624e2ce2fad95ef3957f15d1bb (patch)
tree8ce28f2c11964c75410d31d87b1ccfa33740ffd1 /Master
parent799768e4e245761aea76c9c25385f1ffd76423e6 (diff)
more updates to GUI for update
git-svn-id: svn://tug.org/texlive/trunk@7916 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl1
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl16
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl15
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/gui-install.pl17
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/gui-remove.pl16
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl15
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/gui-update.pl14
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl110
8 files changed, 115 insertions, 89 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index a1eca616a68..5d0a5daf1d4 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -113,6 +113,7 @@ if (defined($action) && ($action =~ m/^gui/i)) {
if (defined($opt_netarchive));
push @cmdline, "--diskarchive", "$opt_diskarchive"
if (defined($opt_diskarchive));
+ push @cmdline, @ARGV;
exec $perlbin @cmdline;
die("Cannot execute the GUI script\n");
}
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl
index 7cfe4c8d357..1d504cbe649 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl
@@ -7,6 +7,22 @@
#
+our $b4 = $top->Button(-text => "Architectures",
+ -command => sub {
+ $back_f1->packForget;
+ $back_f2->packForget;
+ $back_f3->packForget;
+ $back_config->packForget;
+ $back_up->packForget;
+ $back_arch->pack;
+ });
+
+
+$b4->pack(-side => 'left');
+
+our $back_arch = $back->Frame;
+$screens{"arch"} = $back_arch;
+
# this will be loaded only on unix systems!
#
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl
index b060d572a2c..5ef1775310e 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl
@@ -6,6 +6,21 @@
# GUI for tlmgr
#
+our $b5 = $top->Button(-text => "Configuration",
+ -command => sub {
+ $back_f1->packForget;
+ $back_f2->packForget;
+ $back_f3->packForget;
+ $back_arch->packForget;
+ $back_up->packForget;
+ $back_config->pack;
+ });
+
+
+$b5->pack(-side => 'left');
+
+our $back_config = $back->Frame;
+$screens{"config"} = $back_config;
my $default_location = $localtlpdb->option_location;
my $default_formats = ($localtlpdb->option_formats ? "Yes" : "No");
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-install.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-install.pl
index 2fd3b20afd5..a6fd5796ffb 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/gui-install.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-install.pl
@@ -7,6 +7,23 @@
#
+our $b1 = $top->Button(-text => "Adding packages",
+ -command => sub {
+ $back_f2->packForget;
+ $back_f3->packForget;
+ $back_arch->packForget;
+ $back_config->packForget;
+ $back_up->packForget;
+ $back_f1->pack;
+ });
+
+$b1->pack(-side => 'left');
+
+
+our $back_f1 = $back->Frame;
+$screens{"install"} = $back_f1;
+
+
####################### row 1
# frame .back.f1.f1 -relief ridge -borderwidth 2
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-remove.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-remove.pl
index f2f94f47be3..a4a06edf9f6 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/gui-remove.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-remove.pl
@@ -6,6 +6,22 @@
# GUI for tlmgr
#
+our $b2 = $top->Button(-text => "Removing packages",
+ -command => sub {
+ $back_f1->packForget;
+ $back_f3->packForget;
+ $back_arch->packForget;
+ $back_config->packForget;
+ $back_up->packForget;
+ $back_f2->pack;
+ });
+
+
+$b2->pack(-side => 'left');
+
+our $back_f2 = $back->Frame;
+$screens{"remove"} = $back_f2;
+
####################### row 1
# frame .back.f2.f1 -relief ridge -borderwidth 2
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl
index 2b8973f3cf2..ef4a62114ae 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl
@@ -6,6 +6,21 @@
# GUI for tlmgr
#
+our $b3 = $top->Button(-text => "Uninstallation",
+ -command => sub {
+ $back_f1->packForget;
+ $back_f2->packForget;
+ $back_arch->packForget;
+ $back_config->packForget;
+ $back_up->packForget;
+ $back_f3->pack;
+ });
+
+$b3->pack(-side => 'left');
+
+
+our $back_f3 = $back->Frame;
+$screens{"uninstall"} = $back_f3;
if ($^O=~/^MSWin(32|64)$/i) {
my $lab = $back_f3->Label(-justify => 'left',
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-update.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-update.pl
index f49943563fe..0c3e50cab73 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/gui-update.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-update.pl
@@ -5,6 +5,20 @@
# GUI for tlmgr
#
+our $bu = $top->Button(-text => "Updating packages",
+ -command => sub {
+ $back_f2->packForget;
+ $back_f3->packForget;
+ $back_arch->packForget;
+ $back_config->packForget;
+ $back_f1->packForget;
+ $back_up->pack;
+ });
+
+$bu->pack(-side => 'left');
+
+our $back_up = $back->Frame;
+$screens{"update"} = $back_up;
####################### row 1
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl
index 191ece1b41f..973893cae81 100755
--- a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl
@@ -39,19 +39,14 @@ my $opt_location;
my $opt_debug = 0;
my $opt_netarchive;
my $opt_diskarchive;
+my $opt_screen;
GetOptions("location=s" => \$opt_location,
"netarchive=s" => \$NetArchive,
"diskarchive=s" => \$DiskArchive,
+ "screen=s" => \$opt_screen,
"debug!" => \$opt_debug) or die("Unsupported argument!");
-our $back_f1;
-our $back_f2;
-our $back_f3;
-our $back_arch;
-our $back_config;
-our $back_up;
-
our $localtlpdb = TeXLive::TLPDB->new ("root" => "$Master");
die("cannot find tlpdb!") unless (defined($localtlpdb));
our @alllocalpackages = setup_list(0,$localtlpdb->list_packages);
@@ -81,109 +76,45 @@ our $mw = MainWindow->new(-title => "tlmgr 2008");
# frame .top
our $top = $mw->Frame;
-
-our $b1 = $top->Button(-text => "Adding packages",
- -command => sub {
- $back_f2->packForget;
- $back_f3->packForget;
- $back_arch->packForget;
- $back_config->packForget;
- $back_up->packForget;
- $back_f1->pack;
- });
-
-our $bu = $top->Button(-text => "Updating packages",
- -command => sub {
- $back_f2->packForget;
- $back_f3->packForget;
- $back_arch->packForget;
- $back_config->packForget;
- $back_f1->packForget;
- $back_up->pack;
- });
-
-our $b2 = $top->Button(-text => "Removing packages",
- -command => sub {
- $back_f1->packForget;
- $back_f3->packForget;
- $back_arch->packForget;
- $back_config->packForget;
- $back_up->packForget;
- $back_f2->pack;
- });
-
-our $b3 = $top->Button(-text => "Uninstallation",
- -command => sub {
- $back_f1->packForget;
- $back_f2->packForget;
- $back_arch->packForget;
- $back_config->packForget;
- $back_up->packForget;
- $back_f3->pack;
- });
-
-our $b4 = $top->Button(-text => "Architectures",
- -command => sub {
- $back_f1->packForget;
- $back_f2->packForget;
- $back_f3->packForget;
- $back_config->packForget;
- $back_up->packForget;
- $back_arch->pack;
- });
-our $b5 = $top->Button(-text => "Configuration",
- -command => sub {
- $back_f1->packForget;
- $back_f2->packForget;
- $back_f3->packForget;
- $back_arch->packForget;
- $back_up->packForget;
- $back_config->pack;
- });
-
-
our $quit = $top->Button(-text => "Quit",
-command => sub { $mw->destroy; exit(0); });
-
-# pack .top.b1 .top.b2 -side left
-$b1->pack(-side => 'left');
-$b2->pack(-side => 'left');
-$bu->pack(-side => 'left');
-# arch support not be done via tlmgr on win32
-$b3->pack(-side => 'left');
-if (!win32()) {
- $b4->pack(-side => 'left');
-}
-$b5->pack(-side => 'left');
-
+
$quit->pack(-side => 'right');
# frame .back -borderwidth 2
our $back = $mw->Frame(-borderwidth => 2);
-$back_f1 = $back->Frame;
-$back_f2 = $back->Frame;
-$back_f3 = $back->Frame;
-$back_arch = $back->Frame;
-$back_config = $back->Frame;
-$back_up = $back->Frame;
-
# pack .top .back -side top -fill both -expand 1
$top->pack(-side => 'top', -fill => 'both', -expand => 1);
$back->pack(-side => 'top', -fill => 'both', -expand => 1);
+our %screens;
+
require("gui-install.pl");
require("gui-update.pl");
require("gui-remove.pl");
require("gui-uninstall.pl");
+# arch support not be done via tlmgr on win32
if (!win32()) {
require("gui-arch.pl");
}
require("gui-config.pl");
-# pack .back.f1
-$back_f1->pack;
+my $packed = 0;
+if (defined($opt_screen)) {
+ foreach my $k (keys %screens) {
+ if ($opt_screen =~ m/^$k$/) {
+ $screens{$k}->pack;
+ $packed = 1;
+ }
+ }
+}
+
+if (!$packed) {
+ $screens{"install"}->pack;
+}
+
Tk::MainLoop();
@@ -354,6 +285,7 @@ sub reinit_local_tlpdb {
sub create_update_list {
my @ret;
foreach my $lp ($localtlpdb->list_packages) {
+ next if ($lp =~ m/00texlive-installation.config/);
my $lrev = $localtlpdb->get_package($lp)->revision;
my $up = $tlmediatlpdb->get_package($lp);
my $urev;