jay (support) wrote:jheddings wrote:I'm considering an automatic update mechanism...
Interesting. Careful though since Indigo moves the actual plugin around as part of enabling/disabling it. I was really hoping to get further down the plugin store/update path for Indigo 7, but I'm not sure if it's going to make it into the first release.
One interesting thing to note on updating plugins is that the Indigo Server has a built-in plugin version resolver, so if multiple copies of a plugin are found in either the enabled or disabled folders it will resolve them appropriately. We use this internally in conjunction with our installer.
The way the resolver works is it looks in both the enabled AND disabled plugin folder for duplicates. If it finds any, then it moves all the older versions to the trash (the newest version always "wins"). Additionally, if there is a plugin in the enabled folder then the winning plugin, no matter where it is (even in disabled folder) will be moved to the enabled folder. This keeps the plugin enable/disable state correct.
The way Indigo's installer uses this is that it always places new versions of plugins in the disabled plugins folder. On the next server launch, the plugin resolver will then handle the case where the older plugin, which needs to be replaced, is in the enabled folder. In that case the older copy in the enabled folder is moved to the trash and the newer version is moved over from the disabled plugin folder to the enabled plugin folder.
Purely an FYI... it might not make sense to use that with a plugin updater since it only runs (currently) when the Indigo Server launches, thus it requires an Indigo restart.