Untergeordnete Seiten
  • Changes to plugin.xml for compatibility management

  Wiki Navigation

    Loading...


 Recently Updated


 Latest Releases

 MediaPortal 1.32
            Releasenews | Download
 MediaPortal 2.5
            Releasenews | Download


Table of Contents

Overview

This guide describes the changes of plugin.xml file between "10th Anniversary Edition U1" and the "Summer '15" release due to new features of plugin compatibility management.

Sample

The following sample shows the differences and required changes of "Weather" plugin:

 

Before:

<Plugin
    DescriptorVersion="1.0"
    Name="Weather"
    PluginId="{AD9C0439-F9DA-443c-BAC3-163891FB09F1}"
    Author="Team MediaPortal"
    Copyright="GPL"
    Description="Weather Plugin"
    PluginVersion="1.0">

  <DependsOn>

    <PluginReference PluginId="{1AFF4467-64B0-4ca1-AF28-9AEDF3525BCE}"/> <!-- ConfigurationManager -->
    <PluginReference PluginId="{B765A4B6-F455-4941-BDAE-2CE45208BFEB}"/> <!-- Configuration plugin -->
    <PluginReference PluginId="{B32504F3-4374-4640-94A1-16E1DEE84C3C}"/> <!-- OnlineLibraries -->
  </DependsOn>

  <Runtime>
    <Assembly FileName="Weather.dll"/>
    <PluginStateTracker ClassName="MediaPortal.UiComponents.Weather.WeatherPlugin"/>
  </Runtime>

  <Register Location="/Models">
...
 

After:

<Plugin
    DescriptorVersion="1.0"
    Name="Weather"
    PluginId="{AD9C0439-F9DA-443c-BAC3-163891FB09F1}"
    Author="Team MediaPortal"
    Copyright="GPL"
    Description="Weather Plugin">

*  <Version
    PluginVersion="1.0"
    ReleaseDate="2013-11-11 01:00:00 GMT+01:00"
    CurrentAPI="1"/>*

  <DependsOn>
    <CoreDependency Name="MediaPortal.Common" CompatibleAPI="1" />
    <CoreDependency Name="MediaPortal.UI" CompatibleAPI="1" />
    <CoreDependency Name="MediaPortal.Utilities" CompatibleAPI="1" />

    <PluginReference PluginId="{1AFF4467-64B0-4ca1-AF28-9AEDF3525BCE}" CompatibleAPI="1"/> <!-- ConfigurationManager -->
    <PluginReference PluginId="{B765A4B6-F455-4941-BDAE-2CE45208BFEB}" CompatibleAPI="1"/> <!-- Configuration plugin -->
    <PluginReference PluginId="{B32504F3-4374-4640-94A1-16E1DEE84C3C}" CompatibleAPI="1"/> <!-- OnlineLibraries -->
  </DependsOn>

  <Runtime>
    <Assembly FileName="Weather.dll"/>
    <PluginStateTracker ClassName="MediaPortal.UiComponents.Weather.WeatherPlugin"/>
  </Runtime>

  <Register Location="/Models">

...

Remarks

In the example above there are following differences:

  1. The "PluginVersion" attribute was removed from "<Plugin>" element (red part) and is now stored as own <Version> element (green part)
  2. There is a new way to define plugin dependencies on core parts (yellow part). All referenced core assemblies in plugin project must be declared as dependency.
  3. The PluginReferences now also must contain the "CompatibleAPI" attribute (blue part) that matches the one which is defined inside referenced plugin.
  4. With introduction of this feature in June 2015 all API version number in "CompatibleAPI" are "1". They will be only increased for new features or breaking changes in the related component.

   

 

This page has no comments.