[Bf-funboard] Support for more standard directory structure on UN*X installs

Ted Schundler tschundler at gmail.com
Sun Nov 7 20:08:03 CET 2004


So I believe this has been brought up before, but without much conclusion.

Abstract:

I think Blender should look in $HOME/.blender, $EXEPATH/.blender _and_
$EXEPATH/../libexec/blender as this makes it work more neatly for
installs on UN*X type OSes.

Details:

For blender, it's easy for anyone to download a build from blender.org
and untar/gzip it and run. That's very nice. But a lot of UN*X users
get their programs for their OS's port collections, as this is usually
an easy way to stay up to date. Furthermore, for users of OSes like
FreeBSD, the application is compiled for you, which is desireable over
pre-built binaries because a properly written port will use your
system settings for CPU-specific optimizations, without the user
having to take time out to better understand the quirks of installing
that application just to get it optimized right.

However, said OSes have standard installation directories and
heirarchies that they preffer to be used. The standard is that there
is a $PREFIX and the binary goes in $PREFIX/bin, support files like
everything in .blender would go in $PREFIX/libexec/(appname) So it's
impossible to _properly_ install Blender without some extra support
scripts and extra directories.

So for most UN*X apps, the $PREFIX can be anything and the app will
have to still work. Basically the binary will look in its directory
../libexec/. In Bender's case, this would mean instead of looking in
$HOME/.blender and $EXEPATH/.blender it will also look in
$EXEPATH/../libexec/blender (note the lack of a dot in front of the
blender. It's appropriate for $HOME/.blender but not here).

This will work on ANY OS, even if it doesn't structure its directories
like this because if the directory doesn't exist, it just doesn't use
it. Basically when looking for files, blender should look for files in
order, starting with $HOME/.blender if it isn't there, then try
$EXEPATH/../libexec/blender, and if not there try $EXEPATH/.blender.
That way the files in $HOME/.blender take priority, as they should. An
exception would be the scripts directory, which would have to be
merged. I'd imagine in thast case, it would make sense to start with
$HOME/.blender and then go on $EXEPATH directories, only adding
scripts that don't conflict with ones loaded already.

So, operating like this, it would still work out of the box, and on
all systems that it does now. It would just also install neatly on
UN*X systems.


Ted


More information about the Bf-funboard mailing list