-
Notifications
You must be signed in to change notification settings - Fork 204
New functionality to create the cloud save dirs at startup #358
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
Conversation
0fac23e to
ade7c59
Compare
- new helper function to search for a substring with case insensitive support
ade7c59 to
dc9e5dc
Compare
|
This feature is currently enabled by default since it's not something intuitive that users would think of enabling at any time at all. Not sure what's best, so any feedback would be appreciated. In any case, the ini flags mentioned above could be used to turn it off. |
universal963
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I still prefer handling all of these in external tools like gen_emu_config, but due to all kinds of difficulties (needs tons of new parameters and/or manual setup to handle variables and such), it seems this solution is more acceptable.
|
Will also put your link into readme where can also generate config. |
|
Just an idea here, but wouldn't it be better to use the already generated productinfo json from steam api or the config ufs subsection of that, and automatically parse the correct required paths from there, instead of asking the user to manually add them? They could be even written automatically into the ini by gen_emu_cfg... |
There are some usual known problems in software in general which arise when we start depending on external input:
By handling all of that in a tool like People could then easily change the tool, without having to compile the emu.
This hurts 😄 please check the notes section at the end of this PR, I literally spent ~2 days coding this annoying parser for the C# port. I've also created a release of it to hopefully decrease the amount of later (inevitable) complaints.
Parsing these files directly in the emu would be problematic as mentioned above, but saving the output json files has always been the case since the earliest releases of the
Assuming this is meant for the C# port of the tool, this also hurts :/ |
Properly fixes and closes #332
This allows the emu to create the expected directories for cloud saves at startup.
New options in the ini file
configs.app.ini:create_default_dir=1This makes the emu create the default directory for cloud saves
[Steam Install]/userdata/{Steam3AccountID}/{AppID}/The variable
Steam Installis substituted with the path forsteam_apiorsteamclientdepending on the current method used, either regular dll/so replacement, or using the cold client loader.create_specific_dirs=1This makes the emu create the custom/specific directories for cloud saves, defined by the OS-specific ini sections:
[app::cloud_save::win]Used for Windows OS
[app::cloud_save::linux]Used for Linux OS
When parsing a custom directory for cloud saves, the emu will substitute the variables defined in the SDK page for Steam Cloud, but they have to be defined in the ini file with a custom format.
The variable name must be wrapped in 2 colons
::, for example:{SteamCloudDocuments}{::SteamCloudDocuments::}This makes it easier for the emu to detect variables which were not substituted (by looking for
{::), and avoid creating these directories to avoid unintentional behavior.Also added new helper functions:
Note:
This requires support from the python tool
gen_emu_configso it has to be updated.I've provided a complete implementation of that here, from collecting the data to properly parsing it, anyone is welcome and free to copy the code and use it however they want.