Allow customization of the message displayed at the end of installations (Closes #1775)

This commit is contained in:
Mathieu Comandon 2020-04-11 14:38:30 -07:00
parent ddd18f33e9
commit ed9660bd82
2 changed files with 8 additions and 1 deletions

View file

@ -149,6 +149,12 @@ add-on "The reckoning" for Quake 2, you should add: ``requires: quake-2``
You can also add complex requirements following the same syntax as the
``require-binaries`` directive described above.
Customizing the end of install text
-----------------------------------
You can display a custom message when the installation is completed. To do so,
use the ``install_complete_text`` key.
Accessing the current display mode
----------------------------------

View file

@ -647,7 +647,8 @@ class ScriptInterpreter(CommandsMixin):
)
logger.warning("No executable found at specified location %s", path)
else:
self.parent.set_status("Installation finished!")
install_complete_text = (self.script.get("install_complete_text") or "Installation completed!")
self.parent.set_status(install_complete_text)
self.parent.on_install_finished()