[Bf-committers] Accessing Files (new config locations, fopen wrapper, etc)

Andrea Weikert andrea at aweikert.de
Fri Apr 2 12:01:23 CEST 2010


Hi,

I've read through your documentation, a few questions still:

How are relative paths handled? I would like a way to better handle 
these than they are handled currently - I have some code for a generic 
filepath struct that I didn't have time to finish yet but it would be 
worth to look at..

The functions getSystemDir and getUserDir are added to GHOST, which adds 
a pretty nasty dependency to BLI_blenlib - have you any idea on how to 
solve this?

There are quite a few functions that need consulidation: BLI_where_am_i, 
BLI_where_is_temp, get_install_dir,  BLI_gethome_folder, 
BLI_gethome_system, BLI_gethome_user and for Windows there's also 
BLI_getInstallationDir...
In these functions you can also find the code that needs to go into the 
windows version of getSystemDir and getUSerDir.
I think that a bit of planning needs to be done how to consolidate this 
with your proposal, otherwise we'll just add more to the mess that is 
alsready there.

The last issue I have with the environment variables is that if you 
create them automatically with BLI_setenv, you will add them to any 
computer where you fun Blender for example form a usb thumbdrive even 
thought the user there might not want to have anything blender 
installed. (Unlikely I know ;) ).
I would prefer to leave a user's system untouched in this case.

I do hope we can solve these issues to be able to clean up the old 
system and user directory handling and getting to a much nicer 
installation of Blender.

Andrea

> Hi:
>
> I wrote a doc about the on going file access wrapping API and the
> effects on configuration files.
> http://wiki.blender.org/index.php/User:Gsrb3d/Accessing_Files
>
> Related documents:
> http://wiki.blender.org/index.php/Dev:2.5/Source/ResourceFilePaths
> http://wiki.blender.org/index.php/Dev:2.5/Source/Architecture/EnvironmentVariables
>
> and files:
> intern/ghost/GHOST_C-api.h
> intern/ghost/intern/GHOST_C-api.cpp
> intern/ghost/intern/GHOST_System*
> source/blender/blenlib/BLI_bfile.h
> source/blender/blenlib/intern/BLI_bfile.c
>
> GSR
>  
>   



More information about the Bf-committers mailing list