texlive[51550] Master: runscript GUI error messages with vbscript

commits+siepo at tug.org commits+siepo at tug.org
Thu Jul 4 20:48:23 CEST 2019


Revision: 51550
          http://tug.org/svn/texlive?view=revision&revision=51550
Author:   siepo
Date:     2019-07-04 20:48:23 +0200 (Thu, 04 Jul 2019)
Log Message:
-----------
runscript GUI error messages with vbscript rather than tcl

Modified Paths:
--------------
    trunk/Master/bin/win32/runscript.tlu

Added Paths:
-----------
    trunk/Master/texmf-dist/scripts/texlive/tl-errmess.vbs

Modified: trunk/Master/bin/win32/runscript.tlu
===================================================================
--- trunk/Master/bin/win32/runscript.tlu	2019-07-03 23:53:33 UTC (rev 51549)
+++ trunk/Master/bin/win32/runscript.tlu	2019-07-04 18:48:23 UTC (rev 51550)
@@ -285,8 +285,13 @@
 
 local function show_error(msg)
   if guimode then
+    local err_cmd
     os.setenv('RUNSCRIPT_ERROR_MESSAGE', msg)
-    if lfs.isfile(TEXDIR..'/tlpkg/tltcl/tclkit.exe') and
+    local errmess_path = TEXDIR .. '/texmf-dist/scripts/texlive/tl-errmess.vbs'
+    local err_cmd = {"wscript", errmess_path:gsub('/','\\')}
+    if lfs.isfile(errmess_path) then
+      os.spawn(err_cmd)
+    elseif lfs.isfile(TEXDIR..'/tlpkg/tltcl/tclkit.exe') and
         lfs.isfile(TEXDIR..'/tlpkg/tltcl/gui_err.tcl') then
       os.spawn{TEXDIR..'/tlpkg/tltcl/tclkit.exe',
           TEXDIR..'/tlpkg/tltcl/gui_err.tcl'}

Added: trunk/Master/texmf-dist/scripts/texlive/tl-errmess.vbs
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tl-errmess.vbs	                        (rev 0)
+++ trunk/Master/texmf-dist/scripts/texlive/tl-errmess.vbs	2019-07-04 18:48:23 UTC (rev 51550)
@@ -0,0 +1,7 @@
+option explicit
+
+Dim wsh, envi
+
+Set wsh = wscript.CreateObject("wscript.shell")
+Set envi = wsh.environment("PROCESS")
+MsgBox envi("RUNSCRIPT_ERROR_MESSAGE"), vbcritical, "Error"
\ No newline at end of file



More information about the tex-live-commits mailing list