[Mono-dev] Installers and relative paths

Robert Jordan robertj at gmx.net
Mon Oct 24 16:01:13 EDT 2005


> The latest Windows installer doesn't set any environment variables in
> the wrapper scripts and batch files (MONO_PATH, etc...).  This works
> fine in finding the gac binaries.

The path to the mono assemblies is computed from
the executable's file name of the process that loads
mono.dll. See os/win32/util.cs:mono_set_rootdir.

> I've looked into doing this for the linux installer as well, and some
> programs didn't work.  gmcs worked, but mcs didn't (couldn't locate a
> hardcoded dll).
> Why would this be different on the different oses?  Is only windows set
> up to use relative paths?

Only Windows and it's not always perfect:


Relocation based on the executable's file name is not
portable under Unix. Glib is still missing this function, AFAIK.
That's probably the reason, why under Unix the path is hard coded.


More information about the Mono-devel-list mailing list