On 6/4/23 5:24 AM, Emiliano Heyns wrote:
> Clear. Sorry to press the matter, but BBT does things like reinit of
> the translators and I'm trying to get things right. I think what's
> below covers all scenarios (correct?) how can I distinguish (in 6 and 7)
>
> - Clean install:?
> - Upgrade: for now, install() with a newer version number than
> you last stored
> - Disable: shutdown() with reason ADDON_DISABLE
> - Enable:?
> - Uninstall:?
> - zotero Shutdown : shutdown() with reason APP_SHUTDOWN
>
> Did I miss a scenario?
- Clean install: install() with ADDON_INSTALL or nothing stored
- Upgrade: for now, install() with a newer version number than you last
stored (see note below)
- Disable: shutdown() with reason ADDON_DISABLE
- Enable: startup() with ADDON_ENABLE
- Uninstall: uninstall() with reason ADDON_UNINSTALL (see note below)
- Zotero shutdown : shutdown() with reason APP_SHUTDOWN
This is Zotero 7. Zotero 6 should be as documented by Mozilla, so same
as above but with an extra shutdown() and uninstall() with
ADDON_UPGRADE/ADDON_DOWNGRADE during a version change.
We're also going to see if we can restore that upgrade/downgrade
behavior in Zotero 7. Thinking about it more, I realized that the new
(or even old) version being installed doesn't necessarily know how to
undo all the things that the previous version did, so having each
version do its own uninstall before a version change makes more sense.