summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf-dist/scripts/tlshell/tlshell.tcl44
1 files changed, 28 insertions, 16 deletions
diff --git a/Master/texmf-dist/scripts/tlshell/tlshell.tcl b/Master/texmf-dist/scripts/tlshell/tlshell.tcl
index 0113c25dfbe..9c2a7441ea3 100755
--- a/Master/texmf-dist/scripts/tlshell/tlshell.tcl
+++ b/Master/texmf-dist/scripts/tlshell/tlshell.tcl
@@ -1,6 +1,6 @@
#!/usr/bin/env wish
-# Copyright 2017, 2018 Siep Kroonenberg
+# Copyright 2017-2019 Siep Kroonenberg
# This file is licensed under the GNU General Public License version 2
# or any later version.
@@ -10,24 +10,28 @@ package require Tk
# security: disable send
catch {rename send {}}
-# unix: make sure TL comes first on process searchpath
-# on windows, runscript takes care of this.
+# make sure TL comes first on process searchpath
+set texbin [file dirname [file normalize [info script]]]
+set savedir [pwd]
+cd $texbin
+set texbin [pwd]
+cd $savedir
+# prepend texbin to PATH, unless it is already the _first_
+# path component
+set dirs [split $::env(PATH) ":"]
if {$::tcl_platform(platform) ne "windows"} {
- set texbin [file dirname [file normalize [info script]]]
- set savedir [pwd]
- cd $texbin
- set texbin [pwd]
- cd $savedir
- # prepend texbin to PATH, unless it is already the _first_
- # path component
- set dirs [split $::env(PATH) ":"]
if {[lindex $dirs 0] ne $texbin} {
set ::env(PATH) "${texbin}:$::env(PATH)"
}
- unset texbin
- unset savedir
- unset dirs
+} else {
+ set texbin [file nativename $texbin]
+ if {[file nativename [lindex $dirs 0]] ne $texbin} {
+ set ::env(PATH) "${texbin}:$::env(PATH)"
+ }
}
+unset texbin
+unset savedir
+unset dirs
# declarations and utilities shared with install-tl-gui.tcl
set ::instroot [exec kpsewhich -var-value=TEXMFROOT]
@@ -832,7 +836,7 @@ proc show_logs {} {
# collect pages in notebook widget
pack [ttk::notebook .tllg.logs] -in .tllg.bg -side top -fill both -expand 1
.tllg.logs add .tllg.log -text [__ "Output"]
- .tllg.logs add .tllg.err -text [__ "Errors"]
+ .tllg.logs add .tllg.err -text [__ "Other"]
if $::ddebug {
.tllg.logs add .tllg.dbg -text "Debug"
raise .tllg.dbg .tllg.logs
@@ -1512,6 +1516,13 @@ proc update_tlmgr {} {
tk_messageBox -message [__ "Nothing to do!"]
return
}
+ if {$::tcl_platform(platform) eq "windows"} {
+ set ans [tk_messageBox -type okcancel -icon info -message \
+ [string cat [__ "If update fails, try on a command-line:"] \
+ "\ntlmgr update --self\n" \
+ [__ "Use an admininstative command prompt for an admin install."]]]
+ if {$ans eq "cancel"} return
+ }
run_cmd "update --self" 1
vwait ::done_waiting
# tlmgr restarts itself automatically
@@ -2062,7 +2073,8 @@ proc populate_main {} {
ttk::label .topf.luptodate -text [__ "Unknown"] -anchor w
pgrid .topf.luptodate -row 2 -column 1 -sticky w
- ttk::label .topf.llcmd -anchor w -text [__ "Last tlmgr command:"] -anchor w
+ ttk::label .topf.llcmd -anchor w -text [__ "Last tlmgr command:"] -anchor w \
+ -wraplength [expr {60*$::cw}] -justify left
pgrid .topf.llcmd -row 3 -column 0 -sticky w
ttk::label .topf.lcmd -anchor w -textvariable ::last_cmd -anchor w
pgrid .topf.lcmd -row 3 -column 1 -sticky w