-
-
Notifications
You must be signed in to change notification settings - Fork 991
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
Reorganize userdata folder #8059
Comments
The settings would need to be split in two, for example display settings should be per-device. |
Loading two files, combining the contents, and then continuing as normal wouldn't be much of an issue. |
So I guess the question would be, what should be synched and what shouldn't?
Is there anything else I missed? I guess the idea is to move all the stuff that should be synched into a common folder; I'm not sure what to call it though. If we can't think of anything better, I suppose "sync" or "cloud" would do.
Apparently it already does exactly this if the build environment defines a certain constant (though for some reason it doesn't clear the prefs before loading in that case, which seems wrong). See For the preferences, couldn't we just run the preprocessor on it? The existing "preferences" file would then be a fixed file that never changes (with a comment at the top noting as such), and it just references all the necessary files containing various bits of relevant information that are stored wherever they need to be. If there are builds that use a "default preferences file", that could probably be merged into the core preferences file. Obviously, writing the preferences would become completely different, as it would write some things to one file and some things to another file. There'd need to be a method of deciding what goes to which file somehow. Perhaps the preferences themselves would become more structured, with fewer toplevel keys; the contents of each tag might go in a different file. |
I'd say:
I don't think the preprocessor could handle this though? Given on Linux for example you have the preferences and lua_command_history in |
If all this is specific to Steam, should we call it |
I don't think we should call it "steam", as it's very reasonable to think there might be another cloud-based platform supported in the future. |
Probably going to work on this after #8791, so the new folder structure per version would be: /[version]/userdata/data/add-ons/ /[version]/userdata/sync/editor/ This would also then resolve #4163 as well. |
Isn't it [version]/userdata/whatever? Or I guess it might depend on the platform. Before working on it, I think we need to discuss what preferences should be synched and not synched. I'm pretty sure there's at least some things in there that shouldn't be synched. |
I don't really care whether the version number comes before or after userdata in the path, but the goal would of course be to have all platforms use the same structure. The preferences are a bit of an unknown at the moment just since I don't think it's known what the full list of preferences that currently exist are. |
Right, and we need to work that out in order to decide which ones need to be synched. |
Cache should be kept separately, as it's normal to generate it locally rather than transmit it over a network. Some OSes have specific directories for caches, so that backup programs or roaming profiles can automatically ignore it. |
The stuff in the |
There's more than just Steam's synchronisation to consider, which is why I gave the examples of backups and roaming profiles. Wesnoth already supports XDG_CACHE_HOME on Linux for treating cache specially.
|
Wesnoth supports the XDG paths for more than just the cache, which actually just annoys me most of the time. I don't like needing to look in five different folders depending on what data I want. |
Oh, is this a suggestion to disregard the XDG specification? I don't think that's useful. |
I don't think this is a suggestion to do that, unless XDG specifies that the 4 things noted as belonging in the sync folder should be in different places. …so maybe it's a suggestion to ignore it only for preferences? |
I suppose I don't really care where the cache goes. I don't know why it makes sense to store the preferences, credentials, and lua command history separately from everything else though. |
Something that occurred to me - does anyone know if the Steam Autocloud functionality supports syncing of subfolders, or does it only sync the files immediately under the folder it's setup to sync? |
Tested - Steam's Autocloud functionality doesn't sync subfolders, so this wouldn't actually accomplish anything. |
Maybe this can be configuured? https://partner.steamgames.com/doc/features/cloud#steam_auto-cloud explicitly talk about some "Recursive" option |
Oh, uh... yeah, that's a thing that exists actually. I've updated that setting and can confirm that it does look in subfolders now for storing files in the steam cloud. |
Also deletes the iOS chunk since mainline doesn't support iOS. Partially in preparation for wesnoth#8059 and also removes one use of _X11 for wesnoth#8806
Partially in preparation for wesnoth#8059 and also removes one use of _X11 for wesnoth#8806
Partially in preparation for wesnoth#8059 and also removes one use of _X11 for wesnoth#8806
Just realized that this is missing the |
True, added. |
Steam's cloud setup (without using the SDK) only allows us to sync a single folder across devices which right now is just the saves folder, but there are multiple things that would be useful to keep synced - preferences (achievements, campaign completion, general settings) and map editor maps/scenarios come to mind in particular. It would be useful to have these all located under a single folder so that they can all be synced.
The text was updated successfully, but these errors were encountered: