New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify config file/folder locations #352
Comments
|
'My Documents/Stella' has made problems in Windows already. I suppose Microsoft will restrict this even more in the future. |
|
TBH, I don't know how to solve this. We are using the directory that MS has specifically provided for this scenario, and now they are disallowing it. Also (rant mode on), doesn't it seem like this issue never goes away? It seems we can never properly deal with file save/load locations to everyone's satisfaction. I never thought this issue would persist longer than getting a new TIA core in Stella 😠 |
|
I have to read the details, maybe we can get away with a hint in the documentation. |
|
This is really only a symptom of a larger problem. After all these years, we still haven't properly dealt with file locations. For example, where to save ASM files, read from .lst files, etc. And when loading, do we load from the same location as they were saved? And what about when the app is stored in read-only location (as it should be), and the user also wants to store the files with the app (like Windows does, but REALLY, REALLY shouldn't do?? Adding all this configurability over the years is just a bandaid around the fact that we still haven't nailed down how to load/save config files adequately. |
|
How does Linux handle this? Can we learn from it without harm for Windows users? Maybe we should make a complete list of all files Stella handles and then decide what to do with them. For all supported OS and from player and developer perspective. |
|
How does Linux handle this: the correct way 😈. In Linux, there is a clear separation between user and system files. And for the user, there is even a clear location where config files are placed. Same as OSX (which is based on Unix, which is similar to Linux). Windows is very haphazard in this area, and frequently changes its mind between different releases (as we're now seeing with 'My Documents'). I agree that we should list all the files and folders that Stella will possibly use, and go from there. I will try to get to this later this evening. |
|
OK, so there is a base directory (what you call 'root', I will call it 'bd' from this point on, to reduce typing):
Under 'bd' we will have the following (non-configurable):
I propose to eliminate being able to change the following (ie, user has no choice on name/location):
Snapshots are something that the end user needs access to, so they can't be in a hidden directory (or more to the point, it must be possible to have them elsewhere). The 'bd' should should be changeable, but it can't be stored in the config file itself, for obvious reasons. This means that one can only change it from the commandline, Windows icon, etc. We need a common dir that is not hidden, is user-accessible and easy to find, and can store various files that don't really belong anywhere else. Currently that means the following:
So, that leaves the various other files that Stella can generate/use:
Also, some of the above have two or even three possible locations!! Arrgh 😖 |
|
Maybe a path named "Develop", "Debug"... below My Documents\Stella for the created, related files? .lst and .sym should always come from ROM path (incl. cfg). That or everything goes into ROM path. BTW: shouldn't it be $HOME/Stella for Linux/OSX? |
|
I figured some should go with the ROM, so that means we can get rid of the 'cfg' directory entirely, and store cfg files there too. The reason that Linux/OSX don't use $HOME/Stella is that it's considered 'rude' to create visible directories in $HOME unless absolutely necessary on those systems. You can create hidden directories, but then we're back to the same problem. |
|
TBH, I'm leaning to putting any file that's related to a specific ROM in the ROM directory directly, and just be done with it. |
|
Ok, for files Stella creates. Regarding $HOME: Isn't that causing a huge mess in that directory? |
|
Well, I think the functionality is used so rarely that it doesn't matter. Which is another reason for getting rid of the idea entirely. If we place all ROM-specific stuff with the ROMs, and allow snapshot and basedir to be configurable, I guess there's nothing left for the other folder. Besides, these are just the defaults; the user can change it if they like. So it's more about creating useful defaults. Those users that don't use Stella very rigorously won't care, and those that do will have enough experience to pick a better default :) |
|
Off to work on the house again ... |
|
Maybe sleep one night before you continue in anger. 😉 |
- only 'romdir' is configurable; the rest are now always under the 'basedir' - next step is to allow 'basedir' to be configurable, and optionally use the APP dir - ConfigPathDialog dialog is now almost empty (only contains romdir), so perhaps this can move elsewhere
|
Maybe you should implement the APP dir option only for the Windows version. 😄 |
|
Yes, that's actually the plan. There's no way to reliably do this in Linux/macOS, but there is in Windows. So for now at least, that's the only version that will get it. |
|
@sa666666 Is this done? |
|
Testing still required, so leave open for now. Also, I need to add just a little more to it. But it's perhaps 98% done. |
|
There are quite a lot of references to now gone path configurations in the doc. I better leave cleaning that up to you. |
|
Yes, that's part of the 2% I need to finish. |
|
Finishing up documentation on this, done in the last few commits. I think we're almost ready to close this one (and hopefully never have to revisit it again). |
|
Hello. Looks like a lot of consideration has been given config file structure, so I hope I'm not stirring anything up here, but is it possible to specify config file from the CLI? Ie., something like: stella -conf ~/my/alternate/stellarc If not, would it be possible to add it? The standardization under ~/.config/stella makes perfect sense, but I'm setting up Stella for use on multiple machines and want to share the configuration and resources on a NAS. I could get by with a bunch of symlinks and whatnot, but it'd be easier if I could specify a shared stellarc file from the CLI. I can configure all other paths within stellarc, just need a way to tell Stella where to find the appropriate config file. Would be helpful, but clearly not critical. Thanks for the consideration. |
|
The code already added will address this. I just tested, and if you type So the functionality you want is already there (albeit called 'basedir' instead); we just need to actually release 6.1 so people can use it 😈 |
|
Ahh, good deal. I'm still using 6.0.2 and didn't see that option. I just built from trunk and confirmed -basedir works great. Thanks a bunch! Looking forward to the next release. :-) |
|
I've tested this on several systems, and it seems to be working fine. Closing for now, pending results from beta testing; will re-open if necessary. |
The current system has become extremely unwieldy, with way too much configuration being possible. To make it easier on the end-user, I propose that there be a minimum of user-definable locations (changeable within the UI or on the commandline):
~/.config/stellafor Linux,%APPDATA%\stellafor Windows, etc),Furthermore, there should be a 'HOME' directory where stuff can be stored that we expect the user to be able to easily access/modify. For Linux, this is basically $HOME, for Windows it's 'My Documents\Stella', etc. This location should not be modifiable, else we get back to the same over-configurability issue as before.
Some of this can be completed for 6.0, and the rest may have to be pushed to 6.1
The text was updated successfully, but these errors were encountered: