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

reinstaller: add "no copy" option #34

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

loicreynier
Copy link
Contributor

@loicreynier loicreynier commented Jul 2, 2024

Add a "no copy" option for reinstaller which use a text file (MO2Plugins/Data/Reinstaller/installers.txt) that list the installers instead of copying the files to the plugin data folder.

I believe this could be useful for users as myself that prefer to keep all the downloaded files (for Wabbajack purposes for example).

This is implemented by adding no_copy setting to the plugin. If set to true (default behavior) the plugin keeps its original behavior. If set to false, the plugin uses a subclass of Reinstaller and ReinstallerPaths that implements the use of the text files.
The drawback of this implementation is that because the plugin is already loaded when the setting is changed, MO2 must be restarted to apply the new behavior. However, this is standard practice for MO2 plugins, so it shouldn't pose a significant issue.

Marking this PR as a draft for now because I have not yet tested the behavior of the quick install and quick delete menus. So far, I have only implemented and tested the full reinstaller menu.

Also, I left the changes made by my linter, Ruff, to the files I touched, but I can remove them if necessary.

@loicreynier loicreynier marked this pull request as ready for review July 2, 2024 15:30
@loicreynier
Copy link
Contributor Author

Second commit add the "no copy" behavior to the quick delete menu.
The quick install menu uses only functions from the Reinstaller class so it doesn't require any changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant