From 6fa567467b86f28fa2fcb9e0f85bd91eface730d Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Wed, 14 Nov 2018 15:20:33 +0000 Subject: Integrating tcl installer; UAC prompt for tlshell git-svn-id: svn://tug.org/texlive/trunk@49155 c570f23f-e606-0410-a88d-b1316a301751 --- Master/install-tl | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) (limited to 'Master/install-tl') diff --git a/Master/install-tl b/Master/install-tl index 1d2c3a8e9bc..1ec5f629f0f 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -42,6 +42,59 @@ BEGIN { unshift (@INC, "$::installerdir/tlpkg"); } +# Unix-only: want tcl GUI? +# If so, this run of install-tl does duty as a wrapper for install-tl-gui.tcl, +# which in its turn will start an actual run of install-tl. +# On windows an external batch wrapper replaces the built-in wrapper below. + +if ($^O !~ /^MSWin/i) { + my $i=-1; + my @new_args = (); + my $want_tcl = 0; + while ($i<$#ARGV) { + # build argument array for install-tl-gui.tcl. + # But once we know that install-tl-gui.tcl is not going to be invoked, + # we quit scanning and continue with the original @ARGV + $i++; + my $p = $ARGV[$i]; + if ($p eq 'from_ext_gui') { + $want_tcl = 0; + last; + } elsif ($p =~ /^-?-gui=(.*$)/) { + if ($1 eq 'tcl') { + $want_tcl = 1; + } else { + last; # other gui: can forget about @new_args + } + } elsif ($p =~ /^-?-gui/) { + if ($i == $#ARGV) { + last; # default gui => not tcl + } elsif ($ARGV[$i+1] eq 'tcl') { + $i++; + $want_tcl = 1; + } else { + last; + } + } else { + # not gui-related, continue collecting @new_args + push (@new_args, $p); + } + } + if ($want_tcl) { + unshift (@new_args, "--"); + unshift (@new_args, "$::installerdir/tlpkg/installer/install-tl-gui.tcl"); + if (!exec('wish', @new_args)) { + if (!exec('wish8.6', @new_args)) { + if (!exec('wish8.5', @new_args)) { + if (!exec('tclkit', @new_args)) { + die "wish not found\n"; + } + } + } + } + } +} + use Cwd 'abs_path'; use Getopt::Long qw(:config no_autoabbrev); use Pod::Usage; @@ -2442,6 +2495,8 @@ sub check_env { |.*PWD |GENDOCS_TEMPLATE_DIR|PATH|SHELLOPTS |PERL5LIB + |INSTROOT + |ARGS )$/x; # don't worry about these if ("$evar $origenv{$evar}" =~ /tex/i) { # check both key and value $::env_warns .= " $evar=$origenv{$evar}\n"; @@ -2641,6 +2696,12 @@ questions before installing all of TeX Live. The expert GUI installer, providing access to more options. Can also be invoked on Windows by running C. +=item C + +An experimental GUI. It starts out simply, with the same options as +the wizard installer, but a button 'Advanced' gives acces to almost +all the options of the perltk GUI. + =back The C and C modules, and thus also when calling with @@ -2648,6 +2709,10 @@ bare C<-gui> (with no I), require the Perl/Tk module (L); if Perl/Tk is not available, installation continues in text mode. +The tcl GUI requires Tcl/Tk. This is part of Mac OS and is often +already installed on Linux. For Windows, TeX Live provides a Tcl/Tk +runtime. + =item B<-no-gui> Use the text mode installer (default except on Windows). -- cgit v1.2.3