Addon.xml

From Official Kodi Wiki
Jump to navigation Jump to search

Each skin in XBMC contains the addon.xml file which sets up an overview of the skin and provides credits, versioning information and dependencies.

Example

<?xml version="1.0" encoding="UTF-8"?>
<addon
  id="skin.confluence"
  version="1.1.0"
  name="Confluence"
  provider-name="Jezz_X, Team XBMC">
  <requires>
    <import addon="xbmc.gui" version="2.11"/>
    <import addon="script.recentlyadded" version="1.0.4"/>
  </requires>
  <extension
    point="xbmc.gui.skin"
    defaultresolution="720p"
    defaultresolutionwide="720p"
    defaultthemename="textures.xbt"
    effectslowdown="0.75"
    debugging="false"/>
  <res width="1280" height="960" aspect="4:3" default="true" folder="960p"/>  <!-- OPTIONAL! -->
  <extension point="xbmc.addon.metadata">
    <summary lang="en">Confluence skin by Jezz_X. (XBMC's default skin)</summary>
    <summary lang="fr">Skin Confluence par Jezz_X. (skin par défaut)</summary>
    <description lang="en">Confluence is the default skin for XBMC 9.11 and above.</description>
    <description lang="fr">Confluence est le skin par défaut de XBMC 9.11 ou supérieur.</description>
    <disclaimer lang="en">Confluence is the default skin for XBMC, removing it may cause issues</disclaimer>
    <disclaimer lang="fr">Confluence est le skin par défaut de XBMC, l'effacer peut créer des dysfonctionnements</disclaimer>
    <platform>all</platform>
  </extension>
</addon>

One thing to note is that all tag names are lower case. XML tag names are case sensitive!

Overview of the skin specific Tags

defaultresolution Default resolution folder for this skin. This is the base directory that all window xml file requests will fall back to.
defaultresolutionwide Default widescreen resolution folder for this skin. This is the directory that all window xml file requests from widescreen resolutions (1080i, 720p, 480p 16x9, NTSC 16x9 and PAL 16x9) will fallback to. If the file isn't found in this window, then it'll fall back to the <defaultresolution> folder.
defaultthemename Default theme name. Currently set to: Default.
effectslowdown A multiplier that is applied to all <animation> effect lengths in the skin. Useful to slow down all animations globally so that you can better configure timings and see interactions between animating controls.
debugging When set to true, it'll display onscreen debug information (xml filename, mouse position and focused control type and name) in the skin.
xbmc.gui version This specifies the version of the skin engine that this skin will operate with. The current minimum skin version is 2.0. The XBMC team tries to keep backward compatibility for as long as possible (generally before a major version jump).
res Support for arbitrary skin resolutions.

other tags are explained in the Add-ons_for_XBMC_(Developement) section.

How window xml files are found

XBMC can run in many differing resolutions, and a skin should try and cater to all these resolutions. The easiest way is to develop for one specific resolution and make sure that all controls contain <width> and <height> tags. That way, XBMC can scale the controls to the new screen resolution.

However, you may choose to develop alternative window xml files for differing resolutions (such as for HDTV resolutions, or for widescreen versus 4x3 resolutions).

The order that XBMC looks for it's skin files are as follows:

  1. It first looks in the current screenmode folder (one of 1080i, 720p, NTSC16x9, NTSC, PAL16x9 or PAL)
  2. If the current screenmode is 1080i, it then looks in the 720p folder.
  3. If the current screenmode is a widescreen mode (1080i, 720p, NTSC16x9, PAL16x9) then it looks in the <defaultresolutionwide> folder.
  4. Finally, it looks in the <defaultresolution> folder.

This allows you to just put any window files that do not require special treatment for 16x9 resolutions etc. in the <defaultresolution> folder, preventing needless repetition.