From: Hans Hagen <pragma@wxs.nl>
To: ntg-context@ntg.nl
Subject: Re: Problem loading a DLL with the latest Ctx beta
Date: Thu, 6 Apr 2017 13:54:17 +0200 [thread overview]
Message-ID: <4d6c98be-1e9c-a95e-5ef0-3274032c9a8c@wxs.nl> (raw)
In-Reply-To: <op.yx9ngrw162epfj@lprx>
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 "^[[0;31m" .. s .."^[[0;1m"
end,
g = function(s)
return "^[[0;32m" .. s .."^[[0;1m"
end,
b = function(s)
return "^[[0;34m" .. s .."^[[0;1m"
end,
c = function(s)
return "^[[0;36m" .. s .."^[[0;1m"
end,
m = function(s)
return "^[[0;35m" .. s .."^[[0;1m"
end,
y = function(s)
return "^[[0;33m" .. s .."^[[0;1m"
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
> <kakuto@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
___________________________________________________________________________________
next prev parent reply other threads:[~2017-04-06 11:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-05 22:05 Akira Kakuto
2017-04-06 9:03 ` Procházka Lukáš Ing.
2017-04-06 11:54 ` Hans Hagen [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-04-08 22:23 Akira Kakuto
2017-04-11 7:04 ` Procházka Lukáš Ing.
2017-04-18 13:52 ` Procházka Lukáš Ing.
2017-04-06 10:47 Akira Kakuto
2017-04-05 12:29 Procházka Lukáš Ing.
2017-04-05 13:06 ` Hans Hagen
2017-04-05 14:12 ` Procházka Lukáš Ing.
2017-04-05 15:02 ` Hans Hagen
2017-04-05 15:49 ` Procházka Lukáš Ing.
2017-04-05 19:42 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4d6c98be-1e9c-a95e-5ef0-3274032c9a8c@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).