texlive[55357] Master: Perl/Tk installers removed
commits+siepo at tug.org
commits+siepo at tug.org
Sun May 31 22:09:55 CEST 2020
Revision: 55357
http://tug.org/svn/texlive?view=revision&revision=55357
Author: siepo
Date: 2020-05-31 22:09:55 +0200 (Sun, 31 May 2020)
Log Message:
-----------
Perl/Tk installers removed
Modified Paths:
--------------
trunk/Master/install-tl
trunk/Master/install-tl-windows.bat
trunk/Master/tlpkg/installer/install-tl-gui.tcl
trunk/Master/tlpkg/tltcl/tltcl.tcl
Modified: trunk/Master/install-tl
===================================================================
--- trunk/Master/install-tl 2020-05-31 16:03:24 UTC (rev 55356)
+++ trunk/Master/install-tl 2020-05-31 20:09:55 UTC (rev 55357)
@@ -76,6 +76,7 @@
# quit scanning and building @new_args once tcl is ruled out.
my $want_tcl = ($^O eq 'darwin');
my $asked4tcl = 0;
+ my $forbid = 0;
my @new_args = ();
$i = -1;
while ($i < $#tmp_args) {
@@ -83,28 +84,29 @@
if ($p eq '-gui') {
# look ahead at next parameter
if ($i == $#tmp_args || $tmp_args[$i+1] =~ /^-/) {
- $want_tcl = 1; # default value for -gui
- $asked4tcl = 1;
- } elsif ($tmp_args[$i+1] eq 'tcl') {
+ # just -gui, without value
$want_tcl = 1;
$asked4tcl = 1;
- $i++;
- } else { # other value for -gui
+ } elsif ($tmp_args[$i+1] eq 'text') {
$want_tcl = 0;
+ $forbid = 1;
last;
+ } else {
+ # check all allowed values for -gui
+ my $q = $tmp_args[$i+1];
+ if ($q eq 'tcl' || $q eq 'perltk' ||
+ $q eq 'wizard' || $q eq 'expert') {
+ $want_tcl = 1;
+ $asked4tcl = 1;
+ $i++;
+ } else {
+ die "$0: illegal value $q for parameter -gui.\n";
+ }
}
} else {
- my $forbid = 0;
- for my $q (qw/in-place profile help/) {
+ for my $q (qw/in-place profile help print-platform version no-gui/) {
if ($p eq "-$q") {
- # default text mode
- $want_tcl = 0 unless $asked4tcl;
- last;
- }
- }
- for my $q (qw/print-platform version no-gui/) {
- if ($p eq "-$q") {
- # enforce text mode
+ # ignore gui mode
$want_tcl = 0;
$forbid = 1;
last;
@@ -119,7 +121,7 @@
if ($want_tcl) {
unshift (@new_args, "--");
unshift (@new_args, "$::installerdir/tlpkg/installer/install-tl-gui.tcl");
- my @wishes = qw /wish wish8.6 wish8.5 tclkit/;
+ my @wishes = qw /wish wish8.7 wish8.6 wish8.5 tclkit/;
unshift @wishes, $ENV{'WISH'} if (defined $ENV{'WISH'});
foreach my $w (@wishes) {
if (!exec($w, @new_args)) {
@@ -365,15 +367,6 @@
"version" => \$opt_version,
"warn-checksums!" => \$opt_warn_checksums,
"help|?" => \$opt_help) or pod2usage(2);
-
-if ($opt_gui eq "expert") {
- $opt_gui = "perltk";
-}
-if ($opt_gui eq "" || $opt_gui eq "tcl") {
- # tried and failed tcl, try perltk instead
- $opt_gui = "perltk";
- warn "Setting opt_gui to perltk instead";
-}
if ($from_ext_gui) {
$opt_gui = "extl";
}
@@ -438,12 +431,7 @@
if ($opt_in_place && $opt_init_from_profile);
if ($#ARGV >= 0) {
- # we still have arguments left, should only be gui, otherwise die
- if ($ARGV[0] =~ m/^gui$/i) {
- $opt_gui = "perltk";
- } else {
- die "$0: Extra arguments `@ARGV'; try --help if you need it.\n";
- }
+ die "$0: Extra arguments `@ARGV'; try --help if you need it.\n";
}
@@ -451,7 +439,7 @@
$::lang = $::opt_lang;
}
-if ($opt_profile) { # for now, not allowed if in_place
+if ($opt_profile) { # not allowed if in_place
if (-r $opt_profile && -f $opt_profile) {
info("Automated TeX Live installation using profile: $opt_profile\n");
} else {
@@ -519,47 +507,6 @@
# continuing with normal install
-# check as soon as possible for GUI functionality to give people a chance
-# to interrupt.
-# not needed for extl, because in this case install-tl is invoked by external gui
-if (($opt_gui ne "extl") && ($opt_gui ne "text") && !$opt_no_gui && ($opt_profile eq "")) {
- # try to load Tk.pm, but don't die if it doesn't work
- eval { require Tk; };
- if ($@) {
- # that didn't work out, so warn the user and continue with text mode
- tlwarn("Cannot load Tk, maybe something is missing and\n");
- tlwarn("maybe https://tug.org/texlive/distro.html#perltk can help.\n");
- tlwarn("Error message from loading Tk:\n");
- tlwarn(" $@\n");
- tlwarn("Continuing in text mode...\n");
- $opt_gui = "text";
- }
- eval { my $foo = Tk::MainWindow->new; $foo->destroy; };
- if ($@) {
- tlwarn("perl/Tk unusable, cannot create main window.\n");
- if (platform() eq "universal-darwin") {
- tlwarn("That could be because X11 is not installed or started.\n");
- }
- tlwarn("Error message from creating MainWindow:\n");
- tlwarn(" $@\n");
- tlwarn("Continuing in text mode...\n");
- $opt_gui = "text";
- } else {
- # try to set up fonts if $opt_gui is given
- if ($opt_font) {
- my @a;
- push @a, "--font", $opt_font;
- Tk::CmdLine::SetArguments(@a);
- }
- }
- if ($opt_gui eq "text") {
- # we switched from GUI to non-GUI mode, tell the user and wait a bit
- tlwarn("\nSwitching to text mode installer, if you want to cancel, do it now.\n");
- tlwarn("Waiting for 3 seconds\n");
- sleep(3);
- }
-}
-
if (defined($opt_force_arch)) {
tlwarn("Overriding platform to $opt_force_arch\n");
$::_platform_ = $opt_force_arch;
@@ -705,9 +652,6 @@
die ("Exiting installation.\n");
}
read_profile($opt_profile);
- if ($from_ext_gui) {
- print STDOUT "startinst\n";
- }
}
my $varsdump = "";
@@ -2764,38 +2708,19 @@
The text mode user interface (default on Unix systems). Same as the
C<-no-gui> option.
-=item C<tcl>
+=item C<tcl> (or "perltk" or "wizard" or "expert" or nothing)
The Tcl/Tk user interface (default on Macs and Windows). It starts
with a small number of configuration options, roughly equivalent
-to what the wizard option below offers, but a button C<Advanced>
-takes you to a screen with roughly the same options as the C<perltk>
-interface.
+to what the former wizard option offers, but a button C<Advanced>
+takes you to a screen with roughly the same options as the former
+C<perltk> interface.
-=item C<wizard>
-
-The wizard mode user interface, asking only minimal questions before
-installing all of TeX Live.
-
-=item C<expert>
-
-A generic name for, currently, C<perltk>; it may select a different GUI
-in the future.
-
-=item C<perltk>
-
-The expert GUI installer, providing access to more options.
-
=back
-The C<perltk> and C<wizard> modules require the Perl/Tk module
-(L<https://tug.org/texlive/distro.html#perltk>). if Perl/Tk is not
-available, installation continues in text mode, except on Windows,
-where all gui options except C<text> are diverted to the default
-C<tcl> GUI.
-
-The C<tcl> GUI requires Tcl/Tk. This is standard on Macs and is often
-already installed on GNU/Linux. For Windows, TeX Live provides a Tcl/Tk
+The default GUI requires Tcl/Tk. This is standard on Macs (although
+it is considered deprecated since Catalina) and is often already
+installed on GNU/Linux. For Windows, TeX Live provides a Tcl/Tk
runtime.
=item B<-no-gui>
@@ -2806,10 +2731,8 @@
=item B<-lang> I<llcode>
-By default, the GUI tries to deduce your language from the
-environment. The Tcl GUI uses the language detection built into
-Tcl/Tk; the Perl/Tk GUIs use the C<LC_MESSAGES> environment
-variable. If that fails you can select a different language by
+By default, the Tcl GUI uses the language detection built into
+Tcl/Tk. If that fails you can select a different language by
giving this option with a language code (based on ISO 639-1).
Currently supported (but not necessarily completely translated) are:
English (en, default), Czech (cs), German (de), French (fr), Italian
@@ -2839,8 +2762,8 @@
=item B<-select-repository>
This option allows you to choose a particular mirror from the current
-list of active CTAN mirrors. This option is supported in the C<text>,
-C<wizard> and C<perltk> installer modes, and will also offer to install
+list of active CTAN mirrors. This option is supported in the C<text>
+and C<gui> installer modes, and will also offer to install
from local media if available, or from a repository specified on the
command line. It's useful when the (default) automatic redirection does
not choose a good host for you.
@@ -2870,9 +2793,10 @@
=item B<-debug-translation>
-In the Perl/Tk GUI modes, this option reports any missing, or more
-likely untranslated, messages to standard error. Helpful for
-translators to see what remains to be done.
+In the former Perl/Tk GUI modes, this option reported any missing,
+or more likely untranslated, messages to standard error. Not yet
+implemented for the Tcl interface. Helpful for translators to see
+what remains to be done.
=item B<-force-platform> I<platform>
Modified: trunk/Master/install-tl-windows.bat
===================================================================
--- trunk/Master/install-tl-windows.bat 2020-05-31 16:03:24 UTC (rev 55356)
+++ trunk/Master/install-tl-windows.bat 2020-05-31 20:09:55 UTC (rev 55357)
@@ -16,11 +16,11 @@
if %ver_str:~,2% == 5. goto tooold
if %ver_str:~,3% == 6.0 (
echo WARNING: Windows 7 is the earliest supported version.
- echo TeX Live 2018 has not been tested on Windows Vista.
+ echo TeX Live 2020 has not been tested on Windows Vista.
pause
)
-rem version of external perl, if any
+rem version of external perl, if any. used by install-tl.
set extperl=0
for /f "usebackq tokens=2 delims='" %%a in (`perl -V:version 2^>NUL`) do (
set extperl=%%a
@@ -42,12 +42,18 @@
rem we test for value == parameter rather than the other way around
rem to avoid some weird parsing errors
-rem code block for gui argument
+rem code block for gui argument: look at next argument
:dogui
if x == x%1 (
set tcl=yes
set asked4gui=yes
-shift
+goto nomoreargs
+)
+set q=%1
+if "-" == "%q:~,1%" (
+rem %1 is no value for -gui but another parameter
+set tcl=yes
+set asked4gui=yes
goto rebuildargs
)
if text == %1 (
@@ -77,9 +83,9 @@
shift
goto rebuildargs
) else (
-set tcl=yes
-set asked4gui=yes
-goto rebuildargs
+echo Illegal value %1 for -gui
+set errlev=1
+goto eoff
)
rem last case was -gui without parameter to shift
@@ -101,9 +107,8 @@
set p=%p:~1%
:nominmin
-rem countermand gui parameter for short output.
-rem assume text mode for help and for profile install,
-rem unless gui was explicitly requested.
+rem countermand gui parameter for short output, help and profile install.
+rem even if gui was explicitly requested.
if -print-platform == %p% (
set tcl=no
set forbid=yes
@@ -117,15 +122,13 @@
set forbid=yes
)
if -profile == %p% (
-if no == %asked4gui% (
set tcl=no
+set forbid=yes
)
-)
if -help == %p% (
-if no == %asked4gui% (
set tcl=no
+set forbid=yes
)
-)
if -gui == %p% goto dogui
rem -no-gui or not a gui argument: copy to args string
Modified: trunk/Master/tlpkg/installer/install-tl-gui.tcl
===================================================================
--- trunk/Master/tlpkg/installer/install-tl-gui.tcl 2020-05-31 16:03:24 UTC (rev 55356)
+++ trunk/Master/tlpkg/installer/install-tl-gui.tcl 2020-05-31 20:09:55 UTC (rev 55357)
@@ -37,7 +37,7 @@
# This file should be in $::instroot/tlpkg/installer.
# On non-windows platforms, install-tl functions as a wrapper
-# for this file if it encounters a parameter '-gui tcl'.
+# for this file if it encounters a parameter '-gui' (but not -gui text).
# This allows automatic inclusion of a '--' parameter to separate
# tcl parameters from script parameters.
@@ -44,7 +44,8 @@
set ::instroot [file normalize [info script]]
set ::instroot [file dirname [file dirname [file dirname $::instroot]]]
-# declarations, initializations and procs shared with tlshell.tcl
+# declarations, initializations and procs shared with tlshell.tcl.
+# tltcl may want to know whether or not it was invoked by tlshell:
set ::invoker [file tail [info script]]
if [string match -nocase ".tcl" [string range $::invoker end-3 end]] {
set ::invoker [string range $::invoker 0 end-4]
@@ -69,7 +70,7 @@
set ::advanced 0
set ::alltrees 0
-# interactively select repository
+# interactively select repository; default false
set ::select_repo 0
proc kill_perl {} {
@@ -381,7 +382,7 @@
# wallpaper for remaining widgets
pack [ttk::frame .bg -padding 3] -fill both -expand 1
- # buttons: abort button, mirrors dropdown menu
+ # frame for buttons (abort button, mirrors dropdown menu)
pack [ttk::frame .splfb] -in .bg -side bottom -fill x
}
@@ -1331,10 +1332,6 @@
# of this array.
# We still use blocking i/o: frontend and backend wait for each other.
-# idea: follow submenu organization of text installer
-# for 3-way options, create an extra level of children
-# instead of wizard install, supppress some options
-
## default_bg color, only used for menus under ::plain_unix
if [catch {ttk::style lookup TFrame -background} ::default_bg] {
set ::default_bg white
@@ -1963,15 +1960,14 @@
set ::out_log {}
show_log 1; # 1: with abort button
.close state disabled
- if $::did_gui {
- chan puts $::inst "startinst"
- write_vars
- }
+ chan puts $::inst "startinst"
+ write_vars
# the backend was already running and needs no further encouragement
# switch to non-blocking i/o
chan configure $::inst -buffering line -blocking 0
chan event $::inst readable read_line_cb
+ raise .
if {$::tcl_platform(platform) eq "windows"} {wm deiconify .}
}; # run_installer
@@ -1998,33 +1994,24 @@
# handle some command-line arguments.
# the argument list should already be normalized: '--' => '-', "=" => ' '
- set i 0
- set do_splash 1
set ::prelocation "..."
set ::mir_selected 1 ; # i.e. default or set by parameter
- set i [llength $::argv]
+ set l [llength $::argv]
+ set i $l
while {$i > 0} {
+ set iplus $i
incr i -1
set p [lindex $::argv $i]
- if {$p eq "-profile"} {
- # check for profile argument: no splash screen if present
- set do_splash 0
- } elseif {$p in [list "-location" "-url" "-repository" "-repos" "-repo"]} {
+ if {$p in [list "-location" "-url" "-repository" "-repos" "-repo"]} {
# check for repository argument: bail out if obviously invalid
- set j [expr {$i+1}]
- if {$j<[llength $::argv]} {
- set p [lindex $::argv $j]
- unset j
+ if {$iplus<$l} {
+ set p [lindex $::argv $iplus]
if {$p ne "ctan" && ! [possible_repository $p]} {
- tk_messageBox -message [__ "%s not a local or remote repository" $p] \
- -title [__ "Error"] -type ok -icon error
- exit
+ err_exit [__ "%s not a local or remote repository" $p]
}
set ::prelocation $p
} else {
- tk_messageBox -message [__ "%s requires an argument" $p] \
- -title [__ "Error"] -type ok -icon error
- exit
+ err_exit [__ "%s requires an argument" $p]
}
} elseif {$p eq "-select-repository"} {
# in this case, we start with selecting a repository
@@ -2037,23 +2024,15 @@
}
unset i
- if {$do_splash || ! [info exists ::mir_selected]} pre_splash
-
if {! [info exists ::mir_selected]} {
+ pre_splash
select_mirror
}
- if $do_splash make_splash
- unset do_splash
-
- if {! [info exist ::mir_selected]} {
- vwait ::mir_selected
- }
-
# start install-tl-[tcl] via a pipe.
set cmd [list "|${::perlbin}" "${::instroot}/install-tl" \
"-from_ext_gui" {*}$::argv 2>@1]
- show_time "opening pipe"
+ #show_time "opening pipe"
if [catch {open $cmd r+} ::inst] {
err_exit "Error starting Perl backend"
}
@@ -2069,8 +2048,7 @@
# possible input from perl until the menu starts:
# - question about prior canceled installation
# - location (actual repository)
- # - menu data, help, version, print-platform
- set ::did_gui 0
+ # - menu data
set answer ""
unset -nocomplain ::loaded
while 1 { ; # initial perl output
@@ -2102,7 +2080,6 @@
# waiting till the repository has been loaded
vwait ::loaded
unset ::loaded
- #puts stderr "done loading"
# resume reading from back end in blocking mode
while 1 {
set ll [read_line]
@@ -2130,7 +2107,6 @@
set answer [run_menu]
}
}
- set ::did_gui 1
break
} elseif {$l eq "startinst"} {
# use an existing profile:
Modified: trunk/Master/tlpkg/tltcl/tltcl.tcl
===================================================================
--- trunk/Master/tlpkg/tltcl/tltcl.tcl 2020-05-31 16:03:24 UTC (rev 55356)
+++ trunk/Master/tlpkg/tltcl/tltcl.tcl 2020-05-31 20:09:55 UTC (rev 55357)
@@ -339,7 +339,6 @@
}
}
}
-initialize_language
load_translations
proc __ {s args} {
More information about the tex-live-commits
mailing list.