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
This commit is contained in:
Damien Elmes 2025-07-05 01:37:42 +07:00
parent ccc0c7cdbb
commit de2d1477de

View file

@ -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():