texlive[71292] Master/bin/windows/runscript.tlu: Added support for

commits+siepo at tug.org commits+siepo at tug.org
Sat May 18 22:10:37 CEST 2024


Revision: 71292
          https://tug.org/svn/texlive?view=revision&revision=71292
Author:   siepo
Date:     2024-05-18 22:10:37 +0200 (Sat, 18 May 2024)
Log Message:
-----------
Added support for powershell .ps1 files

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

Modified: trunk/Master/bin/windows/runscript.tlu
===================================================================
--- trunk/Master/bin/windows/runscript.tlu	2024-05-18 15:34:42 UTC (rev 71291)
+++ trunk/Master/bin/windows/runscript.tlu	2024-05-18 20:10:37 UTC (rev 71292)
@@ -41,15 +41,16 @@
     The following script types and their file extensions are currently 
     supported and searched in that order:
     
-      Lua      (.tlu;.texlua;.lua) --  included
-      Perl     (.pl)               --  included
-      Ruby     (.rb)               --  requires installation
-      Python   (.py)               --  requires installation
-      Tcl      (.tcl)              --  included (GUI scripts only)
-      Java     (.jar)              --  requires installation
-      VBScript (.vbs)              --  part of Windows
-      JScript  (.js)               --  part of Windows
-      Batch    (.bat;.cmd)         --  part of Windows
+      Lua        (.tlu;.texlua;.lua) --  included
+      Perl       (.pl)               --  included
+      Ruby       (.rb)               --  requires installation
+      Python     (.py)               --  requires installation
+      Tcl        (.tcl)              --  included (GUI scripts only)
+      Java       (.jar)              --  requires installation
+      Powershell (.ps1)              --  part of Windows
+      VBScript   (.vbs)              --  part of Windows
+      JScript    (.js)               --  part of Windows
+      Batch      (.bat;.cmd)         --  part of Windows
     
     Finally, Unix-style extensionless scripts are searched as last and 
     the interpreter program is established based on the she-bang (#!) 
@@ -744,10 +745,11 @@
   ['.py' ] = {'python.exe'},
   ['.rb' ] = {'ruby.exe'},
   ['.tcl'] = {'tclsh.exe tclsh86.exe tclsh85.exe tclkitsh.exe'},
+  ['.ps1'] = {'powershell.exe',  '-NoLogo', '-ExecutionPolicy', 'Bypass'},
   ['.vbs'] = {'cscript.exe', '-nologo'},
 }
 if guimode then
-  -- for GUI mode wrappers we try GUI mode interpeters where possible
+  -- for GUI mode wrappers we try GUI mode interpreters where possible
   extension_map['.jar'][1] = 'javaw.exe '   .. extension_map['.jar'][1]
   extension_map['.pl' ][1] = 'wperl.exe '   .. extension_map['.pl' ][1]
   extension_map['.py' ][1] = 'pythonw.exe ' .. extension_map['.py' ][1]
@@ -754,6 +756,8 @@
   extension_map['.rb' ][1] = 'rubyw.exe '   .. extension_map['.rb' ][1]
   -- gui tcl shares no interpreters with non-gui tcl
   extension_map['.tcl'] = {'wish.exe wish86.exe wish85.exe tclkit.exe'}
+  extension_map['.ps1'] = {'powershell.exe',  '-NoLogo', '-ExecutionPolicy', 'Bypass',
+      '-WindowStyle', 'hidden'}
   extension_map['.vbs'][1] = 'wscript.exe ' .. extension_map['.vbs'][1]
 end
 extension_map['.cmd'] = extension_map['.bat']
@@ -850,7 +854,7 @@
 
 if not ARGV then
   os.setenv('TEXMF', TEXMFDIST)
-  local extlist = '.lua;.tlu;.pl;.rb;.py;.tcl;.jar;.vbs;.js;.bat;.cmd;.texlua;\0'
+  local extlist = '.lua;.tlu;.pl;.rb;.py;.tcl;.jar;.ps1;.vbs;.js;.bat;.cmd;.texlua;\0'
   local progfullname = search_path(progname, BINDIR, '.lua;.tlu;.bat;.cmd;.pl') or
                        find_texmfscript(progname, extlist)
   os.setenv('TEXMF', nil)



More information about the tex-live-commits mailing list.