setting up an addon repo?
#1
I have an addon I'd like to distribute via an xbmc repo.

I've seen several scripts, but most of them haven't been touched in years.

What is the best way to generate an addon repo, package the addon and push it to the repo for delivery?
Reply
#2
Depends which xbmc build you were using
Reply
#3
(2015-12-16, 15:43)Concestly Wrote: Depends which xbmc build you were using

I'm not sure what this comment means, but the repo structure is consistent across the currently available Kodi versions.
If you are familiar with github, it's pretty straight forward. There are several different ways to set the repo up, I'll give you a fairly simple version.

Have a look a how I've structured one of my repos: https://github.com/learningit/repository.t1m.addons
This is a very plain vanilla repo with only a 'Master' branch. I'll try to describe the repo below, but actually looking at it on github will probably tell you more.

You will see a separate folder for each addon. You can have as many addon folders as you want in the repo, but you need at least 1.
You will also see three files: addons.xml, addons.xml.md5 and a python script: addons_xml_generator.py - the python script actually creates addons.xml and addons.xml.md5, so a new repo will only have addons_xml_generator.py in it. Some kind soul wrote the script, you can download it from my repo.

Within each addon folder you will find a few files:
addon.xml - this is the addon xml file for the latest version of your addon
icon.png - this is optional, I use the same icon.png (256x256) as in my addon
addon zip files each with their version appended to the filename
changelog files with versions corresponding to addon zip they represent appended to the filename

You can keep as many different versions as you want in the addon folder, but you need at least 1.
You can see an example of an addon folder here: https://github.com/learningit/repository...video.cbsn

Once you've created the repo directory and the addon folders, you need to run the python script to create addons.xml and addons.xml.md5 files in the repo directory. You need to have installed python to run the script. I have a little (windows) batch that looks like this to run the generator:
Code:
cd C:\\Users\A\appdata\roaming\XBMC\repository.t1m.addons
c:\python27\python addons_xml_generator.py
All that remains is create the repo on github and sync with your local copy - which I'm not going to go into. There are plenty of wikis, etc describing that for each platform.

You also need to create an addon for the repo for Kodi. All that you need in the addon is an addon.xml file (you can also have icon.png, fanart.jpg) that looks something like this:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="repository.t1m.addons" name="t1m Add-on Repository" version="1.0.4" provider-name="t1m">
    <extension point="xbmc.addon.repository" name="Offical t1m Add-on Repository">
        <info compressed="true">https://raw.github.com/learningit/repository.t1m.addons/master/addons.xml</info>
        <checksum>https://raw.github.com/learningit/repository.t1m.addons/master/addons.xml.md5</checksum>
        <datadir zip="true">https://raw.github.com/learningit/repository.t1m.addons/master/</datadir>
    </extension>
    <extension point="xbmc.addon.metadata">
        <summary>Install  add-ons from github.com/learningit</summary>
        <description>Releases of my t1m addons - some may be under development</description>
        <platform>all</platform>
    </extension>
</addon>
You can look at my repo addon here: https://github.com/learningit/repository...odi_addons

Of course you need to modify the addon id, name and github paths to your values. Put the addon in a separate repo on github so that users can download the .zip easily. All they need to do is download the repo addon .zip and install it. You need to remember to run the addon_xml_generator.py each time you update the repo addon folders and sync with github. The rest is pretty automatic in Kodi, you can speed the process by doing a 'Check for Updates' - be aware that it may take sometime for the changes to be seen on github, but it's usually within a couple of minutes of updating (syncing) the repo.
Reply

Logout Mark Read Team Forum Stats Members Help
setting up an addon repo?0