[Bf-committers] Setting a default system scripts directory
michael at obberon.com
Sat Sep 19 20:39:14 CEST 2009
On Friday 18 September 2009 22:58:23 Campbell Barton wrote:
> No reply but I thought over this a little more and have a proposal for
> blender to better fit in with linux package management.
> This closely matches The Gimp, which allows system python scripts and
> user ones to coexist.
> Proposal in point form :)
> * ~/.blender stays working, existing configurations wont need to change.
> * An optional new DIR is defined for UNIX systems (not win/mac), for
> brevity will call it SYS-PATH
> * This dir could be named as follows $PREFIX/share/blender-$VERSION --
> Eg. /usr/local/share/blender-2.5
> * When the SYS-PATH directory is found it will be used as the primary
> directory for scripts, language files, icons etc. (Otherwise
> ~/.blender will be used like it is now)
> * Scrips scan SYS-PATH first (if exists) then ~/.blender, other data
> files only use one path (SYS-PATH and fall-back to ~/.blender)
> ...In most cases using data from both dirs at once is not needed, (you
> could conceivably want to access icon themes from ~/.blender &
> SYS-PATH, but don't think its so important)
> However, scripts are an exception, On a typical linux package you'd
> have blender install all data files into /usr/share/blender-2.5 and
> then when users want to add their own scripts they can copy into
> * improves out-of-box experience for users by not treating built-in
> files (eg, most of blender2.5s interface) as user settings/data.
> * Less trouble to package blender (no scripts copying data to
> ~/.blender on startup).
> * Keep support for existing "local" installs where blender can run
> without being installed.
> * Packages will install all blender data in /usr/share/blender-2.5.x,
> casual users will not create a ~/.blender, however ~/.B.blend will
> still be saved into their home dir.
> * Existing users who build and run blender dont need to change their
> * Package managers upgrading blender will remove system scripts and
> replace with new ones, ~/.blender (if exists) is untouched.
> * Use a compile time option, like ./configure --prefix="/usr/local"
> * $BLENDERPATH used like $PYTHONPATH, allow for non hard-coded
> SYS-PATH (Better for re-distribution where users dont install into
> /usr/share/.... etc. and don't copy scripts into ~/.blender). Typical
> usage this would not need setting.
> * Can implement this as opt-in to initially, later can review making it
> default. * Will add an "install" target for cmake and scons.
> - Campbell
Your proposal sounds great! I think this is really the best solution the the
problem, and I can't see any downsides. I am really looking forward to seeing
this implemented in the future.
Thanks for your support for this issue. I really appreciate you going out of
your way to make sure this gets dealt with :)
Michael Forney <michael at obberon.com>
More information about the Bf-committers