summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/bin/win32/tlshell.exebin11776 -> 19968 bytes
-rwxr-xr-xMaster/install-tl65
-rw-r--r--Master/source/tlshell_UAC.zipbin0 -> 7837 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/tlshell/tlshell.tcl2
-rw-r--r--Master/tlpkg/TeXLive/tltcl.tcl507
-rwxr-xr-xMaster/tlpkg/installer/install-tl-gui.tcl17
-rw-r--r--Master/tlpkg/installer/install-tl-windows.cmd181
-rwxr-xr-xMaster/tlpkg/installer/install-tl.sh78
8 files changed, 81 insertions, 769 deletions
diff --git a/Master/bin/win32/tlshell.exe b/Master/bin/win32/tlshell.exe
index 2fc9dcca372..babc55cdb30 100755
--- a/Master/bin/win32/tlshell.exe
+++ b/Master/bin/win32/tlshell.exe
Binary files differ
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<install-tl-advanced.bat>.
+=item C<tcl>
+
+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<perltk> and C<wizard> modules, and thus also when calling with
@@ -2648,6 +2709,10 @@ bare C<-gui> (with no I<module>), require the Perl/Tk module
(L<http://tug.org/texlive/distro.html#perltk>); 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).
diff --git a/Master/source/tlshell_UAC.zip b/Master/source/tlshell_UAC.zip
new file mode 100644
index 00000000000..8a1427d8b76
--- /dev/null
+++ b/Master/source/tlshell_UAC.zip
Binary files differ
diff --git a/Master/texmf-dist/scripts/tlshell/tlshell.tcl b/Master/texmf-dist/scripts/tlshell/tlshell.tcl
index 23656017587..73b13f52cbd 100755
--- a/Master/texmf-dist/scripts/tlshell/tlshell.tcl
+++ b/Master/texmf-dist/scripts/tlshell/tlshell.tcl
@@ -33,7 +33,7 @@ if {$::tcl_platform(platform) ne "windows"} {
# declarations and utilities shared with install-tl-gui.tcl
set ::instroot [exec kpsewhich -var-value=TEXMFROOT]
-source [file join $::instroot "tlpkg" "TeXLive" "tltcl.tcl"]
+source [file join $::instroot "tlpkg" "tltcl" "tltcl.tcl"]
# searchpath and locale:
# windows: most scripts run via [w]runscript, which adjusts the searchpath
diff --git a/Master/tlpkg/TeXLive/tltcl.tcl b/Master/tlpkg/TeXLive/tltcl.tcl
deleted file mode 100644
index 75e9c12e724..00000000000
--- a/Master/tlpkg/TeXLive/tltcl.tcl
+++ /dev/null
@@ -1,507 +0,0 @@
-#!/usr/bin/env wish
-
-# Copyright 2018 Siep Kroonenberg
-
-# This file is licensed under the GNU General Public License version 2
-# or any later version.
-
-# common declarations for tlshell.tcl and install-tl-gui.tcl
-
-set ::plain_unix 0
-if {$::tcl_platform(platform) eq "unix" && $::tcl_platform(os) ne "Darwin"} {
- set ::plain_unix 1
-}
-
-# process ID of the perl program that will run in the background
-set ::perlpid 0
-
-set any_mirror "http://mirror.ctan.org/systems/texlive/tlnet"
-
-proc get_stacktrace {} {
- set level [info level]
- set s ""
- for {set i 1} {$i < $level} {incr i} {
- append s [format "Level %u: %s\n" $i [info level $i]]
- }
- return $s
-} ; # get_stacktrace
-
-proc err_exit {{mess ""}} {
- if {$mess eq ""} {set mess "Error"}
- append mess "\n" [get_stacktrace]
- if $::plain_unix {
- # plain_unix: avoid a RenderBadPicture error on quitting.
- # 'send' changes the shutdown sequence,
- # which avoids triggering the bug.
- # 'tk appname <something>' restores 'send' and avoids the bug
- bind . <Destroy> {
- catch {tk appname appname}
- }
- }
- tk_messageBox -icon error -message $mess
- # kill perl process, just in case
- if $::perlpid {
- catch {
- if {$::tcl_platform(platform) eq "unix"} {
- exec -ignorestderr "kill" $::perlpid
- } else {
- exec -ignorestderr "taskkill" "/pid" $::perlpid
- }
- }
- }
- exit
-} ; # err_exit
-
-# localization support
-
-# for the sake of our translators we use our own translation function
-# which can use .po files directly. This allows them to check their work
-# without creating or waiting for a conversion to .msg.
-# We still use the msgcat module for detecting default locale.
-# Otherwise, the localization code borrows much from Norbert Preining's
-# translation module for TL.
-
-proc load_translations {} {
-
- # check the command-line for a lang parameter
- set ::lang ""
- set i 0
- while {$i < $::argc} {
- set p [lindex $::argv $i]
- incr i
- if {$p eq "-lang" || $p eq "--lang"} {
- if {$i < $::argc} {
- set ::lang [lindex $::argv $i]
- break
- }
- } elseif {[string range $p 0 5] eq "-lang="} {
- set ::lang [string range $p 6 end]
- break
- } elseif {[string range $p 0 6] eq "--lang="} {
- set ::lang [string range $p 7 end]
- break
- }
- }
- unset i
-
- # First fallback: check config file.
- # $TEXMFCONFIG/tlmgr/config can have a setting for gui-lang.
- # There will not be one for the installer, only for tlmgr.
- if {! [info exists ::lang] || $::lang eq ""} {
- foreach tmf {"TEXMFCONFIG" "TEXMFSYSCONFIG"} {
- if [catch {exec kpsewhich -var-value $tmf} d] {
- break; # apparently there is not yet a TL installation
- }
- if [catch {open [file join $d "tlmgr" "config"] r} fid] continue
- while 1 {
- if [chan eof $fid] {
- break
- }
- if [catch {chan gets $fid} l] break
- if {[regexp {^\s*gui-lang\s*=\s*(\S+)$} $l m ::lang]} {
- break
- }
- }
- chan close $fid
- if {[info exists ::lang] && $::lang ne ""} break
- }
- }
-
- # second fallback: what does msgcat think about it? Note that
- # msgcat checks the environment and on windows also the registry.
- if {! [info exists ::lang] || $::lang eq ""} {
- package require msgcat
- set ::lang [::msgcat::mclocale]
- }
-
- set messcat ""
- if {$::lang ne ""} {
- set messcat ""
- set maybe ""
- set ::lang [string tolower $::lang]
- set tdir [file join $::instroot "tlpkg" "translations"]
- foreach f [glob -directory $tdir *.po] {
- set ln_f [string tolower [string range [file tail $f] 0 end-3]]
- if {$ln_f eq $::lang} {
- set messcat $f
- break
- } elseif {[string range $ln_f 0 1] eq [string range $::lang 0 1]} {
- set maybe $f
- }
- }
- if {$messcat eq ""} {
- set messcat $maybe
- }
- }
-
- # parse messcat.
- # for now, just skip lines which make no sense.
- # empty messcat: no suitable message catalog
- if {$messcat ne ""} {
- # create array with msgid keys and msgstr values
- if {! [catch {open $messcat r} fid]} {
- fconfigure $fid -encoding utf-8
- set inmsgid 0
- set inmsgstr 0
- set msgid ""
- set msgstr ""
- while 1 {
- if [chan eof $fid] break
- if [catch {chan gets $fid} l] break
- if [regexp {^\s*#} $l] continue
- if [regexp {^\s*$} $l] {
- # empty line separates msgid/msgstr pairs
- if $inmsgid {
- # msgstr lines missing
- # puts stderr "no translation for $msgid in $messcat"
- set msgid ""
- set msgstr ""
- set inmsgid 0
- set inmsgstr 0
- continue
- }
- if $inmsgstr {
- # empty line signals end of msgstr
- if {$msgstr ne ""} {
- set msgid [string map {"\\n" "\n"} $msgid]
- set msgstr [string map {"\\n" "\n"} $msgstr]
- set msgid [string map {"\\\\" "\\"} $msgid]
- set msgstr [string map {"\\\\" "\\"} $msgstr]
- set ::TRANS($msgid) $msgstr
- }
- set msgid ""
- set msgstr ""
- set inmsgid 0
- set inmsgstr 0
- continue
- }
- continue
- } ; # empty line
- if [regexp {^msgid\s+"(.*)"\s*$} $l m msgid] {
- # note. a failed match will leave msgid alone
- set inmsgid 1
- continue
- }
- if [regexp {^"(.*)"\s*$} $l m s] {
- if $inmsgid {
- append msgid $s
- } elseif $inmsgstr {
- append msgstr $s
- }
- continue
- }
- if [regexp {^msgstr\s+"(.*)"\s*$} $l m msgstr] {
- set inmsgstr 1
- set inmsgid 0
- }
- }
- chan close $fid
- }
- }
-}
-load_translations
-
-proc __ {s args} {
- if {[info exists ::TRANS($s)]} {
- set s $::TRANS($s)
- #} else {
- # puts stderr "No translation found for $s\n[get_stacktrace]"
- }
- if {$args eq ""} {
- return $s
- } else {
- return [format $s {*}$args]
- }
-}
-
-# string representation of booleans
-proc yes_no {b} {
- if $b {
- set ans [__ "Yes"]
- } else {
- set ans [__ "No"]
- }
- return $ans
-}
-
-if {$::tcl_platform(os) eq "Darwin"} {
- # avoid warnings 'tar: Failed to set default locale'
- set ::env(LC_ALL) "en_US.UTF-8"
-}
-
-### fonts ###
-
-# no bold text for messages; `userDefault' indicates priority
-option add *Dialog.msg.font TkDefaultFont userDefault
-
-# normal size bold
-font create bfont {*}[font configure TkDefaultFont]
-font configure bfont -weight bold
-# larger, not bold: lfont
-font create lfont {*}[font configure TkDefaultFont]
-font configure lfont -size [expr {round(1.2 * [font actual lfont -size])}]
-# larger and bold
-font create hfont {*}[font configure lfont]
-font configure hfont -weight bold
-# extra large and bold
-font create titlefont {*}[font configure TkDefaultFont]
-font configure titlefont -weight bold \
- -size [expr {round(1.5 * [font actual titlefont -size])}]
-
-## italicized items; not used
-#font create it_font {*}[font configure TkDefaultFont]
-#font configure it_font -slant italic
-
-# width of '0', as a very rough estimate of average character width
-# assume height == width*2
-set ::cw [font measure TkDefaultFont "0"]
-
-# default foreground color and disabled foreground color
-# may not be black in e.g. dark color schemes
-set blk [ttk::style lookup TButton -foreground]
-set gry [ttk::style lookup TButton -foreground disabled]
-
-# 'default' padding
-
-proc ppack {wdg args} { ; # pack command with padding
- pack $wdg {*}$args -padx 3 -pady 3
-}
-
-proc pgrid {wdg args} { ; # grid command with padding
- grid $wdg {*}$args -padx 3 -pady 3
-}
-
-# unicode symbols as fake checkboxes in ttk::treeview widgets
-
-proc mark_sym {mrk} {
- if {$::tcl_platform(platform) eq "windows"} {
- # under windows, these look slightly better than
- # the non-windows selections
- if $mrk {
- return "\u25C9" ; # 'fisheye'
- } else {
- return "\u25CB" ; # 'white circle'
- }
- } else {
- if $mrk {
- return "\u25A3" ; # 'white square containing black small square'
- } else {
- return "\u25A1" ; # 'white square'
- }
- }
-} ; # mark_sym
-
-# for help output
-set ::env(NOPERLDOC) 1
-
-##### dialog support #####
-
-# for example code, look at dialog.tcl, part of Tk itself
-
-# global variable for dialog return value, in case the outcome
-# must be handled by the caller rather than by the dialog itself:
-set ::dialog_ans {}
-
-# start new toplevel with settings appropriate for a dialog
-proc create_dlg {wnd {p .}} {
- unset -nocomplain ::dialog_ans
- catch {destroy $wnd} ; # no error if it does not exist
- toplevel $wnd -class Dialog
- wm withdraw $wnd
- if [winfo viewable $p] {wm transient $wnd $p}
- if $::plain_unix {wm attributes $wnd -type dialog}
- wm protocol $wnd WM_DELETE_WINDOW {destroy $wnd}
-}
-
-# Place a dialog centered wrt its parent.
-# If its geometry is somehow not yet available,
-# its upperleft corner will be centered.
-
-proc place_dlg {wnd {p "."}} {
- set g [wm geometry $p]
- scan $g "%dx%d+%d+%d" pw ph px py
- set hcenter [expr {$px + $pw / 2}]
- set vcenter [expr {$py + $ph / 2}]
- set g [wm geometry $wnd]
- set wh [winfo reqheight $wnd]
- set ww [winfo reqwidth $wnd]
- set wx [expr {$hcenter - $ww / 2}]
- if {$wx < 0} { set wx 0}
- set wy [expr {$vcenter - $wh / 2}]
- if {$wy < 0} { set wy 0}
- wm geometry $wnd [format "+%d+%d" $wx $wy]
- wm state $wnd normal
- wm attributes $wnd -topmost
- raise $wnd $p
- tkwait visibility $wnd
- focus $wnd
- grab set $wnd
-} ; # place_dlg
-
-proc end_dlg {ans wnd} {
- set ::dialog_ans $ans
- set p [winfo parent $wnd]
- if {$p eq ""} {set p "."}
- raise $p
- destroy $wnd
-} ; # end_dlg
-
-##### directories #####
-
-# slash flipping
-proc forward_slashify {s} {
- regsub -all {\\} $s {/} r
- return $r
-}
-proc native_slashify {s} {
- if {$::tcl_platform(platform) eq "windows"} {
- regsub -all {/} $s {\\} r
- } else {
- regsub -all {\\} $s {/} r
- }
- return $r
-}
-
-# unix: choose_dir replacing native directory browser
-
-if {$::tcl_platform(platform) eq "unix"} {
-
- # Based on the tcl/tk widget demo.
- # Also for MacOS, because we want to see /usr.
- # For windows, the native browser widget is better.
-
- ## Code to populate a single directory node
- proc populateTree {tree node} {
- if {[$tree set $node type] ne "directory"} {
- set type [$tree set $node type]
- return
- }
- $tree delete [$tree children $node]
- foreach f [lsort [glob -nocomplain -directory $node *]] {
- set type [file type $f]
- if {$type eq "directory"} {
- $tree insert $node end \
- -id $f -text [file tail $f] -values [list $type]
- # Need at least one child to make this node openable,
- # will be deleted when actually populating this node
- $tree insert $f 0 -text "dummy"
- }
- }
- # Stop this code from rerunning on the current node
- $tree set $node type processedDirectory
- }
-
- proc choose_dir {initdir {parent .}} {
-
- create_dlg .browser $parent
- wm title .browser [__ "Browse..."]
-
- # wallpaper
- pack [ttk::frame .browser.bg -padding 3] -fill both -expand 1
- ## Create the tree and set it up
- pack [ttk::frame .browser.fr0] -in .browser.bg -fill both -expand 1
- set tree [ttk::treeview .browser.tree \
- -columns {type} -displaycolumns {} -selectmode browse \
- -yscroll ".browser.vsb set"]
- .browser.tree column 0 -minwidth 500 -stretch 0
- ttk::scrollbar .browser.vsb -orient vertical -command "$tree yview"
- # hor. scrolling does not work, but toplevel and widget are resizable
- $tree heading \#0 -text "/"
- $tree insert {} end -id "/" -text "/" -values [list "directory"]
-
- populateTree $tree "/"
- bind $tree <<TreeviewOpen>> {
- populateTree %W [%W focus]
- }
- bind $tree <ButtonRelease-1> {
- .browser.tree heading \#0 -text [%W focus]
- }
-
- ## Arrange the tree and its scrollbar in the toplevel
- # horizontal scrolling does not work.
- # possible solution: very wide treeview in smaller paned window
- # (may as well use pack in the absence of a horizontal scrollbar)
- grid $tree .browser.vsb -sticky nsew -in .browser.fr0
- grid columnconfigure .browser.fr0 0 -weight 1
- grid rowconfigure .browser.fr0 0 -weight 1
-
- # ok and cancel buttons
- pack [ttk::frame .browser.fr1] -in .browser.bg -fill x -expand 1
- ppack [ttk::button .browser.ok -text [__ "Ok"]] \
- -in .browser.fr1 -side right
- ppack [ttk::button .browser.cancel -text [__ "Cancel"]] \
- -in .browser.fr1 -side right
- .browser.ok configure -command {
- set ::dialog_ans [.browser.tree focus]
- destroy .browser
- }
- .browser.cancel configure -command {
- set ::dialog_ans ""
- destroy .browser
- }
- unset -nocomplain ::dialog_ans
-
- # navigate tree to $initdir
- set chosenDir {}
- foreach d [file split [file normalize $initdir]] {
- set nextdir [file join $chosenDir $d]
- if [file isdirectory $nextdir] {
- if {! [$tree exists $nextdir]} {
- $tree insert $chosenDir end -id $nextdir \
- -text $d -values [list "directory"]
- }
- populateTree $tree $nextdir
- set chosenDir $nextdir
- } else {
- break
- }
- }
- $tree see $chosenDir
- $tree selection set [list $chosenDir]
- $tree focus $chosenDir
- $tree heading \#0 -text $chosenDir
-
- place_dlg .browser $parent
- tkwait window .browser
- return $::dialog_ans
- }; # choose_dir
-
-}; # if unix
-
-proc browse4dir {inidir {parent .}} {
- if {$::tcl_platform(platform) eq "unix"} {
- return [choose_dir $inidir $parent]
- } else {
- return [tk_chooseDirectory \
- -initialdir $inidir -title [__ "Select or type"] -parent $parent]
- }
-} ; # browse4dir
-
-# browse for a directory and store in entry- or label widget $w
-proc dirbrowser2widget {w} {
- set wclass [winfo class $w]
- if {$wclass eq "Entry" || $wclass eq "TEntry"} {
- set is_entry 1
- } elseif {$wclass eq "Label" || $wclass eq "TLabel"} {
- set is_entry 0
- } else {
- err_exit "browse2widget invoked with unsupported widget class $wclass"
- }
- if $is_entry {
- set retval [$w get]
- } else {
- set retval [$w cget -text]
- }
- set retval [browse4dir $retval [winfo parent $w]]
- if {$retval eq ""} {
- return 0
- } else {
- if {$wclass eq "Entry" || $wclass eq "TEntry"} {
- $w delete 0 end
- $w insert 0 $retval
- } else {
- $w configure -text $retval
- }
- return 1
- }
-}
diff --git a/Master/tlpkg/installer/install-tl-gui.tcl b/Master/tlpkg/installer/install-tl-gui.tcl
index 07ea07954a5..975b8bad4df 100755
--- a/Master/tlpkg/installer/install-tl-gui.tcl
+++ b/Master/tlpkg/installer/install-tl-gui.tcl
@@ -45,7 +45,7 @@ set ::instroot [file normalize [info script]]
set ::instroot [file dirname [file dirname [file dirname $::instroot]]]
# declarations and procs shared with tlshell.tcl
-source [file join $::instroot "tlpkg" "TeXLive" "tltcl.tcl"]
+source [file join $::instroot "tlpkg" "tltcl" "tltcl.tcl"]
### initialize some globals ###
@@ -1512,9 +1512,22 @@ proc main_prog {} {
wm title . [__ "TeX Live Installer"]
make_splash
- # start install-tl-[tcl] via a pipe
+ # start install-tl-[tcl] via a pipe.
+ # the command must be a string, not a list.
+ # therefore, arguments with spaces must be quoted.
+ # although we build the command at first as a list,
+ # it will be joined into a string at a second step
set cmd [list ${::perlbin} "${::instroot}/install-tl" \
"-from_ext_gui" {*}$::argv]
+ set i 0
+ while {$i<[llength $cmd]} {
+ set c [lindex $cmd $i]
+ if {[string first " " $c] >= 0} {
+ lset cmd $i "\"$c\""
+ }
+ incr i
+ }
+ unset i
show_time "opening pipe"
if [catch {open "|[join $cmd " "] 2>@1" r+} ::inst] {
# "2>@1" ok under Windows >= XP
diff --git a/Master/tlpkg/installer/install-tl-windows.cmd b/Master/tlpkg/installer/install-tl-windows.cmd
deleted file mode 100644
index ca5677d0241..00000000000
--- a/Master/tlpkg/installer/install-tl-windows.cmd
+++ /dev/null
@@ -1,181 +0,0 @@
-@echo off
-rem $Id: install-tl.bat 30369 2018-03-11 13:01:27Z siepo $
-rem Wrapper script to set up environment for installer
-rem
-rem Public domain.
-rem Originally written 2009 by Tomasz M. Trzeciak.
-
-rem Localize environment changes
-setlocal enableextensions enabledelayedexpansion
-
-rem check for version later than vista
-for /f "usebackq tokens=2 delims=[]" %%I in (`ver`) do set ver_str=%%I
-set ver_str=%ver_str:* =%
-rem windows 9x, 2000, xp won't work, vista unsupported but may work
-if %ver_str:~,2% == 4. goto tooold
-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.
-pause
-)
-
-rem version of external perl, if any
-set extperl=0
-for /f "usebackq tokens=2 delims='" %%a in (`perl -V:version 2^>NUL`) do (
- set extperl=%%a
-)
-
-rem set instroot before %0 gets overwritten during argument processing
-set instroot=%~dp0
-
-rem while this file resides in tlpkg/installer:
-rem alternately remove final backslash and filename part
-rem to arrive at grandparent
-rem retain final backslash
-set instroot=%instroot:~,-1%
-for %%J in (%instroot%) do set instroot=%%~dpJ
-set instroot=%instroot:~,-1%
-for %%J in (%instroot%) do set instroot=%%~dpJ
-
-set notcl=no
-set tcl=yes
-set args=
-goto rebuildargs
-
-rem check for a gui argument
-rem handle it here and do not pass it on to perl or tcl.
-rem cmd.exe converts '=' to a space:
-rem '-parameter=value' becomes '-parameter value': two arguments
-
-rem code block for gui argument
-:dogui
-if x%1 == x (
-set tcl=yes
-goto rebuildargs
-)
-if %1 == text (
-set tcl=no
-shift
-goto rebuildargs
-)
-if %1 == wizard (
-set tcl=yes
-shift
-goto rebuildargs
-)
-if %1 == perltk (
-set tcl=yes
-shift
-goto rebuildargs
-)
-if %1 == expert (
-set tcl=yes
-shift
-goto rebuildargs
-)
-if %1 == tcl (
-set tcl=yes
-shift
-goto rebuildargs
-)
-
-rem loop for argument scanning
-:rebuildargs
-shift
-if x%0 == x goto nomoreargs
-set p=%0
-if %p% == -print-platform set tcl=no
-if %p% == --print-platform set tcl=no
-if %p% == -version set tcl=no
-if %p% == --version set tcl=no
-if %p% == -no-gui (
-set notcl=yes
-goto rebuildargs
-)
-if %p% == --no-gui (
-set notcl=yes
-goto rebuildargs
-)
-if %p% == -gui goto dogui
-if %p% == --gui goto dogui
-
-rem not a gui argument: copy to args string
-if "%args%" == "" (
-set args=%p%
-) else (
-set args=%args% %p%
-)
-goto rebuildargs
-:nomoreargs
-
-set p=
-if %notcl% == yes set tcl=no
-
-rem removed: locale detection via registry; leave to tcl msgcat
-
-rem Check for tex directories on path and remove them.
-rem Need to remove any double quotes from path
-set path=%path:"=%
-rem Break search path into dir list and rebuild w/o tex dirs.
-set path="%path:;=" "%"
-set newpath=
-for /d %%I in (%path%) do (
-set ii=%%I
-set ii=!ii:"=!
-if not exist !ii!\pdftex.exe (
-if not exist !ii!pdftex.exe (
-set newpath=!newpath!;!ii!
-)
-)
-)
-set ii=
-path %newpath%
-if "%path:~,1%"==";" set path=%path:~1%
-rem Use TL Perl
-path=%instroot%tlpkg\tlperl\bin;%path%
-set PERL5LIB=%instroot%tlpkg\tlperl\lib
-rem for now, assume tcl/tk is on path
-
-rem Clean environment from other Perl variables
-set PERL5OPT=
-set PERLIO=
-set PERLIO_DEBUG=
-set PERLLIB=
-set PERL5DB=
-set PERL5DB_THREADED=
-set PERL5SHELL=
-set PERL_ALLOW_NON_IFS_LSP=
-set PERL_DEBUG_MSTATS=
-set PERL_DESTRUCT_LEVEL=
-set PERL_DL_NONLAZY=
-set PERL_ENCODING=
-set PERL_HASH_SEED=
-set PERL_HASH_SEED_DEBUG=
-set PERL_ROOT=
-set PERL_SIGNALS=
-set PERL_UNICODE=
-set errlev=0
-
-rem Start installer
-if %tcl% == yes (
-rem echo wish "%instroot%tlpkg\installer\install-tl-gui.tcl" -- %args%
-rem pause
-wish "%instroot%tlpkg\installer\install-tl-gui.tcl" -- %args%
-) else (
-rem echo perl "%instroot%install-tl" %args% -no-gui
-rem pause
-perl "%instroot%install-tl" %args% -no-gui
-)
-
-rem The nsis installer will need this:
-if errorlevel 1 set errlev=1
-goto eoff
-
-:tooold
-echo TeX Live does not run on this Windows version.
-echo TeX Live is supported on Windows 7 and later.
-goto eoff
-
-:eoff
-endlocal
diff --git a/Master/tlpkg/installer/install-tl.sh b/Master/tlpkg/installer/install-tl.sh
deleted file mode 100755
index 5dc1b2da7bd..00000000000
--- a/Master/tlpkg/installer/install-tl.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/sh
-
-# default: tcl gui or not
-if test `uname -s` = Darwin; then
- tcl=yes
-else
- tcl=no
-fi
-# are there reasons not to use the tcl gui?
-notcl=no
-
-unset wait_for_gui
-unset gui_set
-
-# We need "$@" syntax because some parameters may contain spaces.
-# In order to make use of this syntax we must pass along ALL parameters.
-for p in "$@"; do
- # TODO: sanitize $p; abort if necessary
- case $p in
- -tcl | --tcl)
- if test $gui_set; then echo Gui set more than once; exit 1; fi
- gui_set=1
- unset wait_for_gui
- tcl=yes
- ;;
- -print-platform | --print-platform | -version | --version)
- unset wait_for_gui
- notcl=yes
- ;;
- -gui | --gui)
- if test $gui_set; then echo Gui set more than once; exit 1; fi
- gui_set=1
- tcl=yes
- wait_for_gui=1
- ;;
- --gui=* | -gui=*)
- if test $gui_set; then echo Gui set more than once; exit 1; fi
- gui_set=1
- if test $p = -gui=text -o $p = --gui=text; then
- tcl=no
- else
- tcl=yes
- fi
- unset wait_for_gui
- ;;
- -no-gui | --no-gui)
- unset wait_for_gui
- notcl=yes
- ;;
- *)
- if test $wait_for_gui; then
- if test $p = text; then
- tcl=no
- else
- tcl=yes
- fi
- unset wait_for_gui
- fi
- ;;
- esac
-done
-if test $notcl = yes; then
- tcl=no
-fi
-
-# silence perl locale warnings
-PERL_BADLANG=0
-export PERL_BADLANG
-
-# We can safely pass all original parameters to perl:
-# In install-tl[.pl], from_ext_gui will overrule the gui parameter.
-# The lang parameter will be handled by tcl and not come into play in perl
-
-if test "$tcl" = "yes"; then
- wish `dirname $0`/install-tl-gui.tcl -- "$@" &
-else
- perl `dirname $0`/../../install-tl "$@"
-fi