[tex-live] Perl for Windows
gnwiii at gmail.com
gnwiii at gmail.com
Sat Jun 17 14:20:33 CEST 2006
On 6/16/06, Fabrice Popineau <Fabrice.Popineau at supelec.fr> wrote:
> * Reinhard Kotucha <reinhard.kotucha at web.de> writes:
> > Hi, when I install the complete TeXLive system on Windows XP, the
> > installer does not check whether there is another version of Perl
> > already installed on the system.
> Any system relying on 3rd parties programs like Ghostscript, Perl or
> whatever that are non standard (and for which sources are publicly
> available) can't rely on existing versions of these tools (versions
> installed on the client machine). The problem is that there is no way to
> check that the features you expect from these tools are provided (or in
> the best case, it is a nightmare to maintain). There are too many
> version of Perl, of GS or even of the zlib library. Moreover many of
> these tools do not publish themselves by following the MS guidelines so
> you may have to check by yourself for conflicts. It happened that
> Rational Rose (http://www.ibm.com/software/rational) came with and
> mf.exe executable ... that was found on the PATH. Other products may use
> gswin32c.exe or perl.exe or whatever.
>  _The only reliable way is to provide the version you need and to hide it
> from the rest of the system._
If you want reliability, use Cygwin or run linux in a virtual machine.
Don't forget that Win XP is now reasonably mature, while new Win32
versions are coming into play.
It isn't realistic, particularly given the difficulties of doing
development under Win32, to expect TeX to run reliably on a Win32
system chosen at random. Any tools you provide may break at any 2nd
Tuesday when MS patches another dozen security flaws. You have to
define the interfaces you need. If you say you only want Win32 system
calls, you might as well run Cygwin. If you require some relatively
basic perl, gs, etc. then you can rely on people outside the TeX
community to make sure there are versions that work despite whatever
curves MS decide to throw.
As long as there are people providing the 3rd party tools with decent
Win32 installers it is quire reasonable to take the approach: TL will
work with current versions of the 3rd party tools. If you currently
have older versions you may need to update them.
A few people will run into conflicts where a particular app insists on
a older version of some utility. There are options (virtual
machines, cygwin) for such situations so it isn't necessary for TL to
support such situations.
> > TL prepends the path/to/binaries to PATH and sets the environment
> > variable PERL5LIB accordingly.
> I may have done that in the past and I agree that it was wrong. However
> in this case you are using an old version of TL.
> > The Perl version which had been installed before TeXLive has set
> > the value of PERL5LIB somewhere else rather than in the
> > environment variables dialog box, maybe in the registry. Don't
> > know how Windos works.
> There is nothing secret in the registry. It behaves much like the
> environment, except that it is system and lan wide for any user/machine.
> It is a distributed database.
> At one point, the GS guy changed their mind in the way they were looking
> for the gs library. In the old days, they looked for GS_LIB in the
> environment, and if it were not found, they looked into the
> registry. And when they switched to the 8.x series (AFAIR), they stopped
> looking into the environment, which means they prevented people to
> locally override settings.
If you call gs in a script you can use command-line switches, so the
big problem is finding the "right" gswin32c.exe, perl.exe, etc. (some
systems have many copies).
> > It should be sufficient to add texmf*/scripts to PERL5LIB if Perl
> > is installed already.
> And cross your fingers and pray for this stuff to work. At some point,
> texlive supported the texdoctk program that needed perl + tk + the right
> extensions ... Are you sure that because you find perl.exe on the client
> machine, you will find also everything you need ? See my  point.
I use texdoctk on Win32 with Active State Perl -- the big problem is
that the database
isn't complete. I assume the tk bits are included in ASP. I do have
colleages who swore off Perl on Win32 a couple years ago because they
couldn't get it to work for ConTeXt. I get also reports from people
who can't get ghostscript batch files to work (e.g. the epstopdf
support in WinEDT). Win32 is fragile and TL can't repair badly
damaged Win32 configurations.
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia
More information about the tex-live