Hi All I guess one is for Taco... Hope OK to ask this here. I'd like to build MPlib as a DLL using the discussion you posted here: [reproduced below] http://www.dw.tug.org/pipermail/metapost/2010-April/001917.html (reason: to probe a bit more into the btex...etex + makempx stuff) (For this build I want to use visual C++) I've tried to run both ctangle.exe and cweave.exe on the .w sources. These exes were both built during the MPlib build. No matter what I try to do, they both fail with the errors below. From a pure DOS shell or an Mysys bash shell --- simple paths or not. Is this caused by Default CHANGEFILE is /dev/null; --- which confuses windows? Any suggestions would be great :-) Could I just use the code from the MPlib build process as output to \build\texk\web2c\ =--> Are these files identical to what you would get from running ctangle.exe or are they processed during the build process? \MPlib\build\texk\web2c\memio.c \MPlib\build\texk\web2c\mp.c \MPlib\build\texk\web2c\mpost.c \MPlib\build\texk\web2c\mpxout.c \MPlib\build\texk\web2c\psout.c \MPlib\build\texk\web2c\svgout.c Apologies for what must be quite trivial questions for you Taco but the whole Web2c paradigm is still rather alien to me so I would value your comments, as always. Warm wishes Graham ================================ $ cweave c:/mpxout.w This is CWEAVE, Version 3.64 (Web2C 2010/dev) ! Cannot open change file NUL. (l. 0) (That was a fatal error, my friend.) G:\MPlib\source\texk\web2c\mplibdir> ctangle G:\MPlib\source\texk\web2c\mplibdir\mpxout.w This is CTANGLE, Version 3.64 (Web2C 2010/dev) ! Cannot open change file NUL. (l. 0) (That was a fatal error, my friend.) ===============================================================
1) How to build MP as *.dll (win) or *.so (linux)?
Metapost consists of two components: a library and an executable driver. The library is built from am/libmplib.am, the executable from am/mplib.am. The library consists of avl.c, memio.w, mp.w, psout.w, and svgout.w, this does all the real work except the TeX connection and file searching. The binary has mpxout.w and mpost.w, and connects the library to kpathsea. There is also lmplib.c. This file creates bindings to the library component from lua, and could be used as an example. If this is too obscure for you, see manual/mplibapi.tex for the official documentation. The current build system does not support creating a dynamic library (because it is derived from the TeXLive build system which does not need that) but the general approach is fairly straightforward: run 'ctangle' on memio.w, mp.w, psout.w, and svgout.w, then compile the resulting C files + avl.c into a dynamic library using whatever methods you need for your platform.
2) I don't need an TeX-ability with MP (no texts at all). How to build MP without TeX connection (kpathsea and others)?
This is automatic if you only build the library part: when the relevant callback functions are not set, the library disables btex .. etex processing and will only be able to use files from the current working directory. Best wishes, Taco Pasted from http://www.dw.tug.org/pipermail/metapost/2010-April/001917.html
Graham Douglas wrote:
Hi All
I guess one is for Taco... Hope OK to ask this here.
I'd like to build MPlib as a DLL using the discussion you posted here: [reproduced below] http://www.dw.tug.org/pipermail/metapost/2010-April/001917.html (reason: to probe a bit more into the btex...etex + makempx stuff)
(For this build I want to use visual C++)
I've tried to run both ctangle.exe and cweave.exe on the .w sources. These exes were both built during the MPlib build. No matter what I try to do, they both fail with the errors below.
From a pure DOS shell or an Mysys bash shell --- simple paths or not.
Is this caused by Default CHANGEFILE is /dev/null; --- which confuses windows?
probably. You could create an empty existing change file, to see whether that helps.
=--> Are these files identical to what you would get from running ctangle.exe or are they processed during the build process?
Yes, these are identical so you oculd as well use those. Best wishes, Taco
<
Yes, these are identical so you oculd as well use those.
Best wishes, Taco
------------------------------
_______________________________________________ dev-luatex mailing list dev-luatex@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-luatex
End of dev-luatex Digest, Vol 52, Issue 4 *****************************************
Thanks Taco A few rather ugly hacks later... I managed to get the DLL built. Thanks again Graham
participants (2)
-
Graham Douglas
-
Taco Hoekwater