Re: Re: [AD] set_config_file jumping around on OS X bundles |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: Re: [AD] set_config_file jumping around on OS X bundles
- From: Matthew Leverton <meffer@xxxxxxxxxx>
- Date: Mon, 22 Aug 2005 11:48:02 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=r482OV8YOghMXeWv+pGTnCGPrioZ7wDiM/raqNk3+2o2nfHfulB6L8epyxKQHhvBiH0CyMFabPDLPZZ7eUwzoxhDEwAtDUAy1lsJZ6BrChLLrVoCE2ODNlPwpRYyGV8FAulBV9QHnJrTe5hSl/uQaQOELQzO6MlNhNvfF9j4cHU=
>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