Embedding Mono
-
- Posts: 6
- Joined: Mon Jun 01, 2009 9:19 pm
Embedding Mono
Hi, I was looking at this:
http://www.mono-project.com/Embedding_Mono
as far as I can tell this makes it so that an independent runtime is not required to run IL produced from .net languages, so I thought about the possibility of using this on the wii. Has anybody tried this already? Would it be a waste of time, etc...?
It would be great to be able to use C# on the wii.
Thanks in advance.
http://www.mono-project.com/Embedding_Mono
as far as I can tell this makes it so that an independent runtime is not required to run IL produced from .net languages, so I thought about the possibility of using this on the wii. Has anybody tried this already? Would it be a waste of time, etc...?
It would be great to be able to use C# on the wii.
Thanks in advance.
-
- Posts: 6
- Joined: Mon Jun 01, 2009 9:19 pm
Re: Embedding Mono
Well, I've been attempting to do this myself, but am a complete linux noob (I didn't want to mess around with Cygwin.), and I'm having some issues with the make file.
In the link I posted above, it says you can just use the following macros in your makefile:
CFLAGS=`pkg-config --cflags mono`
LDFLAGS=`pkg-config --libs mono`
when I try to compile it gives me the following errors:
powerpc-gekko-gcc: pkg-config: No such file or directory
powerpc-gekko-gcc: mono: No such file or directory
I'm guessing this is something related to my Path variables, can anybody give me some help on what to do here?
In the link I posted above, it says you can just use the following macros in your makefile:
CFLAGS=`pkg-config --cflags mono`
LDFLAGS=`pkg-config --libs mono`
when I try to compile it gives me the following errors:
powerpc-gekko-gcc: pkg-config: No such file or directory
powerpc-gekko-gcc: mono: No such file or directory
I'm guessing this is something related to my Path variables, can anybody give me some help on what to do here?
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Embedding Mono
You need to port the mono runtime to Wii before you can use it. This is unlikely to be done any time soon.
-
- Posts: 6
- Joined: Mon Jun 01, 2009 9:19 pm
Re: Embedding Mono
The idea of embedding mono is to remove the need for the runtime altogether. It's actually bundled with the program, which adds some overhead and bloats the program, but I'd say the trade off is worth it.
Besides which, there actually is a mono implementation for the wii, but it's available for only for commercial wii developers.
Besides which, there actually is a mono implementation for the wii, but it's available for only for commercial wii developers.
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Embedding Mono
The embedded runtime is the runtime. It's simply a static library which needs to be ported to the Wii. The version available to commercial developers is irrelevant unless someone can obtain the mono patches.
-
- Posts: 6
- Joined: Mon Jun 01, 2009 9:19 pm
Re: Embedding Mono
You are correct, the mono that gets embedded would have to be able to run on the wii. Thanks for your reply and help.
-
- Posts: 2
- Joined: Tue Jun 09, 2009 3:58 am
Re: Embedding Mono
To be honest, I do not know much about devkitPro or what it does, I just found this on a Google's group search while searching for Mono.
What I can say is the following: although Mono's port to the Wii is only available for licensed Wii developers, Mono's code has been properly isolated so that porting it to other environments is relatively easy (porting it to embedded operating systems, and non-Unix systems). This is achieved by excluding parts from Mono's build and writing replacements for some routines.
For example consider the file mono/mini/mini-posix.c. That file is used in POSIX systems, but if you do not have a POSIX system, you would replace this during build time with a different mini-FOO.c
Mono's trunk code has been ported to a few non-POSIX operating systems, so the code is known to work in this mode, it is just going to take some work.
Although you can use mkbundle, this is mostly a Unix wrapper around the actual embedding API (run mkbundle --keemtemp to see the temporary files generated).
What I can say is the following: although Mono's port to the Wii is only available for licensed Wii developers, Mono's code has been properly isolated so that porting it to other environments is relatively easy (porting it to embedded operating systems, and non-Unix systems). This is achieved by excluding parts from Mono's build and writing replacements for some routines.
For example consider the file mono/mini/mini-posix.c. That file is used in POSIX systems, but if you do not have a POSIX system, you would replace this during build time with a different mini-FOO.c
Mono's trunk code has been ported to a few non-POSIX operating systems, so the code is known to work in this mode, it is just going to take some work.
Although you can use mkbundle, this is mostly a Unix wrapper around the actual embedding API (run mkbundle --keemtemp to see the temporary files generated).
-
- Posts: 6
- Joined: Mon Jun 01, 2009 9:19 pm
Re: Embedding Mono
Wow, thanks for the reply. It's nice to see the creator of mono taking interest in the "little people"
devkitPro, specifically devkitPPC lets you target the wii for use in homebrew.
I'm not too sure whether the Wii is a POSIX system, it might even be proprietary Nintendo. Still, the fact that there is an a official mono for the wii gives me hope. I'll try compiling the Mono sources using devkit when I get some time.
As far as mkbundle goes, is it possible to bundle a program from a different platform/architecture to another. For example if I was on Linux but wanted to bundle a program for Windows, could I do that without compiling myself?
devkitPro, specifically devkitPPC lets you target the wii for use in homebrew.
I'm not too sure whether the Wii is a POSIX system, it might even be proprietary Nintendo. Still, the fact that there is an a official mono for the wii gives me hope. I'll try compiling the Mono sources using devkit when I get some time.
As far as mkbundle goes, is it possible to bundle a program from a different platform/architecture to another. For example if I was on Linux but wanted to bundle a program for Windows, could I do that without compiling myself?
-
- Posts: 2
- Joined: Tue Jun 09, 2009 3:58 am
Re: Embedding Mono
Sadly, no.
mkbundle merely does the equivalent of embedding your application in a sample C program and then links that with the libmono library. So the result is a self-contained piece of software, but it will only run on the same system that it was compiled on.
The portability layer comes at the ECMA CIL level, that is the bytecodes that are encoded in the DLL/EXE file.
mkbundle merely does the equivalent of embedding your application in a sample C program and then links that with the libmono library. So the result is a self-contained piece of software, but it will only run on the same system that it was compiled on.
The portability layer comes at the ECMA CIL level, that is the bytecodes that are encoded in the DLL/EXE file.
Who is online
Users browsing this forum: No registered users and 0 guests