![]() |
#1 |
Swordsman
Join Date: May 2007
Posts: 289
![]() |
Analysis of the /lib directory and suggested changes.
Here's an analysis of the /lib directory structure with proposed changes.
I'm posting this for suggestions, comments and corrections. I will later post a ticket for Vanilla and make changes for Sangband. First we take a look at the directory structure: /lib/apex: Contains the high-score list. Needs to be game-writeable, and should preferably be global. /lib/bone: Contains player ghost information on variants with them. Needs to be game-writeable, and should preferably be global. /lib/data: Contains the 'compiled' versions of the files in /lib/edit. Should preferably be game-writeable and global. /lib/edit: Contains the text-version of the files in /lib/data. Should be global. /lib/file: Contains text files used by the game that neither fits in to /lib/edit or /lib/help category. Should be global. /lib/help: Contains text files used by the in-game help. Should be global. /lib/info: Serves no useful in-game purpose. Used in some variants to store text-files that aren't used in-game. Should be removed. Eventual content should be moved to /doc. /lib/pref: Contains global preset preference files. Overrided by files in /lib/user. Should be global. /lib/save: Contains savegames. Needs to be game-writable. Should preferably be user-specific. /lib/user: Contains user editable preference files. Should preferably be game-writable and user-specific. /lib/xtra: Contains multimedia files. Should be global. Then we take a look at what certain defines do. PRIVATE_USER_PATH: This replaces /lib/user with the path specified in the define. USE_PRIVATE_PATHS: This replaces apex, bone, save and data with subdirs of PRIVATE_USER_PATH. This makes all game-writable dirs user-specific. So far, so good, but what about save? I listed it above as preferably user-specific. IMO, it should be user-specific always, if PRIVATE_USER_PATH is defined. This would also allows us to remove the SAVEFILE_USE_UID code. So to summarize my suggestions: - Remove /lib/info, move eventual content to /doc. - Use PRIVATE_USER_PATH/save for savefiles always if PRIVATE_USER_PATH is defined. - Remove the SAVEFILE_USE_UID code. |
![]() |
![]() |
![]() |
#2 | |
Veteran
Join Date: Apr 2007
Posts: 1,951
Donated: $40
![]() |
Quote:
I disagree with removing SAVEFILE_USE_UID, on the basis that if savefiles are shared, you need the uid to distinguish them. If you're going to use a private path for everything else, you might as well do the same for savefiles, it's true. PS. You may want to post stuff like this to the angband-dev list. |
|
![]() |
![]() |
![]() |
#3 | |||
Swordsman
Join Date: May 2007
Posts: 289
![]() |
Quote:
Quote:
As it's now, either only /lib/user or everything that can be saved uses private path. I would like to change that to (/lib/user and savefiles) or everything. And IMO savefiles shouldn't be shared on a multi-user system, because if an user is deleted, then the sys-admin has to hunt down and delete those savefiles separately. Quote:
And I already joined one dead angband-dev last year. http://vlists.pepperfish.net/cgi-bin...ev-kaboodle.be |
|||
![]() |
![]() |
![]() |
#4 | ||
Veteran
Join Date: Apr 2007
Posts: 1,951
Donated: $40
![]() |
Quote:
![]() Quote:
|
||
![]() |
![]() |
![]() |
#5 |
Swordsman
Join Date: May 2007
Posts: 289
![]() |
|
![]() |
![]() |
![]() |
#6 | |
Veteran
Join Date: Apr 2007
Posts: 1,951
Donated: $40
![]() |
Quote:
EDIT: I'm starting to soften to the idea of storing everything that the game writes in ~/.angband now. I'll make a poll for it. Last edited by takkaria; June 22, 2007 at 13:22. |
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|