[tex-live] TeXLive (Windows) bash script -> exe
Dan Luecking
dluecking at sbcglobal.net
Tue May 20 00:07:08 CEST 2014
On Mon May 19, 2014 at 17:06:44 CEST, Josef Kleber [josef.kleber at
gmx.de] wrote:
>What I've found so far is:
>/svn/branches/tl2013/source/texk/texlive/linked_scripts
>
>There are a lot of scripts in there like installfont-tl (bash) or
>ctanify (perl). And there seems to be indeed some kind of magic that
>turns all these scripts into an Windows exe!
The "magic" is as follows (for a known scripting language like perl):
-- One writes a script, named say myscriptname.pl
-- Place it in /scripts/myscriptdirname/ in some TEXMF directory
-- Make a copy of runscript.exe named myscriptnam.exe in
/bin/win32/ in the TeX Live tree.
Then
myscriptname [args]
(being runscript in disguise) calls runscript.dll which then calls
texlua runscript.tlu myscriptname [args]
this searches for myscriptname in /scripts/ with various known
extensions and then calls an interpreter (say perl) based on the
extension (passing it the script and its args). If no script is
found by that method, it looks for the script file with no
extension and checks for a shebang to determine the interpreter.
The help text at the top of runscript.tlu explains what
extensions are "known"
So the only effort is to write the script, there is no actual
need to "turn it into a Windows exe".
installfont-tl.exe, for some reason, is not a copy of runscript.exe.
However it seems to do something similar. However, On my windows
(which has a bash from MSYS installed) it fails with
line 104 getopt: command not found
(MSYS has getopt.awk, but apparently that's not good enough.)
Dan
Daniel H. Luecking
Department of Mathematical Sciences
Fayetteville, Arkansas
http://www-cs-faculty.stanford.edu/~knuth/iaq.html
More information about the tex-live
mailing list