Re: [AD] Allegro 4.3 file location API

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


On Tue, Nov 15, 2005, Dustin Dettmer wrote:
> --- Peter Hull wrote:
> > SYSTEM_SETTINGS -> /usr/local/share/allegro/
> > APP_RESOURCES -> /usr/local/share/${APP_ID}/
> > USER_SETTINGS -> ${HOME}/.allegro/$(APP_ID}/

   I think ${HOME}/.${APP_ID} would make more sense. Subdirectories are
painful to spot and when one looks for the settings of a given app, one
should not have to think of .allegro.

> >   On Windows: (need to check this, anyway there are
> > W32 Shell API 
> > functions to get these)
> > SYSTEM_SETTINGS -> c:\documents and settings\all
> > users\application 
> 
> I think this changes durasiticaly from version to
> version.  Sometimes you want it in
> c:\winnt\application data or other obscure places. 
> Might need to have some code that checks the version
> and then checks the appropriate environment variable
> for that version.

   Yes. The proper way to do that is probably to dynamically open
SHFolder.dll and call its SHGetFolderPathA method with CSIDL_APPDATA (or
maybe CSIDL_PROFILE) as an argument.

Just my $0.02,
-- 
Sam.




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