Known aliases are a way to tell the Add-on Manager how to migrate old Add-ons to new Add-ons. This is important because it allows users to seamlessly upgrade their Add-ons without having to manually uninstall and reinstall them.
To define a known alias, add a known_aliases parameter to the elements section of your Add-on's .addon file. The known_aliases parameter is a list of strings, where each string represents a previous name of the add-on.
When the Add-on Manager is upgrading Add-ons, it will check the known_aliases parameter to see if the old Add-on has a known alias. If it does, the Add-on Manager will automatically display that the Add-on has an Update available. Users can keep their currently installed version or update to the newly packaged version.
Example
The following example shows how to define a known alias in an .addon file:
{
"name": "User Tool Creator",
...
"elements": [
{
"type":"AddOnTool",
"identifier": "com.seeq.addon.usertoolcreator.addontool",
"known_aliases": ["Add-on Tool Manager", "Add-on Management Tool"]
}
]
}
In this example, the User Tool Creator Add-on has two known aliases: Add-on Tool Manager and Add-on Management Tool. If the user has either of these Add-ons installed, the Add-on Manager will automatically adopt the Tool and display in the Add-on Manager that the User Tool Creator Add-on has an Update available.
Important Notes
-
Known aliases are exact matches, but not case sensitive.
-
Wildcards are not allowed in known aliases.
-
Known aliases are only used for migrating previously installed Add-ons Tools to packaged Add-ons of type
AddOnTool. They cannot be used to migrate between types.