Add-on repositories: Difference between revisions
>Grajen3 No edit summary |
>NedBot m (Bot-aided spell checker; cosmetic changes) |
||
Line 1: | Line 1: | ||
See this [[HOW-TO: Create a Repository to host your Add-on]] | See this [[HOW-TO: Create a Repository to host your Add-on]] | ||
==Repositories== | == Repositories == | ||
Beginning with Dharma, XBMC includes an interface to browse remote repositories where add-ons can be retrieved. The model is similar to the way many current Linux distributions work, whereby there is a "main" repository that is the default, and additional ones may be added by the user. The [[Official Add-on Repository]] is included with XBMC by default and is maintained by the XBMC team. | Beginning with Dharma, XBMC includes an interface to browse remote repositories where add-ons can be retrieved. The model is similar to the way many current Linux distributions work, whereby there is a "main" repository that is the default, and additional ones may be added by the user. The [[Official Add-on Repository]] is included with XBMC by default and is maintained by the XBMC team. | ||
After you have created your repository, consider adding it to [[Unofficial Add-on Repositories]]. | After you have created your repository, consider adding it to [[Unofficial Add-on Repositories]]. | ||
==Ingredients for a Repository== | == Ingredients for a Repository == | ||
Repositories were created with the idea that they should be simple and easy enough to setup for anyone interested. The basic requirements are as follows: | Repositories were created with the idea that they should be simple and easy enough to setup for anyone interested. The basic requirements are as follows: | ||
*An HTTP server. Any should work. | * An HTTP server. Any should work. | ||
*Some add-ons. | * Some add-ons. | ||
*A master xml file. This file contains metadata about all available add-ons. | * A master xml file. This file contains metadata about all available add-ons. | ||
*A checksum of the above file. | * A checksum of the above file. | ||
*A repository add-on for distribution. This allows you to share your repository with others. | * A repository add-on for distribution. This allows you to share your repository with others. | ||
==Directory Structure== | == Directory Structure == | ||
addon.id | addon.id | ||
addon.id-x.y.z.zip | addon.id-x.y.z.zip | ||
Line 27: | Line 27: | ||
icon.png | icon.png | ||
*addon.id should be the same as the addon's id, which is expected to be unique. | * addon.id should be the same as the addon's id, which is expected to be unique. | ||
*x.y.z is the addon's version, the same should be listed in its version attribute. | * x.y.z is the addon's version, the same should be listed in its version attribute. | ||
==Addons.xml== | == Addons.xml == | ||
XBMC expects to fetch a master xml file that contains the information for each | XBMC expects to fetch a master xml file that contains the information for each add-on inside the repo. This file is named addons.xml - it can be placed external to the main repository of add-on files if you wish. This file merely encapsulates the other addon.xml files in an <addons> tag. See below for the basic structure: | ||
<source lang="xml"> | <source lang="xml"> | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
Line 47: | Line 47: | ||
</source> | </source> | ||
==Repository Add-on== | == Repository Add-on == | ||
Repositories are distributed just like any other add-on. In order for you to browse one in XBMC, you'll need to [[Add- | Repositories are distributed just like any other add-on. In order for you to browse one in XBMC, you'll need to [[Add-ons for XBMC (Developement)|create an add-on]] and install it. The repository addon extends the xbmc.addon.repository extension point, so in addition to the general XML structure and icons required for an icon, you'll need an <extension> block as follows: | ||
<source lang="xml"> | <source lang="xml"> | ||
<extension point="xbmc.addon.repository" | <extension point="xbmc.addon.repository" | ||
Line 57: | Line 57: | ||
</extension> | </extension> | ||
</source> | </source> | ||
===<info>=== | === <info> === | ||
URL to the main xml file, compressed="true" parameter specifies whether or not the xml should be fetched with compression (gzip) enabled. | URL to the main xml file, compressed="true" parameter specifies whether or not the xml should be fetched with compression (gzip) enabled. | ||
===<checksum>=== | === <checksum> === | ||
An MD5 checksum file of the main xml file. | An MD5 checksum file of the main xml file. If present, XBMC verifies the addons.xml file against this MD5. This is the mechanism that XBMC uses to decide whether we need to fetch the full XML file to verify whether updates are required. If the MD5 file has changed we fetch the full <info> file. If not, we don't. Thus, in order for automatic updates to work, you must ensure that you have the checksum file in place. | ||
===<datadir>=== | === <datadir> === | ||
URL to the root directory that contains the addons (i.e. the directory holding the addon.id subdirectories). | URL to the root directory that contains the addons (i.e. the directory holding the addon.id subdirectories). If the zip attribute is set to true, then XBMC downloads addons via <datadir>/addon.id/addon.id-x.y.z.zip. If zip is set to false, then XBMC assumes that each addon.id directory simply contains the addon itself, i.e. <datadir>/addon.id/<files for addon>. Online repositories should always have zip set to true, both for efficiency of download and for the protection that .zip offers by way of verifying the download (i.e. can we unzip it). | ||
[[ | [[Category:Add-ons]] |
Revision as of 15:34, 7 September 2011
See this HOW-TO: Create a Repository to host your Add-on
Repositories
Beginning with Dharma, XBMC includes an interface to browse remote repositories where add-ons can be retrieved. The model is similar to the way many current Linux distributions work, whereby there is a "main" repository that is the default, and additional ones may be added by the user. The Official Add-on Repository is included with XBMC by default and is maintained by the XBMC team.
After you have created your repository, consider adding it to Unofficial Add-on Repositories.
Ingredients for a Repository
Repositories were created with the idea that they should be simple and easy enough to setup for anyone interested. The basic requirements are as follows:
- An HTTP server. Any should work.
- Some add-ons.
- A master xml file. This file contains metadata about all available add-ons.
- A checksum of the above file.
- A repository add-on for distribution. This allows you to share your repository with others.
Directory Structure
addon.id addon.id-x.y.z.zip changelog-x.y.z.txt fanart.jpg icon.png addon2.id addon2.id-x.y.z.zip changelog-x.y.z.txt fanart.jpg icon.png
- addon.id should be the same as the addon's id, which is expected to be unique.
- x.y.z is the addon's version, the same should be listed in its version attribute.
Addons.xml
XBMC expects to fetch a master xml file that contains the information for each add-on inside the repo. This file is named addons.xml - it can be placed external to the main repository of add-on files if you wish. This file merely encapsulates the other addon.xml files in an <addons> tag. See below for the basic structure:
<?xml version="1.0" encoding="UTF-8"?> <addons> <addon id="sample.addon1" ... </addon> <addon id="sample.addon2" ... </addon> </addons>
Repository Add-on
Repositories are distributed just like any other add-on. In order for you to browse one in XBMC, you'll need to create an add-on and install it. The repository addon extends the xbmc.addon.repository extension point, so in addition to the general XML structure and icons required for an icon, you'll need an <extension> block as follows:
<extension point="xbmc.addon.repository" name="Official XBMC.org Add-on Repository"> <info compressed="true">http://mirrors.xbmc.org/addons/dharma-pre/addons.xml</info> <checksum>http://mirrors.xbmc.org/addons/dharma-pre/addons.xml.md5</checksum> <datadir zip="true">http://mirrors.xbmc.org/addons/dharma-pre</datadir> </extension>
<info>
URL to the main xml file, compressed="true" parameter specifies whether or not the xml should be fetched with compression (gzip) enabled.
<checksum>
An MD5 checksum file of the main xml file. If present, XBMC verifies the addons.xml file against this MD5. This is the mechanism that XBMC uses to decide whether we need to fetch the full XML file to verify whether updates are required. If the MD5 file has changed we fetch the full <info> file. If not, we don't. Thus, in order for automatic updates to work, you must ensure that you have the checksum file in place.
<datadir>
URL to the root directory that contains the addons (i.e. the directory holding the addon.id subdirectories). If the zip attribute is set to true, then XBMC downloads addons via <datadir>/addon.id/addon.id-x.y.z.zip. If zip is set to false, then XBMC assumes that each addon.id directory simply contains the addon itself, i.e. <datadir>/addon.id/<files for addon>. Online repositories should always have zip set to true, both for efficiency of download and for the protection that .zip offers by way of verifying the download (i.e. can we unzip it).