From de2d1477de53174231129ff2e5af148f428ba2eb Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 5 Jul 2025 01:37:42 +0700 Subject: [PATCH] Hack in a message about the launcher add-on We can't show an AnkiWeb page for a locally-installed add-on, and having a custom config action is the only way we can easily expose this for older clients as well. Re: #4158 --- qt/launcher/addon/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qt/launcher/addon/__init__.py b/qt/launcher/addon/__init__.py index 71f2fa116..63a2cc5a9 100644 --- a/qt/launcher/addon/__init__.py +++ b/qt/launcher/addon/__init__.py @@ -151,7 +151,15 @@ def _packagedCmd(cmd: list[str]) -> tuple[Any, dict[str, str]]: return cmd, env +def on_addon_config(): + showInfo( + "This add-on is automatically added when installing older Anki versions, so that they work with the launcher. You can remove it if you wish." + ) + + def setup(): + mw.addonManager.setConfigAction(__name__, on_addon_config) + if pointVersion() >= 250600: return if not launcher_executable():