Re: [Mono-dev] Installers and relative paths

2005-10-24 Thread Robert Jordan

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

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Installers and relative paths

2005-10-24 Thread Miguel de Icaza
Hello,

 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.
 
 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?

Yes, Windows is set to use relative paths, while the Unix version is
not.  I think we should fix this.

They could be the same, but *typically* on a Unix system, when Mono is
integrated with the OS (prefix=/usr), the conventions are something
like this: most stuff is relative to $prefix, but configuration is
relative to /etc.

Which is why we can not guess the start location.

Maybe what we could do is have the runtime detect whether its being
executed from /usr/bin, and if so, it fallsback to /usr for most things,
and /etc for the rest.

But if the binary is not in /usr/bin/mono, then it should compute things
relative to the executable path.

Miguel.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list