Skip to content
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

Generic Folder Matching installer #504

Merged
merged 10 commits into from
Aug 2, 2023
Merged

Generic Folder Matching installer #504

merged 10 commits into from
Aug 2, 2023

Conversation

Al12rs
Copy link
Contributor

@Al12rs Al12rs commented Aug 2, 2023

Closes #477

GameCapabilities

See #503 for all the objectives and rationale behind the system.

GenericFolderMatchInstaller

The idea is to have an installer that takes a list of recognizable folder targets and tries to match the content of a mod archive to that of one of the targets.

In the case of Bethesda games I just defined two targets (InstallFolderTarget), root level and Data, where Data is nested under the Root one.
Each target contains information to recognize it, such as known subfolders or extensions for files that reside at that level.

Most of the information regarding the known folders and extensions was taken from MO2, so it should be pretty valid.

Potential improvements:

I'm not completely happy with how the code structure turned out for now. I think the structure could be simplified a bit probably. I would have spent some more time tweaking and moving things around if we didn't want to get SKSE support done.

Some ideas I considered:

  • Moving the helper methods of the Generic installer to InstallFolderTarget
  • Making some of those part of an interface IInstallFolderTarget, e.g.: PathMatchesAnyTarget(), GetModFilesForTarget()
  • Allowing games to implement IIinstallFolderTargets that use different data and behaviour.

But that felt like it would make the structure more complicated rather than simplifying it.

For capabilities I would like to consider using IServiceProvider for storing them inside games, but that needs some investigation for advantages/disadvantages.

I'm not completely happy with the names either.

I'm sure there is lots of room for improvements here so let me know of any suggestions.

@Al12rs Al12rs requested a review from a team August 2, 2023 15:06
@halgari halgari merged commit 89ccdcd into main Aug 2, 2023
6 of 7 checks passed
@halgari halgari deleted the skse-installer-feature branch August 2, 2023 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support for installing SKSE in SkyrimSE and LE
2 participants