Author Topic: Plugin Update Notification/Updater  (Read 23035 times)

AvikB

  • Sr. Member
  • ****
  • Posts: 945
Just a quick note on the warning. You don't really need the first sentence - the second sentence says the same thing. In warnings, less is more. The longer it is, the more people tend to ignore it, strangely. It might also be cool to include a list of plugins that are installed but do not support the update check, maybe with a link back to the plugin page as a "manual check" or to contact the developer. That way, the end user knows "Yes, the update checker plug-in sees that these unsupported plugins exist and the update checker is functioning properly, the reason there is no update listed for these is that they are not supported." I don't know if that's possible or not, but it would be more user-friendly. Great stuff, there. Nice.
I am not sure if it is possible. For example the addon manager only look for meta files so it can be used for skins and theather modes. But without it not sure how i am going to get the data needed.

AvikB

  • Sr. Member
  • ****
  • Posts: 945
  mb doesn't support any compatibility check for skins/theater modes. it would be just the info that mb is needed to be upgraded also.
Yeah that is possible. I will look into it tonight.

boroda

  • Sr. Member
  • ****
  • Posts: 4679
Ok i have a very basic working demo ready.

https://mega.nz/#!CFwDQRgB!jVglRERRL-8GkS6GGOKW6Wv4mp-rhF8zQxhDkg8UBOg


This is the updater file. You can try it out.


You can try it on your own addon. Here is the XML file structure.

Code
<?xml version="1.0" encoding="UTF-8"?>
<addon-data>
<name>Addon Name</name>
<id>put your addon id</id>
<version>put your addon version</version>
</addon-data>

you can get the addon ID by going to your addon page and check the URL. you should see a number there. That is the ID



The XML file extension should be .meta, you can name it whatever you like. No need for prefix or suffix.
it should look something like:



Right now you can access the updater from the menu:


you can check if an update is available or not. and the download button will open the addon page:



This is a very basic implementation.

mb must hide folders which are marked hidden in file system in 'skins' folder.

also it would great to have 3 tabs: available updates, ignored updates and add-ons, which don't support update notifications.

AvikB

  • Sr. Member
  • ****
  • Posts: 945

 mb must hide folders which are marked hidden in file system in 'skins' folder. also it would great to have 3 tabs: available updates, ignored updates and add-ons, which don't support update notifications.
Good idea. I will look into it.
Btw you wrote Add-on manager that supported auto update. How did you do it if you don't mind asking. Did you have some sort of CDN???

AvikB

  • Sr. Member
  • ****
  • Posts: 945
A new build is available. Added suggestions from boroda74.

https://mega.nz/#!HERgQATR!kr7ZiYp531pfXMGfTKDD0tdFC-QOyf1KNeiIep9HgN0

Code
<?xml version="1.0" encoding="UTF-8"?>
<addon-data>
<name>Taskbar Progress</name>
<id>97</id>
<version>1.0</version>
<ignore-update>false</ignore-update>
</addon-data>

the "ignore-update" tag should decide if notification will show or not. (ofc notification is not added yet) Right now you can manually set if it will notify you or not.

boroda

  • Sr. Member
  • ****
  • Posts: 4679
AvikB, i think that i meant by 'unsupported' the add-ons without metadata.

AvikB

  • Sr. Member
  • ****
  • Posts: 945
AvikB, i think that i meant by 'unsupported' the add-ons without metadata.
I have no idea how i can get the data regarding this?

boroda

  • Sr. Member
  • ****
  • Posts: 4679
just list all skins/plugins which don't have associated .meta files on 3d tab. maybe its wont be very quickly, but its local operation, so the speed must not be the problem.

AvikB

  • Sr. Member
  • ****
  • Posts: 945
just list all skins/plugins which don't have associated .meta files on 3d tab. maybe its wont be very quickly, but its local operation, so the speed must not be the problem.
I guess it is possible to look for files with mb_*.dll and list them as installed plugin.

derTyp

  • Jr. Member
  • **
  • Posts: 71
Code
<?xml version="1.0" encoding="UTF-8"?>
<addon-data>
<name>Taskbar Progress</name>
<id>97</id>
<version>1.0</version>
<ignore-update>false</ignore-update>
</addon-data>

the "ignore-update" tag should decide if notification will show or not. (ofc notification is not added yet) Right now you can manually set if it will notify you or not.


I don't think it's a good idea to store this in the xml because it will get overwritten every time the plugin is updated (because the .meta would be in the same zip as the new plugin). The xml should only contain values that are not changing at "runtime" of the plugin or user settings, it should be deployable as part of a plugin update.

AvikB

  • Sr. Member
  • ****
  • Posts: 945

 I don't think it's a good idea to store this in the xml because it will get overwritten every time the plugin is updated (because the .meta would be in the same zip as the new plugin). The xml should only contain values that are not changing at "runtime" of the plugin or user settings, it should be deployable as part of a plugin update.
only "ignore-update" will be modified runtime. And yes it was my intention to revert it to default once user updated the addon.

Ignore update is only for ignoring updates. But once user decided to update it i don't think it needs to be in the ignore list.


redwing

  • Guest
Maybe you could support it yourself without add-on devs' help by adding a button to each add-on page that auto-generates the manifest file. Then users who want to use the "updater" plugin could download the file using the button and put it in the folder and add-on devs won't have to include it to their add-ons.

AvikB

  • Sr. Member
  • ****
  • Posts: 945
Maybe you could support it yourself without add-on devs' help by adding a button to each add-on page that auto-generates the manifest file. Then users who want to use the "updater" plugin could download the file using the button and put it in the folder and add-on devs won't have to include it to their add-ons.
0_0 this is brilliant idea. I need to include a tutorial message for the user though. but it could be done.
Although addon devs need to update the versions properly through the dashboard.

boroda

  • Sr. Member
  • ****
  • Posts: 4679
although its good idea, i think its preferable for users that devs include .meta files to add-on zips.