Has anyone actually read the guides from Microsoft for what to do for Application/User specific data and where/how to install things? This has been an FSO bugbear for me for a very long time. Now that FSO is starting to use STL strings all over the place and thus the pathlength issue is disappearing, why not start installing in Program Files and using the Microsoft guidance.
(burn the heresy! Games/Freespace2 4eva)
Hi, long time, no see.
Yes I have. Notice that wxLauncher follows them correctly (to the best of my knowledge).
Because FreeSpace2 Open is available on more than just Windows. And the best compatibility is the "does what it is supposed to do on all supported platforms with a minimal of fuss".
No, the best compatibility is to do it as the platform standards dictate, so that we do things the same as everyone else. That is, be consistent with everyone else.
At least, that is my take on it. I don't want to see a MS-ification of FSO. GOG not withstanding, I don't happen to believe that storaging in the registry or %appdata% is necessary at all. Point in fact, I find the idea abhorrent. FSO should use its directory as the location for things specific to FSO and be made constant to do so across the platforms. This is the easiest to accomplish objective.
Its not MS-ification. These ideas are not new to MS, in fact MS is slowly reinventing how POSIX systems already work. Also, even when FSO was new, writing to the applications own directory was frowned upon by MS. Yes, this has been incorrect for over a decade and only recently has MS started to enforce their own policy, but even then they temper it by providing the compatibility features that they do.
This prevents it from being complicated or broken across revisions of OSes and introduces fewer support issues regarding what goes where. And as FSO only needs the assets from FS2 Retail, how or where that was installed initially does not matter in the slightest.
No, by following what MS says we will not get broken by new revisions of the OS. Had FSO followed Microsoft's suggestions back in 2001 with respect of where to write data, we would not be having this discussion, it is only because Microsoft forced the issue with Vista that the error of how FSO deals with this stuff is being brought to light. If you want to rant that Microsoft is always changing things, sure I agree and could probably add to your list of complaints about changes.
Yes, you are correct, because FSO only needs the assets from FS2 Retail it really doesn't matter where FSO gets installed, however that is not what happens. FSO gets installed to where FS2 is, for various reasons.
And yes, you can start playing both Retail and FSO in one directory location, change the directory location and continue playing. If we start investing in tighter integration to the OSes conventions, that will not remain the case.
True, which is why most applications that do follow the MS's recommendations will have a portable mode that resolves this particular issue. wxLauncher and FSO will have a portable mode.
"AppDataFolder" (%APPDATA%) is the place that user-specific, persistent data that isn't a "document" goes into (well, there's also the local one, but why not roam anyway?)
So that's clearly where we should be putting all cache files, pilots and config files. Possibly mods as well(!)
The reason to not use the roam one is a matter of the size of data expected to be put in there and the value of that data (say its a cache file, or an index, something that can be regenerated on each computer and shouldn't be put on the profile server). Admittedly the difference in practice is pretty minor for FSO because we are probably not used much on corporate computers where the difference is actually important.
Debug Log files probably should go into My Documents - %APPDATA% is a hidden folder (C:\Users\%USERNAME\AppData\Roaming by default English install), so better to put them where they are more easily found.
Well, it depends. If wxLauncher provides a button to get the log dir then it doesn't really matter if it is hidden or not.
Is this as currently done in OSX and Linux?
It is. On linux and OS X, everything that FSO writes is written to a dot directory in the users home directory, including things like the model cache, the various bits that are put in the registry on windows, etc. Technically this is actually wrong on OS X (we are supposed to put most of these bits in the "Library" (iirc)) and on FreeDesktop compliant linux distros (we are supposed to use certain environment variables to pick where to put this stuff because some it if can get rather large).