Re: [AD] 5.0.0 final release plan

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


On Sun, Jan 2, 2011 at 8:14 PM, Thomas Fjellstrom
<tfjellstrom@xxxxxxxxxx> wrote:
> SYSTEM_DATA_PATH is/was intended to be where data that comes with a game is
> installed to, on installation. I'm not entirely sure what that maps to these
> days in vista/w7. It used to map to C:\Program Files\SomeGame.
>
I wouldn't argue with the concept, but I think the name is confusing.
In fact, SYSTEM_DATA_PATH *should* be program files if it's meant to
be the bundled data. But I'd call that APP_DATA_PATH, which should be
considered read-only.

I see several different useful things:

* read-only, bundled data (exe dir or OS X bundle resource dir) - APP_DATA_PATH
* loading/saving shared user data - SYSTEM_DATA/SETTINGS_PATH
* loading/saving private user data - USER_DATA/SETTINGS_PATH

Where SYSTEM means shared / global.

Windows doesn't make the distinction between settings and data, so
those two concepts would map to the same location under it.

Surely Linux / OS X has some place to store shared (e.g., world
writable) app data for SYSTEM_DATA. Even if that's still
/usr/share/app/, the user could be sure to set the file mode to +w.

The way I look at it, if my Windows program is meant to be installed,
and I plan on using the installer setup to move my data into
c:\users\matthew\foo\data, then I would use SYSTEM_DATA_PATH.
Otherwise, if the program data would remain bundled, I would use
APP_DATA_PATH. I have control over that, so I would know which to use.

However, for cross platform reasons, I don't see why I'd ever try to
put the bundled data anywhere other than with the exe. On
Windows/Linux, I'd keep the data in a sub folder. In OS X, I'd use an
app bundle. So I'd always use APP_DATA_PATH on every platform.

And while we're on this topic, I think USER_HOME should be
c:\users\matthew, and not c:\users\matthew\documents. The reason why,
is on Ubuntu, it's /home/matthew. But I have /home/matthew/documents
there, so there's inconsistency.

I would add USER_DOCUMENTS, which would be c:\users\matthew\documents.
On OS X, I assume there's a standard doc folder. On Linux, I think
/home/matthew/Documents could probably safely be used.

USER_DOCUMENTS would be meant for files that the user is meant to open
externally. E.g., I'd save screenshots to that folder, but I'd save
high scores to USER_DATA.

--
Matthew Leverton




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