| 1 |
Copyright: |
| 2 |
|
| 3 |
The originally 'runscript' program was written by in 2009 by T.M.Trzeciak and is |
| 4 |
public domain. This derived mtxrun program is an adapted version by Hans Hagen and |
| 5 |
Luigi Scarso. |
| 6 |
|
| 7 |
Comment: |
| 8 |
|
| 9 |
In ConTeXt MkIV we have two core scripts: luatools.lua and mtxrun.lua where the |
| 10 |
second one is used to launch other scripts. The mtxrun.exe program calls luatex.exe. |
| 11 |
|
| 12 |
Normally a user will use a call like: |
| 13 |
|
| 14 |
mtxrun --script font --reload |
| 15 |
|
| 16 |
Here mtxrun is a lua script. In order to avoid the usage of a cmd file on windows this |
| 17 |
runner will start texlua directly. In TeXlive a runner is added for each cmd file but |
| 18 |
we don't want that overhead (and extra files). By using an exe we can call these |
| 19 |
scripts in batch files without the need for using call. |
| 20 |
|
| 21 |
The mtxrun.exe file can be copied to a mtxrunjit.exe file in which case luajittex.exe |
| 22 |
is called. |
| 23 |
|
| 24 |
mtxrunjit --script font --reload |
| 25 |
|
| 26 |
We also don't want to use other runners, like those that use kpse to locate the script |
| 27 |
as this is exactly what mtxrun itself is doing already. Therefore the runscript program |
| 28 |
is adapted to a more direct approach suitable for mtxrun. |
| 29 |
|
| 30 |
Compilation: |
| 31 |
|
| 32 |
with gcc (size optimized): |
| 33 |
|
| 34 |
gcc -Os -s -shared -o mtxrun.dll mtxrun_dll.c |
| 35 |
gcc -Os -s -o mtxrun.exe mtxrun_exe.c -L./ -lmtxrun |
| 36 |
|
| 37 |
with tcc (ver. 0.9.24), extra small size |
| 38 |
|
| 39 |
tcc -shared -o runscript.dll runscript_dll.c |
| 40 |
tcc -o runscript.exe runscript_exe.c runscript.def |