Re: [AD] standard path updates

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On January 6, 2011, Matthew Leverton wrote:
> On Thu, Jan 6, 2011 at 10:57 PM, Thomas Fjellstrom
> 
> <tfjellstrom@xxxxxxxxxx> wrote:
> > The xdg specs[1] state you should first look in the XDG_* ENV variables,
> > then fall back to ~/.config for settings and ~/.local/share for data
> 
> Implemented and committed that. app_name must be set, else it returns
> NULL. (Docs already warn about that.) org_name is optional.
> 
> Output under Ubuntu:
> 
> RESOURCES_PATH: /home/matthew/src/allegro-5.1/build/examples/
> TEMP_PATH: /tmp/
> USER_DATA_PATH: /home/matthew/.local/share/liballeg.org/ex_get_path/
> USER_SETTINGS_PATH: /home/matthew/.config/liballeg.org/ex_get_path/
> USER_HOME_PATH: /home/matthew/
> USER_DOCUMENTS_PATH: /home/matthew/Documents/
> EXENAME_PATH: /home/matthew/src/allegro-5.1/build/examples/ex_get_path

I should have tested better. RESOURCES_PATH is incorrect, at least when the 
binary is installed in a system dir.

It decides to give: 

RESOURCES_PATH: /usr/local/bin/

It should probably give something in $XDG_DATA_DIRS, which one to pick is 
probably a bit hard... maybe which ever one contains the org_name/app_name 
dir?
 
> --
> Matthew Leverton
> 


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/