Self Updating Add-ons?
- byron
- Posts: 582
- Joined: Wed Jul 04, 2012 9:26 pm
- Location: Illinois
- Has thanked: 27 times
- Been thanked: 96 times
Self Updating Add-ons?
Hello all, was wondering if there are any add-ons for us that auto update (or something along those lines), and actually do it correctly. I'm trying to find some code to copy for skinning purposes so that a skin could be updated automatically (confident that there's a way to do this), and would like some code to maybe copy into a script or something along those lines from something that already does an update automatically. I know this is built in for mainline, but was curious as to whether or not any of our add-ons have been modified to do this. It'd certainly be nice to figure out some sort of work around for this as it would really simplify things for the general user especially, but everyone would ultimately benefit.
- Dan Dar3
- Posts: 1176
- Joined: Sun Jul 08, 2012 4:09 pm
- Has thanked: 273 times
- Been thanked: 257 times
- Contact:
Re: Self Updating Add-ons?
I was trying to find the post where I call Buzz saying he's got some work done on the addons management system, but that would be finished / released after the Python 2.7 update (which I guess would 3.5). That so save you from having to write all this logic and then throw it away.
Anyways, I don't recall similar logic in any of the plugins or skins, but in theory for one plugin should be fairly straight forward. You would need :
* an Internet location where to keep a data file (XML or otherwise) with the new version;
* Python code (script) to check either at system startup (autoexec.py) or if possible to trigger from the skin load (you probably know this better) whether a new version of the skin is available (download the file and verify the new version against "old" version).
* if new version is found, ask the user to confirm whether they want to update, and if yes, it would continue with downloading the archive (the "version" remote file could also hold an URL or a name of the new archive).
* on download complete, extract by overwriting the skin files (original) name and call built-in ReloadSkin() function.
* done.
Some of that I've already done in the XBMC4Xbox Installer plugin, if you want you can inspire from that (thread in my signature) and if you have any questions or would need a hand, feel free to send me a PM or an email, although I believe you're a decent Python coder yourself
Anyways, I don't recall similar logic in any of the plugins or skins, but in theory for one plugin should be fairly straight forward. You would need :
* an Internet location where to keep a data file (XML or otherwise) with the new version;
* Python code (script) to check either at system startup (autoexec.py) or if possible to trigger from the skin load (you probably know this better) whether a new version of the skin is available (download the file and verify the new version against "old" version).
* if new version is found, ask the user to confirm whether they want to update, and if yes, it would continue with downloading the archive (the "version" remote file could also hold an URL or a name of the new archive).
* on download complete, extract by overwriting the skin files (original) name and call built-in ReloadSkin() function.
* done.
Some of that I've already done in the XBMC4Xbox Installer plugin, if you want you can inspire from that (thread in my signature) and if you have any questions or would need a hand, feel free to send me a PM or an email, although I believe you're a decent Python coder yourself
- App(s): XBMC4Xbox Remote for Android | Plugin(s): XBMC4Xbox Installer
- Please donate to XBMC4Xbox project to keep it going, every little helps!
- Join us on TeamSpeak