Re: Relocatability of packages



I don't think you would reduce the location independence of a program by
using a gnome_locale_dir() function (provided you are dynamically linking
against libraries built on the target machine).

As it currently is, I can compile a program on one machine, and copy the
binaries (minus gnome-libs) to another computer with a different prefix
for gnome.  Most of the files will work in the new prefix, except for the
i18n message catalogs which have to be installed under the original
prefix.  By using a gnome_locale_dir() function, the catalogs could be
moved as well.

As for location independence for the gnome libraries, you can never
completely achieve this.  One way to come close would be to have a config
file in a known location (say /etc/gnome.conf), that tells where the gnome
installation is.  This way, the libraries (and their support files) could
be moved to a different location, and only that configuration file would
need changing.  As a fallback, if the config file couldn't be found,
compiled in defaults could be used.

This does have the drawback that multiple independent installations of
GNOME may get mixed up.  This drawback may outweigh the benefit for some
people (but probebly not me).

James Henstridge.

--
Email: james@daa.com.au
WWW:   http://www.daa.com.au/~james/


On 24 Sep 1998, Tom Tromey wrote:

> James> Currently, with a lot of GNOME programs, there is only one part
> James> of the program that relies on absolute paths.  That is the call
> James> to bindtextdomain, which usually passes in a directory name
> James> taken from the makefile.
> 
> James>   bindtextdomain(PACKAGE, gnome_locale_dir())
> 
> You're forgetting that the Gnome libraries use their own translation
> domain.  That means that they must be able to find their own install
> location, which might be different from the package's install
> location.
> 
> It would probably work to require the user to install the Gnome
> libraries in a fixed place, but then to let the applications be
> location-independent.  This seems yucky to me.
> 
> James> What do others think of this?
> 
> I'm generally in favor of location independence.
> 
> Tom
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]