Comments (23)
The settings would need to be split in two, for example display settings should be per-device.
from wesnoth.
Loading two files, combining the contents, and then continuing as normal wouldn't be much of an issue.
from wesnoth.
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.
from wesnoth.
So I guess the question would be, what should be synched and what shouldn't?
- cache - seems like it probably shouldn't be, but not sure?
- data - this is actually add-ons; I'm not sure if it should be synched
- editor - somewhat legacy, but a place to store custom maps for synching isn't a bad idea
- logs - why would you want to sync that?
- history files - sure, why not (I only have a Lua console history file, but I suspect there could be more?)
- persist - is related to saved games so should definitely be synched
- preferences - mixed bag, as mentioned it should probably be split in two
- save_index - related to saved games, but I'm not sure… it's generated automatically, after all, but it's also tiny, so…
- saves - obviously
- screenshots - dunno, maybe
- credentials - definitely not, as they're encrypted with a machine-dependent key
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.
Loading two files, combining the contents, and then continuing as normal wouldn't be much of an issue.
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 load_base_prefs()
in preferences/general.cpp.
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.
from wesnoth.
I'd say:
- cache - no
- data - no (could end up too big)
- editor - yes
- logs - no
- history files - yes
- persist - yes
- preferences - as much as makes sense
- save_index - no
- saves - yes (is what's currently synced)
- screenshots - no
- credentials - no
I don't think the preprocessor could handle this though? Given on Linux for example you have the preferences and lua_command_history in ~/.config/wesnoth
and the userdata in ~/.local/share/wesnoth/1.17
.
from wesnoth.
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.
If all this is specific to Steam, should we call it steam
? If a theoretical second cloud-based platform were to be supported in the future, would it use the same directory structure? If we assume it could, then maybe better to use a generic term like sync
.
from wesnoth.
Probably going to work on this after #8791, so the new folder structure per version would be:
/[version]/userdata/data/add-ons/
/[version]/userdata/logs/
/[version]/userdata/screenshots/
/[version]/userdata/save_index
/[version]/userdata/credentials
/[version]/userdata/lan_config.cfg
/[version]/userdata/sync/editor/
/[version]/userdata/sync/persist/
/[version]/userdata/sync/saves/
/[version]/userdata/sync/history
/[version]/userdata/sync/preferences
This would also then resolve #4163 as well.
from wesnoth.
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.
from wesnoth.
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.
from wesnoth.
Right, and we need to work that out in order to decide which ones need to be synched.
from wesnoth.
/userdata/[version]/cache/
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.
from wesnoth.
The stuff in the sync
dir is what gets synced.
from wesnoth.
from wesnoth.
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.
from wesnoth.
Oh, is this a suggestion to disregard the XDG specification? I don't think that's useful.
from wesnoth.
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?
from wesnoth.
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.
from wesnoth.
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?
from wesnoth.
Tested - Steam's Autocloud functionality doesn't sync subfolders, so this wouldn't actually accomplish anything.
from wesnoth.
Maybe this can be configuured? https://partner.steamgames.com/doc/features/cloud#steam_auto-cloud explicitly talk about some "Recursive" option
from wesnoth.
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.
from wesnoth.
Probably going to work on this after #8791, so the new folder structure per version would be:
/userdata/[version]/cache/
/userdata/[version]/data/add-ons/
/userdata/[version]/logs/
/userdata/[version]/screenshots/
/userdata/[version]/save_index
/userdata/[version]/credentials
/userdata/[version]/sync/editor/
/userdata/[version]/sync/saves/
/userdata/[version]/sync/history
/userdata/[version]/sync/preferencesThis would also then resolve #4163 as well.
Just realized that this is missing the persist
directory, which should probably go at /userdata/[version]/sync/persist/
.
from wesnoth.
True, added.
from wesnoth.
Related Issues (20)
- EI - 10. Dark Sanctuary - Owaec can go into the sanctuary HOT 3
- Assertion needs_download.size() failed when observing game
- In-game chat doesn't redraw over water when help is open HOT 2
- Should have a better error message when `[unit]type=` in ActionWML names an unknown type HOT 1
- Close button scrunched in some help menus HOT 3
- hide_help=yes in [unit_type] hides help halfway HOT 2
- EI: In S14 Drowned Plains Replays, Hahid Dialogue Breaks Replays HOT 5
- Delay shroud updates breaks second_unit references for sighted events HOT 4
- Achievements Can Be Earned When Watching Replays
- Move image copyrights to image HOT 11
- Python 3.12 highlights invalid escape sequence in wmlxgettext dependency HOT 11
- wmllint cannot handle # inside single-line Lua code HOT 2
- gui.show_dialog takes 13 px more space than it should on each side HOT 4
- apply_to=status add=unplagueable => status=not_living HOT 2
- Remove confusion about SP and MP saves of hybrid campaigns having the same names HOT 5
- Allow admins to remove add-ons from the in-game UI HOT 1
- After sorting by level in the recall window recall or cancel leads to a crash HOT 1
- Prestart messages not being cleared HOT 2
- :droid should either do something or error when given a null/empty side
- WML: `[have_unit]` tag: allow `only` as value to `search_recall_list=` key HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wesnoth.