»
S
I
D
E
B
A
R
«
Building Your First App: Creating The Skeleton
1 November 2009 by Rob Spectre
This entry is part 3 of 9 in the series Building Your First App

Last time we broke down our app design into three different graphics files – background, list container and metadata box.  Next, we will create the skeleton of our app and place the files in their permanent home.

First, we will create our descriptor.xml.  The descriptor.xml is the configuration file for the application that tells Boxee the location of all important resources and provides metadata about the app including title, description, version and author.

An example of such a descriptor.xml is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<app>
  <id>appid</id>
  <name>Name of App</name>
  <version>1.0</version>
  <description>A description of your app.</description>
  <thumb>http://yourdomain.com/yourapp/images/thumb.png</thumb>
  <repository>http://dir.boxee.tv/apps</repository>
  <media>video</media>
  <copyright>Your Name</copyright>
  <email>youremail@email.com</email>
  <type>skin</type>
  <startWindow>14000</startWindow>
  <platform>all</platform>
  <minversion>0.9.11</minversion>
  <test-app>true</test-app>
</app>

What do all these elements mean and how do they affect your app? The Boxee developer documentation has a complete breakdown with three helpful examples.

After we create the descriptor.xml, we can create the directory structure for our application.

First we create a directory with the same name as the value of the id element in our descriptor.xml. Afterwards, we place our descriptor.xml in that directory.

In the root folder we need to create a directory called skin.

Then within the skin folder, create another called Boxee Skin NG. This is where we store the media and resolution skin XMLs.

Within Boxee Skin NG, create two directory – one called 720p and another called media.

When finished, your app’s directory structure should look like:

descriptor.xml
|-skin
|---Boxee Skin NG
|-----720p
|-----media
|---------background.png
|---------list.png
|---------metadata.png

Afterwards, we put the graphic files we created in the last step in their final destination, the media directory.

With our skeleton complete, we can go ahead and place our app folder in a place where Boxee can recognize it. First we need to identify the location of our UserData folder; its location varies depending on your operating system.

  • Linux: ~/.boxee/UserData/
  • Mac OS/X: ~/Library/Application Support/BOXEE/UserData/
  • AppleTV: ~/Library/Application\ Support/BOXEE/UserData/
  • Windows Vista: C:\Users\\AppData\Roaming\BOXEE\userdata\
  • Windows XP: C:\Documents and Settings\\Application Data\BOXEE\userdata\

Once identifying your UserData folder, you need to place your app in the UserData/apps folder to prepare for the next step: hello world!

Series Navigation«Building Your First App: Breaking Down The ControlsBuilding Your First App: Hello World»

blog comments powered by Disqus
»  Substance: WordPress   »  Style: Ahren Ahimsa
© 2009, all rights reserved.