Custom Repository

From DevWiki

Revision as of 13:29, 22 December 2009 by Riegersn (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Back to Home

Contents


Custom Repository

You may decide not to submit your applications to Boxee and rather store them in your own repository. Users may add your repository url from the Boxee app store. The following describes the steps you need to follow in order to host your own repository.

The protocol that the Boxee client communicates with the repository is HTTP over TCP port 80. You are free to use any HTTP web server such as Apache as Lighttpd. The repository can reside on any directory under your web server.

Important: Every application in a repository must have the application repository id as a prefix to the application id. For example: if your repository if called com.myboxee and you want to build app called “facebook”, then the application id MUST be com.myboxee.facebook. This is required in order to assure global uniqueness in the application ids.

The structure of files under the repository root are as follows:

<root_of_repository>
|
+-- repository.xml
|
+-- index.xml
|
+-+ download/
  |
  +-- <appid>-<version>.zip
  |
  +-- ...
Details
repository.xml Descriptor file of the repository (name, thumbnail, etc)
index.xml Index of all the applications and versions in the repository.
download Folder that contains ZIP files of all the applications in the different versions. Each application should be packaged as described below.


repository.xml

This is a descriptor of the repository. The descriptor file is an XML document which has the root element called repository. The following sub-elements should be placed under that element:

id Unique identifier for the repository. We recommend to use the reverse domain of where the repository is hosted. For example, if you host at boxeehq.com, the repository should have the id of com.boxeehq.
url The full URL of the repository. For example: http://dir.boxeehq.com.
name The name of the repository. For example: My BOXEE Repository.
thumb URL of a thumbnail to the repository. For example: http://dir.boxeehq.com/thumb.png. The thumbnail size should be 200×200. The background of the thumbnail must be a graay gradient which can be downloaded from here.
description Free text desribing the repository, creator and its contents.


An example of a repository file from dir.boxeehq.com:

<repository>
   <id>com.boxeehq</id>
   <url>http://dir.boxeehq.com</url>
   <name>BoxeeHQ</name>
   <thumb>http://dir.boxeehq.com/thumb.png</thumb>
   <description>Official Boxeehq.com repository. All apps developed by Boxeehq. Enjoy.</description>
</repository>


index.xml

This is a index or manifest of all the applications hosted in the repository. The index file is an XML document which has the root element called apps. Under the root element, there are one or more application descriptors (including their app element) as described in the Application Descriptor File specification.

An example of a index file from dir.boxeehq.com which contains two applications:

<apps>
   <app>
      <id>com.boxeehq.gametrailers</id>
      <name>GameTrailers</name>
      <version>1.0</version>
      <description>Watch videos from GameTrailers.com</description>
      <thumb>http://dir.boxeehq.com/apps/gametrailers/gt.png</thumb>
      <repositoryid>com.boxeehq</repositoryid>
      <repository>http://dir.boxeehq.com</repository>
      <media>video</media>
      <author>team-boxeehq</author>
      <copyright>BoxeeHQ.com</copyright>
      <email>support@boxeehq.com</email>
      <type>skin</type>
      <startWindow>14000</startWindow>
      <platform>all</platform>
      <minversion>0.9.14</minversion>
   </app>
   <app>
      <id>com.boxeehq.openfilm</id>
      <name>Openfilm</name>
      <version>0.1</version>
      <description>High quality live-action and animated films displayed in high resolution</description>
      <thumb>http://dir.boxeehq.com/apps/openfilm/openfilm.png</thumb>
      <repositoryid>com.boxeehq</repositoryid>
      <repository>http://dir.boxeehq.com</repository>
      <media>video</media>
      <author>team-boxeehq</author>
      <copyright>BoxeeHQ.com</copyright>
      <email>support@boxeehq.com</email>
      <type>skin</type>
      <startWindow>14000</startWindow>
      <platform>all</platform>
      <minversion>0.9.14</minversion>
   </app>
</apps>


download/

The download directory contains packaged applications. Boxee applications are packaged in ZIP files. The ZIP file must include the application descriptor file called "descriptor.xml" at the root. GUI Applications should include all skin files and python files. Plugins should also include the file "default.py" and any other addtional Python and/or resource files. The ZIP file must be called appid-ver.zip. For example: com.myboxee.facebook-1.12.zip which means that the the application is called "com.myboxee.facebook" with version number "1.12". See note above that every application in the repository must have the repository id as a prefix. The application id and version number must match the information in the application descriptor file.

Personal tools