Where to save files?

Posts

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Where to save files?

Postby IBBoard at 07 Jan 2010, 20:10

It isn't too much of a problem for initial testing, but we could do to sort it at some point. Currently WarFoundry keeps its data files in a sub-folder of the install directory (although there is code to support multiple directories, so once we get a properties dialog you can start specifying other folders) and all other data is in your "app data" directory (~/.config/IBBoard/WarFoundry/ in Linux and something like c:\Documents and Settings\username\Application Data\IBBoard\WarFoundry\ in Windows).

The "app data" directory is fine and even correct for things like your stored preferences, but not really as the default for saved armies and exports. Eventually we'll save the last location that you saved to, but we still need to define a sensible default. There may be some constraints on what can generically be supported, but what do people think is the most sensible default location for Windows/Mac/Linux?
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Re: Where to save files?

Postby snowblizz at 08 Jan 2010, 08:45

In Vista this is where it ends up:
C:\Users\username\AppData\Roaming\IBBoard\WarFoundry\armies

C:\Users\username\Documents\WarFoundry\armies, would be more sensible but for my money I'd much rather prefer it to end up in
...\WarFoundry\armies

there are few things I hate more than windows and programs filling up "My Documents" (which I also dislike intensely) with folders. And then always defaulting on open to a folder (My Documents) I do not really use.
But I'm a cranky old DOS user that likes to put my stuff exactly where it should be.

However it feels a bit silly to have a completely separate folder in a vastly different place with only the save files in it (unless you purposely place them there). To me at least. So I think the default should reside in the WarFoundry folder itself.

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: Where to save files?

Postby IBBoard at 08 Jan 2010, 19:24

Personally I'd rather not use My Documents either, and I hate it as well. The Linux way makes so much more sense (a home folder that is your home, with most distros creating default Document, Music, Pictures and Videos folders in there) rather than having a 'home' directory of C:\Users\username and then always defaulting to C:\Users\username\Documents and making "up" from there drop to the desktop (at least in XP).

There is apparently a "Environment.SpecialFolder.Personal" value, which maps to "My Documents", so I might have to investigate where Mono on Linux maps that to. If it uses ~/ then it'll be usable for both environments (although not ideal in either, since it'll either use My Documents for things that aren't documents on Windows or create a new folder in your user home directory on Linux, which I don't like either :D)

With regards using the "WarFoundry" folder itself, if you mean the install folder then the problem can come with Vista/7 (and with packaged Linux builds, once I make them) if you don't have permissions on that folder, or if multiple people are using a central install. In general it is best to store the user's data in the user's home directory and leave the install directory completely untouched, except when updating.
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)

[Unknown user]'s Avatar
snowblizz
Veteran Member
Veteran Member
Progress to next rank:
 
61%
 
Posts: 484
Joined: 08 Apr 2009, 06:55

Re: Where to save files?

Postby snowblizz at 08 Jan 2010, 20:09

So you are saying having 1 computer per person in a family (only my mom doesn't have her own laptop, and even she talks about a mini-PC or a Mac [fat chance of that if I have any say]) and me owning 4 computers might not be the common set-up? Shucks... ;-)

[Unknown user]'s Avatar
IBBoard
Administrator, Commissar
Administrator
Commissar
Progress to next rank:
 
38%
 
Posts: 4222
Joined: 20 Mar 2001, 20:24
Location: Worcestershire, UK

Re: Where to save files?

Postby IBBoard at 08 Jan 2010, 20:30

Me and the wife have two desktops (although one is hardly used, so we share the more powerful one) but computers can have multiple user accounts so you might as well support it ;) That plus proper permissions in Linux and UAC in the newer versions of Windows mean that you can't guarantee to be able to write to the main folder anyway.

I've done a bit of poking and it looks like there is a usable default for Linux and Windows. The "personal" folder in a "special folders" enumeration appears to be My Documents in Windows and your home dir in Linux. Not perfect, but certainly usable as a default :)
Out now: Dawn of War Texture/Skin Downloads
At v0.1: WarFoundry (open source, cross-platform, multi-system army creation application)