[Mono-list] building the embed test for windows ( before Re:
Mono Release 0.15 Binaries for Win32
Thu, 29 Aug 2002 08:28:57 -0400
> C --> game engine (sound, render, etc..), main .exe (quake.exe)
> C# --> game logic ( game rules, phisic of entitys, etc.. ), user .dll ( progsdat.dll )
> runtime mono + engine + user mods (c#) + free medias = free games
I am doing something very similar to this...well, exactly like this.
However, instead of building mono directly into my application, I
have a "bootloader" app that execve()'s the mono executable. So the
user enters a command like:
> mygame.exe mymod || ./mygame mymod
The 'mygame' executable then...
1) tries to run 'mymod' directly: execv("mymod", argv); If the app
is running on windows and MS .NET is installed, or if it's
running on Linux and the user has registered Mono or P.NET with
the kernel, this will succeed, else...
2) Try to run 'mono mymod', using the system search path. If mono
is installed on the system, this will succeed, else...
3) Try to launch mono from a special directory, I use "runtime",
so 'runtime/mono mymod'.
I highly recommend this approach. I can ship a version of mono with
my app, but it will only get used if there is not a newer version
already installed on the system. The user can upgrade their runtime
without having to upgrade my app. And when .NET becomes ubiquitous,
as I believe it will, I can just remove mono from my install.
> * For the C# I have not problem, users can download mono and build is .dll file without problem.
> * For the engine, I have not problem, I can build from gcc friendly sources or wait something
> ready to work with VC++ friendly sources. The problem is...
> ..I need <mono/jit/jit.h> compiled for windows. I have failed to build mono with the
> latest cygwin (no glib2). I have installed the latest mingw, may help? ( I dont know how to
> compile mono with mingw ).
> What I need to build the embed test in windows?
> How I can do this?
> Miguel, Sergei, Thanks for the help.
> - - -
> S> Again this is probably a more specific version of the same question, but here is some
> S> info about running VC++ binaries compiled for CIL target under Mono.
> S> It's possible, but requires a couple of extra things:
> S> * Micorosoft.VisualC.dll - some attributes and custom mods used by VC++
> S> (not yet in CVS, but included in my Win32 binary build);
> S> * System.Runtime.CompilerServices.CallConv* classes, custom mods (same here);
> S> Until recently there was a tiny bug in custom mods reader, so Mono was entering infinite-loop
> S> when loading binaries produced by VC++, this was the main showstopper and it's already fixed.
> S> For some reason it's necessary to disassemble those binaries, then assemble them again,
> S> Mono still refuses to load original binaries (I will look into this issue later).
> S> Also, it's necessary to use appropriate compiler switches to ensure that there is no native
> S> code in the resulting assemblies, and entry point is set to IL code (for EXEs).
> S> All in all, it's already possible to compile C++ code with VisualC compiler and then run
> S> the binary on Linux under Mono. This is very nice, IMO :-)
> S> Sergey
> S> ----- Original Message -----
> S> From: "Miguel de Icaza" <firstname.lastname@example.org>
> S> To: "tei" <email@example.com>
> S> Cc: <firstname.lastname@example.org>
> S> Sent: Wednesday, August 28, 2002 7:09 PM
> S> Subject: Re: [Mono-list] Re: Mono Release 0.15 Binaries for Win32
>>>>And, is this supported for other compilers?
>>>Maybe, as long as they generate CLI code and as long as we do not have
>>>>Will be posible to compile apps with embed stuff with MSVC++?
>>>I have not tested any C++ code, but I would certainly appreciate some
>>>samples running on Mono.
>>>>How I can make OpenGL apps with C#?
>>>Use one of the GL bindings (Mark's are on CVS and aim for more
>>>completeness, or you can try the more mature CSGL).
> Mono-list maillist - Monoemail@example.com