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

Global install filters #3458

Merged
merged 1 commit into from
Apr 10, 2022

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Oct 5, 2021

Motivation

As of some recent API changes, users might install somewhat older mods that would work except that they bundle MiniAVC.dll, which crashes the game on startup. Even before the crashes, MiniAVC was annoying and unnecessary thanks to CKAN's own compatibility checking. It would be nice to prevent MiniAVC from being installed.

NOTE: The crash was specific to KSP 1.12.2, and was fixed in 1.12.3.

Similarly, some power users may wish to customize the details of how certain mods are installed, often a cfg file that patches how two or more mods interact. Currently they can only do this by deleting them manually after installation, which means they will re-appear after upgrades.

Changes

A new menu option under Settings opens a window with text boxes for installation filters that apply to all mods:

image

image

If you add a string to either of these boxes, then CKAN will not install any file where that string is contained in the full relative path. The top box applies to all game instances, and the bottom box applies only to the current instance. The target audience for this window is power users who are comfortable typing paths, but an Add MiniAVC button is available so typical users can more easily avoid installing MiniAVC.

Cmdline now has a ckan filter subcommand to manage these lists, and ConsoleUI has a new screen that works like the one in GUI.

Fixes #2490.
Fixes #3129.

@HebaruSan HebaruSan added Enhancement New features or functionality GUI Issues affecting the interactive GUI Cmdline Issues affecting the command line Core (ckan.dll) Issues affecting the core part of CKAN Pull request ConsoleUI Issues affecting the interactive console UI labels Oct 5, 2021
@HebaruSan HebaruSan requested a review from DasSkelett October 5, 2021 04:02
@vinix38
Copy link
Contributor

vinix38 commented Oct 5, 2021

Hi, here is the usual French translation :)

installfiltersdialog

<data name="GlobalFiltersGroupBox.Text" xml:space="preserve"><value>Filtres Globaux</value></data>
<data name="InstanceFiltersGroupBox.Text" xml:space="preserve"><value>Filtres de l'Instance</value></data>
<data name="AddMiniAVCButton.Text" xml:space="preserve"><value>Ajouter MiniAVC</value></data>
<data name="$this.Text" xml:space="preserve"><value>Installer des Filtres</value></data>

main

<data name="installFiltersToolStripMenuItem.Text" xml:space="preserve"><value>Installation de filtres</value></data>

@HebaruSan HebaruSan force-pushed the feature/global-install-filters branch from 08931b0 to 5398b35 Compare January 19, 2022 23:53
@DasSkelett
Copy link
Member

I was thinking whether a simple .Contains() check might be too broad and filter out files that people didn't want to, but since I can't think of a case where this could happen I guess it's okay. And every attempt to change this would make it a lot more complex and less accessible (e.g. if we made it behave like shell globs).

@HebaruSan
Copy link
Member Author

HebaruSan commented Feb 3, 2022

Yeah, if a filter is too broad, the user can add more characters to match only the right file(s), as in changing MiniAVC to MiniAVC.dll. If it's not broad enough, they can do the reverse, or add more filters. I think .Contains() gives us a pretty good level of flexibility here.

@HebaruSan

This comment was marked as resolved.

@DasSkelett
Copy link
Member

Should we re-scan the already installed files after the user changes the filters? I can imagine that some might expect MiniAVC.dll to disappear after they add it to a filter, but it seems like doing that could get messy (i.e., what about installing files that were filtered out previously when a filter is removed?).

I would keep it as is, people can still reinstall the mod they want. We could put a sentence in the "Install filters" window like

Changes to the install filters only take effect on future mod installations, already installed files are unaffected

@HebaruSan
Copy link
Member Author

Coming up in a few moments:

image

@HebaruSan HebaruSan force-pushed the feature/global-install-filters branch 3 times, most recently from dc4b0bb to 93b69ba Compare April 6, 2022 16:06
@HebaruSan
Copy link
Member Author

OK, should be all set now. ✔️

@vinix38
Copy link
Contributor

vinix38 commented Apr 6, 2022

Just added a few bits that I had missed during translation

Co-authored-by: vinix38 <vinix38@users.noreply.github.com>
Co-authored-by: DasSkelett <DasSkelett@users.noreply.github.com>
@DasSkelett DasSkelett force-pushed the feature/global-install-filters branch from 42126f0 to 30e8899 Compare April 10, 2022 15:33
Copy link
Member

@DasSkelett DasSkelett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All three UI are fine, and it works very well. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmdline Issues affecting the command line ConsoleUI Issues affecting the interactive console UI Core (ckan.dll) Issues affecting the core part of CKAN Enhancement New features or functionality GUI Issues affecting the interactive GUI
Projects
None yet
3 participants