-
Notifications
You must be signed in to change notification settings - Fork 43
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
ADR and Implementation of New Default App Locations #783
Conversation
So one of the biggest complaints people had with Vortex when it first came out was the fact that it put its files in Appdata by default and there was no way to avoid that. From MO2 side as well, being able to set custom locations and supporting Portable installations was something very important for a lot of users. Knowing this I think it's important that whatever solution we come up with for the default can be completely customized and overruled by users. In particular choosing a default location on C: drive for everything might incur into drive capacity issues. Ideally during installation or first setup the user would be able to choose whether to create a portable instance or a normal instance. A portable instance would keep all files inside the installation folder, which would need to be write enabled. The user would still need to be able to change the locations for modfile backups etc, as those can take up hundreds of GBs and they might want to put the FileStore of different games on different drives (e.g. most game mods on NVME SSD for performance, but not the Skyrim 500GB setup). Could we get away with having the user configure this on first startup, so we don't have to choose the default ourselves? |
Note that this is already possible today 😉, I did it with some config work a while back. This ADR specifically focuses on what we should suggest to the user as a default location, rather than anything else. As another point of note, our DataModel also supports (or used to support last I checked) having multiple archive locations; i.e. multiple places where archives are stored. This worked at the reader side, but at the writer site, there was currently not yet a mechanism to configure where new archives go. I'm not sure if the situation on that changed.
That's actually a great piece of feedback, ultimately it would require some UX designs from @captainsandypants down the road. I've also had a lot of users who have historically modified their packages path in my own solutions, and/or used portable mode. Regarding the point of when this configuration is set, it would have to be at runtime. It's not really possible to have custom install logic for every single packaging format we should strive to support and even if we could; that would be a lot of repeated work to get set up for every single packaging format. Anyway, lemme add a footnote to the ADR regarding these things. I also need to add a sub-section regarding out non-DataStore config location ( |
6915aa2
to
6b04a7c
Compare
6b04a7c
to
fcafa05
Compare
Updated with some additional potential discussion topics regarding UX and information regarding running the app 'portably'. |
I think it's important to note that the reason people want portable modes is often tied to the inflexability of the app in other areas. Having to have instances for MO2, Vortex treating mods as only installable once for all loadouts, etc. Solving these issues removes a lot of the need for a truely portable app. Clearly we'll always want some sort of protable system for testing and development, but I'm not sure it's a feature that we have to ship with the MVP |
Our loadout system is much more advanced. Once we have a proper settings system, there won't be a need to have multiple instances of the App, since you'd be able to change per-loadout locations. |
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 my opinion, we should make use of all available XDG_*
user base directories (Specs, Arch Wiki) on Linux. These are also easy to access with the correct Flatpak Permissions. I put emphasis on using all available directories because there is a difference between the config, cache, data, state, and runtime directories. Our datastore would likely go into the config directory, while big mod data should go into the data directory.
On Windows, we can just stick to the local application data folder (details). The difference between ApplicationData
and LocalApplicationData
is that the former can be used by a roaming user, meaning the contents will be uploaded to a server. The latter is local to the machine.
Regardless of platform, I believe we should add these requirements as well:
- Don't use system directories, all data should be local to the current user.
- Only have one instance installed of the app (no "portable mode", no "multi instances").
- Allow the user to change directories on a per-loadout and/or game basis.
I agree with LocalAppdata as the default location in windows for things that shouldn't balloon in size. If we put something that could potentially become hundreds of GBs in Appdata by default, without explicitly asking the users we will get a lot of complaints, even if it is possible to move the folder after the fact, simply because people will not know that it can be changed or how (even if it is just there staring at them in settings). So in my opinion we should explicitly ask the user on first setup where to put the heavy stuff, to avoid the user complaints, while the smaller things like the database can be put in the default location. |
[needs testing]
I undrafted this by accident, oops. Please ignore. |
src/ArchiveManagement/NexusMods.FileExtractor/IFileExtractorSettings.cs
Outdated
Show resolved
Hide resolved
May change, after discussion
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #783 +/- ##
==========================================
- Coverage 63.01% 62.81% -0.21%
==========================================
Files 586 586
Lines 18125 18201 +76
Branches 1277 1287 +10
==========================================
+ Hits 11422 11433 +11
- Misses 6361 6422 +61
- Partials 342 346 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
src/ArchiveManagement/NexusMods.FileExtractor/IFileExtractorSettings.cs
Outdated
Show resolved
Hide resolved
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #783 +/- ##
==========================================
- Coverage 63.01% 62.17% -0.85%
==========================================
Files 586 594 +8
Lines 18125 18656 +531
Branches 1277 1334 +57
==========================================
+ Hits 11422 11599 +177
- Misses 6361 6708 +347
- Partials 342 349 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Contest / Problem Statement
The App currently stores its files in the same folder as the application (
{EntryFolder}
).This approach has issues with certain packaging formats and installers. For example, when the application is run from
an
.AppImage
, theEntryFolder
becomes read-only, and our application fails to run.We need to identify alternative storage locations that are both accessible and writable, regardless of how the
application is deployed or executed.
About The Document
This document (WIP ADR) presents us with existing options as to where we could potentially store our content, including some of the benefits and drawbacks for each location.
It also introduces a potential new problem that may arise should we decide to switch to a new user data location.
Feedback Requested
This is intentionally submitted as a draft PR in request for feedback.
More specifically, I request that everyone reads this, and forms their own preference/opinion on the subject matter ahead of time, as it is probably for the best that we discuss this (on call) as a team down the road.
If you have any other suggestions, fixes, etc. feel free to comment or even amend this PR directly (no force pushes over other people's stuff, let's be civilized here !!).