texlive[50487] Master/texmf-dist/scripts/tlshell/tlshell.tcl: Minor

commits+siepo at tug.org commits+siepo at tug.org
Wed Mar 20 22:51:54 CET 2019


Revision: 50487
          http://tug.org/svn/texlive?view=revision&revision=50487
Author:   siepo
Date:     2019-03-20 22:51:54 +0100 (Wed, 20 Mar 2019)
Log Message:
-----------
Minor fixes; for windows, advisory for command-line infrastructure update

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl

Modified: trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl
===================================================================
--- trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl	2019-03-20 21:47:21 UTC (rev 50486)
+++ trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl	2019-03-20 21:51:54 UTC (rev 50487)
@@ -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 @@
 # 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 @@
   # 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 @@
     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 @@
   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



More information about the tex-live-commits mailing list