We have dealt with creating your first simple application and with adding a third party repository to your Boxee setup. The next step is to put the two together to create your own Boxee Repository.
Your repository will list your applications and allow users to download new apps and updates that you release.
Setting up your own repository is pretty straightforward. You will need to have a web hosting package of some kind to host your repository and all your applications, you may want to register a domain (or use one you already own).
The first thing to decide is the url that you will use for your repository. Most Boxee developers seem to prefer to set up a sub-domain for their repository, usually dir.yourdomain.com (e.g. dir.nexthop.ie is the url to my repository) Using a sub-domain is not a requirement. You could just as easily host your repository at www.yourdomain.com/boxee/myrepo/. Keep in mind however that not all Boxee users will have a keyboard hooked up to their media centre so short urls are preferred.
Once you have decided on where to host your repository you need to build it. The structure is quite simple. You need three files in the repository root directory. repository.xml, index.xml and index.php.
repository.xml should look something like this:
<repository>
<id>com.yourdomain</id>
<url>http://dir.yourdomain.com</url>
<name>Repository Name</name>
<thumb>http://dir.nexthop.ie/nexthop_logo.png</thumb>
<description>A short description</description>
</repository>
index.xml should look like this:
<apps>
<app>
<id>com.yourdomain.TourismIreland</id>
<name>Tourism Ireland</name>
<version>1.0</version>
<description>Watch Videos from Tourism Ireland</description>
<thumb>http://dir.nexthop.ie/apps/tourismireland/ti.png</thumb>
<repository>http://dir.yourdomain.com</repository>
<media>video</media>
<copyright>dkane</copyright>
<email>info@yourdomain.com</email>
<type>url</type>
<platform>all</platform>
<minversion>0.9.5</minversion>
<url>rss://gdata.youtube.com/feeds/api/users/TourismIreland/uploads?orderby=updated&alt=rss</url>
</app>
</apps>
index.php is very similar to index.xml, it should look like so:
<?php
$fp = fopen($_SERVER["SCRIPT_FILENAME"], "r");
$etag = md5(serialize(fstat($fp)));
fclose($fp);
header('Etag: '.$etag);
header ("content-type: application/xml");
?>
<apps>
<app>
<id>com.yourdomain.TourismIreland</id>
<name>Tourism Ireland</name>
<version>1.0</version>
<description>Watch Videos from Tourism Ireland</description>
<thumb>http://dir.nexthop.ie/apps/tourismireland/ti.png</thumb>
<repository>http://dir.yourdomain.com</repository>
<media>video</media>
<copyright>dkane</copyright>
<email>info@yourdomain.com</email>
<type>url</type>
<platform>all</platform>
<minversion>0.9.5</minversion>
<url>rss://gdata.youtube.com/feeds/api/users/TourismIreland/uploads?orderby=updated&alt=rss</url>
</app>
</apps>
Note that the <id> tag has changed to include the repository id:
<id>com.yourdomain.TourismIreland</id>
Also make sure that there is a blank line at the end of each of these files, just after the last closing tag. Failing to include this blank line may cause your repository to not behave correctly.
You also need a directory under the root called download. This directory will store zipped copies of all your applications. In the download directory there should be a zipped archive for each app. The zipped file should be named com.yourdomain.TourismIreland-1.0.zip where com.yourdomain is the id of your repository, TourismIreland is the name of the app and 1.0 is the version number as in the descriptor.xml and index.xml files.
Inside the zipped file there should be one directory named com.yourdomain.TourismIreland, notice the version number is not part of this directory name.
And within this directory should be the discriptor.xml file as described in my previous post building your first rss app for boxee. Note that the value of <id> in the descriptor is not the same as <id> in index.xml and index.php.
In the index files the <id> tag should read:
<id>com.yourdomain.TourismIreland</id>
In the descriptor this should read:
<id>TourismIreland</id>
When you create a new application you will need to add the zipped archive for the app to the download directory and add a new <app> section to both index.php and index.xml.
When you have created your repository you can try it out by adding it to your Boxee setup as I described in this post.
Once you are happy that all is working correctly and you have added your first few apps to the repository you may submit it to fuzzthed.com's list of Boxee repositories here.