[tex-live] Building pdflatex

Reinhard Kotucha reinhard.kotucha at web.de
Sun Mar 25 00:54:39 CET 2018


On 2018-03-24 at 20:46:31 +0100, Zdenek Wagner wrote:

 > latex and pdflatex executables exist on Windows only but as a
 > wrapper written in lua which calls pdftex with &formatname.

Not exactly.  The Lua wrappers are used by scripts.  pdflatex.exe is a
tiny program written in C which loads pdftex.dll and, dependent on
argv[0], the appropriate format file.  No Lua involved here.

Scripts have to be treated differently.  First of all, their locations
within the TEXMF trees and the appropriate interpreter have to be
determined.  Furthermore, Perl and Ghostscript have to be added to
PATH.  The details are explained in

  bin/win32/runscript.tlu

So we use different wrappers for TeX programs in bin/win32 and scripts
in TEXMF.  In older versions of TeX Live you could distinguish between
these wrappers by file size.  This doesn't seem to be the case anymore

$ ls -l updmap.exe pdftex.exe
-rwxr-xr-x 1 reinhard users 1536 Nov 25  2016 pdftex.exe
-rwxr-xr-x 1 reinhard users 1536 Nov 25  2016 updmap.exe

$ cmp updmap.exe pdflatex.exe
updmap.exe pdflatex.exe differ: byte 137, line 2

$ strings updmap.exe | grep '\.dll$'
runscript.dll
msvcrt.dll

$ strings pdftex.exe | grep '\.dll$'
pdftex.dll
msvcrt.dll

All the script related .exe wrappers are identical on purpose and
invoke runscript.dll which in turn executes runscript.tlu.

In order to support an additional script you have to

  copy runscript.exe mynewsript.exe

but you run into trouble if you

  copy pdftex.exe mynewsript.exe

 > On unix systems (including Mac) these are just symlinks to
 > pdftex. If you use unix system, then cd to the executable directory
 > and do:
 > 
 > ln -s pdftex latex
 > ln -s pdftex pdflatex

You just mention 2 of 263 symlinks.  You did something completely
wrong before if you have to create all of them manually.  The preferred
approach is

$ cd /path/to/svn/trunk/Build/source
$ ./Build <configure options>

The programs *and* symlinks are then in

  /path/to/svn/trunk/Build/source/inst/bin/<platform>

Regards,
  Reinhard

-- 
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------


More information about the tex-live mailing list