On 4/6/2017 11:03 AM, Procházka Lukáš Ing. wrote:
Hello Akira,

you mention possibility of --shell-escape at
    http://tug.org/pipermail/luatex/2017-March/006410.html.

How exactly do you mean to combine "ffi" and "--shell-escape" to work
with latest ConTeXt/LuaTeX?

(I tried (rather amateurishly) to run "context --shell-escape
WinTest.mkiv" - but it didn't help.)

context doesn't use --shell-escape (control over executables happens via the sandbox mechanism)

BTW:

WinCon.dll contains some functions to print COLORED text to the console
screen and enables some basic WinAPI functions (like capturing window
bitmap) to Lua;
I've been using especially colored printing in combination with ConTeXt
("warnings" in magenta, "errors" in red...).

local ansicolor = {
    r = function(s)
        return "" .. s ..""
    end,
    g = function(s)
        return "" .. s ..""
    end,
    b = function(s)
        return "" .. s ..""
    end,
    c = function(s)
        return "" .. s ..""
    end,
    m = function(s)
        return "" .. s ..""
    end,
    y = function(s)
        return "" .. s ..""
    end
}

local formatters = string.formatters

utilities.strings.formatters.add(formatters, "cr", [[cr(%s)]], { cr = ansicolor.r }) utilities.strings.formatters.add(formatters, "cg", [[cg(%s)]], { cg = ansicolor.g }) utilities.strings.formatters.add(formatters, "cb", [[cb(%s)]], { cb = ansicolor.b }) utilities.strings.formatters.add(formatters, "cc", [[cc(%s)]], { cc = ansicolor.c }) utilities.strings.formatters.add(formatters, "cm", [[cm(%s)]], { cm = ansicolor.m }) utilities.strings.formatters.add(formatters, "cy", [[cy(%s)]], { cy = ansicolor.y })

print(ansicolor.r("red"))
print(ansicolor.g("green"))
print(ansicolor.b("blue"))
print(ansicolor.c("cyan"))
print(ansicolor.m("magenta"))
print(ansicolor.y("yellow"))

logs.writer(formatters["this is in %!cr! or %!cg! or %!cb! or %s"]("red","green","blue","oeps")) logs.report("whatever","this is in %!cr! or %!cg! or %!cb! or %s","red","green","blue","oeps")

(you can also use mtxrun --ansi ....)

Any way to re-enable user DLL loading into ConTeXt, even in the future,
would be appreciated...

Best regards,

Lukas


On Thu, 06 Apr 2017 00:05:28 +0200, Akira Kakuto
<kak...@fuk.kindai.ac.jp> wrote:

I encountered problem loading WinCon.dll
(a module that I wrote and I've been using for several years)

In the new lua(jit)tex, one cannot use DLL modules.
See my mail in
http://tug.org/pipermail/luatex/2017-March/006410.html
http://tug.org/pipermail/luatex/2017-March/006413.html

Reason:
I could not build usable binaries for the new sources by
linking dynamically lua-5.2.4 or luajit.
Thus I changed to link lua-5.2.4 etc. statically.

Best,
Akira

___________________________________________________________________________________

If your question is of interest to others as well, please add an entry
to the Wiki!

maillist : ntg-context@ntg.nl /
http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________





--

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to