[tex-live] Hints about checking for win32 compatibility for fragmaster perl script

T T t34www at googlemail.com
Sun Feb 13 13:05:10 CET 2011


On 11 February 2011 22:42, Reinhard Kotucha <reinhard.kotucha at web.de> wrote:
> On 11 February 2011 Agustin Martin wrote:
>  >
>  > For miktex, something similar can be done by user, besides installing
>  > a real perl. A gswin32c wrapper to mgs.exe may help. Suggestions for
>  > robust and portable gs selection code are of course welcome.

In one of my utilities I simply search PATH for whatever found first:
gswin32c.exe or mgs.exe, and error out when nothing found.

>  > There is another potential problem under miktex, fragmaster uses
>  > epstopdf (indeed borrowed gs selection code from it) perl script.
>  > However, miktex seems to ship a different epstopdf written by
>  > Christian Schenk in C++. Hope they are syntax compatible.
>
> Hi Agustin,
> it claims so, at least:
>
> /* This program reimplements the epstopdf Perl script written by
>   Sebastian Rahtz. */
>
> Since you only need --outfile, I don't expect problems.  This option
> is supported, according to the sources in the MiKTeX svn repository.
> I don't know whether Christian's option parser is as sloppy as Perl's
> getopt::long regarding single or double hyphens, but maybe someone
> could try
>
>  epstopdf --version
>
> under MiKTeX and tell you whether it works.

epstopdf from MiKTeX and TL differ in some options, but both of them
support '--outfile'.  Long and short options are used (i.e., --help is
not the same as -help).

>  > ------------- 8< ---------------Cut here --------------------------------
>  > Some notes about using fragmaster under usual win32 distributions
>  > =================================================================
>  >
>  > TeX live:
>  > =========
>  >
>  > fragmaster is already part of TeX live and should, if fragmaster
>  > package is installed, run out-of-the-box.
>  >
>  > If your fragmaster version is outdated, try first to update it
>  > from the network using TeX live package manager.
>  >
>  > In case that does not help, you can replace fragmaster.pl shipped
>  > with TeX live (%texlive% below means e.g. C:\texlive\2009).
>  > *Never* replace "%texlive%\bin\win32\fragmaster.exe, that is just
>  > a binary wrapper to actual script. Real script is installed under
>  > "%texlive%\texmf-dist\scripts\fragmaster\fragmaster.pl". Make a
>  > backup copy of shipped script and put your replacement there.
>  > New invocations to fragmaster should run new script.
>
> If people really want to install the script manually, it's easier if
> you provide a zip file which can be extracted in a TDS tree.  People
> can then decide whether they want to extract it in TEXMFDIST,
> TEXMFLOCAL, or TEXMFHOME.  And you don't have to explain so much.

Indeed.  Moreover, please stick to TEXMFLOCAL or TEXMFHOME in the
official documentation.  TEXMFDIST tree is managed by tlmgr and not
intended for manual maintenance by users.  This is just bad practice
to give such advice in official docs.

> If you really want fragmaster to be portable, the best thing you can
> do is to re-write it in texlua.  This sounds more difficult than it
> actually is.  You obviously don't use any features of Perl which are
> not supported by texlua too, and your script isn't very complex.
>
> texlua has kpathsea built-in, hence the script could locate mgs.exe

Reinhard, are you sure texlua in MiKTeX uses kpathsea?

> itself.  texlua scripts are started by the same wrappers as Perl
> scripts in TeX Live, I suppose that the MiKTeX installer has to
> associate the extension "tlu" with the texlua binary, if it's not done
> already.
>
>  > Call fragmaster as "perl fragmaster.pl"
>
> This is only necessary if Perl isn't installed properly (copied from
> another machine instead).  If you install Perl using the installer,
> the extension ".pl" is associated with the Perl executable in the
> registry and you can call fragmaster directly without specifying the
> extension or the Perl executable, just as on Unix.

No, "executable scripts" through file associations won't work outside
command line.  Fortunately, MiKTeX automatically generates exe stubs
for perl and bat scripts after you refresh FNDB (equivalent of
mktexlsr in TL), so no need to worry about it.  Dunno about lua
scripts, but it might be the same.

Cheers,

Tomek



More information about the tex-live mailing list