Re: Re: [AD] set_config_file jumping around on OS X bundles

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


>should be going - on Unix, if your game was called
/usr/local/bin/mygame, settings
>certainly shouldn't be going in /usr/local/bin, nor should they go in
some directory
>underneath c:\program files\ for Windows.
>
Under Windows 98, they should go in the local folder. Under 2000 and
beyond, it "should" go into:

C:\Documents and Settings\Matthew Leverton\Application Data\$game\

In practice most Windows games and applications still write to the
program files, so I don't think it's crucial that Allegro puts stuff
in a special config folder. Also, every application in Windows gets a
folder to put their settings in. This means Allegro would have to ask
for an application name. Just specifying a file name won't work,
because you aren't supposed write directly to the "Application Data"
folder. (At least, no program I've ever used does.) I don't there
there's currently a way to get the application name, unless you just
guess off of the executable.

>char *system_driver.get_path(int type, int name)
>name would be the name of my game, type would be one of (and what it
>would return in linux):
>AL_ALLEGRO_CONFIG "/etc/allegro.cfg"
>AL_USER_SETTINGS_PATH "~/.name"
>AL_GLOBAL_SETTINGS_PATH "/etc/name"
>AL_DATA_PATH "/usr/local/share/name" (or whatever prefix it was compiled with)
>
Would it make more sense to let the programmer define the name of his
game? like:

set_app_name("My Game");

It could be used perhaps for other things as well. Under Windows
2000+, set_config_file() could used the Application Data + app name +
config file name for the location. If one isn't specified, it could
store in the local folder. This wouldn't break backward compatibility
at all.

I don't know well that would work with other platforms though.

--
Matthew Leverton




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