fn2006 / PollyMC

DRM-free Prism Launcher fork with support for custom auth servers.
GNU General Public License v3.0
754 stars 48 forks source link

unmojang: Automatically install authlib-injector when missing #101

Closed evan-goode closed 9 months ago

evan-goode commented 9 months ago

Scenario: user tries to launch an instance with an authlib-injector account, but authlib-injector is not installed on the instance.

Current behavior: a dialog box is shown asking whether the user wants to install authlib-injector. If they check "Don't ask again", missing authlib-injector will always be ignored for that instance. If they click "Yes", launching the instance is cancelled and a dialog to select a version of authlib-injector is shown.

Proposed behavior: the checkbox is changed to "Always do the same for all instances without asking" and controls a global setting called "Missing authlib-injector behavior". The "Yes" button automatically installs the latest version of authlib-injector[0] and continues launching the instance. The global "Missing authlib-injector behavior" setting can be set to:

A custom version of authlib-injector can still be installed in the "Edit Instance" menu, as before.

[0] I couldn't get the launcher to choose the latest version, possibly related to https://github.com/yushijinhun/authlib-injector/issues/219. I'd like to fix this before unmojang is merged to develop, but in the meantime I've changed the metadata server to only list the latest version of authlib-injector, currently 1.2.3.

evan-goode commented 9 months ago

Yep yep, CodeQL is happy now.