Hi,
Martin Kretzschmar wrote:
The binary UNO interface is defined in C. That means, that a CLI runtime must be accessable through a C interface. For example, the Java bridge uses the Java Native Interface.Hi,
Joachim Lingner <[EMAIL PROTECTED]> wrote:
I also heard it was written using Managed C++.
Correct.
So, this would not let
it work with other CLI implementations, such as, Mono.
Yes, Mono does not work.
C# would have
been a better choice.
Would anybody be willing to work on a C# version of UNO-CLI that could run on .NET and other CLI implementations, such as, Mono?
I'm looking at UNO-CLI wrt. Mono now. I don't have much UNO internals knowledge yet, but I know how to build OOo ;-), have written some patches for ooo-build and small C++ programs (and even smaller Python programs) that use UNO.
If I read the code correctly, a pure C# version of UNO-CLI is not possible, because the bridge has to have C linkage.
That code would
The CLI-UNO bridge depends on the capability of the C++ compiler to produced mixed code. That is, the library contains native code and managed code. This cannot be simply devided.somehow link to the runtime which is not portable at all (IIUC; my CLR knowledge is not that great either).
This would <
allow it to work on Linux, Windows, Mac OS X, etc...
That would be great. Good luck.
If you'd rewrite UNO-CLI as portable as possible, where would you make the managed/native split? (I'm just trying to have you do my homework ;-)
As far as I know, Mono does not provide such a C++ compiler. So you need to look for a way to make C code speak to CLI code and vice versa. If you have sorted this out you should have a close look at the Java bridge, to get an understanding of how the bridge works.
It is difficult to understand how the bridges work. So you could spend quite some time over it. However, if you are serious the Java JNI bridge is a good starting point.
You must also take into account that you need to provide the UNO types as CLI types. We have a tool called climaker which does this (project cli_ure). climaker is also written in managed C++ code and uses extensively the System.Reflection.Emit classes. It is used to create assemblies containing all the UNO interfaces, Enums, etc.
Joachim
Thanks,
Martin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
