[Dev-luatex] platform specific functionality
t34www at googlemail.com
Tue Mar 16 11:31:53 CET 2010
On 16 March 2010 08:01, Élie Roux <elie.roux at telecom-bretagne.eu> wrote:
> I just thought about something: in a script we need to detect if,
> under windows, luatex is run under cygwin or not (cygwin and
> non-cygwin are the same binary for me). Currently we do something like
I'm not sure if I understand you correctly. I've just checked cygwin
binaries and they are are different from the win32 ones we ship. Do
you mean that the cygwin binaries can be run in two modes: under
cygwin and under native windows? That would be strange, but then again
I don't know enough about cygwin to tell.
> local system = io.popen("uname -s"):read("*l")
> if system then
> if system:match("^CYGWIN") then
> system = 'cygwin'
> but having os.type == 'cygwin' as a condition would be cleaner... The
> thing is the check must be done at runtime, and I don't know anything
> about the Windows API nor compilation under cygwin/mingw...
> Tomek, would you know how to patch LuaTeX to do that?
Would Taco's suggestion with os.uname() work for you?
More information about the dev-luatex