[Mono-dev] Installers and relative paths

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


Wade,

> 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:

http://bugzilla.ximian.com/show_bug.cgi?id=76529

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.

Rob




More information about the Mono-devel-list mailing list