[Mono-devel-list] Re: [Gtk-sharp-list] kernel support.
Carlos Perelló Marín
17 Jun 2003 22:53:36 +0200
Content-Type: text/plain; charset=iso-8859-15
I think that the best solution is the binfmt feature with the wrapper
that exists with Debian packages at:
If you want use it with Big endian machines, you should apply a patch
It works really good and lets you use wine also, it reads the .exe file
headers and check if it's a .net executable.
This way you just execute: ./my-cool-mono-application.exe and it works
without the need of any wrapper.
El mar, 17-06-2003 a las 22:45, Jonathan Pryor escribi=F3:
> There's one problem with your proposed shell wrapper: it doesn't work
> correctly in the presence of symbolic links, since when invoking the
> symbolic link "$0" will be the name of the symbolic link, not the name
> of the *target* of the symbolic link.
> MCS has a solution, but it depends on autoconf (mono's scripts/mcs.in
> file is processed, including the full path to mcs). As such, it may be
> So, here's my attempted solution. It checks for the presence of
> symlinks, and looks up the target of the symlink (using readlink) if
> necessary, before passing off the program to mono:
> # Starts a CIL program whose name is patterned after the filename of
> # this script. The CIL program executed is "$0".exe.
> # If file is a symlink, find where it's pointing to
> if [ -L $file ] ; then
> if ! (readlink -f "$file") > /dev/null 2>&1; then
> echo `basename "$0"` ": missing required program readlink!"
> exit -1
> file=3D`readlink -f "$file"`
> exec mono "$file.exe" "$@"
> - Jon
> On Tue, 2003-06-17 at 12:51, Dag Wieers wrote:
> > On 16 Jun 2003, George Farris wrote:
> > > Does anyone know what the plans are for kernel support of mono
> > > binaries? Right now a binary mono file shows as:
> > >=20
> > > MS Windows PE 32-bit Intel 80386 console executable
> > >=20
> > > This of course, is totally unacceptable on a Linux machine. I want t=
> > > be able to run my binaries directly instead of through a shell script=
> > This issue is dear to me too.
> > The Debian Mono page indicates there is a workaround. A third binary th=
> > does a more conclusive check and then starts either mono or wine.
> > Which would mean that the kernel binfmt support has short-comings that =
> > only be overcome by doing it in userspace. My first thought is that the=
> > binfmt_misc kernel-support should be fixed to be more useful.
> > Since there will not be a good solution soon, I would propose the=20
> > following standard (and I took the liberty to add it to the Developer F=
> > page in the Wiki already).
> > The proposal is to have a shell wrapper with the same name as the .Net=20
> > binary, with the '.exe' part and would consist of the following 2 lines=
> > #!/bin/sh
> > exec mono "$0".exe $@
> > Ofcourse we could verify some things in this script (check if mono can =
> > called, if the executable exists, etc...) But I would keep it as simple=
> > possible, I've tested the output in various circumstances and the=20
> > error-output was in each case very clear about the problem.
> > Kind regards,
> > -- dag wieers, firstname.lastname@example.org, http://dag.wieers.com/ --
> > [Any errors in spelling, tact or fact are transmission errors]
> > _______________________________________________
> > Gtk-sharp-list maillist - Gtkemail@example.com
> > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> Mono-devel-list mailing list
Carlos Perell=F3 Mar=EDn
Debian GNU/Linux Sid (PowerPC)
Linux Registered User #121232
mailto:firstname.lastname@example.org || mailto:email@example.com
Valencia - Spain
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
-----END PGP SIGNATURE-----