Wiki Navigation
- Loading...
Overview
The MP2 Package File Format describes the contents of an MP2 package file.
General
A package file is a zip compressed folder using the file extension .mp2x.
By definition a package can contain various things. Currently only single plugin packages are supported.
The file name of a single plugin package has to be as follows:
<PluginName>-<MajorVersion>.<MinorVersion>.mp2t
like "SlimTV.Service-1.0.mp2x".
Packages should never be created manually. Always use the Command Line Utility.
Content overview
The structure of an package file is quite flexible. The only file that needs to be in every package is a XML file named PackageInfo.xml.
Depending of the type of package (like a single plugin package) other content is required.
The minimum content of an single plugin package looks like this:
<PluginName>-<MajorVersion>.<MinorVersion>.mp2x
[%Plugins%]
[<PluginName>]
plugin.xml
{other plugin content}
PackageInfo.xml
PluginInfo.xml
ReleaseInfo.xml
Package root content
Item | Type | Required for | Description |
---|---|---|---|
PackageInfo.xml | XML file. | Always | Contains general information of the package. The PackageInfo.xml file is created automatically by the Command Line Utility during the create process. |
PluginInfo.xml | XML file | Plugin package | Contains all plugin meta data that is independent of a plugin version/release. The PluginInfo.xml file is usually identical for multiple releases of the same plugin. It has to be created manually. |
ReleaseInfo.xml | XML file | Plugin package | Contains version/release specific plugin meta data. The ReleaseInfo.xml file has to be created manually. |
%Plugins% | Folder | Plugin package | Contains the plugin folders as they are copied to the target machine <Plugins> directory during the installation process. A single plugin package must contain exact one plugin folder. Each sub folder must contain a plugin.xml file. |
%*% | Folder | Optional | Any package root folder with an '%' prefix and suffix is an 'auto copy folder". The contents of any auto copy folder of the package is copied to the matching folder on the target machine. The exact location of the target is resolved during the installation process. The name of the auto copy directory (without pre- and suffix) must match an registered directory on the target machine. |
* | Folder | Optional | Additional folders can be added to the package as needed. All folders in the root directory must be used by any item like install actions, images, ... in the package. Unused folders are not allowed. |
* | File | not allowed | Any other file is not allowed in the root folder. |
The following table describes the required and optional contents of the package root:
PackageInfo.xml
The PackageInfo.xml file contains general information about the package and is automatically created during the package creation process.
XML Elements and Attributes
Name | Type | Count | Package version | Description |
---|---|---|---|---|
PackageInfo | XML element | 1 | 1 | XML file root node. |
PackageInfo:PackageVersion | XML attribute | 1 | 1 | Version of the package file format. The package file format is a single integer. When new package features are introduced, tho version is increased. Tools that support older versions only will fail if they get an newer package to work with. |
Any additional elements or attributes are not allowed.
The "Package version" column in the XML Element/Attribute tables defines which Package Versions supports this element.
Sample PackageInfo.xml file:
<?xml version="1.0" encoding="utf-8"?> <PackageInfo PackageVersion="1" />
PluginInfo.xml
The PluginInfo.xml file contains general information about the plugin.
XML Elements and Attributes
Name | Type | Count | Package Version | Description |
---|---|---|---|---|
PluginInfo | XML element | 1 | 1 | XML file root node. |
PluginInfo:Name | XML attribute | 0..1 | 1 | Name of the Plugin. This name must be identical with the main plugin folder name. For single plugin packages this attribute is optional. |
PluginInfo:FriendlyName | XML attribute | 0..1 | 1 | Friendly name, mainly used for display issues. For plugin packages the friendly name is optional. If the friendly name is not specified, the name from the main plugin meta data is used. |
PluginInfo:Copyright | XML attribute | 0..1 | 1 | Copyright of the package. For plugin packages the copyright is optional. If the copyright is not specified, the copyright from the main plugin meta data is used. |
PluginInfo:Author | XML attribute | 0..1 | 1 | Author of the package. For plugin packages the author is optional. If the author is not specified, the author from the main plugin meta data is used. |
PluginInfo:Description | XML attribute | 0..1 | 1 | Description of the package. For plugin packages the description is optional. If the description is not specified, the description from the main plugin meta data is used. |
PluginInfo:Target | XML attribute | 1 | 1 | Target of the package. The target defines on which systems the package can be installed. Supported values are: Server: MP2 server Client: MP2 client Shared: MP2 client or server |
PluginInfo:Channel | XML attribute | 1 | 1 | Release Channel of the package. The channel defines on which channel the package is shown on the web server. Supported values are: Internal: For internal use only Developers: Only visible to developers. Alpha: Alpha release channel Beta: Beta release channel ReleaseCadidate: Release candidate release channel Release: Normal (public) release channel |
PluginInfo/Image | XML element | 0..n | 1 | Associates an image with the package. Images can serve multiple purposes, defined by the Type attribute. The value of the element contains the path to the image. The image must be contained in the package. The path is relative to the package root folder. Images should be placed in an root folder named "Images". |
PluginInfo/Image:Type | XML attribute | 1 | 1 | Type/usage of the image. Supported values are: Logo: Logo of the package to be used as icon. Only one logo should be defined. The description for this image is not used. Screenshot: Screenshot of the package. Screenshots are shown on the web server. The description should be specified for screen shots. |
PluginInfo/Image:Description | XML attribute | 0..1 | 1 | Description of the image. |
PluginInfo/Link | XML element | 0..n | 1 | Associates an image with the package. The value of the XML element contains the link. The link must be an valid URL. Links are displayed on the web server. |
PluginInfo/Link:Description | XML attribute | 1 | 1 | Description of the link. The description is used as display text of the link. |
Any additional elements or attributes are not allowed.
Sample PackageInfo.xml file:
<?xml version="1.0" encoding="utf-8"?> <PluginInfo Target="Server" Channel="Beta"> <Image Type="Logo">Images\Logo.png</Image> <Image Type="Screenshot" Description="SetupTV in action">Images\ScreenShot1.png</Image> <Link Description="Home">https://forum.team-mediaportal.com</Link> <Link Description="Source">https://github.com/MediaPortal/MediaPortal-2</Link> </PluginInfo>
ReleaseInfo.xml
The ReleaseInfo.xml file contains release/version specific information about the package.
XML Elements and Attributes
Name | Type | Count | Package version | Description |
---|---|---|---|---|
ReleaseInfo | XML element | 1 | 1 | XML file root node. |
ReleaseInfo:Version | XML attribute | 0..1 | 1 | Version of the package. For plugin packages the version is optional. If the version is not specified, the version from the main plugin meta data is used. |
ReleaseInfo:ReleaseNotes | XML attribute | 1 | 1 | Release notes of the package. This contains information about the changes, bug fixes, new features, ... of the release. |
ReleaseInfo/InstallActions | XML element | 0..1 | 1 | List of actions which is executed when the package is installed. When no install actions are defined, then the default install action 'CopyPackageDirectories" is used. |
ReleaseInfo/InstallActions/Action | XML element | 0..n | 1 | Action elements, see below. |
ReleaseInfo/UpdateActions | XML element | 0..1 | 1 | List of actions which is executed when the package is updated. Instead of defining update actions, the attribute "UseInstallActions" can be set to true (see below). When no update actions are defined, then the install actions are used for update. |
ReleaseInfo/UpdateActions:UseInstallActions | XML attribute | 0..1 | 1 | When set to true, the install actions are used for update. The "Overwrite" parameter of each action is overriden to true then. |
ReleaseInfo/UpdateActions/Action | XML element | 0..n | 1 | Action elements, see below. |
ReleaseInfo/UninstallActions | XML element | 0..1 | 1 | List of actions which is executed when the package is uninstalled. When no uninstall actions are defined, then the default install action 'DeletePackageDirectories" is used. |
ReleaseInfo/UninstallActions/Action | XML element | 0..n | 1 | Action elements, see below. |
Any additional elements or attributes are not allowed.
The "Pck version" column in the XML Element/Attribute tables defines which Package Versions supports this element.
Sample PackageInfo.xml file:
<?xml version="1.0" encoding="utf-8"?> <ReleaseInfo ReleaseNotes="Initial version"> <!-- the following 3 action elements (install, update, uninstall) should be the default behavior, even if the are not part of this file --> <InstallActions> <Action Type="CopyPackageDirectories"/> <!-- Copies all directories from the package to the desired targets For all %Plugins%\*\plugin.xml files the dependencies are checked. The plugin Name and Version of one of these plugin.xml files must match the information in PluginInfo.xml --> </InstallActions> <UpdateActions UseInstallActions="true"/> <!-- If UseInstallActions=true then the same actions as for install are used for update as well. All existing files will be overwritten. --> <UninstallActions> <Action Type="DeletePackageDirectories"/> <!-- deletes all directories on the target system which exists in this package --> </UninstallActions> <!-- more actions and action properties will be specified in the future. This could be actions like: copy, extract, delete, run Additional action properties could be: friendly action names for logging, conditions like "only if old version = x,y", ... --> </ReleaseInfo>
Auto copy folders
Install actions
This page has no comments.