<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pandorawiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dflemstr</id>
	<title>Pandora Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://pandorawiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dflemstr"/>
	<link rel="alternate" type="text/html" href="https://pandorawiki.org/Special:Contributions/Dflemstr"/>
	<updated>2026-04-23T17:23:31Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.32.0-alpha</generator>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2512</id>
		<title>PXML specification</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2512"/>
		<updated>2010-06-22T11:33:11Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article covers the specification for PXML files. To see the specification for PND repository files, please see the [[PND repository specification]].&lt;br /&gt;
&lt;br /&gt;
'''Attention:''' at the present time, the PXML file format isn't set in stone, and is therefore subject to change. There is no guarantee that the format or the schema are bug-free or will be changed at any time. Please wait until this standard is finished before writing a PXML file.&lt;br /&gt;
&lt;br /&gt;
This is the human-readable specification for the PXML file format. The PXML file format is used in your applications for the OpenPandora® that you package in &amp;quot;.pnd&amp;quot;-files or distribute otherwise, to make it possible for menus and launchers to use your applications and their properties.&lt;br /&gt;
&lt;br /&gt;
A PXML file should be appended to your &amp;quot;.pnd&amp;quot;-file, using the tools provided for that purpose, or put in a directory that you want to serve as a redistributable package, to make it possible for launchers and menus to find it. It should have the name &amp;quot;PXML.xml&amp;quot; not case sensitive, and there should only be one such file. The contents of the PXML file should also comply to this specification without exception, to guarantee that everyone will be able to read it.&lt;br /&gt;
&lt;br /&gt;
== XML compatibility ==&lt;br /&gt;
The PXML format is XML-based and fully XML-compliant, which means that it can be read and written by any XML reader or writer. Included with this specification should also be a &amp;quot;.xsd&amp;quot;-file, which is used by XML tools to validate PXML files. A &amp;quot;.xsd&amp;quot;-file is also known as a XML schema, and can be called the &amp;quot;computer-readable&amp;quot; version of this document. It is very good practice to validate your PXML-files with that schema before publishing them.&lt;br /&gt;
&lt;br /&gt;
To write a PXML file, you also need to know the basics of writing a XML file. It boils down to the following:&lt;br /&gt;
&lt;br /&gt;
# If an element contains text or other elements, it needs a start-tag and an end-tag. This looks like (1)&lt;br /&gt;
# If an element does not contain other elements or text, but only attributes, it looks like (2)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement someattribute=&amp;quot;something&amp;quot;&amp;gt;something inside it&amp;lt;/exampleelement&amp;gt; &amp;lt;!-- (1) --&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement2 someattribute=&amp;quot;something&amp;quot; /&amp;gt; &amp;lt;!-- (2) --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The PXML-file is split up into multiple so-called elements, each of which specify one property of the &amp;quot;.pnd&amp;quot;-package. All of these elements are surrounded with a &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag, which tells the readers of the file that the data within that tag belongs to a PXML file. The tag and elements should be defined as follows:&lt;br /&gt;
=== The PXML-tag ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The PXML-tag serves as the container for all PXML elements. It is the first thing that should occur in your PXML file. An example &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, the PXML tag accepts a few attributes, namely the &amp;quot;id&amp;quot; and &amp;quot;xmlns&amp;quot; attributes.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;xmlns&amp;quot; attribute is required by the XML standard, and guarantees that this file will be identified as a PXML file. You must include the xmlns attribute, exactly as shown, in your PXML file, with the URL as specified. Only then can it be guaranteed that the file will be read at all by launchers and menu apps.&lt;br /&gt;
* '''DEPRECATED; SEE &amp;quot;application&amp;quot; tag.''' The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
=== The Application-tag ===&lt;br /&gt;
====Description====&lt;br /&gt;
The Application-tag permits the PXML.xml container to have multiple applications within it; you should have at least one application tag-pair (for one app), though you may have many.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;application id=&amp;quot;uniqueID&amp;quot; appdata=&amp;quot;dirname&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;appdata&amp;quot; permits a directory name (NOT PATH) to be specified as preferred; if not present, the unique-id will be used. For example, we may want a unique-id of &amp;quot;Battlejewels.skeezix.3216836217382163.v001&amp;quot;, but a appdata path of &amp;quot;battlejewels&amp;quot; to make it easier on the user, or to have multiple different battlejewels sharing one appdata.&lt;br /&gt;
&lt;br /&gt;
A good unique-id is the application name, developer name, and some key you may wish to update on occasion (should state-data become incompatible between updates, say.)&lt;br /&gt;
&lt;br /&gt;
Consider:&lt;br /&gt;
battlejewels.skeezix.001&lt;br /&gt;
quake-1.pickle.001&lt;br /&gt;
&lt;br /&gt;
unique-id formatting: '''Should not include directory or filename invalid characters, such as ?, &amp;gt;, /, etc. Any of those will cause the pnd-file to not function.'''&lt;br /&gt;
&lt;br /&gt;
Note on Uniqueness: The unique-id should be unique against other pnd-files, but may be re-used by other 'application' tags within the pnd; for example, you may have multiple subapps that want to share the same appdata path (which is formed based on unique-id!), so use the same unique-id. You might then have a utility application in that same pnd, which needs its own appdata, and so gets its own unique-id.&lt;br /&gt;
&lt;br /&gt;
=== The title element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The title element specifies the text that is shown to the users of your PND file as the application title. This element can be specified multiple times in multiple languages (the language is indicated by the lang attribute).&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;title&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Your application name&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;Dein Programmname&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The description element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The description element specifies the text that is shown to the users of your PND file as the application description. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;description&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;Your long description of this application, describing its purpose and highlighting its features.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;Deine etwas längere Programmbeschreibung, die den Sinn des Programmes und seine wichtigsten Features beschreiben sollte.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The exec element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The exec element should specify all the information needed to execute your application.&lt;br /&gt;
An exec element must be included in every PXML file. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The command attribute specifies the path to the executable file. This should be a relative path to a file within the PND package. Must contain no arguments! One strategy you may need is to point to a sh-script in your pnd-file, which in turn sets up LD_LIBRARY_PATH, determines arguments to pass, uses zenity to pop up a pre-run menu, or other trickery.&lt;br /&gt;
* The arguments attribute may be not present, or present with 1 or more arguments to the executable.&lt;br /&gt;
* The startdir attribute specifies the starting directory (Also known as the working directory) that the application should start in. This should be a relative path to a directory within the PND package, or to a well-known directory in the Pandora file system.&lt;br /&gt;
* The standalone attribute specifies whether or not this application can run on its own, or if it needs parameters to run. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can be run without parameters. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run with parameters (Meaning that no icon will appear for it in a launcher; it will only be run via file associations or via the terminal).&lt;br /&gt;
* The background attribute specifies whether or not this application should run in the background, and it should be possible to switch to other apps while it is running, or if it is the only application that should be running. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can run in the background. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run as the only application.&lt;br /&gt;
* The x11 attribute may be missing; values are one of &amp;quot;req&amp;quot;, &amp;quot;stop&amp;quot;, and &amp;quot;ignore&amp;quot;. If &amp;quot;req&amp;quot; is set, it means the application requires X11 (and possibly could be filtered out of users display in a menu if X is not running, or perhaps such a menu would have to start X.) If &amp;quot;stop&amp;quot; is set, it means X must be not running, or temporarily shut down, for the app. If &amp;quot;ignore&amp;quot; is set, the app doesn't care if X is running or not (such as an SDL app, or a sh-script, etc.)&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;myprogram&amp;quot; arguments=&amp;quot;arg1 arg2&amp;quot; x11=&amp;quot;option&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The icon element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The icon element should specify a nice icon for your program.&lt;br /&gt;
An icon element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The src attribute specifies the path to the image file used as the icon.&lt;br /&gt;
&lt;br /&gt;
NOTE: Current implementation will use the pnd-file's appended icon; for a PXML-app-directory, it will try to use the icon mentioned in the PXML. So for a pnd-file, all subapps will show the appended-icon, regardless of the &amp;lt;icon&amp;gt; tag within the PXML.xml&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;icon src=&amp;quot;images/icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The info element ===&lt;br /&gt;
====Description====&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;info&amp;quot; element allows the PXML.xml to suggest to the desktop environment or menu a file that may be shown to the user when they want to know more - be it an About, a Install Guide, a User Guide, or all of the above.&lt;br /&gt;
&lt;br /&gt;
The file can be a txt-file or an html-file, and as the PXML-app-dir or .pnd-application will be mounted, the file may in turn branch to other files should it wish to.&lt;br /&gt;
&lt;br /&gt;
Developers do not need to have this element, if their app is nice and simple and just runs. If the application requires additional set up (such as Quake requiring separate pak files that cannot be included in the pnd), or if you wish to include sample config files or config guidelines for something complex like DosBox, or include Pandora-specific notes.. those are all good things. But the developer is encouraged to be tasteful and not go hog-wild!&lt;br /&gt;
&lt;br /&gt;
* name → the name to be shown in the menu; should be obvious that it belongs to the pnd .. Quake's game pnd could have &amp;quot;Quake 1 Setup&amp;quot;.&lt;br /&gt;
* type → the mime type for the file; in the event the consuming application can map mimetypes to an appropriate executable, this would be a good way of letting the user's preferred reader come up. Should be one of &amp;quot;text/html&amp;quot; (for an html file) or &amp;quot;text/plain&amp;quot; (for a .txt file)&lt;br /&gt;
* src → '''required''' A file (including path relative to the pnd; ie: ./index.html would be the root of the pnd) in the pnd to open up; by default, the web browser will likely be used to open it.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;text/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The previewpics element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The previewpics element is an element that contains multiple other elements.&lt;br /&gt;
A previewpics element is optional.&lt;br /&gt;
&lt;br /&gt;
It contains multiple pic-elements. Every pic-element represents one preview picture. If the previewpics element is specified, it must contain at least one pic element.&lt;br /&gt;
&lt;br /&gt;
* The src attribute on a pic element specifies the path to the image file used as the preview picture.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;previewpics&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The author element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The author element is an element that is used by the author to introduce him/herself.&lt;br /&gt;
An author element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The name attribute specifies the name of the author.&lt;br /&gt;
* The website attribute specifies the website of the author.&lt;br /&gt;
* The email attribute specifies the e-mail of the author. This attribute is not yet supported by libpnd, but please specify it anyways.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The version element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The version element specifies the application version.&lt;br /&gt;
A version element is required. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The major attribute specifies the major version number. This number should be 0 or more.&lt;br /&gt;
* The minor attribute specifies the minor version number. This number should be 0 or more.&lt;br /&gt;
* The release attribute specifies the release number. This number should be 0 or more.&lt;br /&gt;
* The build attribute specifies what build the application is at. This number should be 0 or more.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The osversion element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The osversion element specifies the minimal OS version that supports the PND file. The PND file will not be loaded by an OS that has an older version than the one specified here.&lt;br /&gt;
An osversion element is optional. It accepts the same attributes as the version element.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The categories element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The categories element is an element that contains multiple other elements.&lt;br /&gt;
A categories element is required, and must contain at least one category.&lt;br /&gt;
&lt;br /&gt;
Menus that use your PXML in any shape or form will use the category information to sort your application entry into the tree or sub menus. Depending on the menu system, this will be done differently every time. It is therefore advisable to specify as many categories and subcategories as possible (and as suitable; don't specify that your application belongs in a category if it doesn't).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;categories&amp;quot; element contains multiple category-elements. Every category-element represents one category that this app can be sorted into. Valid top-level categories are (among others):&lt;br /&gt;
&lt;br /&gt;
# AudioVideo&lt;br /&gt;
# Audio&lt;br /&gt;
# Video&lt;br /&gt;
# Development&lt;br /&gt;
# Education&lt;br /&gt;
# Game&lt;br /&gt;
# Graphics&lt;br /&gt;
# Network&lt;br /&gt;
# Office&lt;br /&gt;
# Settings&lt;br /&gt;
# System&lt;br /&gt;
# Utility&lt;br /&gt;
&lt;br /&gt;
Please see [http://standards.freedesktop.org/menu-spec/latest/apa.html the FreeDesktop specification] for more information. In it, you will also find valid subcategories for your top-level categories.&lt;br /&gt;
&lt;br /&gt;
The category-element takes one attribute: The name-attribute. This attribute represents the category name, which preferrably should be one of the above.&lt;br /&gt;
&lt;br /&gt;
A category-element can contain further child-elements: subcategory-elements. These represent the subcategories of a category that the app will be sorted into.&lt;br /&gt;
&lt;br /&gt;
The subcategory-element also takes a name-attribute; this attibute can contain a name for your subcategory.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;categories&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app belongs in the &amp;quot;Game/StrategyGame&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app also belongs in the &amp;quot;Graphics/ImageProcessing&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/categories&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The associations element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The associations element is an element that contains multiple other elements.&lt;br /&gt;
An associations element is optional, except if exec.standalone is false.&lt;br /&gt;
&lt;br /&gt;
It contains multiple association-elements. Every association-element represents one file action association.&lt;br /&gt;
&lt;br /&gt;
* The name attribute on an association element specifies the user-friendly action name for the association.&lt;br /&gt;
* The filetype attribute on an association element specifies what file types (in MIME format) that this association should apply to.&lt;br /&gt;
* The exec attribute on an association element specifies the command-line arguments that should be given to the program, when this action is performed. The exec can contain a &amp;quot;%s&amp;quot;, which indicates where the file name of the file, that the action is performed on, should be inserted. For example, if the exec-line is &amp;quot;--file %s --type lol&amp;quot;, and you have a file &amp;quot;lol.bmp&amp;quot; that the action is performed on, the exec-line is transformed into &amp;quot;--file &amp;quot;lol.bmp&amp;quot; --type lol&amp;quot;&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;associations&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Deinterlaced Bitmap Image&amp;quot; filetype=&amp;quot;image/bmp&amp;quot; exec=&amp;quot;-f %s --no-deinterlacing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Style sheet system crasher&amp;quot; filetype=&amp;quot;text/css&amp;quot; exec=&amp;quot;-f %s --crash-on-success&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/associations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The clockspeed element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The clockspeed element specifies what clockspeed this app should run at. Please do only specify this element if your application *needs* to run at the specified clock speed.&lt;br /&gt;
A clockspeed element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The frequency attribute specifies the wanted frequency, in megahertz (MHz).&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The mkdir element ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The PXML may request creation of directories on the SD card.&lt;br /&gt;
&lt;br /&gt;
'''This should be used sparingly.'''&lt;br /&gt;
&lt;br /&gt;
There are a number of scenarios in which this may be useful; should an application wish to attempt to establish a canonicle location for a file, it can request a path be created. This can avoid user confusion -- user merely plugs in SD, waits a few moments, pulls out SD, and inspects it to see what directories he may populate. Consider 'id' files for Quake -- the user might have many ports of the game, such as Quake, or ioquake, or others. They could all share the same id pak files, but the user may not know where to put them. (Especially since the pnd-file itself does not have user documentation available perhaps.) Consider ROM-paths for emulators .. perhaps the emulator expects ROMs in a specific location? If so, the author may wish to have that location created, to make it obvious.&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
The paths are created on the SD that contains the pnd.&lt;br /&gt;
The paths may not include &amp;quot;..&amp;quot; or wildcards.&lt;br /&gt;
&lt;br /&gt;
It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* dir -&amp;gt; the name of the path to be created; it may not be multiple levels deep - to effect that, include multiple &amp;lt;dir path=&amp;quot;...&amp;quot;/&amp;gt; entries&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mkdir&amp;gt;&lt;br /&gt;
  &amp;lt;dir path=&amp;quot;/foo/bar&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/mkdir&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is in /pandora/desktop on SD1 (/media/mmcblk0p1 say), then /media/mmcblk0p1/foo/bar will be created.&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
Please see the [[PXML_archetype|PXML archetype]].&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
To validate a PXML file, you need a XSD (XML schema) validator, and you have to know how to use it.&lt;br /&gt;
&lt;br /&gt;
You will also need to put the XML schema for the PXML format in the same folder as your PXML file. Note that the current PXML schema is horribly out of date.&lt;br /&gt;
&lt;br /&gt;
When you have done that, and know how to use it, you need to change a few things in your PXML file. In your PXML tag, change the contents from this...&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;PXML_schema.xsd&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the PXML file can be validated.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=Libpnd_hub&amp;diff=2509</id>
		<title>Libpnd hub</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=Libpnd_hub&amp;diff=2509"/>
		<updated>2010-06-22T01:38:32Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Overview=&lt;br /&gt;
&lt;br /&gt;
''libpnd'' is a basic collection of functions and tools to make working Pandora-specific operations easier; to wit, it is hoped multiple applications will make use of this library rather than re-implement similar functionality and lead to problems down the road. (Instead we can run into problems together and thus clobberize them.)&lt;br /&gt;
&lt;br /&gt;
''libpnd'' thus is a collection of:&lt;br /&gt;
&lt;br /&gt;
* handy system code that hopefully is reusable - IO functions, CPU clock setting, etc.&lt;br /&gt;
* applications for supporting the Pandora's unique features, such as ''pndnotifyd'' for auto-discovery of PXML and .pnd applicatons&lt;br /&gt;
* libraries for support of the .pnd and PXML systems; i.e.: for locating, executable, mounting and unmounting PXML-directory and .pnd applications, loading PXML and handling overrides&lt;br /&gt;
* hopefully reusable code for support of these things; i.e.: a rudimentary but useful config-file parser, rudimentary singly-linked-list container, etc.&lt;br /&gt;
&lt;br /&gt;
''libpnd'' will/does also include utility functions for setting the CPU clock, reading GPIO inputs without depending on SDL, and other handy bits.&lt;br /&gt;
&lt;br /&gt;
'''You can, nay, are required to - contribute to libpnd!'''&lt;br /&gt;
&lt;br /&gt;
==Design considerations and philosophy==&lt;br /&gt;
&lt;br /&gt;
While much of libpnd is obvious, some decisions had to be made and it may help to know the guiding principle behind it; the Pandora device will be a handheld '''computer''', but libpnd is designed to facilitate certain operations with goals towards..&lt;br /&gt;
&lt;br /&gt;
* simplicity - just work right, configuration not generally needed&lt;br /&gt;
* obviousness - work as one would expect for this sort of device; i.e.: the user assumes something will work a certain way, and it does&lt;br /&gt;
* like other guys - as an extension of the prior point, we have tried to follow UNIX spirit and provide reusable small tools to do the work those bits can be leveraged, but further tried to follow the spirit of other consoles. So while the device is a powerful little computer, it is probably going to be used by gaming and retro enthusiasts and so we color some of our decisions that way. (i.e.: consider that a PS2/xbox/PSP/etc will have save-game or data management as a separate application, for instance. If thats the best multi-million dollar companies can come up with over decades, well, its not so bad for us to fall back on!)&lt;br /&gt;
* not over-defined; libpnd and PXML try to define a bunch of things, but we also do not _over define_; we try to lead by providing examples and styles, and while we have designed ahead for many things, we have also not nailed a lot of that down too early. It is better to be simple and shipped, then complex and a mess.. adaptable rather than scary.&lt;br /&gt;
&lt;br /&gt;
The library is of course broken into parts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include     - include these files to make use of the lib&lt;br /&gt;
lib         - the code that produces the lib&lt;br /&gt;
test        - mini tools to test various pieces of the lib in isolation&lt;br /&gt;
bin         - test tools - tools for testing the lib as it is developed, not anticipated to be used by many&lt;br /&gt;
testdata/   - for testing /etc/pandora; will contain 'conf' dir, for example&lt;br /&gt;
apps/       - actual applications people may use, such as pndnotifyd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For now though, here are a couple notes about the design.&lt;br /&gt;
* it is straight C code, to be maximumly re-usable (perhaps C++ and other language bindings will tie back to it). I have gone out of my way to limit external references so that bindings are easier to make. &lt;br /&gt;
* contrary to the previous comment, we've used a bit of C++ for the tinyxml parser .. hopefully this is not an issue.&lt;br /&gt;
* I have tried to keep the API relatively simple and am faking some OO like data hiding to try to keep dev noses out of structures that are subject to change. i.e.: functions for list management and node access are provided, don't dig into the void* cast structs, or you could get burnt.&lt;br /&gt;
* the API should be pretty stable; so far very few user-code changes have ever been needed.. lib internal changes should be binary compatible.&lt;br /&gt;
* As a result of that decision, 'handles' are used; a handle is a 'black box' type, something you cannot just use 'handle h; h -&amp;gt; foo = 5' type code for. Instead, internally the library will cast the handle to the actual useful type (which may involve pointer arith etc). This way the user can be returned a handle, and pass the handle to various access functions to get useful data/operations.. but the user is not encouraged to look inside the data objects himself&lt;br /&gt;
* As another implication, access functions are available aplenty; it is a little unwieldy perhaps, but its all about keeping the API good without the user peeking inside and risking being broken down the road. (By example, consider.. you use ftell() on a FILE object; you don't go looking in FILE for the 'position' member, since it might be platform specific, etc.)&lt;br /&gt;
* The lib works pretty well, but there is room for improvement internally; it won't hurt my feelings for you to suggest improvements, and I'm sure we would all be grateful for any patches you provide. We've _started_ this library, but by no means wish to carry it alone!&lt;br /&gt;
&lt;br /&gt;
==Opportunities for improvement==&lt;br /&gt;
&lt;br /&gt;
Certainly nothing is perfect, especially when chasing moving targets.  Some aspects of the library are less efficient, or missing, or buggy, and a few things are noted here should someone have time. The API was designed to be pretty stable so the internal code could be altered without breaking the API interface.&lt;br /&gt;
&lt;br /&gt;
* Better ISO lang handling ... due to shift from original PXML spec to new PXML spec with better lang support I've not updated some of the internal code, API uses etc to handle it. (even .desktop files could include all iso-lang titles, and let the WM pick through as the spec suggests.)&lt;br /&gt;
* Validation of files when they're loaded&lt;br /&gt;
* An actual parser of PXML metadata&lt;br /&gt;
&lt;br /&gt;
==License==&lt;br /&gt;
&lt;br /&gt;
libpnd (including all the apps etc) are released under the LGPL (ie: so there should be no encumbrances that prevent linking to commercial applications.):&lt;br /&gt;
&lt;br /&gt;
GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999&lt;br /&gt;
&lt;br /&gt;
==Obtaining the library==&lt;br /&gt;
&lt;br /&gt;
libpnd is in the Official Pandora GIT repo: [http://git.openpandora.org/cgi-bin/gitweb.cgi]&lt;br /&gt;
To obtain yourself a copy, use something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.openpandora.org/pandora-libraries.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Thats all you normally need. For copy-paste from the private Wiki sake, heres what I had before:&lt;br /&gt;
Without going into how to set up a GIT, the summary that I (as a registered dev in the repo) used was:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir libpnd&lt;br /&gt;
cd libpnd&lt;br /&gt;
git init&lt;br /&gt;
git remote add libpnd ssh://foo@git.openpandora.org/srv/git/pandora-libraries.git&lt;br /&gt;
git push libpnd master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Building the library==&lt;br /&gt;
&lt;br /&gt;
Standard 'make' should be sufficient here; pull down the directory from the GIT, cd into it, and run make. Thats it.&lt;br /&gt;
&lt;br /&gt;
Note that the make default target is 'everything', which will emit:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
libpnd.a - the static linked version of the lib&lt;br /&gt;
libpnd.so.1.0.1 - the dynlinked version &lt;br /&gt;
libpnd.so.1 - the stub for the shared lib; i.e.: apps should link against libpnd.so.1 and not the 1.0.1 over-specific version&lt;br /&gt;
bin/* - the 'test' dir and the 'apps' dir builds will end up in bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a few additional make targets, however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make clean - wipes out the object files, the bin files, and *~* (emacs backup files), empties some of the deploy stuff, etc. Do this before committing to GIT or we will beat you with sticks.&lt;br /&gt;
make deploy - populates the deploy/ directory, which is what is used inthe shipping images; i.e.: testdata/conf includes test configs, while deploy/etc/pandora/conf includes the configs we ship with. This make will copy over some of the libs and binaries and such.&lt;br /&gt;
make pnd - create a few sample pnd files for testing the lib on an x86 machine&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Included Applications==&lt;br /&gt;
&lt;br /&gt;
===pndnotifyd===&lt;br /&gt;
&lt;br /&gt;
Manages the auto-discovery mechanism and integrating PXML.xml dir-apps and .pnd files into the FreeDesktop standard system (.desktop files). A dedicated libpnd-aware menu could leverage libpnd directly and not need pndnotifyd, though pndnotifyd does offer some handy bits such as HUPping apps to suggest to them that applications may have been added/removed (libpnd includes all the necessary functions for this as well.)&lt;br /&gt;
&lt;br /&gt;
===pndvalidator===&lt;br /&gt;
&lt;br /&gt;
Is mostly a skeleton right now; in the future, it is hoped it will inspect a PXML.xml and then check to ensure the referenced assets are present; the goal to validate the PXML.xml is spec compliant, and the resulting application would be useful.&lt;br /&gt;
&lt;br /&gt;
===discotest===&lt;br /&gt;
&lt;br /&gt;
One of the test tools; it essentially runs an auto-discovery to list off the found apps (be they PXML.xml dir apps or .pnd files), and can dump various data or invoke one or other little tasks; used to test lots of&lt;br /&gt;
bits of libpnd as it was developed.&lt;br /&gt;
&lt;br /&gt;
===rawpxmltest===&lt;br /&gt;
&lt;br /&gt;
Reads a given PXML.xml and spits out some of the fields found within.&lt;br /&gt;
&lt;br /&gt;
===Test tools===&lt;br /&gt;
&lt;br /&gt;
See the test/ dir in the libpnd source for assorted goofy little test apps used for testing bits of libpnd over time. They also may serve as source examples for using some of the APIs. They're old and shoddy probably too.&lt;br /&gt;
&lt;br /&gt;
==Distributed PXML.xml-directory and pnd applications, how does running them actually work?==&lt;br /&gt;
&lt;br /&gt;
This is just a quick summary to save you guessing by reading this whole document.&lt;br /&gt;
&lt;br /&gt;
In essence, libpnd includes lots of real code, but in many places it passes heavy lifting off to shellscripts. This is both handy because the scripts are easily modified without recompilation, and further extends our design goals of making the library bindable to any other language.&lt;br /&gt;
&lt;br /&gt;
Remember, PXML.xml directories are just as executable/mountable as .pnd apps.&lt;br /&gt;
&lt;br /&gt;
So while libpnd is mostly straight-C and so easily bound to python or perl or whatever, libpnd itself invokes many scripts. Those scripts can be directly used by other applications, including other shellscripts.. so libnd functionality can even have bindings in other scripts. This is very flexible and powerful, and handy during debugging or SSHing into the Pandora, etc.&lt;br /&gt;
&lt;br /&gt;
The application lifecycle goes like this:&lt;br /&gt;
&lt;br /&gt;
* device is turned on&lt;br /&gt;
* during init, pndnotifyd is brought up and inhales the config giles&lt;br /&gt;
* pndnotidyd will attempt to auto-discover what PXML.xml directory apps and .pnd-file apps are in the configured searchpaths&lt;br /&gt;
* pndnotifyd will set up filesystem watches on the directories in the notify searchpath; if any of those directories are touched, pndnotifyd will wake up and re-auto-discover .. possibly removing .desktop entries or creating new ones. (i.e.: you drop a new app into the app searchpath, or remove one, or mount an SD card, etc. This is how appications immediately show up or vanish from the window manager desktops.)&lt;br /&gt;
* a libpnd aware launcher can execute applications direct (using libpnd)&lt;br /&gt;
* a libpnd unaware launcher can execute applications via the .desktop standard system; pndnotidyd will emit .desktop files as needed.&lt;br /&gt;
* when libpnd or a .desktop file need to execute an application, they do it via pnd_run.sh (which may be leveraged by other applications, but they hould use libpnd if they can instead, for utmost compatiblity down the road.) pnd_run.sh does the mount of the ISO, runs the actual execable and so on, as directed by libpnd or the command-line args from the .desktop. pnd_run.sh will clean up after everything as well.&lt;br /&gt;
&lt;br /&gt;
So it all works like magic, but it is not that complex a system once you've got the hang of what all is going on.&lt;br /&gt;
&lt;br /&gt;
application → libpnd → shellscripts → system&lt;br /&gt;
&lt;br /&gt;
==FAQ: IF you want to make files visible to the apps, do you have to modify the pnd?==&lt;br /&gt;
&lt;br /&gt;
No. When apps write back to themselves, the writes go to their /pandora/appdata on the SD that houses them. The next time the app reads a file in its directory, the OS will ensure they get the newer file, which is the one in the appdata.&lt;br /&gt;
&lt;br /&gt;
Likewise, you can just drop a file into the appdata and the app will see it.&lt;br /&gt;
&lt;br /&gt;
The app doesn't know about appdata and its pnd file.. the OS and libpnd take care of all the magic.. the app sees one directory, but the reality is there is magic merging going on behind the scenes.&lt;br /&gt;
&lt;br /&gt;
==Assumptions about the filesystem and Configuration==&lt;br /&gt;
&lt;br /&gt;
Note that for libpnd to work, it makes certain assumptions about the filesystem and config files. Since libpnd was developed with the images it should work for the Pandora .. but just dropping libpnd onto another Linux distribution and it won't likely 'work out of the box'. Certain config files will need to be set, and certain conventions followed.&lt;br /&gt;
&lt;br /&gt;
===Searchpaths===&lt;br /&gt;
&lt;br /&gt;
libpnd was designed so that most everything is configured in files, and that these files should be easily hackable and easily overriden, without compromising the machine. It should be feasible to add a config file to an SD card, have it take over if available when required, and then 'undo' those configs simply by removal of the SD card and rebooting.&lt;br /&gt;
&lt;br /&gt;
To facilitate this design goal, all config files are 'sought' using a search-path system.&lt;br /&gt;
&lt;br /&gt;
Developers should be mindful of using the libpnd APIs so this behaviour is inherited to interested applications; developers could also reuse the logic for searching for files, if they find it useful.&lt;br /&gt;
&lt;br /&gt;
Searchpaths are colon-delimited list of paths, searched left to right.&lt;br /&gt;
&lt;br /&gt;
ex: foo:bar:/my/baz means to look for a given file in 'foo', then in 'bar', then in '/my/baz'.&lt;br /&gt;
&lt;br /&gt;
The standard config files have a default searchpath, and those config files will define further searchpaths for scripts and such the system uses. This makes the system highly flexible -- default scripts are included, but can be overridden by dropping the right named script on an SD card, or by altering a config file.&lt;br /&gt;
&lt;br /&gt;
See the example config files below for example searchpaths -- i.e.: how pndnotifyd searches for pnd_run, etc.&lt;br /&gt;
&lt;br /&gt;
===Notification paths===&lt;br /&gt;
&lt;br /&gt;
The 'apps' config includes a searchpath that specifies the sub-paths to be 'watched'. Various watch mechanisms exist for various filesystem types, but over the course of Pandora development (various kernels, various k-modules, various DM and WM's, I found the included system most stable, though not most current. After a final device image is settled on, it might be time to alter the notification system, but it should not impact the libpnd API.)&lt;br /&gt;
&lt;br /&gt;
Anyway, watches are placed upon the paths defined, and if anything in those paths changes, the auto-discovery code is kicked off to seek our PXML.xml and .pnd type applications in the search paths.&lt;br /&gt;
&lt;br /&gt;
Note that searchpath and notifypaths are different (and usually very similar, but have the option to be very different.)&lt;br /&gt;
&lt;br /&gt;
===Config files===&lt;br /&gt;
&lt;br /&gt;
libpnd includes a generic simple config file parser and assumes the presence of a few config files. It also includes defaults&lt;br /&gt;
so if a config is missing or broken things should work.&lt;br /&gt;
&lt;br /&gt;
In general, Pandora specific config files should be located in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/pandora/conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The config files are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
conf -- this file is generally _not_ included with the Pandora and left to default; its job is to define the basic default searchpath for config files, so should you wish to override things entirely, you may need to alter this file. i.e.: If you wish to switch to test config files on SD or in /tmp, instead of using any other conf files .. you can create this guy. This provides a mechanism to short circuit the entire conf system.&lt;br /&gt;
&lt;br /&gt;
apps -- this config file defines auto-discovery and other application bundle parameters&lt;br /&gt;
&lt;br /&gt;
desktop -- this config defines &amp;quot;dotdesktop&amp;quot; .desktop and FreeDesktop integration paramters -- example is where to spit out icons or .desktop files from discovered PXML.xml or pnd applications&lt;br /&gt;
&lt;br /&gt;
categories -- this config maps PXML.xml spec based categories to FreeDesktop standard categories; in this way a PXML based applicatoin can show up in the appropriate categories of a WM that does not use libpnd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====conf File====&lt;br /&gt;
&lt;br /&gt;
No default is included with the distribution.&lt;br /&gt;
&lt;br /&gt;
The default search path is reasonable and assumes we want the official /etc/pandora/conf near the end, with checks to the SD cards for overrides first. (Likely most people will not override, so the canonical location will be used 99.9% of the time.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PND_CONF_SEARCHPATH &amp;quot;/media/mmcblk0p1/pandora/conf:/media/mmcblk1p1/pandora/conf:/etc/pandora/conf:./testdata/conf&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The key for override is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PND_CONF_KEY        &amp;quot;conf.searchpath&amp;quot; /* if not found, use PND_CONF_SEARCHPATH */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which suggests using something like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[conf]&lt;br /&gt;
searchpath   /foo/bar:/baz/bing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====desktop File====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Desktop configuration&lt;br /&gt;
&lt;br /&gt;
[dotfiles]&lt;br /&gt;
#(~/Desktop for xfce, /usr/share/applications for WMs that actually follow spec)&lt;br /&gt;
dotdesktoppath  ~/Desktop/      # path for pndnotifyd to spit .desktop files into (run as root)&lt;br /&gt;
iconpath        /tmp    # path for pndnotifyd to drop icons into (can be same as .desktop if WM permits)&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
# if hupscript is commented out entirely, pndnotifyd will not try to find/run the hup&lt;br /&gt;
# if it is uncommented, pndnotifyd will attempt to invoke the hupscript after emitting .desktop files&lt;br /&gt;
# (the hupscript exists to hup the WMs to redisplay .desktop apps)&lt;br /&gt;
#hupscript      pnd_hup.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====apps File====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Application configuration&lt;br /&gt;
&lt;br /&gt;
[autodiscovery]&lt;br /&gt;
# searchpath is a list of paths (colon separated) in which to look for PXML.xml or .pnd-file applications&lt;br /&gt;
searchpath      /media/*/pandora/apps:/usr/pandora/apps&lt;br /&gt;
# notifypath is a list of paths to monitor; if anything in those paths changes, the searchpath is rescanned&lt;br /&gt;
# note that for each path chunk, all current subdirs of that path are also watched)&lt;br /&gt;
notifypath      /media:/media/*/pandora/apps:/usr/pandora/apps:./testdata/app?&lt;br /&gt;
&lt;br /&gt;
# PXMLs may be overridden .. i.e.: overrides are a subset of PXML, where the values are copied over the full PXML&lt;br /&gt;
[overrides]&lt;br /&gt;
# searchpath to look for PXML overrides (which are named by the unique-id)&lt;br /&gt;
searchpath      ~/pxml-overrides&lt;br /&gt;
&lt;br /&gt;
# [pnd] defines where to locate the pnd support scripts, so the user may override pnd_run.sh without clobbering built in&lt;br /&gt;
[pnd]&lt;br /&gt;
searchpath      /media/*/pandora/scripts:/usr/pandora/scripts&lt;br /&gt;
runscript       pnd_run.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====categories File====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# dotdesktop configuration&lt;br /&gt;
&lt;br /&gt;
# this config file maps 'PXML' categories to free-desktop standard categories&lt;br /&gt;
# i.e.: category 'Foo' could map to more standard 'Utility', thus making .desktop file&lt;br /&gt;
# emitting a more useful thing&lt;br /&gt;
&lt;br /&gt;
# the standard listing of categories is:&lt;br /&gt;
# http://standards.freedesktop.org/menu-spec/latest/apa.html&lt;br /&gt;
&lt;br /&gt;
# note that 'map' section in the config is _required_ for a match to be found; this&lt;br /&gt;
# is done to separate categories from (future) top-level directives&lt;br /&gt;
&lt;br /&gt;
default Application;Utility;Network;&lt;br /&gt;
&lt;br /&gt;
[map]&lt;br /&gt;
Development     Development&lt;br /&gt;
Education       Education&lt;br /&gt;
Games   Game&lt;br /&gt;
Graphics        Graphics&lt;br /&gt;
Internet        Network&lt;br /&gt;
Multimedia      AudioVideo&lt;br /&gt;
Office  Office&lt;br /&gt;
Settings        Settings&lt;br /&gt;
System  System&lt;br /&gt;
Utilities       Utility&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SD card layout===&lt;br /&gt;
&lt;br /&gt;
libpnd concerns itself with things in the 'pandora' root folder on SD. We agonized over this decision, but settled on this to avoid cases where someone with a 16GB SDHC card puts 50-million files with &amp;quot;.pnd&amp;quot; on them, and expects reasonable performance. Instead, applications for instance would have to be in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/pandora/menu -&amp;gt; apps that will go to /usr/share/applications and should show up in xfce menu by category&lt;br /&gt;
/pandora/desktop -&amp;gt; apps that will go to ~/Desktop and show up on user desktop as icons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following location is used by pmenu (and may get deprecated, but I've not discussed it with cpasjuste yet.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/pandora/apps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i.e.: the searchpath for autodiscovery includes /media/*/pandora/apps (and desktop and menu now)&lt;br /&gt;
&lt;br /&gt;
Also in the /pandora/ folder is a magic 'appdata' folder:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/pandora/appdata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a .pndfile or PXML.xml dir get mounted, any writes back to the mounted area are put into appdata, with a subdir by the unique-id. i.e.: With the hypothetical MAME.pnd, it might update its config files after a user changes something, or create new files, or store hiscores or whatever. If it doesn't write them to NAND, and doesn't want ot write them to /mame/some/dir, but instead record it to itself for whatever reason, it would go to /pandora/appdata/MAMEs-ID/ instead. The pnd or PXML.xml app area is never modified during a run, only the appdata. (But when an application reads its own path, it will pick up the appdata version of the file instead of the actual file. Then magic of union-type filesystems!)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
If Myapp with unique-id foo.123 is mounted, then any write-backs are directed to..&lt;br /&gt;
&lt;br /&gt;
/pandora/appdata/foo.123/&lt;br /&gt;
&lt;br /&gt;
On the SD that hosts the application.&lt;br /&gt;
&lt;br /&gt;
===NAND layout===&lt;br /&gt;
&lt;br /&gt;
In addition to seeking applications in SD cards, /usr/pandora/apps is included in the default searchpath, so that 'built in' apps can be listed, or users can drop them there.&lt;br /&gt;
&lt;br /&gt;
It might be a cool addition to put a user homedir into the searchpath as well, so NAND but user-homedir (for on-device browser downloads, say.)&lt;br /&gt;
&lt;br /&gt;
==Command line tools and testing==&lt;br /&gt;
&lt;br /&gt;
A number of scripts and tools are included or built with libpnd, to facilitate testing of the lib as its being developed and to assist in making .pnd files and PXML.xml files.&lt;br /&gt;
&lt;br /&gt;
==PXML.xml and .pnd files==&lt;br /&gt;
&lt;br /&gt;
On most platforms, applications are distributed as an executable and optional datafiles and likely an installer. The installers job is to integrate the application into the filesystem, as the transport mechanism itself is not executable and is considered temporary. In Windows an application might be installed into Program Files, while in Unix an application might be dropped into /usr/local/bin .. data files in various other places.&lt;br /&gt;
&lt;br /&gt;
For the Pandora platform we wanted a very easy to use workflow -- download and run -- and also have a very different operating environment. With multiple SD cards available for expansion (and that space being highly desirable due to a smaller internal store) it is desirable to install applications to SD, and yet SD cards are by definition something users will wish to carry multiple of. With two slots, it could be quite a chore to install an application to SD1, its data to SD2, and then say have only one of them plugged in at a time, or switch which slot they're in, or any number of scenarios. i.e.: Installing onto a medium which may be present or not at any time is very different to how most operating systems work. So we made something new and awesome.&lt;br /&gt;
&lt;br /&gt;
The PXML.xml and .pnd-file approach we came up with attempts to address these issues.&lt;br /&gt;
&lt;br /&gt;
The goals:&lt;br /&gt;
* for the user, an application can be a single file download&lt;br /&gt;
* furthermore, there is no installation whatsoever, beyond dropping that single file into the right place on the SD card&lt;br /&gt;
* using the application should be easy -- stick in the SD card, and tap/launch on the icon.&lt;br /&gt;
* for uninstallation, delete the single file. Thats it, no fuss.&lt;br /&gt;
* for the developer, creating that single file should be easy to do&lt;br /&gt;
* for the system, performance should be high&lt;br /&gt;
&lt;br /&gt;
Remember, an application can be a .pnd 'bundle' (single file containing all the sub-files), or a PXML.xml 'dir application' (an unpacked .pnd esentially.) '''BOTH PXML.xml-dirs and .pnd's ARE EXECUTABLE.'''&lt;br /&gt;
&lt;br /&gt;
pndnotifyd will auto-discover PXML.xml in a directory and consider that an application, emitting a .desktop file, just as well as a .pnd file. i.e.: This can be hand for development or users. Remember that a mounted PXML.xml dir still redirect write-backs to the /pandora/appdata directory, just like a full .pnd application. They are treated the same!&lt;br /&gt;
&lt;br /&gt;
===What are PXML.xml and .pnd files?===&lt;br /&gt;
&lt;br /&gt;
PXML.xml is a file describing an application&lt;br /&gt;
A directory containing a PXML.xml _is executable_&lt;br /&gt;
A .pnd file is the packaged up version of the directory that is executable.&lt;br /&gt;
i.e.: a PXML.xml in a directory is just as executable as a .pnd representation of that directory.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir OutcaST&lt;br /&gt;
cp outcast.bin OutcaST/&lt;br /&gt;
cp PXML.xml OutcaST/&lt;br /&gt;
# at this point, the OutcaST directory is now discoverable and executable&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pnd_make.sh -this -that OutcaST outcast.pnd&lt;br /&gt;
# at this point, outcast.pnd is executable (as is the OutcaST directory), so upload outcast.pnd to the Open Handhelds Archive and let people enjoy!&lt;br /&gt;
&lt;br /&gt;
===A note on including shared libs===&lt;br /&gt;
A philsophy for packaging that I am advocating is to 'just make applications work' -- avoid dependancy trees.&lt;br /&gt;
&lt;br /&gt;
Some guidelines:&lt;br /&gt;
&lt;br /&gt;
1) you can depend on shared libs included with the firmware to always be there&lt;br /&gt;
&lt;br /&gt;
2 you should include any shared libs you need for your app, that are not in the firmware (yes, this increases app size a little bit, and potentially makes for duplication among apps that use the same shared libs)&lt;br /&gt;
&lt;br /&gt;
3) if a shared lib becomes desirable in the firmware, it can be added there as a firmware patch easily (this has the advantage of gradulaly updating the entire user based, and apps easily saying 'we depend in firmware version X', rather than making for pnd-dependnacies and the equivilent of 'dll hell'&lt;br /&gt;
&lt;br /&gt;
4) You'll have to be careful in linking your application to ensure that the shared libs you are including in the pnd/PXML-dir are to be locatable by your binaries. ie: stick them in a 'lib/' dir in your bundle, and stamp your binary with a library-path './dir/' so they can be found, say. More later.&lt;br /&gt;
&lt;br /&gt;
===Future idea: pnd's for containing system-wide shared libs===&lt;br /&gt;
&lt;br /&gt;
This is something we've bounced around for quite awhile, but not committed to. As it keeps coming up I thought I'd put some notes here in public.&lt;br /&gt;
&lt;br /&gt;
It is possibly desirable to make a special searchpath that is discovered during machine boot, and any pnd's found there are automatically mounted (and left mounted) into a special path (say /usr/local/pandora/lib or somesuch.) This way, collections of handy utilities or shared libraries could be distributed as a pnd, and become available in consistent locations. If 10 applications need a shared lib, and don't want to duplciate it in each of their pnd files, this could be an approach.&lt;br /&gt;
&lt;br /&gt;
I tend to think it is best avoided, however, since it complicates the user experience -- we end up with pnd depandancies, and apps nolonger about to 'just work', and apps that did work and 'suddenly break' when other files are altered. The philosphy we're going for with pnd files is 'drag and drop' -- user downloads a pnd file, and it works.. a self contained application, nice and easy. We start complicating the dependancies, and it turns into 'dll hell' as seen on other platforms.&lt;br /&gt;
&lt;br /&gt;
That said, it is _not_ difficult to add into the existing system and design; we've been mulling it over, but it is best avoided for now. rather than complicate the system up front, let us try to get a functional and as lightweight-as-possible system on the uptake, gather some usage data points and then worry about upgrades :)&lt;br /&gt;
&lt;br /&gt;
===File format - PXML.xml / PXML Specification===&lt;br /&gt;
See the [[PXML_specification|PXML specification]]&lt;br /&gt;
&lt;br /&gt;
Alternatively the spec is included in the docs/ directory of the libpnd distribution, though the wiki version linked above should be considered cannon.&lt;br /&gt;
&lt;br /&gt;
A note on history; the PXML spec was originally created by EvilDragon, and went through a number of revisions as suggestions came in; as these things are wont to do, the target was ever moving and the scope and meaning of PXML changed so at some point a more strategic approach was needed. dflemstr took it upon himself to help recode some of the parse and re-evaluate many of the PXML decisions and hence was born the PXML-version-2 spec.&lt;br /&gt;
&lt;br /&gt;
===File format - .pnd files===&lt;br /&gt;
The pnd file format is pretty straight forward, though most will interact with it through the included (or community supplied) tools.&lt;br /&gt;
&lt;br /&gt;
Basically its just an ISO file (or other filesystem type) with a PXML.xml and an optional PNG icon appended. (example: cat appfolder.iso app.pxml icon.png &amp;gt; app.pnd) For ease of discussion, I refer to ISO but in fact you coudl be using squashfs or other types.&lt;br /&gt;
&lt;br /&gt;
The ISO filesystem portion of the file can include anything the developer wishes, as long as it includes a PXML.xml in its root file and an executable somewhere in there. It can also include images, audio files, data files of any kind. It can be small or large.&lt;br /&gt;
&lt;br /&gt;
Yes, the PXML.xml is included in the ISO portion (in the root directory), and also appended to the end of the .pnd file (for _convenience_ .. it is very easy and fast to locate in this position; we can backseek into the ISO to find the PXML, but if its a 500MB ISO it could take awhile. Hence, we append it and can find it in one seek.)&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The naming of the PXML.xml file is important! The name is case sensitive and must be &amp;quot;PXML.xml&amp;quot;, nothing else!'''&lt;br /&gt;
&lt;br /&gt;
This simple format makes it possible to easily create .pnd files with the default utility's of most operating systems. Further, it is a fairly fail-safe system -- the PXML is appended, but is also included within the ISO image part of the file so if the appended-PXML is ever lost (unpack and repack poorly, say) the system will still work (the PXML inside the ISO can be found easily, even without mounting the ISO _as_ an ISO, since it is a plaintext uncompressed image format.) &lt;br /&gt;
&lt;br /&gt;
Manually creating a .pnd (or even a PXML) is a pain so there will be a few helper scripts or maybe even a gui app out when we launch.&lt;br /&gt;
&lt;br /&gt;
Included with libpnd are some scripts to create PXML and pndfiles, though it is expected people will create handier utilities. See the tool section of this wiki for some details.&lt;br /&gt;
&lt;br /&gt;
Question from the gp32x forum regarding confusion of PXML location -- remember that in general mot developers will keep a directory that represents the .pnd or PXML-dir application. Their makefile/build-process will drop the executable(s) into that directory, which inludes a PXML.xml description of the application, and possibly an icon (and whatever all else they wish.) To build the .pnd file, a script (say) is used which compresses all this into the pnd format (including appending the PXML.) So yes, the PXML is in two places in the .pnd file and one place in the source directory. You'll get used to it ;)&lt;br /&gt;
&lt;br /&gt;
Rationale --&lt;br /&gt;
&lt;br /&gt;
Several iterations of pnd files have been considered, from zipfiles to cramfs to other formats, to putting in a key/value set of information tags in the file, to table-of-contents indexes, to any number of options to help performance, and so on. In the end we went for a good overall and simple solution and dropped getting fancy -- PXML.xml can be extended to define the type of the file if it cannot be magic'd, so we could using other filesystem types in the future (and this is why people should use libpnd rather than rolling their own solution.) For now however, pnd files are ISO files with the PXML.xml appended and an optional icon. This keeps the PXML and icon easy to locate, and yet a easy file format.&lt;br /&gt;
&lt;br /&gt;
====Recommended layout of a pnd directory structure, ie: how to make a well behaved pnd file====&lt;br /&gt;
&lt;br /&gt;
These are guidelines to make pnd-files 'well behaved', and to help move towards a consistent pnd structure.&lt;br /&gt;
&lt;br /&gt;
* Always include your icon png-file and PXML.xml file in the _Root_ of the pnd-file; this is for reasons that folks may well unpack the pnd-file, and then repack it; in doing so, if the icon and PXML.xml (normally appended to the .iso to become a .pnd) will be lost, unless the user or tool is being careful. Thus, it is wise to include them within the .iso, to make things so the iso is the entire pnd application, in unpacked form.&lt;br /&gt;
&lt;br /&gt;
* Use a 'reasonably unique' unique-id of course (to identify your application.) This is used for many internal uses, so uniqueness is pretty wise.&lt;br /&gt;
&lt;br /&gt;
* Use an 'application relevent' appdata name; make it as unique as you have to, but consider being less unique; a random example could be .. possibly there may be several quake1 ports; they could all share the same appdata (same config files, same data files), but if you intend on having different config or data files than other quake1's, make your appdata named differently. &lt;br /&gt;
&lt;br /&gt;
* Always include a documentation 'info' link, if your app has any setup requirements, has popup help screens that the user needs to know a key to pop up, or other essential trivia; feel free to make the doc link as complete as you like, since its all within the pnd file. (ie: Include the full DosBox documentation if you want to, in your DosBox pnd :)&lt;br /&gt;
&lt;br /&gt;
* Try to set up the appdata directory for the user; if you need a 'roms' or 'image' directory in the appdata (such as in the case of an Atari ST emulator needing a location to house the TOS OS image, say), then do a 'mkdir' in your 'runscript', to create it. Thus the user will find a (example) Hatari appdata directory, and within, any directories he needs (possibly empty.) This just makes it obvious for the user where to put stuff.&lt;br /&gt;
&lt;br /&gt;
* Try using rudimentary zenity scripts to pop up imporant pre-run information, if the application can't do so; ie: Hatari itself has a very fine GUI in it, but if the Atari ST TOS image is not present, it just exits and fails to run, so the GUI doesn't have time to do anything useful. In this case, it could be wise to use a 1 line zenity script that checks before the emu runs for the file in question, then pop up a dialog box saying 'put this file /here', so the user knows what the heck happened&lt;br /&gt;
&lt;br /&gt;
* Always Always Always write your 'state info' to current-working-directory (ie: ./foo, and not ~/foo). The pnd-system will redirect this to the users appdata of course, keeping things clean and predictable. If you're just porting an app, that has ~ all over the darned place, and you don't want to muck up the code.. just have your 'runscript' do something like 'set $HOME=.' and you're good to go!&lt;br /&gt;
&lt;br /&gt;
* Runscripts; the PXML.xml can specify to run your binary, or you can run a .sh script that in turn runs your binary, say. This lets you do various tests, set up LD_LIBRARY_PATH, or other mischief before your binary gets run. Very handy. I often have PXML.xml run 'runfoo.sh', and runfoo.sh in turn runs ./foo after setting things up, making directories, etc.&lt;br /&gt;
&lt;br /&gt;
* For data that is not kept in your appdata directory, try to keep it local to the current SD _or_ better still, search both SD. ie: libpnd uses a basic but really handy system for iterating across a list of directories (including glob type expansion); so you can tell it something like /media/*/foo:/tmp and it'll check every mounted device (including both SD slots) in the 'foo' directory, as well as /tmp; you can have it call your code as it looks through, or you can ask libpnd to find a file for you and report where it was found, across all your searchpaths; you don't have to use libpnd's code to do it, you coudl write oyur own (using libpnd as an example if you need the help), as its pretty easy to build (20 lines of code maybe?) Anyway, the trick is to be multi-SD aware, and bonus marks for handling if theres a USB mounted drive etc as well. (Example; I coded minimenu so that when it caches out a preview picture, it checks for free space first, and tries first on the same SD that the pnd is mounting from, and then across a searchpath of alternate locations to cache to; this way the user can customize the caching, and it can be on various devices.)&lt;br /&gt;
&lt;br /&gt;
====What filesystem types can be contained within a pnd-file?====&lt;br /&gt;
&lt;br /&gt;
The pnd container can really contain a large variety of filesystem types; day-zero we're aiming for ISO since it is simple, easy build across every major OS, and fast to use. But it is not the only supported filesystem type, and more should be added all the time. (Possibly '-auto' can be added to pnd-run and it'll &amp;quot;just work&amp;quot; for dozens of types!)&lt;br /&gt;
&lt;br /&gt;
A compressed filesystem type has always been desirable for file sizing reasons, though it potentially impacts performance (depending on the application operation really.)&lt;br /&gt;
&lt;br /&gt;
Supported types (not an exhaustive list!):&lt;br /&gt;
&lt;br /&gt;
o ISO&lt;br /&gt;
&lt;br /&gt;
o squashfs&lt;br /&gt;
&lt;br /&gt;
====PND generation workflow====&lt;br /&gt;
&lt;br /&gt;
- create a directory to represent the application on SD card; i.e.: ./mame-app&lt;br /&gt;
&lt;br /&gt;
- create a PXML.xml fil and drop it into the dir (./mame-app/PXML.xml); genpxml script can be used, or do it by hand&lt;br /&gt;
&lt;br /&gt;
- drop the executable and data files into this dir (say, ./mame-app/mame.bin, and ./mame-app/artwork/foo, etc.)''' &amp;lt;- note, with a PXML.xml and executabe, it can now be discovered and run without even bundling into .pnd!'''&lt;br /&gt;
&lt;br /&gt;
- invoke pnd-make.sh to produce mame4all-pandora-1.0-arm.pnd or whatever you want to call it (foobearspanky.pnd, we don't care.)&lt;br /&gt;
&lt;br /&gt;
- you're done, distribute it as you see fit&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Windows / DOS commandline====&lt;br /&gt;
&lt;br /&gt;
There should be a basic GUI along very soon, and more advanced friendlier GUIs in due time. But for now, we thought it prudent to include some basic instructions on the command line for day-zero.&lt;br /&gt;
&lt;br /&gt;
For this command-line tutorial, I will assume you have already created a PXML.xml file; copy one of the templates and then edit it, using notepad or whatever _TEXT_ editor you see fit.&lt;br /&gt;
&lt;br /&gt;
Prepare in advance:&lt;br /&gt;
&lt;br /&gt;
1) Make a PXML.xml file (through whatever means; copy a template, or get a PXML.xml tool when they come available.) Ensure that you've got a reasonably unique-id in that field (ie: say, app-name, your name, and date/time all catenated together.) &lt;br /&gt;
&lt;br /&gt;
2) Get yourself mkisofs tools; for example, grab from here: http://www.student.tugraz.at/thomas.plank/ -- get cdrtools-2.01-win32-bin.zip and DLL version 1.5.25, and extract to somewhere. That lets you run 'mkisofs' to spit out .iso files&lt;br /&gt;
&lt;br /&gt;
2b) If you want to make a compressed image, use squashfs tools here: ftp://ftp.slax.org/useful-binaries/win32/squashfs-tools/&lt;br /&gt;
&lt;br /&gt;
3) Put your application and all needed files into a single directory .. say &amp;quot;myapp&amp;quot;; it doesn't matter what you call it. Might be cool as a Makefile step&lt;br /&gt;
&lt;br /&gt;
4) In your app-dir, put the PXML.xml file in the root&lt;br /&gt;
&lt;br /&gt;
5) Put the icon in the root of that dir as well (make it a .png file)&lt;br /&gt;
&lt;br /&gt;
6) Make sure the PXML.xml names the icon (just its filename.png), and specifies the executable (foo.bin or whatever.)&lt;br /&gt;
&lt;br /&gt;
Generate the actual PND-file, fully manual method:&lt;br /&gt;
&lt;br /&gt;
1) Make yourself the iso; this step produces the iso, but to turn the iso into a pnd you need a couple last steps. You could also use some fancy iso-building tool.&lt;br /&gt;
'''mkisofs -o foo.iso -R /path/to/folder/myapp'''&lt;br /&gt;
&lt;br /&gt;
2) Append PXML.xml to the .iso (yes, the PXML.xml is included in the iso, but we also want to append it for performance reasons.) &lt;br /&gt;
'''copy foo.iso+PXML.xml foo.step2'''&lt;br /&gt;
&lt;br /&gt;
3) Append the icon PNG file to the .iso (if you have an icon; if not, you can leave this step out.)&lt;br /&gt;
'''copy foo.step2+myicon.png foo.pnd'''&lt;br /&gt;
&lt;br /&gt;
4) Clean up: del''' foo.step2 foo.iso'''&lt;br /&gt;
&lt;br /&gt;
5) Profit!&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Linux/BSD/Unix (including on Pandora)====&lt;br /&gt;
&lt;br /&gt;
=====Command-line=====&lt;br /&gt;
&lt;br /&gt;
Tools are included in the libpnd distribution; see below for discussion, but suffice to say they are included in the [http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-libraries.git;a=tree;f=testdata/scripts GIT]. Look in testdata/scripts for:&lt;br /&gt;
&lt;br /&gt;
* genpxml - spits out a template PXML.xml for you, and even includes a reasonably unique-id&lt;br /&gt;
* pnd_make.sh - given a directory and some arguments, will spit out a .pnd file; great for use in Makefiles&lt;br /&gt;
&lt;br /&gt;
We're working on others as well, so it should be a piece of cake under Unix and Unix-like OSes.&lt;br /&gt;
&lt;br /&gt;
=====GUI=====&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Windows GUI====&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Mac OSX====&lt;br /&gt;
&lt;br /&gt;
===PXML overrides===&lt;br /&gt;
&lt;br /&gt;
There are a couple of ways to effect an override of the PXML, without modifying a pnd-file.&lt;br /&gt;
&lt;br /&gt;
====&amp;quot;In-path&amp;quot; override files: .ovr====&lt;br /&gt;
&lt;br /&gt;
The library automatically imports a limited number of overrides from a conf file that can be located in the same location as its matching .pnd file is.&lt;br /&gt;
&lt;br /&gt;
For instance, if /pandora/desktop/awesomegame.pnd exists, then libpnd will automatically also search for /pandora/desktop/awesomegame.ovr&lt;br /&gt;
&lt;br /&gt;
Some menu systems will also be smart enough to watch for an icon override -- /pandora/desktop/awesomegame.png -- and if present, to use it; 'minimenu' (mmenu) is aware of that, as is pndnotifyd daemon when emitting .desktop files. Likely pmenu will also be updated. In effect, the user can override the icon, category and other attributes of the pnd, without needing special tools or to alter the system.&lt;br /&gt;
&lt;br /&gt;
An .ovr file must be named identically to the pnd-file, excepting the 3 character file extension.&lt;br /&gt;
&lt;br /&gt;
NOTE: Given that a pnd may emit multiple applications from its PXML.xml, the ovr will have to be aware of this so it can override the correct application(s) within the pnd. Some menus and information tools will display the application list with 'subapp number' to assist identification. minimenu shows the subapp number in the detail panel, for example. In the case where a pnd-file has only one contained application, that is subapp-number zero. For any additional subapplications, increment by one .. but it can be tricky to know which app is which subapp number. (A careful eye will notice the .desktop filename includes the subapp-number after the pound sign .. foo#3.desktop is subapp_number 3.)&lt;br /&gt;
&lt;br /&gt;
The ovr file may (at this time) override the icon title, the CPU clock speed to set on launch, the main category, and the first subcategory for the main category. Additional fields will become overridable.&lt;br /&gt;
&lt;br /&gt;
Minimenu honors up to 3 lines of 'notes', pulled from the .ovr file. (Make sure they are in the right subapp group). note-1, note-2, note-3, see example below. The notes in minimenu are shown at the bottom of the detail text panel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
[Application-0]&lt;br /&gt;
title                   HatariHack0&lt;br /&gt;
maincategory            Audio&lt;br /&gt;
maincategorysub1        Emulator&lt;br /&gt;
[Application-1]&lt;br /&gt;
title                   HatariHack1&lt;br /&gt;
clockspeed              200&lt;br /&gt;
note-1                  My note text line 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====PXML override file -- currently unsupported====&lt;br /&gt;
&lt;br /&gt;
PXML.xml files can have any number of their elements over-ridden by user preferences. &lt;br /&gt;
&lt;br /&gt;
The design goal here was to make it so user-preferences could alter the impact of the PXML.xml in any way, but without requiring the actual PXML.xml in the .pnd (and within the ISO therein) to be altered (could be a 500MB ISO after all!), and further, for these changes to persist. Consider than an SD card could be removed and inserted into the other slot, or the app could be removed entirely and come back another day, or other scenarios.&lt;br /&gt;
&lt;br /&gt;
As such, the PXML-overrides are kept in NAND in the user homedirectory (See the config files to find out where.)&lt;br /&gt;
&lt;br /&gt;
libpnd includes functions to pull in PXML, and also functions to then look for and merge in overrides. It is not always done since you may wish to inspect the PXML or the overrides, so the developers job is to do as they see fit -- pull the XML, and likely also pull in the overrides.&lt;br /&gt;
&lt;br /&gt;
At this time I'm not sure if people will ever use overrides, but the system has been built in should it be needed.&lt;br /&gt;
&lt;br /&gt;
===Included shellscripts to generate files and other sundry duties===&lt;br /&gt;
&lt;br /&gt;
====genpxml====&lt;br /&gt;
&lt;br /&gt;
This tool can spit out a basic but correct PXML.xml, faking up a halfway-useful unique-id in the process. It might be handy in saving you writing up a PXML.xml from scratch.&lt;br /&gt;
&lt;br /&gt;
====pnd_hup.sh====&lt;br /&gt;
&lt;br /&gt;
pndnotifyd will attempt to locate this script and invoke it after an auto-discovery run, if the pnd_hup entry is present (and uncommented) in the config files. It is expected to be commented out in release images, as xfce watches directories for .desktop files and does not need a HUP; some desktop managers need to be HUPped to rescan for .desktop files in a timely fashion, so the pnd_hup config entry can be uncommented and this script will attempt to figure out who to HUP.&lt;br /&gt;
&lt;br /&gt;
====pnd_make.sh====&lt;br /&gt;
&lt;br /&gt;
This is one of the great ones :)&lt;br /&gt;
&lt;br /&gt;
Given a directory with a PXML.xml (see genpxml above) and an executable and any other goo you want in there, this script will spit out a .pnd file you can execute or distribute as an application.&lt;br /&gt;
&lt;br /&gt;
====pnd_run.sh====&lt;br /&gt;
&lt;br /&gt;
This job does a lot of the heavy lifting for libpnd, including setting up the 'union filesystems', doing .pnd and PXML.xml-app-dir execution and mounting, and so on. Generally you will talk to it via libpnd or .desktop files, but you can invoke it dorectly from your apps if you wish to circumvent libpnd or mount .pnd files within a shellscript/perlscript/etc.&lt;br /&gt;
&lt;br /&gt;
==Auto-discovery of applications==&lt;br /&gt;
&lt;br /&gt;
TBD.&lt;br /&gt;
&lt;br /&gt;
==Integration with FreeDesktop .desktop systems==&lt;br /&gt;
&lt;br /&gt;
===dotdesktop (.desktop) files===&lt;br /&gt;
&lt;br /&gt;
===Icons===&lt;br /&gt;
&lt;br /&gt;
There are some rules for Icons in PXML.xml and pnd/directory bundles&lt;br /&gt;
&lt;br /&gt;
- An Icon should be in the root of the directory or .pnd bundle&lt;br /&gt;
&lt;br /&gt;
- An Icon must be specified in the PXML.xml if you expect it to work&lt;br /&gt;
&lt;br /&gt;
- As the PXML.xml is parsed, the icon is sought; if the icon is specified, but not found, it is assumed to be a system default icon and the filename will be placed into the .desktop Icon= line verbatim (ex: Icon=foo.png), and the window manager presumably will know how to locate it. If the icon is specified, and is found, then it will be copied into the configured IconPath, and the full path to it will be used for the Icon= line in the .desktop file ex: Icon=/tmp/myicon.png). If no icon is specified in the PXML file, then no Icon= line will be entered into the .desktop and the WM will presumably apply a default icon based on category or whatever.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==APIs==&lt;br /&gt;
&lt;br /&gt;
Feel free to just go read the .h files; I have tried to comment liberally :)&lt;br /&gt;
&lt;br /&gt;
===Setting and Getting the CPU clock speed===&lt;br /&gt;
&lt;br /&gt;
===Device paramaters - brightness, etc===&lt;br /&gt;
&lt;br /&gt;
===PND files, exec and mount===&lt;br /&gt;
&lt;br /&gt;
===Application discovery===&lt;br /&gt;
&lt;br /&gt;
===Config file parsing===&lt;br /&gt;
&lt;br /&gt;
===Boxing, the singly-linked list container===&lt;br /&gt;
&lt;br /&gt;
===Directory watching===&lt;br /&gt;
&lt;br /&gt;
===Logging api===&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:PND]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PND_repository_specification&amp;diff=2508</id>
		<title>PND repository specification</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PND_repository_specification&amp;diff=2508"/>
		<updated>2010-06-22T01:20:45Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: New page: = Overview = This is the specification for PND repository files. Such a file represents a PND repository, meaning a source to get PND files from, and should list applications that tracked ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
This is the specification for PND repository files. Such a file represents a PND repository, meaning a source to get PND files from, and should list applications that tracked PND files provide, along with URIs for related files.&lt;br /&gt;
&lt;br /&gt;
= Logistics =&lt;br /&gt;
A PND repository file should be hosted in a known location that can be identified by an URI, and using a REST-enabled or read-only protocol. If the repository URI is using the HTTP protocol, it should be possible to perform GET and HEAD operations on the URI node. Caching of repository files is encouraged, and a day is the recommended time interval for cache implementations. Client implementations may circumvent any cache specifications if it is deemed necessary to acquire the latest repository file, though. GZip compression over the HTTP protocol does not have to be supported, and is discouraged.&lt;br /&gt;
&lt;br /&gt;
= Reference implementation =&lt;br /&gt;
There is currently only one piece of software that provides repository files, namely the Box PND management system.&lt;br /&gt;
&lt;br /&gt;
= Client implementations =&lt;br /&gt;
Clients should store lists of URIs to repository files and download files from these URIs on demand, respecting cache metadata. They may use HEAD requests on HTTP repository URIs to get information about expiry times that the repository files may have. It should NOT be possible to perform head operations on actual downloadable files, however; repository URI references should be immutable, and a tracked URI must always point to the same data.&lt;br /&gt;
&lt;br /&gt;
= Format =&lt;br /&gt;
The repository file should be in a text/json format, as described below: (Comments added for clarification; JSON files may normally never contain comments)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
//NOTE: Fields marked with &amp;quot;OPTIONAL&amp;quot; may be null or missing.&lt;br /&gt;
&lt;br /&gt;
//Repository file. (type: json-object)&lt;br /&gt;
//&lt;br /&gt;
//Will use the JSON common-denominator encoding (can be read as ASCII, ISO-8859-1 or UTF-8)&lt;br /&gt;
//Unicode characters are escaped with &amp;quot;\uXXXX&amp;quot; as per the JSON standard.&lt;br /&gt;
{&lt;br /&gt;
  //Information about the repository. (type: json-object)&lt;br /&gt;
  &amp;quot;repository&amp;quot;: {&lt;br /&gt;
&lt;br /&gt;
    //User-friendly name of the repo to be shown to the user (type: json-string)&lt;br /&gt;
    &amp;quot;name&amp;quot;:        &amp;quot;The Box&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
    //Repository API version. (type: json-number, aka float)&lt;br /&gt;
    //&lt;br /&gt;
    //A client may only open a repository file if it supports this version.&lt;br /&gt;
    //(implementations need not be backwards-compatible)&lt;br /&gt;
    &amp;quot;version&amp;quot;:     1.0&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  //Information about the applications in the repo. (type: json-array)&lt;br /&gt;
  &amp;quot;applications&amp;quot;: [&lt;br /&gt;
&lt;br /&gt;
    //Application (type: json-object)&lt;br /&gt;
    {&lt;br /&gt;
      //The application's queryable id. (type: json-string, see PXML standard)&lt;br /&gt;
      &amp;quot;id&amp;quot;:        &amp;quot;viceVIC.pickle&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
      //The application version. (type: json-object)&lt;br /&gt;
      &amp;quot;version&amp;quot;: {&lt;br /&gt;
        &amp;quot;major&amp;quot;:   2, //(type: int, must be &amp;gt;= 0)&lt;br /&gt;
        &amp;quot;minor&amp;quot;:   2, //(type: int, must be &amp;gt;= 0)&lt;br /&gt;
        &amp;quot;release&amp;quot;: 0, //(type: int, must be &amp;gt;= 0)&lt;br /&gt;
        &amp;quot;build&amp;quot;:   0  //(type: int, must be &amp;gt;= 0)&lt;br /&gt;
      },&lt;br /&gt;
&lt;br /&gt;
      //OPTIONAL: The application author. (type: json-string)&lt;br /&gt;
      &amp;quot;author&amp;quot;:   &amp;quot;Ported by Pickle&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
      //OPTIONAL: The application vendor. (type: json-string)&lt;br /&gt;
      //&lt;br /&gt;
      //This is e.g. the uploader of the file, or the company, etc.&lt;br /&gt;
      //This is useful for networks-of-trust, e.g. an auto-update app might ask the user before&lt;br /&gt;
      //upgrading an app with a new version from a different vendor.&lt;br /&gt;
      //If the &amp;quot;vendor&amp;quot; is missing, it should be safe to assume that the package comes from a&lt;br /&gt;
      //fully trusted vendor.&lt;br /&gt;
      &amp;quot;vendor&amp;quot;:    &amp;quot;dflemstr&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
      //URI to the PND containing the application (type: json-string)&lt;br /&gt;
      //&lt;br /&gt;
      //URI accepts the following protocols: [&amp;quot;http:&amp;quot;, &amp;quot;https:&amp;quot;, &amp;quot;ftp:&amp;quot;, &amp;quot;data:&amp;quot;, &amp;quot;file:&amp;quot;]&lt;br /&gt;
      &amp;quot;uri&amp;quot;:       &amp;quot;http://dflemstr.dyndns.org:8088/file/package/WPL5JKWK0PTODSWK.pnd&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
      //Application localizations. (type: json-array)&lt;br /&gt;
      //&lt;br /&gt;
      //A localization for &amp;quot;en_US&amp;quot; will always be present.&lt;br /&gt;
      &amp;quot;localizations&amp;quot;: {&lt;br /&gt;
        //Application localization. (type: json-object)&lt;br /&gt;
        //&lt;br /&gt;
        //Key: Language of this localization. (type: json-string, matches: &amp;quot;[a-z][a-z](_[A-Z][A-Z])?&amp;quot;)&lt;br /&gt;
        //&lt;br /&gt;
        //This is made up of two parts:&lt;br /&gt;
        // - The language part. This code is the lower-case, two-letter code as defined by ISO-639.&lt;br /&gt;
        // - OPTIONAL: The country part. This code is the upper-case, two-letter code as defined by ISO-3166, with an underscore as the prefix.&lt;br /&gt;
        &amp;quot;en_US&amp;quot;: {&lt;br /&gt;
          //The application title according to this localization (type: json-string)&lt;br /&gt;
          &amp;quot;title&amp;quot;: &amp;quot;Vice xVIC&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
          //The application description according to this localization. (type: json-string)&lt;br /&gt;
          &amp;quot;description&amp;quot;: &amp;quot;A VIC Emulator.&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
      },&lt;br /&gt;
&lt;br /&gt;
      //Application categories. (type: json-array)&lt;br /&gt;
      &amp;quot;categories&amp;quot;: [&lt;br /&gt;
        //Category. (type: json-string)&lt;br /&gt;
        //&lt;br /&gt;
        //See http://standards.freedesktop.org/menu-spec/latest/apa.html for a list of valid categories.&lt;br /&gt;
        &amp;quot;Game&amp;quot;&lt;br /&gt;
      ],&lt;br /&gt;
&lt;br /&gt;
      //OPTIONAL: URI to the icon to show to the user (type: json-string)&lt;br /&gt;
      //&lt;br /&gt;
      //URI accepts the following protocols: [&amp;quot;http:&amp;quot;, &amp;quot;https:&amp;quot;, &amp;quot;ftp:&amp;quot;, &amp;quot;data:&amp;quot;, &amp;quot;file:&amp;quot;]&lt;br /&gt;
      //(Image of type: image/png, size: The largest side is 64 pixels, e.g. 64x64, 64x46, 32x64. Preferrably square.)&lt;br /&gt;
      &amp;quot;icon&amp;quot;:     &amp;quot;http://dflemstr.dyndns.org:8088/file/image/WPL5JKWK0PTODSWK.png&amp;quot;,&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=Libpnd_hub&amp;diff=2401</id>
		<title>Libpnd hub</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=Libpnd_hub&amp;diff=2401"/>
		<updated>2010-06-12T14:12:43Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* File format - .pnd files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=libpnd - the Pandora Library=&lt;br /&gt;
&lt;br /&gt;
libpnd is a basic collection of functions and tools to make working Pandora-specific operations easier; to wit, it is hoped multiple applications will make use of this library rather than re-implement similar functionality and lead to problems down the road. (Instead we can run into problems together and thus clobberize them.) &lt;br /&gt;
&lt;br /&gt;
libpnd thus is a collection of ...&lt;br /&gt;
&lt;br /&gt;
* handy system code that hopefully is reusable - IO functions, CPU clock setting, etc.&lt;br /&gt;
* applications for supporting the Pandora unique features, such as pndnotifyd for auto-discovery of PXML and .pnd applicatons&lt;br /&gt;
* libraries for support of the .pnd and PXML systems; i.e.: for locating, executable, mounting and unmounting PXML-directory and .pnd applications, loading PXML and handling overrides&lt;br /&gt;
* hopefully reusable code for support of these things; i.e.: a rudimentary but useful config-file parser, rudimentary singly-linked-list container, etc.&lt;br /&gt;
&lt;br /&gt;
libpnd will/does also include utility functions for setting the CPU clock, reading GPIO inputs without depending on SDL, and other handy bits.&lt;br /&gt;
&lt;br /&gt;
'''You can, nay, are needed - contribute to libpnd!'''&lt;br /&gt;
&lt;br /&gt;
==Design considerations and philosophy==&lt;br /&gt;
&lt;br /&gt;
While much of libpnd is obvious, some decisions had to be made and it may help to know the guiding principle behind it; the Pandora device will be a handheld _computer_, but libpnd is designed to facilitate certain operations with goals towards..&lt;br /&gt;
&lt;br /&gt;
- simplicity - just work right, configuration not generally needed&lt;br /&gt;
&lt;br /&gt;
- obviousness - work as one would expect for this sort of device; i.e.: the user assumes something will work a certain way, and it does&lt;br /&gt;
&lt;br /&gt;
- like other guys - as an extension of the prior point, we have tried to follow UNIX spirit and provide reusable small tools to do the work those bits can be leveraged, but further tried to follow the spirit of other consoles. So while the device is a powerful little computer, it is probably going to be used by gaming and retro enthusiasts and so we color some of our decisions that way. (i.e.: consider that a PS2/xbox/PSP/etc will have save-game or data management as a separate application, for instance. If thats the best multi-million dollar companies can come up with over decades, well, its not so bad for us to fall back on!)&lt;br /&gt;
&lt;br /&gt;
- not over-defined; libpnd and PXML try to define a bunch of things, but we also do not _over define_; we try to lead by providing examples and styles, and while we have designed ahead for many things, we have also not nailed a lot of that down too early. It is better to be simple and shipped, then complex and a mess.. adaptable rather than scary.&lt;br /&gt;
&lt;br /&gt;
The library is of course broken into parts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include     - include these files to make use of the lib&lt;br /&gt;
lib         - the code that produces the lib&lt;br /&gt;
test        - mini tools to test various pieces of the lib in isolation&lt;br /&gt;
bin         - test tools - tools for testing the lib as it is developed, not anticipated to be used by many&lt;br /&gt;
testdata/   - for testing /etc/pandora; will contain 'conf' dir, for example&lt;br /&gt;
apps/       - actual applications people may use, such as pndnotifyd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For now though, here are a couple notes about the design.&lt;br /&gt;
&lt;br /&gt;
- it is straight C code, to be maximumly re-usable (perhaps C++ and other language bindings will tie back to it). I have gone out of my way to limit external references so that bindings are easier to make. &lt;br /&gt;
&lt;br /&gt;
- contrary to the previous comment, we've used a bit of C++ for the tinyxml parser .. hopefully this is not an issue.&lt;br /&gt;
&lt;br /&gt;
- I have tried to keep the API relatively simple and am faking some OO like data hiding to try to keep dev noses out of structures that are subject to change. i.e.: functions for list management and node access are provided, don't dig into the void* cast structs, or you could get burnt.&lt;br /&gt;
&lt;br /&gt;
- the API should be pretty stable; so far very few user-code changes have ever been needed.. lib internal changes should be binary compatible.&lt;br /&gt;
&lt;br /&gt;
- As a result of that decision, 'handles' are used; a handle is a 'black box' type, something you cannot just use 'handle h; h -&amp;gt; foo = 5' type code for. Instead, internally the library will cast the handle to the actual useful type (which may involve pointer arith etc). This way the user can be returned a handle, and pass the handle to various access functions to get useful data/operations.. but the user is not encouraged to look inside the data objects himself&lt;br /&gt;
&lt;br /&gt;
- As another implication, access functions are available aplenty; it is a little unwieldy perhaps, but its all about keeping the API good without the user peeking inside and risking being broken down the road. (By example, consider.. you use ftell() on a FILE object; you don't go looking in FILE for the 'position' member, since it might be platform specific, etc.)&lt;br /&gt;
&lt;br /&gt;
- The lib works pretty well, but there is room for improvement internally; it won't hurt my feelings for you to suggest improvements, and I'm sure we would all be grateful for any patches you provide. We've _started_ this library, but by no means wish to carry it alone!&lt;br /&gt;
&lt;br /&gt;
==Opportunities for improvement==&lt;br /&gt;
&lt;br /&gt;
Certainly nothing is perfect, especially when chasing moving targets.  Some aspects of the library are less efficient, or missing, or buggy, and a few things are noted here should someone have time. The API was designed to be pretty stable so the internal code could be altered without breaking the API interface.&lt;br /&gt;
&lt;br /&gt;
- better ISO lang handling .. due to shift from original PXML spec to new PXML spec with better lang support I've not updated some of the internal code, API uses etc to handle it. (even .desktop files could include all iso-lang titles, and let the WM pick through as the spec suggests.)&lt;br /&gt;
&lt;br /&gt;
==License==&lt;br /&gt;
&lt;br /&gt;
libpnd (including all the apps etc) are released under the LGPL (ie: so there should be no encumbrances that prevent linking to commercial applications.)&lt;br /&gt;
&lt;br /&gt;
   1                   GNU LESSER GENERAL PUBLIC LICENSE&lt;br /&gt;
&lt;br /&gt;
   2                        Version 2.1, February 1999&lt;br /&gt;
&lt;br /&gt;
==Obtaining the library==&lt;br /&gt;
&lt;br /&gt;
libpnd is in the Official Pandora GIT repo: [http://git.openpandora.org/cgi-bin/gitweb.cgi]&lt;br /&gt;
&lt;br /&gt;
To obtain yourself a copy, use something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.openpandora.org/pandora-libraries.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thats all you normally need. For copy-paste from the private Wiki sake, heres what I had before:&lt;br /&gt;
&lt;br /&gt;
Without going into how to set up a GIT, the summary that I (as a registered dev in the repo) used was:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir libpnd&lt;br /&gt;
cd libpnd&lt;br /&gt;
git init&lt;br /&gt;
git remote add libpnd ssh://foo@git.openpandora.org/srv/git/pandora-libraries.git&lt;br /&gt;
git pull libpnd master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Building the library==&lt;br /&gt;
&lt;br /&gt;
Standard 'make' should be sufficient here; pull down the directory from the GIT, cd into it, and run make. Thats it.&lt;br /&gt;
&lt;br /&gt;
Note that the make default target is 'everything', which will emit:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
libpnd.a - the static linked version of the lib&lt;br /&gt;
libpnd.so.1.0.1 - the dynlinked version&lt;br /&gt;
libpnd.so.1 - the stub for the shared lib; i.e.: apps should link against libpnd.so.1 and not the 1.0.1 over-specific version&lt;br /&gt;
bin/* - the 'test' dir and the 'apps' dir builds will end up in bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a few additional make targets, however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make clean - wipes out the object files, the bin files, and *~* (emacs backup files), empties some of the deploy stuff, etc. Do this before committing to GIT or we will beat you with sticks.&lt;br /&gt;
make deploy - populates the deploy/ directory, which is what is used inthe shipping images; i.e.: testdata/conf includes test configs, while deploy/etc/pandora/conf includes the configs we ship with. This make will copy over some of the libs and binaries and such.&lt;br /&gt;
make pnd - create a few sample pnd files for testing the lib on an x86 machine&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Included Applications==&lt;br /&gt;
&lt;br /&gt;
===pndnotifyd===&lt;br /&gt;
&lt;br /&gt;
Manages the auto-discovery mechanism and integrating PXML.xml dir-apps and .pnd files into the FreeDesktop standard system (.desktop files). A dedicated libpnd-aware menu could leverage libpnd directly and not need pndnotifyd, though pndnotifyd does offer some handy bits such as HUPping apps to suggest to them that applications may have been added/removed (libpnd includes all the necessary functions for this as well.)&lt;br /&gt;
&lt;br /&gt;
===pndvalidator===&lt;br /&gt;
&lt;br /&gt;
Is mostly a skeleton right now; in the future, it is hoped it will inspect a PXML.xml and then check to ensure the referenced assets are present; the goal to validate the PXML.xml is spec compliant, and the resulting application would be useful.&lt;br /&gt;
&lt;br /&gt;
===discotest===&lt;br /&gt;
&lt;br /&gt;
One of the test tools; it essentially runs an auto-discovery to list off the found apps (be they PXML.xml dir apps or .pnd files), and can dump various data or invoke one or other little tasks; used to test lots of&lt;br /&gt;
bits of libpnd as it was developed.&lt;br /&gt;
&lt;br /&gt;
===rawpxmltest===&lt;br /&gt;
&lt;br /&gt;
Reads a given PXML.xml and spits out some of the fields found within.&lt;br /&gt;
&lt;br /&gt;
===test tools===&lt;br /&gt;
&lt;br /&gt;
See the test/ dir in the libpnd source for assorted goofy little test apps used for testing bits of libpnd over time. They also may serve as source examples for using some of the APIs. They're old and shoddy probably too.&lt;br /&gt;
&lt;br /&gt;
==Distributed PXML.xml-directory and pnd applications, how does running them actually work?==&lt;br /&gt;
&lt;br /&gt;
This is just a quick summary to save you guessing by reading this whole document.&lt;br /&gt;
&lt;br /&gt;
In essence, libpnd includes lots of real code, but in many places it passes heavy lifting off to shellscripts. This is both handy because the scripts are easily modified without recompilation, and further extends our design goals of making the library bindable to any other language.&lt;br /&gt;
&lt;br /&gt;
Remember, PXML.xml directories are just as executable/mountable as .pnd apps.&lt;br /&gt;
&lt;br /&gt;
So while libpnd is mostly straight-C and so easily bound to python or perl or whatever, libpnd itself invokes many scripts. Those scripts can be directly used by other applications, including other shellscripts.. so libnd functionality can even have bindings in other scripts. This is very flexible and powerful, and handy during debugging or SSHing into the Pandora, etc.&lt;br /&gt;
&lt;br /&gt;
The application lifecycle goes like this:&lt;br /&gt;
&lt;br /&gt;
- device is turned on&lt;br /&gt;
&lt;br /&gt;
- during init, pndnotifyd is brought up and inhales the config giles&lt;br /&gt;
&lt;br /&gt;
- pndnotidyd will attempt to auto-discover what PXML.xml directory apps and .pnd-file apps are in the configured searchpaths&lt;br /&gt;
&lt;br /&gt;
- pndnotifyd will set up filesystem watches on the directories in the notify searchpath; if any of those directories are touched, pndnotifyd will wake up and re-auto-discover .. possibly removing .desktop entries or creating new ones. (i.e.: you drop a new app into the app searchpath, or remove one, or mount an SD card, etc. This is how appications immediately show up or vanish from the window manager desktops.)&lt;br /&gt;
&lt;br /&gt;
- a libpnd aware launcher can execute applications direct (using libpnd)&lt;br /&gt;
&lt;br /&gt;
- a libpnd unaware launcher can execute applications via the .desktop standard system; pndnotidyd will emit .desktop files as needed.&lt;br /&gt;
&lt;br /&gt;
- when libpnd or a .desktop file need to execute an application, they do it via pnd_run.sh (which may be leveraged by other applications, but they hould use libpnd if they can instead, for utmost compatiblity down the road.) pnd_run.sh does the mount of the ISO, runs the actual execable and so on, as directed by libpnd or the command-line args from the .desktop. pnd_run.sh will clean up after everything as well.&lt;br /&gt;
&lt;br /&gt;
So it all works like magic, but it is not that complex a system once you've got the hang of what all is going on.&lt;br /&gt;
&lt;br /&gt;
application -&amp;gt; libpnd -&amp;gt; shellscripts -&amp;gt; system&lt;br /&gt;
&lt;br /&gt;
==FAQ: IF you want to make files visible to the apps, do you have to modify the pnd?==&lt;br /&gt;
&lt;br /&gt;
No. When apps write back to themselves, the writes go to their /pandora/appdata on the SD that houses them. The next time the app reads a file in its directory, the OS will ensure they get the newer file, which is the one in the appdata.&lt;br /&gt;
&lt;br /&gt;
Likewise, you can just drop a file into the appdata and the app will see it.&lt;br /&gt;
&lt;br /&gt;
The app doesn't know about appdata and its pnd file.. the OS and libpnd take care of all the magic.. the app sees one directory, but the reality is there is magic merging going on behind the scenes.&lt;br /&gt;
&lt;br /&gt;
==Assumptions about the filesystem and Configuration==&lt;br /&gt;
&lt;br /&gt;
Note that for libpnd to work, it makes certain assumptions about the filesystem and config files. Since libpnd was developed with the images it should work for the Pandora .. but just dropping libpnd onto another Linux distribution and it won't likely 'work out of the box'. Certain config files will need to be set, and certain conventions followed.&lt;br /&gt;
&lt;br /&gt;
===Searchpaths===&lt;br /&gt;
&lt;br /&gt;
libpnd was designed so that most everything is configured in files, and that these files should be easily hackable and easily overriden, without compromising the machine. It should be feasible to add a config file to an SD card, have it take over if available when required, and then 'undo' those configs simply by removal of the SD card and rebooting.&lt;br /&gt;
&lt;br /&gt;
To facilitate this design goal, all config files are 'sought' using a search-path system.&lt;br /&gt;
&lt;br /&gt;
Developers should be mindful of using the libpnd APIs so this behaviour is inherited to interested applications; developers could also reuse the logic for searching for files, if they find it useful.&lt;br /&gt;
&lt;br /&gt;
Searchpaths are colon-delimited list of paths, searched left to right.&lt;br /&gt;
&lt;br /&gt;
ex: foo:bar:/my/baz means to look for a given file in 'foo', then in 'bar', then in '/my/baz'.&lt;br /&gt;
&lt;br /&gt;
The standard config files have a default searchpath, and those config files will define further searchpaths for scripts and such the system uses. This makes the system highly flexible -- default scripts are included, but can be overridden by dropping the right named script on an SD card, or by altering a config file.&lt;br /&gt;
&lt;br /&gt;
See the example config files below for example searchpaths -- i.e.: how pndnotifyd searches for pnd_run, etc.&lt;br /&gt;
&lt;br /&gt;
===Notification paths===&lt;br /&gt;
&lt;br /&gt;
The 'apps' config includes a searchpath that specifies the sub-paths to be 'watched'. Various watch mechanisms exist for various filesystem types, but over the course of Pandora development (various kernels, various k-modules, various DM and WM's, I found the included system most stable, though not most current. After a final device image is settled on, it might be time to alter the notification system, but it should not impact the libpnd API.)&lt;br /&gt;
&lt;br /&gt;
Anyway, watches are placed upon the paths defined, and if anything in those paths changes, the auto-discovery code is kicked off to seek our PXML.xml and .pnd type applications in the search paths.&lt;br /&gt;
&lt;br /&gt;
Note that searchpath and notifypaths are different (and usually very similar, but have the option to be very different.)&lt;br /&gt;
&lt;br /&gt;
===Config files===&lt;br /&gt;
&lt;br /&gt;
libpnd includes a generic simple config file parser and assumes the presence of a few config files. It also includes defaults&lt;br /&gt;
so if a config is missing or broken things should work.&lt;br /&gt;
&lt;br /&gt;
In general, Pandora specific config files should be located in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/pandora/conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The config files are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
conf -- this file is generally _not_ included with the Pandora and left to default; its job is to define the basic default searchpath for config files, so should you wish to override things entirely, you may need to alter this file. i.e.: If you wish to switch to test config files on SD or in /tmp, instead of using any other conf files .. you can create this guy. This provides a mechanism to short circuit the entire conf system.&lt;br /&gt;
&lt;br /&gt;
apps -- this config file defines auto-discovery and other application bundle parameters&lt;br /&gt;
&lt;br /&gt;
desktop -- this config defines &amp;quot;dotdesktop&amp;quot; .desktop and FreeDesktop integration paramters -- example is where to spit out icons or .desktop files from discovered PXML.xml or pnd applications&lt;br /&gt;
&lt;br /&gt;
categories -- this config maps PXML.xml spec based categories to FreeDesktop standard categories; in this way a PXML based applicatoin can show up in the appropriate categories of a WM that does not use libpnd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====conf File====&lt;br /&gt;
&lt;br /&gt;
No default is included with the distribution.&lt;br /&gt;
&lt;br /&gt;
The default search path is reasonable and assumes we want the official /etc/pandora/conf near the end, with checks to the SD cards for overrides first. (Likely most people will not override, so the canonical location will be used 99.9% of the time.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PND_CONF_SEARCHPATH &amp;quot;/media/mmcblk0p1/pandora/conf:/media/mmcblk1p1/pandora/conf:/etc/pandora/conf:./testdata/conf&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The key for override is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PND_CONF_KEY        &amp;quot;conf.searchpath&amp;quot; /* if not found, use PND_CONF_SEARCHPATH */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which suggests using something like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[conf]&lt;br /&gt;
searchpath   /foo/bar:/baz/bing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====desktop File====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Desktop configuration&lt;br /&gt;
&lt;br /&gt;
[dotfiles]&lt;br /&gt;
#(~/Desktop for xfce, /usr/share/applications for WMs that actually follow spec)&lt;br /&gt;
dotdesktoppath  ~/Desktop/      # path for pndnotifyd to spit .desktop files into (run as root)&lt;br /&gt;
iconpath        /tmp    # path for pndnotifyd to drop icons into (can be same as .desktop if WM permits)&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
# if hupscript is commented out entirely, pndnotifyd will not try to find/run the hup&lt;br /&gt;
# if it is uncommented, pndnotifyd will attempt to invoke the hupscript after emitting .desktop files&lt;br /&gt;
# (the hupscript exists to hup the WMs to redisplay .desktop apps)&lt;br /&gt;
#hupscript      pnd_hup.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====apps File====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Application configuration&lt;br /&gt;
&lt;br /&gt;
[autodiscovery]&lt;br /&gt;
# searchpath is a list of paths (colon separated) in which to look for PXML.xml or .pnd-file applications&lt;br /&gt;
searchpath      /media/*/pandora/apps:/usr/pandora/apps&lt;br /&gt;
# notifypath is a list of paths to monitor; if anything in those paths changes, the searchpath is rescanned&lt;br /&gt;
# note that for each path chunk, all current subdirs of that path are also watched)&lt;br /&gt;
notifypath      /media:/media/*/pandora/apps:/usr/pandora/apps:./testdata/app?&lt;br /&gt;
&lt;br /&gt;
# PXMLs may be overridden .. i.e.: overrides are a subset of PXML, where the values are copied over the full PXML&lt;br /&gt;
[overrides]&lt;br /&gt;
# searchpath to look for PXML overrides (which are named by the unique-id)&lt;br /&gt;
searchpath      ~/pxml-overrides&lt;br /&gt;
&lt;br /&gt;
# [pnd] defines where to locate the pnd support scripts, so the user may override pnd_run.sh without clobbering built in&lt;br /&gt;
[pnd]&lt;br /&gt;
searchpath      /media/*/pandora/scripts:/usr/pandora/scripts&lt;br /&gt;
runscript       pnd_run.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====categories File====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# dotdesktop configuration&lt;br /&gt;
&lt;br /&gt;
# this config file maps 'PXML' categories to free-desktop standard categories&lt;br /&gt;
# i.e.: category 'Foo' could map to more standard 'Utility', thus making .desktop file&lt;br /&gt;
# emitting a more useful thing&lt;br /&gt;
&lt;br /&gt;
# the standard listing of categories is:&lt;br /&gt;
# http://standards.freedesktop.org/menu-spec/latest/apa.html&lt;br /&gt;
&lt;br /&gt;
# note that 'map' section in the config is _required_ for a match to be found; this&lt;br /&gt;
# is done to separate categories from (future) top-level directives&lt;br /&gt;
&lt;br /&gt;
default Application;Utility;Network;&lt;br /&gt;
&lt;br /&gt;
[map]&lt;br /&gt;
Development     Development&lt;br /&gt;
Education       Education&lt;br /&gt;
Games   Game&lt;br /&gt;
Graphics        Graphics&lt;br /&gt;
Internet        Network&lt;br /&gt;
Multimedia      AudioVideo&lt;br /&gt;
Office  Office&lt;br /&gt;
Settings        Settings&lt;br /&gt;
System  System&lt;br /&gt;
Utilities       Utility&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SD card layout===&lt;br /&gt;
&lt;br /&gt;
libpnd concerns itself with things in the 'pandora' root folder on SD. We agonized over this decision, but settled on this to avoid cases where someone with a 16GB SDHC card puts 50-million files with &amp;quot;.pnd&amp;quot; on them, and expects reasonable performance. Instead, applications for instance would have to be in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/pandora/menu -&amp;gt; apps that will go to /usr/share/applications and should show up in xfce menu by category&lt;br /&gt;
/pandora/desktop -&amp;gt; apps that will go to ~/Desktop and show up on user desktop as icons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following location is used by pmenu (and may get deprecated, but I've not discussed it with cpasjuste yet.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/pandora/apps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i.e.: the searchpath for autodiscovery includes /media/*/pandora/apps (and desktop and menu now)&lt;br /&gt;
&lt;br /&gt;
Also in the /pandora/ folder is a magic 'appdata' folder:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/pandora/appdata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a .pndfile or PXML.xml dir get mounted, any writes back to the mounted area are put into appdata, with a subdir by the unique-id. i.e.: With the hypothetical MAME.pnd, it might update its config files after a user changes something, or create new files, or store hiscores or whatever. If it doesn't write them to NAND, and doesn't want ot write them to /mame/some/dir, but instead record it to itself for whatever reason, it would go to /pandora/appdata/MAMEs-ID/ instead. The pnd or PXML.xml app area is never modified during a run, only the appdata. (But when an application reads its own path, it will pick up the appdata version of the file instead of the actual file. Then magic of union-type filesystems!)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
If Myapp with unique-id foo.123 is mounted, then any write-backs are directed to..&lt;br /&gt;
&lt;br /&gt;
/pandora/appdata/foo.123/&lt;br /&gt;
&lt;br /&gt;
On the SD that hosts the application.&lt;br /&gt;
&lt;br /&gt;
===NAND layout===&lt;br /&gt;
&lt;br /&gt;
In addition to seeking applications in SD cards, /usr/pandora/apps is included in the default searchpath, so that 'built in' apps can be listed, or users can drop them there.&lt;br /&gt;
&lt;br /&gt;
It might be a cool addition to put a user homedir into the searchpath as well, so NAND but user-homedir (for on-device browser downloads, say.)&lt;br /&gt;
&lt;br /&gt;
==Command line tools and testing==&lt;br /&gt;
&lt;br /&gt;
A number of scripts and tools are included or built with libpnd, to facilitate testing of the lib as its being developed and to assist in making .pnd files and PXML.xml files.&lt;br /&gt;
&lt;br /&gt;
==PXML.xml and .pnd files==&lt;br /&gt;
&lt;br /&gt;
On most platforms, applications are distributed as an executable and optional datafiles and likely an installer. The installers job is to integrate the application into the filesystem, as the transport mechanism itself is not executable and is considered temporary. In Windows an application might be installed into Program Files, while in Unix an application might be dropped into /usr/local/bin .. data files in various other places.&lt;br /&gt;
&lt;br /&gt;
For the Pandora platform we wanted a very easy to use workflow -- download and run -- and also have a very different operating environment. With multiple SD cards available for expansion (and that space being highly desirable due to a smaller internal store) it is desirable to install applications to SD, and yet SD cards are by definition something users will wish to carry multiple of. With two slots, it could be quite a chore to install an application to SD1, its data to SD2, and then say have only one of them plugged in at a time, or switch which slot they're in, or any number of scenarios. i.e.: Installing onto a medium which may be present or not at any time is very different to how most operating systems work. So we made something new and awesome.&lt;br /&gt;
&lt;br /&gt;
The PXML.xml and .pnd-file approach we came up with attempts to address these issues.&lt;br /&gt;
&lt;br /&gt;
The goals:&lt;br /&gt;
&lt;br /&gt;
- for the user, an application can be a single file download&lt;br /&gt;
&lt;br /&gt;
- furthermore, there is no installation whatsoever, beyond dropping that single file into the right place on the SD card&lt;br /&gt;
&lt;br /&gt;
- using the application should be easy -- stick in the SD card, and tap/launch on the icon.&lt;br /&gt;
&lt;br /&gt;
- for uninstallation, delete the single file. Thats it, no fuss.&lt;br /&gt;
&lt;br /&gt;
- for the developer, creating that single file should be easy to do&lt;br /&gt;
&lt;br /&gt;
- for the system, performance should be high&lt;br /&gt;
&lt;br /&gt;
Remember, an application can be a .pnd 'bundle' (single file containing all the sub-files), or a PXML.xml 'dir application' (an unpacked .pnd esentially.) '''BOTH PXML.xml-dirs and .pnd's ARE EXECUTABLE.'''&lt;br /&gt;
&lt;br /&gt;
pndnotifyd will auto-discover PXML.xml in a directory and consider that an application, emitting a .desktop file, just as well as a .pnd file. i.e.: This can be hand for development or users. Remember that a mounted PXML.xml dir still redirect write-backs to the /pandora/appdata directory, just like a full .pnd application. They are treated the same!&lt;br /&gt;
&lt;br /&gt;
===What are PXML.xml and .pnd files?===&lt;br /&gt;
&lt;br /&gt;
PXML.xml is a file describing an application&lt;br /&gt;
&lt;br /&gt;
A directory containing a PXML.xml _is executable_&lt;br /&gt;
&lt;br /&gt;
A .pnd file is the packaged up version of the directory that is executable.&lt;br /&gt;
&lt;br /&gt;
i.e.: a PXML.xml in a directory is just as executable as a .pnd representation of that directory.&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
mkdir OutcaST&lt;br /&gt;
cp outcast.bin OutcaST/&lt;br /&gt;
cp PXML.xml OutcaST/&lt;br /&gt;
# at this point, the OutcaST directory is now discoverable and executable&lt;br /&gt;
&lt;br /&gt;
pnd_make.sh -this -that OutcaST outcast.pnd&lt;br /&gt;
# at this point, outcast.pnd is executable (as is the OutcaST directory), so upload outcast.pnd to the Open Handhelds Archive and let people enjoy!&lt;br /&gt;
&lt;br /&gt;
===A note on including shared libs===&lt;br /&gt;
A philsophy for packaging that I am advocating is to 'just make applications work' -- avoid dependancy trees.&lt;br /&gt;
&lt;br /&gt;
Some guidelines:&lt;br /&gt;
&lt;br /&gt;
1) you can depend on shared libs included with the firmware to always be there&lt;br /&gt;
&lt;br /&gt;
2) you should include any shared libs you need for your app, that are not in the firmware (yes, this increases app size a little bit, and potentially makes for duplication among apps that use the same shared libs)&lt;br /&gt;
&lt;br /&gt;
3) if a shared lib becomes desirable in the firmware, it can be added there as a firmware patch easily (this has the advantage of gradulaly updating the entire user based, and apps easily saying 'we depend in firmware version X', rather than making for pnd-dependnacies and the equivilent of 'dll hell'&lt;br /&gt;
&lt;br /&gt;
4) You'll have to be careful in linking your application to ensure that the shared libs you are including in the pnd/PXML-dir are to be locatable by your binaries. ie: stick them in a 'lib/' dir in your bundle, and stamp your binary with a library-path './dir/' so they can be found, say. More later.&lt;br /&gt;
&lt;br /&gt;
===Future idea: pnd's for containing system-wide shared libs===&lt;br /&gt;
&lt;br /&gt;
This is something we've bounced around for quite awhile, but not committed to. As it keeps coming up I thought I'd put some notes here in public.&lt;br /&gt;
&lt;br /&gt;
It is possibly desirable to make a special searchpath that is discovered during machine boot, and any pnd's found there are automatically mounted (and left mounted) into a special path (say /usr/local/pandora/lib or somesuch.) This way, collections of handy utilities or shared libraries could be distributed as a pnd, and become available in consistent locations. If 10 applications need a shared lib, and don't want to duplciate it in each of their pnd files, this could be an approach.&lt;br /&gt;
&lt;br /&gt;
I tend to think it is best avoided, however, since it complicates the user experience -- we end up with pnd depandancies, and apps nolonger about to 'just work', and apps that did work and 'suddenly break' when other files are altered. The philosphy we're going for with pnd files is 'drag and drop' -- user downloads a pnd file, and it works.. a self contained application, nice and easy. We start complicating the dependancies, and it turns into 'dll hell' as seen on other platforms.&lt;br /&gt;
&lt;br /&gt;
That said, it is _not_ difficult to add into the existing system and design; we've been mulling it over, but it is best avoided for now. rather than complicate the system up front, let us try to get a functional and as lightweight-as-possible system on the uptake, gather some usage data points and then worry about upgrades :)&lt;br /&gt;
&lt;br /&gt;
===File format - PXML.xml / PXML Specification===&lt;br /&gt;
See the [[PXML_specification|PXML specification]]&lt;br /&gt;
&lt;br /&gt;
Alternatively the spec is included in the docs/ directory of the libpnd distribution, though the wiki version linked above should be considered cannon.&lt;br /&gt;
&lt;br /&gt;
A note on history; the PXML spec was originally created by EvilDragon, and went through a number of revisions as suggestions came in; as these things are wont to do, the target was ever moving and the scope and meaning of PXML changed so at some point a more strategic approach was needed. dflemstr took it upon himself to help recode some of the parse and re-evaluate many of the PXML decisions and hence was born the PXML-version-2 spec.&lt;br /&gt;
&lt;br /&gt;
===File format - .pnd files===&lt;br /&gt;
The pnd file format is pretty straight forward, though most will interact with it through the included (or community supplied) tools.&lt;br /&gt;
&lt;br /&gt;
Basically its just an ISO file (or other filesystem type) with a PXML.xml and an optional PNG icon appended. (example: cat appfolder.iso app.pxml icon.png &amp;gt; app.pnd) For ease of discussion, I refer to ISO but in fact you coudl be using squashfs or other types.&lt;br /&gt;
&lt;br /&gt;
The ISO filesystem portion of the file can include anything the developer wishes, as long as it includes a PXML.xml in its root file and an executable somewhere in there. It can also include images, audio files, data files of any kind. It can be small or large.&lt;br /&gt;
&lt;br /&gt;
Yes, the PXML.xml is included in the ISO portion (in the root directory), and also appended to the end of the .pnd file (for _convenience_ .. it is very easy and fast to locate in this position; we can backseek into the ISO to find the PXML, but if its a 500MB ISO it could take awhile. Hence, we append it and can find it in one seek.)&lt;br /&gt;
&lt;br /&gt;
'''NOTE: The naming of the PXML.xml file is important! The name is case sensitive and must be &amp;quot;PXML.xml&amp;quot;, nothing else!'''&lt;br /&gt;
&lt;br /&gt;
This simple format makes it possible to easily create .pnd files with the default utility's of most operating systems. Further, it is a fairly fail-safe system -- the PXML is appended, but is also included within the ISO image part of the file so if the appended-PXML is ever lost (unpack and repack poorly, say) the system will still work (the PXML inside the ISO can be found easily, even without mounting the ISO _as_ an ISO, since it is a plaintext uncompressed image format.) &lt;br /&gt;
&lt;br /&gt;
Manually creating a .pnd (or even a PXML) is a pain so there will be a few helper scripts or maybe even a gui app out when we launch.&lt;br /&gt;
&lt;br /&gt;
Included with libpnd are some scripts to create PXML and pndfiles, though it is expected people will create handier utilities. See the tool section of this wiki for some details.&lt;br /&gt;
&lt;br /&gt;
Question from the gp32x forum regarding confusion of PXML location -- remember that in general mot developers will keep a directory that represents the .pnd or PXML-dir application. Their makefile/build-process will drop the executable(s) into that directory, which inludes a PXML.xml description of the application, and possibly an icon (and whatever all else they wish.) To build the .pnd file, a script (say) is used which compresses all this into the pnd format (including appending the PXML.) So yes, the PXML is in two places in the .pnd file and one place in the source directory. You'll get used to it ;)&lt;br /&gt;
&lt;br /&gt;
Rationale --&lt;br /&gt;
&lt;br /&gt;
Several iterations of pnd files have been considered, from zipfiles to cramfs to other formats, to putting in a key/value set of information tags in the file, to table-of-contents indexes, to any number of options to help performance, and so on. In the end we went for a good overall and simple solution and dropped getting fancy -- PXML.xml can be extended to define the type of the file if it cannot be magic'd, so we could using other filesystem types in the future (and this is why people should use libpnd rather than rolling their own solution.) For now however, pnd files are ISO files with the PXML.xml appended and an optional icon. This keeps the PXML and icon easy to locate, and yet a easy file format.&lt;br /&gt;
&lt;br /&gt;
====Recommended layout of a pnd directory structure, ie: how to make a well behaved pnd file====&lt;br /&gt;
&lt;br /&gt;
These are guidelines to make pnd-files 'well behaved', and to help move towards a consistent pnd structure.&lt;br /&gt;
&lt;br /&gt;
* Always include your icon png-file and PXML.xml file in the _Root_ of the pnd-file; this is for reasons that folks may well unpack the pnd-file, and then repack it; in doing so, if the icon and PXML.xml (normally appended to the .iso to become a .pnd) will be lost, unless the user or tool is being careful. Thus, it is wise to include them within the .iso, to make things so the iso is the entire pnd application, in unpacked form.&lt;br /&gt;
&lt;br /&gt;
* Use a 'reasonably unique' unique-id of course (to identify your application.) This is used for many internal uses, so uniqueness is pretty wise.&lt;br /&gt;
&lt;br /&gt;
* Use an 'application relevent' appdata name; make it as unique as you have to, but consider being less unique; a random example could be .. possibly there may be several quake1 ports; they could all share the same appdata (same config files, same data files), but if you intend on having different config or data files than other quake1's, make your appdata named differently. &lt;br /&gt;
&lt;br /&gt;
* Always include a documentation 'info' link, if your app has any setup requirements, has popup help screens that the user needs to know a key to pop up, or other essential trivia; feel free to make the doc link as complete as you like, since its all within the pnd file. (ie: Include the full DosBox documentation if you want to, in your DosBox pnd :)&lt;br /&gt;
&lt;br /&gt;
* Try to set up the appdata directory for the user; if you need a 'roms' or 'image' directory in the appdata (such as in the case of an Atari ST emulator needing a location to house the TOS OS image, say), then do a 'mkdir' in your 'runscript', to create it. Thus the user will find a (example) Hatari appdata directory, and within, any directories he needs (possibly empty.) This just makes it obvious for the user where to put stuff.&lt;br /&gt;
&lt;br /&gt;
* Try using rudimentary zenity scripts to pop up imporant pre-run information, if the application can't do so; ie: Hatari itself has a very fine GUI in it, but if the Atari ST TOS image is not present, it just exits and fails to run, so the GUI doesn't have time to do anything useful. In this case, it could be wise to use a 1 line zenity script that checks before the emu runs for the file in question, then pop up a dialog box saying 'put this file /here', so the user knows what the heck happened&lt;br /&gt;
&lt;br /&gt;
* Always Always Always write your 'state info' to current-working-directory (ie: ./foo, and not ~/foo). The pnd-system will redirect this to the users appdata of course, keeping things clean and predictable. If you're just porting an app, that has ~ all over the darned place, and you don't want to muck up the code.. just have your 'runscript' do something like 'set $HOME=.' and you're good to go!&lt;br /&gt;
&lt;br /&gt;
* Runscripts; the PXML.xml can specify to run your binary, or you can run a .sh script that in turn runs your binary, say. This lets you do various tests, set up LD_LIBRARY_PATH, or other mischief before your binary gets run. Very handy. I often have PXML.xml run 'runfoo.sh', and runfoo.sh in turn runs ./foo after setting things up, making directories, etc.&lt;br /&gt;
&lt;br /&gt;
* For data that is not kept in your appdata directory, try to keep it local to the current SD _or_ better still, search both SD. ie: libpnd uses a basic but really handy system for iterating across a list of directories (including glob type expansion); so you can tell it something like /media/*/foo:/tmp and it'll check every mounted device (including both SD slots) in the 'foo' directory, as well as /tmp; you can have it call your code as it looks through, or you can ask libpnd to find a file for you and report where it was found, across all your searchpaths; you don't have to use libpnd's code to do it, you coudl write oyur own (using libpnd as an example if you need the help), as its pretty easy to build (20 lines of code maybe?) Anyway, the trick is to be multi-SD aware, and bonus marks for handling if theres a USB mounted drive etc as well. (Example; I coded minimenu so that when it caches out a preview picture, it checks for free space first, and tries first on the same SD that the pnd is mounting from, and then across a searchpath of alternate locations to cache to; this way the user can customize the caching, and it can be on various devices.)&lt;br /&gt;
&lt;br /&gt;
====What filesystem types can be contained within a pnd-file?====&lt;br /&gt;
&lt;br /&gt;
The pnd container can really contain a large variety of filesystem types; day-zero we're aiming for ISO since it is simple, easy build across every major OS, and fast to use. But it is not the only supported filesystem type, and more should be added all the time. (Possibly '-auto' can be added to pnd-run and it'll &amp;quot;just work&amp;quot; for dozens of types!)&lt;br /&gt;
&lt;br /&gt;
A compressed filesystem type has always been desirable for file sizing reasons, though it potentially impacts performance (depending on the application operation really.)&lt;br /&gt;
&lt;br /&gt;
Supported types (not an exhaustive list!):&lt;br /&gt;
&lt;br /&gt;
o ISO&lt;br /&gt;
&lt;br /&gt;
o squashfs&lt;br /&gt;
&lt;br /&gt;
====PND generation workflow====&lt;br /&gt;
&lt;br /&gt;
- create a directory to represent the application on SD card; i.e.: ./mame-app&lt;br /&gt;
&lt;br /&gt;
- create a PXML.xml fil and drop it into the dir (./mame-app/PXML.xml); genpxml script can be used, or do it by hand&lt;br /&gt;
&lt;br /&gt;
- drop the executable and data files into this dir (say, ./mame-app/mame.bin, and ./mame-app/artwork/foo, etc.)''' &amp;lt;- note, with a PXML.xml and executabe, it can now be discovered and run without even bundling into .pnd!'''&lt;br /&gt;
&lt;br /&gt;
- invoke pnd-make.sh to produce mame4all-pandora-1.0-arm.pnd or whatever you want to call it (foobearspanky.pnd, we don't care.)&lt;br /&gt;
&lt;br /&gt;
- you're done, distribute it as you see fit&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Windows / DOS commandline====&lt;br /&gt;
&lt;br /&gt;
There should be a basic GUI along very soon, and more advanced friendlier GUIs in due time. But for now, we thought it prudent to include some basic instructions on the command line for day-zero.&lt;br /&gt;
&lt;br /&gt;
For this command-line tutorial, I will assume you have already created a PXML.xml file; copy one of the templates and then edit it, using notepad or whatever _TEXT_ editor you see fit.&lt;br /&gt;
&lt;br /&gt;
Prepare in advance:&lt;br /&gt;
&lt;br /&gt;
1) Make a PXML.xml file (through whatever means; copy a template, or get a PXML.xml tool when they come available.) Ensure that you've got a reasonably unique-id in that field (ie: say, app-name, your name, and date/time all catenated together.) &lt;br /&gt;
&lt;br /&gt;
2) Get yourself mkisofs tools; for example, grab from here: http://www.student.tugraz.at/thomas.plank/ -- get cdrtools-2.01-win32-bin.zip and DLL version 1.5.25, and extract to somewhere. That lets you run 'mkisofs' to spit out .iso files&lt;br /&gt;
&lt;br /&gt;
2b) If you want to make a compressed image, use squashfs tools here: ftp://ftp.slax.org/useful-binaries/win32/squashfs-tools/&lt;br /&gt;
&lt;br /&gt;
3) Put your application and all needed files into a single directory .. say &amp;quot;myapp&amp;quot;; it doesn't matter what you call it. Might be cool as a Makefile step&lt;br /&gt;
&lt;br /&gt;
4) In your app-dir, put the PXML.xml file in the root&lt;br /&gt;
&lt;br /&gt;
5) Put the icon in the root of that dir as well (make it a .png file)&lt;br /&gt;
&lt;br /&gt;
6) Make sure the PXML.xml names the icon (just its filename.png), and specifies the executable (foo.bin or whatever.)&lt;br /&gt;
&lt;br /&gt;
Generate the actual PND-file, fully manual method:&lt;br /&gt;
&lt;br /&gt;
1) Make yourself the iso; this step produces the iso, but to turn the iso into a pnd you need a couple last steps. You could also use some fancy iso-building tool.&lt;br /&gt;
'''mkisofs -o foo.iso -R /path/to/folder/myapp'''&lt;br /&gt;
&lt;br /&gt;
2) Append PXML.xml to the .iso (yes, the PXML.xml is included in the iso, but we also want to append it for performance reasons.) &lt;br /&gt;
'''copy foo.iso+PXML.xml foo.step2'''&lt;br /&gt;
&lt;br /&gt;
3) Append the icon PNG file to the .iso (if you have an icon; if not, you can leave this step out.)&lt;br /&gt;
'''copy foo.step2+myicon.png foo.pnd'''&lt;br /&gt;
&lt;br /&gt;
4) Clean up: del''' foo.step2 foo.iso'''&lt;br /&gt;
&lt;br /&gt;
5) Profit!&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Linux/BSD/Unix (including on Pandora)====&lt;br /&gt;
&lt;br /&gt;
=====Command-line=====&lt;br /&gt;
&lt;br /&gt;
Tools are included in the libpnd distribution; see below for discussion, but suffice to say they are included int he GIT. Look in testdata/scripts for:&lt;br /&gt;
&lt;br /&gt;
o genpxml - spits out a template PXML.xml for you, and even includes a reasonably unique-id&lt;br /&gt;
o pnd-make.sh - given a directory and some arguments, will spit out a .pnd file; great for use in Makefiles&lt;br /&gt;
&lt;br /&gt;
We're working on others as well, so piece of cake under Unix and Unix-like OSes.&lt;br /&gt;
&lt;br /&gt;
=====GUI=====&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Windows GUI====&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Mac OSX====&lt;br /&gt;
&lt;br /&gt;
===PXML overrides===&lt;br /&gt;
&lt;br /&gt;
There are a couple of ways to effect an override of the PXML, without modifying a pnd-file.&lt;br /&gt;
&lt;br /&gt;
====&amp;quot;In-path&amp;quot; override files: .ovr====&lt;br /&gt;
&lt;br /&gt;
The library automatically imports a limited number of overrides from a conf file that can be located in the same location as its matching .pnd file is.&lt;br /&gt;
&lt;br /&gt;
For instance, if /pandora/desktop/awesomegame.pnd exists, then libpnd will automatically also search for /pandora/desktop/awesomegame.ovr&lt;br /&gt;
&lt;br /&gt;
Some menu systems will also be smart enough to watch for an icon override -- /pandora/desktop/awesomegame.png -- and if present, to use it; 'minimenu' (mmenu) is aware of that, as is pndnotifyd daemon when emitting .desktop files. Likely pmenu will also be updated. In effect, the user can override the icon, category and other attributes of the pnd, without needing special tools or to alter the system.&lt;br /&gt;
&lt;br /&gt;
An .ovr file must be named identically to the pnd-file, excepting the 3 character file extension.&lt;br /&gt;
&lt;br /&gt;
NOTE: Given that a pnd may emit multiple applications from its PXML.xml, the ovr will have to be aware of this so it can override the correct application(s) within the pnd. Some menus and information tools will display the application list with 'subapp number' to assist identification. minimenu shows the subapp number in the detail panel, for example. In the case where a pnd-file has only one contained application, that is subapp-number zero. For any additional subapplications, increment by one .. but it can be tricky to know which app is which subapp number. (A careful eye will notice the .desktop filename includes the subapp-number after the pound sign .. foo#3.desktop is subapp_number 3.)&lt;br /&gt;
&lt;br /&gt;
The ovr file may (at this time) override the icon title, the CPU clock speed to set on launch, the main category, and the first subcategory for the main category. Additional fields will become overridable.&lt;br /&gt;
&lt;br /&gt;
Minimenu honors up to 3 lines of 'notes', pulled from the .ovr file. (Make sure they are in the right subapp group). note-1, note-2, note-3, see example below. The notes in minimenu are shown at the bottom of the detail text panel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
[Application-0]&lt;br /&gt;
title                   HatariHack0&lt;br /&gt;
maincategory            Audio&lt;br /&gt;
maincategorysub1        Emulator&lt;br /&gt;
[Application-1]&lt;br /&gt;
title                   HatariHack1&lt;br /&gt;
clockspeed              200&lt;br /&gt;
note-1                  My note text line 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====PXML override file -- currently unsupported====&lt;br /&gt;
&lt;br /&gt;
PXML.xml files can have any number of their elements over-ridden by user preferences. &lt;br /&gt;
&lt;br /&gt;
The design goal here was to make it so user-preferences could alter the impact of the PXML.xml in any way, but without requiring the actual PXML.xml in the .pnd (and within the ISO therein) to be altered (could be a 500MB ISO after all!), and further, for these changes to persist. Consider than an SD card could be removed and inserted into the other slot, or the app could be removed entirely and come back another day, or other scenarios.&lt;br /&gt;
&lt;br /&gt;
As such, the PXML-overrides are kept in NAND in the user homedirectory (See the config files to find out where.)&lt;br /&gt;
&lt;br /&gt;
libpnd includes functions to pull in PXML, and also functions to then look for and merge in overrides. It is not always done since you may wish to inspect the PXML or the overrides, so the developers job is to do as they see fit -- pull the XML, and likely also pull in the overrides.&lt;br /&gt;
&lt;br /&gt;
At this time I'm not sure if people will ever use overrides, but the system has been built in should it be needed.&lt;br /&gt;
&lt;br /&gt;
===Included shellscripts to generate files and other sundry duties===&lt;br /&gt;
&lt;br /&gt;
====genpxml====&lt;br /&gt;
&lt;br /&gt;
This tool can spit out a basic but correct PXML.xml, faking up a halfway-useful unique-id in the process. It might be handy in saving you writing up a PXML.xml from scratch.&lt;br /&gt;
&lt;br /&gt;
====pnd_hup.sh====&lt;br /&gt;
&lt;br /&gt;
pndnotifyd will attempt to locate this script and invoke it after an auto-discovery run, if the pnd_hup entry is present (and uncommented) in the config files. It is expected to be commented out in release images, as xfce watches directories for .desktop files and does not need a HUP; some desktop managers need to be HUPped to rescan for .desktop files in a timely fashion, so the pnd_hup config entry can be uncommented and this script will attempt to figure out who to HUP.&lt;br /&gt;
&lt;br /&gt;
====pnd_make.sh====&lt;br /&gt;
&lt;br /&gt;
This is one of the great ones :)&lt;br /&gt;
&lt;br /&gt;
Given a directory with a PXML.xml (see genpxml above) and an executable and any other goo you want in there, this script will spit out a .pnd file you can execute or distribute as an application.&lt;br /&gt;
&lt;br /&gt;
====pnd_run.sh====&lt;br /&gt;
&lt;br /&gt;
This job does a lot of the heavy lifting for libpnd, including setting up the 'union filesystems', doing .pnd and PXML.xml-app-dir execution and mounting, and so on. Generally you will talk to it via libpnd or .desktop files, but you can invoke it dorectly from your apps if you wish to circumvent libpnd or mount .pnd files within a shellscript/perlscript/etc.&lt;br /&gt;
&lt;br /&gt;
==Auto-discovery of applications==&lt;br /&gt;
&lt;br /&gt;
TBD.&lt;br /&gt;
&lt;br /&gt;
==Integration with FreeDesktop .desktop systems==&lt;br /&gt;
&lt;br /&gt;
===dotdesktop (.desktop) files===&lt;br /&gt;
&lt;br /&gt;
===Icons===&lt;br /&gt;
&lt;br /&gt;
There are some rules for Icons in PXML.xml and pnd/directory bundles&lt;br /&gt;
&lt;br /&gt;
- An Icon should be in the root of the directory or .pnd bundle&lt;br /&gt;
&lt;br /&gt;
- An Icon must be specified in the PXML.xml if you expect it to work&lt;br /&gt;
&lt;br /&gt;
- As the PXML.xml is parsed, the icon is sought; if the icon is specified, but not found, it is assumed to be a system default icon and the filename will be placed into the .desktop Icon= line verbatim (ex: Icon=foo.png), and the window manager presumably will know how to locate it. If the icon is specified, and is found, then it will be copied into the configured IconPath, and the full path to it will be used for the Icon= line in the .desktop file ex: Icon=/tmp/myicon.png). If no icon is specified in the PXML file, then no Icon= line will be entered into the .desktop and the WM will presumably apply a default icon based on category or whatever.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==APIs==&lt;br /&gt;
&lt;br /&gt;
Feel free to just go read the .h files; I have tried to comment liberally :)&lt;br /&gt;
&lt;br /&gt;
===Setting and Getting the CPU clock speed===&lt;br /&gt;
&lt;br /&gt;
===Device paramaters - brightness, etc===&lt;br /&gt;
&lt;br /&gt;
===PND files, exec and mount===&lt;br /&gt;
&lt;br /&gt;
===Application discovery===&lt;br /&gt;
&lt;br /&gt;
===Config file parsing===&lt;br /&gt;
&lt;br /&gt;
===Boxing, the singly-linked list container===&lt;br /&gt;
&lt;br /&gt;
===Directory watching===&lt;br /&gt;
&lt;br /&gt;
===Logging api===&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:PND]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_archetype&amp;diff=2398</id>
		<title>PXML archetype</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_archetype&amp;diff=2398"/>
		<updated>2010-06-11T14:10:58Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: Added reminder to users who specify name=&amp;quot;&amp;quot; in the author tag.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a template for PXML files. It covers most of the spec and is considered to be ''clean'', meaning that it can be used as a sane starting point for PXML write-ups.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!--This is an example PXML file for an application named &amp;quot;Exaile&amp;quot;, to&lt;br /&gt;
    demonstrate how a PXML file is supposed to be structured. Feel free to&lt;br /&gt;
    replace all of the field contents with your own data, and to remove these&lt;br /&gt;
    comments afterwards, in order to get a working and valid PXML file.&lt;br /&gt;
&lt;br /&gt;
    Note that this file is MINIMAL aka. this is the information you SHOULD&lt;br /&gt;
    specify if you're well-behaved (all of it isn't NEEDED per-se, though) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
  PXML tag&lt;br /&gt;
  Indicates the root node of a PXML file.&lt;br /&gt;
&lt;br /&gt;
  Attributes:&lt;br /&gt;
    xmlns:&lt;br /&gt;
      Identifies the namespace of this PXML file. Potential future PXML&lt;br /&gt;
      specifications will use a different name space.&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--&lt;br /&gt;
    application tag&lt;br /&gt;
    Declares a new application that this PND package provides. Most PND&lt;br /&gt;
    packages will only have one application entry, and it is discouraged to&lt;br /&gt;
    have too many application entries in one PND file, since a PND file is&lt;br /&gt;
    inseparable, i.e. an user cannot upgrade one app and leave another be if&lt;br /&gt;
    they share the same PND file.&lt;br /&gt;
&lt;br /&gt;
    Attributes:&lt;br /&gt;
      id:&lt;br /&gt;
        Identifies the application in application enumerations.&lt;br /&gt;
        This has to be a string that is unique to the package series; there&lt;br /&gt;
        must not be two packages with entirely different purposes and&lt;br /&gt;
        origins that share the same ID.&lt;br /&gt;
&lt;br /&gt;
        tl;dr: Choose an id like you would choose a package name on the&lt;br /&gt;
               Linux Desktop.&lt;br /&gt;
&lt;br /&gt;
        Some things you have to consider when choosing an id:&lt;br /&gt;
          - If you release new versions of your application, they should have&lt;br /&gt;
            the same id as previous versions. Packages with different id's&lt;br /&gt;
            are not considered to be related at all, while packages with&lt;br /&gt;
            identical id's are considered to be of the same kind.&lt;br /&gt;
          - Your id should not be too complex. You should choose something&lt;br /&gt;
            that is unique to your application, and not something globally&lt;br /&gt;
            unique.&lt;br /&gt;
          - The application id will be used by package managers and the like.&lt;br /&gt;
            So, choose something that you expect to be typed in as:&lt;br /&gt;
            &amp;quot;installtool install %id%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        If you are publishing an application that you created yourself,&lt;br /&gt;
        and that you don't expect anyone else to also publish, these&lt;br /&gt;
        would be GOOD id's:&lt;br /&gt;
          - &amp;quot;exaile&amp;quot;&lt;br /&gt;
          - &amp;quot;myapp&amp;quot;&lt;br /&gt;
          - &amp;quot;kdemod-extras-quassel&amp;quot;&lt;br /&gt;
          - &amp;quot;awesome-music-player&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        These would be BAD id's:&lt;br /&gt;
          - &amp;quot;Exaile&amp;quot; - This is an user-adapted name and not a machine-&lt;br /&gt;
            adapted name&lt;br /&gt;
          - &amp;quot;Exaile - A music player that rocks&amp;quot; - This contains spaces and&lt;br /&gt;
            might therefore be mistreated by shell scripts and the like.&lt;br /&gt;
          - &amp;quot;exaile-1.0&amp;quot; - This contains version information; you should&lt;br /&gt;
            put this information in the version tag below instead.&lt;br /&gt;
          - &amp;quot;exaile-written-by-foobar-in-the-year-of-the-lord-two-thousand-and-ten-and-given-to-yall-for-free&amp;quot;&lt;br /&gt;
            This is too long.&lt;br /&gt;
          - &amp;quot;ae4c8bc112cafedd&amp;quot; - This doesn't identify *the application*, but&lt;br /&gt;
            is just a random unique identifier.&lt;br /&gt;
        These would be GOOD id's if you PORTED or MODDED an existing&lt;br /&gt;
        application:&lt;br /&gt;
          - &amp;quot;exaile-dflemstr&amp;quot; - (port) The app was ported by dflemstr&lt;br /&gt;
          - &amp;quot;exaile-nox&amp;quot; - (mod) The app runs without X&lt;br /&gt;
          - &amp;quot;exaile-player&amp;quot; - (port) Only a part of the application was&lt;br /&gt;
            ported&lt;br /&gt;
          - &amp;quot;exaile-pure&amp;quot; - (mod) Substantial mods were carried through, and&lt;br /&gt;
            a rebranding was needed.&lt;br /&gt;
      appdata:&lt;br /&gt;
        Specifies a name for a data store for your application&lt;br /&gt;
        This is where all your writes to CWD will end up when you run&lt;br /&gt;
        your application. You should choose an user friendly name, but&lt;br /&gt;
        *not* an user-adapted name (think about localization and&lt;br /&gt;
        management).&lt;br /&gt;
        Good alternatives:&lt;br /&gt;
          - &amp;quot;exaile&amp;quot;&lt;br /&gt;
          - &amp;quot;exaile-1&amp;quot; - If you intend to release newer versions that use&lt;br /&gt;
            a different storage format.&lt;br /&gt;
          - &amp;quot;exaile-dev&amp;quot; - If you want an user to be able to use a dev&lt;br /&gt;
            version of your app, and a stable version of your app&lt;br /&gt;
            simultaneously.&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
  &amp;lt;application id=&amp;quot;exaile&amp;quot; appdata=&amp;quot;exaile&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      title tag(s)&lt;br /&gt;
      Defines a human-readable title for the application in a specified locale.&lt;br /&gt;
      You MUST specify a title with the language &amp;quot;en_US&amp;quot;; other localizations&lt;br /&gt;
      are optional, but it is recommended to add one for generic,&lt;br /&gt;
      not-only-american english (&amp;quot;en&amp;quot;). Titles and descriptions should also be&lt;br /&gt;
      in pairs (you should not translate a title and omit a translation for a&lt;br /&gt;
      description).&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        lang:&lt;br /&gt;
          Specifies the language of the title.&lt;br /&gt;
&lt;br /&gt;
          This is made up of two parts:&lt;br /&gt;
            - The language part. This code is the lower-case, two-letter&lt;br /&gt;
              code as defined by ISO-639.&lt;br /&gt;
            - OPTIONAL: The country part. This code is the upper-case,&lt;br /&gt;
              two-letter code as defined by ISO-3166, with an underscore&lt;br /&gt;
              as the prefix.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Exaile music player&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;sv&amp;quot;&amp;gt;Exaile musikspelare&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;de&amp;quot;&amp;gt;Exaile musikspieler&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      description tag(s)&lt;br /&gt;
      Defines a human-readable description for your application in a specified&lt;br /&gt;
      locale. The same rules apply to this element, as to title elements. Note&lt;br /&gt;
      that we by description don't mean page-long texts; the recommended length&lt;br /&gt;
      for a description is 128 characters, but certain implementations support&lt;br /&gt;
      up to 1024 or 4096 characters. More than that is absolutely not&lt;br /&gt;
      recommended. Also, please remember that newlines are ignored in&lt;br /&gt;
      descriptions according to the XML standard, but that spaces are&lt;br /&gt;
      significant. XML escaping applies for the characters less-than,&lt;br /&gt;
      greater-than and ampersand (&amp;amp;lt; &amp;amp;gt; &amp;amp;amp; respectively).&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        lang:&lt;br /&gt;
          See above.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;A versatile music player written in Python.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;sv&amp;quot;&amp;gt;En kraftfull musikspelare skriven i Python.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;de&amp;quot;&amp;gt;Ein fähiger Musikspieler, in Python geschrieben.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      version tag&lt;br /&gt;
      This specifies the version quadron for this application.&lt;br /&gt;
      ALL FIELDS MUST BE POSITIVE INTEGERS OR 0. You are free to choose your&lt;br /&gt;
      own versioning scheme (ie. &amp;quot;build&amp;quot; doesn't have to be the number of times&lt;br /&gt;
      you built the application), but you must specify all four version fields&lt;br /&gt;
      below.&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      exec tag&lt;br /&gt;
      Declares how the application should be started.&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        command:&lt;br /&gt;
          The executable to start when the program is launched. This is&lt;br /&gt;
          a path relative to the root of your PND file.&lt;br /&gt;
        arguments:&lt;br /&gt;
          Does the app need to be started with certain arguments every&lt;br /&gt;
          time it is run? This is useful for PNDs that contain&lt;br /&gt;
          multiple applications that use the same executable file.&lt;br /&gt;
          (specify the actual arguments, not true/false unless your app&lt;br /&gt;
          accepts true or false as arguments!)&lt;br /&gt;
        background:&lt;br /&gt;
          Can this application &amp;quot;be minimised&amp;quot; or should it run&lt;br /&gt;
          singleton?&lt;br /&gt;
          &amp;quot;true&amp;quot;, &amp;quot;false&amp;quot;, &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot; accepted.&lt;br /&gt;
        startdir:&lt;br /&gt;
          Sets the CWD for the application before it is run.&lt;br /&gt;
          Default is the PND mount point.&lt;br /&gt;
        standalone:&lt;br /&gt;
          Can this application run directly, or should it only be&lt;br /&gt;
          started via associations? If this is &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot;, it&lt;br /&gt;
          won't show up in launchers.&lt;br /&gt;
        x11:&lt;br /&gt;
          Can be one of:&lt;br /&gt;
          &amp;quot;req&amp;quot; - X11 is required for the application to run.&lt;br /&gt;
          &amp;quot;stop&amp;quot; - X11 must be stopped for the application to run.&lt;br /&gt;
          &amp;quot;ignore&amp;quot; (default) - Don't care about X11.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;exec command=&amp;quot;./bin/exaile&amp;quot; background=&amp;quot;true&amp;quot; standalone=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      author tag&lt;br /&gt;
      Contains information about the application author. All three fields&lt;br /&gt;
      are optional.&lt;br /&gt;
&lt;br /&gt;
      NOTE: If you type 'name=&amp;quot;&amp;quot;', this won't mean that you left out the&lt;br /&gt;
      name! It only means that the name of the author is 0 characters&lt;br /&gt;
      long! Implementations will e.g. display an empty 'Author: ' field &lt;br /&gt;
      if you do this!&lt;br /&gt;
&lt;br /&gt;
      To leave out the name of the author, remove the attribute completely,&lt;br /&gt;
      and to leave out author information completely, remove the whole tag.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot; email=&amp;quot;a.b@c.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      icon tag&lt;br /&gt;
      Declares the icon for the application. This should be the same icon that&lt;br /&gt;
      is appended to the PND file, or something different if *this* application&lt;br /&gt;
      should have a different icon from the rest.&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        src:&lt;br /&gt;
          Relative URI to the icon (can be a relative file, or a&lt;br /&gt;
          fully-qualified URL; the latter is only supported in some&lt;br /&gt;
          implementations)&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;icon src=&amp;quot;icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
     categories tag&lt;br /&gt;
     Specifies which categories this application belongs to. See&lt;br /&gt;
     http://standards.freedesktop.org/menu-spec/latest/apa.html for more&lt;br /&gt;
     information. The optional sub-element &amp;quot;subcategory&amp;quot; is currently ignored&lt;br /&gt;
     by all implementations.&lt;br /&gt;
     --&amp;gt;&lt;br /&gt;
    &amp;lt;categories&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Audio&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Music&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;GTK&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/categories&amp;gt;&lt;br /&gt;
  &amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_archetype&amp;diff=2396</id>
		<title>PXML archetype</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_archetype&amp;diff=2396"/>
		<updated>2010-06-08T20:01:48Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a template for PXML files. It covers most of the spec and is considered to be ''clean'', meaning that it can be used as a sane starting point for PXML write-ups.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!--This is an example PXML file for an application named &amp;quot;Exaile&amp;quot;, to&lt;br /&gt;
    demonstrate how a PXML file is supposed to be structured. Feel free to&lt;br /&gt;
    replace all of the field contents with your own data, and to remove these&lt;br /&gt;
    comments afterwards, in order to get a working and valid PXML file.&lt;br /&gt;
&lt;br /&gt;
    Note that this file is MINIMAL aka. this is the information you SHOULD&lt;br /&gt;
    specify if you're well-behaved (all of it isn't NEEDED per-se, though) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
  PXML tag&lt;br /&gt;
  Indicates the root node of a PXML file.&lt;br /&gt;
&lt;br /&gt;
  Attributes:&lt;br /&gt;
    xmlns:&lt;br /&gt;
      Identifies the namespace of this PXML file. Potential future PXML&lt;br /&gt;
      specifications will use a different name space.&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--&lt;br /&gt;
    application tag&lt;br /&gt;
    Declares a new application that this PND package provides. Most PND&lt;br /&gt;
    packages will only have one application entry, and it is discouraged to&lt;br /&gt;
    have too many application entries in one PND file, since a PND file is&lt;br /&gt;
    inseparable, i.e. an user cannot upgrade one app and leave another be if&lt;br /&gt;
    they share the same PND file.&lt;br /&gt;
&lt;br /&gt;
    Attributes:&lt;br /&gt;
      id:&lt;br /&gt;
        Identifies the application in application enumerations.&lt;br /&gt;
        This has to be a string that is unique to the package series; there&lt;br /&gt;
        must not be two packages with entirely different purposes and&lt;br /&gt;
        origins that share the same ID.&lt;br /&gt;
&lt;br /&gt;
        tl;dr: Choose an id like you would choose a package name on the&lt;br /&gt;
               Linux Desktop.&lt;br /&gt;
&lt;br /&gt;
        Some things you have to consider when choosing an id:&lt;br /&gt;
          - If you release new versions of your application, they should have&lt;br /&gt;
            the same id as previous versions. Packages with different id's&lt;br /&gt;
            are not considered to be related at all, while packages with&lt;br /&gt;
            identical id's are considered to be of the same kind.&lt;br /&gt;
          - Your id should not be too complex. You should choose something&lt;br /&gt;
            that is unique to your application, and not something globally&lt;br /&gt;
            unique.&lt;br /&gt;
          - The application id will be used by package managers and the like.&lt;br /&gt;
            So, choose something that you expect to be typed in as:&lt;br /&gt;
            &amp;quot;installtool install %id%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        If you are publishing an application that you created yourself,&lt;br /&gt;
        and that you don't expect anyone else to also publish, these&lt;br /&gt;
        would be GOOD id's:&lt;br /&gt;
          - &amp;quot;exaile&amp;quot;&lt;br /&gt;
          - &amp;quot;myapp&amp;quot;&lt;br /&gt;
          - &amp;quot;kdemod-extras-quassel&amp;quot;&lt;br /&gt;
          - &amp;quot;awesome-music-player&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        These would be BAD id's:&lt;br /&gt;
          - &amp;quot;Exaile&amp;quot; - This is an user-adapted name and not a machine-&lt;br /&gt;
            adapted name&lt;br /&gt;
          - &amp;quot;Exaile - A music player that rocks&amp;quot; - This contains spaces and&lt;br /&gt;
            might therefore be mistreated by shell scripts and the like.&lt;br /&gt;
          - &amp;quot;exaile-1.0&amp;quot; - This contains version information; you should&lt;br /&gt;
            put this information in the version tag below instead.&lt;br /&gt;
          - &amp;quot;exaile-written-by-foobar-in-the-year-of-the-lord-two-thousand-and-ten-and-given-to-yall-for-free&amp;quot;&lt;br /&gt;
            This is too long.&lt;br /&gt;
          - &amp;quot;ae4c8bc112cafedd&amp;quot; - This doesn't identify *the application*, but&lt;br /&gt;
            is just a random unique identifier.&lt;br /&gt;
        These would be GOOD id's if you PORTED or MODDED an existing&lt;br /&gt;
        application:&lt;br /&gt;
          - &amp;quot;exaile-dflemstr&amp;quot; - (port) The app was ported by dflemstr&lt;br /&gt;
          - &amp;quot;exaile-nox&amp;quot; - (mod) The app runs without X&lt;br /&gt;
          - &amp;quot;exaile-player&amp;quot; - (port) Only a part of the application was&lt;br /&gt;
            ported&lt;br /&gt;
          - &amp;quot;exaile-pure&amp;quot; - (mod) Substantial mods were carried through, and&lt;br /&gt;
            a rebranding was needed.&lt;br /&gt;
      appdata:&lt;br /&gt;
        Specifies a name for a data store for your application&lt;br /&gt;
        This is where all your writes to CWD will end up when you run&lt;br /&gt;
        your application. You should choose an user friendly name, but&lt;br /&gt;
        *not* an user-adapted name (think about localization and&lt;br /&gt;
        management).&lt;br /&gt;
        Good alternatives:&lt;br /&gt;
          - &amp;quot;exaile&amp;quot;&lt;br /&gt;
          - &amp;quot;exaile-1&amp;quot; - If you intend to release newer versions that use&lt;br /&gt;
            a different storage format.&lt;br /&gt;
          - &amp;quot;exaile-dev&amp;quot; - If you want an user to be able to use a dev&lt;br /&gt;
            version of your app, and a stable version of your app&lt;br /&gt;
            simultaneously.&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
  &amp;lt;application id=&amp;quot;exaile&amp;quot; appdata=&amp;quot;exaile&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      title tag(s)&lt;br /&gt;
      Defines a human-readable title for the application in a specified locale.&lt;br /&gt;
      You MUST specify a title with the language &amp;quot;en_US&amp;quot;; other localizations&lt;br /&gt;
      are optional, but it is recommended to add one for generic,&lt;br /&gt;
      not-only-american english (&amp;quot;en&amp;quot;). Titles and descriptions should also be&lt;br /&gt;
      in pairs (you should not translate a title and omit a translation for a&lt;br /&gt;
      description).&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        lang:&lt;br /&gt;
          Specifies the language of the title.&lt;br /&gt;
&lt;br /&gt;
          This is made up of two parts:&lt;br /&gt;
            - The language part. This code is the lower-case, two-letter&lt;br /&gt;
              code as defined by ISO-639.&lt;br /&gt;
            - OPTIONAL: The country part. This code is the upper-case,&lt;br /&gt;
              two-letter code as defined by ISO-3166, with an underscore&lt;br /&gt;
              as the prefix.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Exaile music player&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;sv&amp;quot;&amp;gt;Exaile musikspelare&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;de&amp;quot;&amp;gt;Exaile musikspieler&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      description tag(s)&lt;br /&gt;
      Defines a human-readable description for your application in a specified&lt;br /&gt;
      locale. The same rules apply to this element, as to title elements. Note&lt;br /&gt;
      that we by description don't mean page-long texts; the recommended length&lt;br /&gt;
      for a description is 128 characters, but certain implementations support&lt;br /&gt;
      up to 1024 or 4096 characters. More than that is absolutely not&lt;br /&gt;
      recommended. Also, please remember that newlines are ignored in&lt;br /&gt;
      descriptions according to the XML standard, but that spaces are&lt;br /&gt;
      significant. XML escaping applies for the characters less-than,&lt;br /&gt;
      greater-than and ampersand (&amp;amp;lt; &amp;amp;gt; &amp;amp;amp; respectively).&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        lang:&lt;br /&gt;
          See above.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;A versatile music player written in Python.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;sv&amp;quot;&amp;gt;En kraftfull musikspelare skriven i Python.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;de&amp;quot;&amp;gt;Ein fähiger Musikspieler, in Python geschrieben.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      version tag&lt;br /&gt;
      This specifies the version quadron for this application.&lt;br /&gt;
      ALL FIELDS MUST BE POSITIVE INTEGERS OR 0. You are free to choose your&lt;br /&gt;
      own versioning scheme (ie. &amp;quot;build&amp;quot; doesn't have to be the number of times&lt;br /&gt;
      you built the application), but you must specify all four version fields&lt;br /&gt;
      below.&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      exec tag&lt;br /&gt;
      Declares how the application should be started.&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        command:&lt;br /&gt;
          The executable to start when the program is launched. This is&lt;br /&gt;
          a path relative to the root of your PND file.&lt;br /&gt;
        arguments:&lt;br /&gt;
          Does the app need to be started with certain arguments every&lt;br /&gt;
          time it is run? This is useful for PNDs that contain&lt;br /&gt;
          multiple applications that use the same executable file.&lt;br /&gt;
          (specify the actual arguments, not true/false unless your app&lt;br /&gt;
          accepts true or false as arguments!)&lt;br /&gt;
        background:&lt;br /&gt;
          Can this application &amp;quot;be minimised&amp;quot; or should it run&lt;br /&gt;
          singleton?&lt;br /&gt;
          &amp;quot;true&amp;quot;, &amp;quot;false&amp;quot;, &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot; accepted.&lt;br /&gt;
        startdir:&lt;br /&gt;
          Sets the CWD for the application before it is run.&lt;br /&gt;
          Default is the PND mount point.&lt;br /&gt;
        standalone:&lt;br /&gt;
          Can this application run directly, or should it only be&lt;br /&gt;
          started via associations? If this is &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot;, it&lt;br /&gt;
          won't show up in launchers.&lt;br /&gt;
        x11:&lt;br /&gt;
          Can be one of:&lt;br /&gt;
          &amp;quot;req&amp;quot; - X11 is required for the application to run.&lt;br /&gt;
          &amp;quot;stop&amp;quot; - X11 must be stopped for the application to run.&lt;br /&gt;
          &amp;quot;ignore&amp;quot; (default) - Don't care about X11.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;exec command=&amp;quot;./bin/exaile&amp;quot; background=&amp;quot;true&amp;quot; standalone=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      author tag&lt;br /&gt;
      Contains information about the application author. All three fields&lt;br /&gt;
      are optional.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot; email=&amp;quot;a.b@c.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      icon tag&lt;br /&gt;
      Declares the icon for the application. This should be the same icon that&lt;br /&gt;
      is appended to the PND file, or something different if *this* application&lt;br /&gt;
      should have a different icon from the rest.&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        src:&lt;br /&gt;
          Relative URI to the icon (can be a relative file, or a&lt;br /&gt;
          fully-qualified URL; the latter is only supported in some&lt;br /&gt;
          implementations)&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;icon src=&amp;quot;icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
     categories tag&lt;br /&gt;
     Specifies which categories this application belongs to. See&lt;br /&gt;
     http://standards.freedesktop.org/menu-spec/latest/apa.html for more&lt;br /&gt;
     information. The optional sub-element &amp;quot;subcategory&amp;quot; is currently ignored&lt;br /&gt;
     by all implementations.&lt;br /&gt;
     --&amp;gt;&lt;br /&gt;
    &amp;lt;categories&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Audio&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Music&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;GTK&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/categories&amp;gt;&lt;br /&gt;
  &amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_archetype&amp;diff=2395</id>
		<title>PXML archetype</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_archetype&amp;diff=2395"/>
		<updated>2010-06-08T19:36:56Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a template for PXML files. It covers most of the spec and is considered to be ''clean'', meaning that it can be used as a sane starting point for PXML write-ups.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!--This is an example PXML file for an application named &amp;quot;Exaile&amp;quot;, to&lt;br /&gt;
    demonstrate how a PXML file is supposed to be structured. Feel free to&lt;br /&gt;
    replace all of the field contents with your own data, and to remove these&lt;br /&gt;
    comments afterwards, in order to get a working and valid PXML file.&lt;br /&gt;
&lt;br /&gt;
    Note that this file is MINIMAL aka. this is the information you SHOULD&lt;br /&gt;
    specify if you're well-behaved (all of it isn't NEEDED per-se, though) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
  PXML tag&lt;br /&gt;
  Indicates the root node of a PXML file.&lt;br /&gt;
&lt;br /&gt;
  Attributes:&lt;br /&gt;
    xmlns:&lt;br /&gt;
      Identifies the namespace of this PXML file. Potential future PXML&lt;br /&gt;
      specifications will use a different name space.&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--&lt;br /&gt;
    application tag&lt;br /&gt;
    Declares a new application that this PND package provides. Most PND&lt;br /&gt;
    packages will only have one application entry, and it is discouraged to&lt;br /&gt;
    have too many application entries in one PND file, since a PND file is&lt;br /&gt;
    inseparable, i.e. an user cannot upgrade one app and leave another be if&lt;br /&gt;
    they share the same PND file.&lt;br /&gt;
&lt;br /&gt;
    Attributes:&lt;br /&gt;
      id:&lt;br /&gt;
        Identifies the application in application enumerations.&lt;br /&gt;
        This has to be a string that is unique to the package series; there&lt;br /&gt;
        must not be two packages with entirely different purposes and&lt;br /&gt;
        origins that share the same ID.&lt;br /&gt;
&lt;br /&gt;
        tl;dr: Choose an id like you would choose a package name on the&lt;br /&gt;
               Linux Desktop.&lt;br /&gt;
&lt;br /&gt;
        Some things you have to consider when choosing an id:&lt;br /&gt;
          - If you release new versions of your application, they should have&lt;br /&gt;
            the same id as previous versions. Packages with different id's&lt;br /&gt;
            are not considered to be related at all, while packages with&lt;br /&gt;
            identical id's are considered to be of the same kind.&lt;br /&gt;
          - Your id should not be too complex. You should choose something&lt;br /&gt;
            that is unique to your application, and not something globally&lt;br /&gt;
            unique.&lt;br /&gt;
          - The application id will be used by package managers and the like.&lt;br /&gt;
            So, choose something that you expect to be typed in as:&lt;br /&gt;
            &amp;quot;installtool install %id%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        If you are publishing an application that you created yourself,&lt;br /&gt;
        and that you don't expect anyone else to also publish, these&lt;br /&gt;
        would be GOOD id's:&lt;br /&gt;
          - &amp;quot;exaile&amp;quot;&lt;br /&gt;
          - &amp;quot;myapp&amp;quot;&lt;br /&gt;
          - &amp;quot;kdemod-extras-quassel&amp;quot;&lt;br /&gt;
          - &amp;quot;awesome-music-player&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        These would be BAD id's:&lt;br /&gt;
          - &amp;quot;Exaile&amp;quot; - This is an user-adapted name and not a machine-&lt;br /&gt;
            adapted name&lt;br /&gt;
          - &amp;quot;Exaile - A music player that rocks&amp;quot; - This contains spaces and&lt;br /&gt;
            might therefore be mistreated by shell scripts and the like.&lt;br /&gt;
          - &amp;quot;exaile-1.0&amp;quot; - This contains version information; you should&lt;br /&gt;
            put this information in the version tag below instead.&lt;br /&gt;
          - &amp;quot;exaile-written-by-foobar-in-the-year-of-the-lord-two-thousand-and-ten-and-given-to-yall-for-free&amp;quot;&lt;br /&gt;
            This is too long.&lt;br /&gt;
          - &amp;quot;ae4c8bc112cafedd&amp;quot; - This doesn't identify *the application*, but&lt;br /&gt;
            is just a random unique identifier.&lt;br /&gt;
        These would be GOOD id's if you PORTED or MODDED an existing&lt;br /&gt;
        application:&lt;br /&gt;
          - &amp;quot;exaile-dflemstr&amp;quot; - (port) The app was ported by dflemstr&lt;br /&gt;
          - &amp;quot;exaile-nox&amp;quot; - (mod) The app runs without X&lt;br /&gt;
          - &amp;quot;exaile-player&amp;quot; - (port) Only a part of the application was&lt;br /&gt;
            ported&lt;br /&gt;
          - &amp;quot;exaile-pure&amp;quot; - (mod) Substantial mods were carried through, and&lt;br /&gt;
            a rebranding was needed.&lt;br /&gt;
      appdata:&lt;br /&gt;
        Specifies a name for a data store for your application&lt;br /&gt;
        This is where all your writes to CWD will end up when you run&lt;br /&gt;
        your application. You should choose an user friendly name, but&lt;br /&gt;
        *not* an user-adapted name (think about localization and&lt;br /&gt;
        management).&lt;br /&gt;
        Good alternatives:&lt;br /&gt;
          - &amp;quot;exaile&amp;quot;&lt;br /&gt;
          - &amp;quot;exaile-1&amp;quot; - If you intend to release newer versions that use&lt;br /&gt;
            a different storage format.&lt;br /&gt;
          - &amp;quot;exaile-dev&amp;quot; - If you want an user to be able to use a dev&lt;br /&gt;
            version of your app, and a stable version of your app&lt;br /&gt;
            simultaneously.&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
  &amp;lt;application id=&amp;quot;exaile&amp;quot; appdata=&amp;quot;exaile&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      title tag(s)&lt;br /&gt;
      Defines a human-readable title for the application in a specified locale.&lt;br /&gt;
      You MUST specify a title with the language &amp;quot;en_US&amp;quot;; other localizations&lt;br /&gt;
      are optional, but it is recommended to add one for generic,&lt;br /&gt;
      not-only-american english (&amp;quot;en&amp;quot;). Titles and descriptions should also be&lt;br /&gt;
      in pairs (you should not translate a title and omit a translation for a&lt;br /&gt;
      description).&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        lang:&lt;br /&gt;
          Specifies the language of the title.&lt;br /&gt;
&lt;br /&gt;
          This is made up of two parts:&lt;br /&gt;
            - The language part. This code is the lower-case, two-letter&lt;br /&gt;
              code as defined by ISO-639.&lt;br /&gt;
            - OPTIONAL: The country part. This code is the upper-case,&lt;br /&gt;
              two-letter code as defined by ISO-3166, with an underscore&lt;br /&gt;
              as the prefix.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Exaile music player&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;sv&amp;quot;&amp;gt;Exaile musikspelare&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;de&amp;quot;&amp;gt;Exaile musikspieler&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      description tag(s)&lt;br /&gt;
      Defines a human-readable description for your application in a specified&lt;br /&gt;
      locale. The same rules apply to this element, as to title elements. Note&lt;br /&gt;
      that we by description don't mean page-long texts; the recommended length&lt;br /&gt;
      for a description is 128 characters, but certain implementations support&lt;br /&gt;
      up to 1024 or 4096 characters. More than that is absolutely not&lt;br /&gt;
      recommended. Also, please remember that newlines are ignored in&lt;br /&gt;
      descriptions according to the XML standard, but that spaces are&lt;br /&gt;
      significant. XML escaping applies for the characters less-than,&lt;br /&gt;
      greater-than and ampersand (&amp;amp;lt; &amp;amp;gt; &amp;amp;amp; respectively).&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        lang:&lt;br /&gt;
          See above.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;A versatile music player written in Python.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;sv&amp;quot;&amp;gt;En kraftfull musikspelare skriven i Python.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;de&amp;quot;&amp;gt;Ein fähiger Musikspieler, in Python geschrieben.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      version tag&lt;br /&gt;
      This specifies the version quadron for this application.&lt;br /&gt;
      ALL FIELDS MUST BE POSITIVE INTEGERS OR 0. You are free to choose your&lt;br /&gt;
      own versioning scheme (ie. &amp;quot;build&amp;quot; doesn't have to be the number of times&lt;br /&gt;
      you built the application), but you must specify all four version fields&lt;br /&gt;
      below.&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      exec tag&lt;br /&gt;
      Declares how the application should be started.&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        command:&lt;br /&gt;
          The executable to start when the program is launched. This is&lt;br /&gt;
          a path relative to the root of your PND file.&lt;br /&gt;
        arguments:&lt;br /&gt;
          Does the app need to be started with certain arguments every&lt;br /&gt;
          time it is run? This is useful for PNDs that contain&lt;br /&gt;
          multiple applications that use the same executable file.&lt;br /&gt;
        background:&lt;br /&gt;
          Can this application &amp;quot;be minimised&amp;quot; or should it run&lt;br /&gt;
          singleton?&lt;br /&gt;
          &amp;quot;true&amp;quot;, &amp;quot;false&amp;quot;, &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot; accepted.&lt;br /&gt;
        startdir:&lt;br /&gt;
          Sets the CWD for the application before it is run.&lt;br /&gt;
          Default is the PND mount point.&lt;br /&gt;
        standalone:&lt;br /&gt;
          Can this application run directly, or should it only be&lt;br /&gt;
          started via associations? If this is &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot;, it&lt;br /&gt;
          won't show up in launchers.&lt;br /&gt;
        x11:&lt;br /&gt;
          Can be one of:&lt;br /&gt;
          &amp;quot;req&amp;quot; - X11 is required for the application to run.&lt;br /&gt;
          &amp;quot;stop&amp;quot; - X11 must be stopped for the application to run.&lt;br /&gt;
          &amp;quot;ignore&amp;quot; (default) - Don't care about X11.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;exec command=&amp;quot;./bin/exaile&amp;quot; background=&amp;quot;true&amp;quot; standalone=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      author tag&lt;br /&gt;
      Contains information about the application author. All three fields&lt;br /&gt;
      are optional.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot; email=&amp;quot;a.b@c.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      icon tag&lt;br /&gt;
      Declares the icon for the application. This should be the same icon that&lt;br /&gt;
      is appended to the PND file, or something different if *this* application&lt;br /&gt;
      should have a different icon from the rest.&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        src:&lt;br /&gt;
          Relative URI to the icon (can be a relative file, or a&lt;br /&gt;
          fully-qualified URL; the latter is only supported in some&lt;br /&gt;
          implementations)&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;icon src=&amp;quot;icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
     categories tag&lt;br /&gt;
     Specifies which categories this application belongs to. See&lt;br /&gt;
     http://standards.freedesktop.org/menu-spec/latest/apa.html for more&lt;br /&gt;
     information. The optional sub-element &amp;quot;subcategory&amp;quot; is currently ignored&lt;br /&gt;
     by all implementations.&lt;br /&gt;
     --&amp;gt;&lt;br /&gt;
    &amp;lt;categories&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Audio&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Music&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;GTK&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/categories&amp;gt;&lt;br /&gt;
  &amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_archetype&amp;diff=2394</id>
		<title>PXML archetype</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_archetype&amp;diff=2394"/>
		<updated>2010-06-08T19:36:17Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a template for PXML files. It covers most of the spec and is considered to be ''clean'', meaning that it can be used as a sane starting point for PXML write-ups.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!--This is an example PXML file for an application named &amp;quot;Exaile&amp;quot;, to&lt;br /&gt;
    demonstrate how a PXML file is supposed to be structured. Feel free to&lt;br /&gt;
    replace all of the field contents with your own data, and to remove these&lt;br /&gt;
    comments afterwards, in order to get a working and valid PXML file.&lt;br /&gt;
&lt;br /&gt;
    Note that this file is MINIMAL aka. this is the information you SHOULD&lt;br /&gt;
    specify if you're well-behaved (all of it isn't NEEDED per-se, though) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
  PXML tag&lt;br /&gt;
  Indicates the root node of a PXML file.&lt;br /&gt;
&lt;br /&gt;
  Attributes:&lt;br /&gt;
    xmlns:&lt;br /&gt;
      Identifies the namespace of this PXML file. Potential future PXML&lt;br /&gt;
      specifications will use a different name space.&lt;br /&gt;
 --&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--&lt;br /&gt;
    application tag&lt;br /&gt;
    Declares a new application that this PND package provides. Most PND&lt;br /&gt;
    packages will only have one application entry, and it is discouraged to&lt;br /&gt;
    have too many application entries in one PND file, since a PND file is&lt;br /&gt;
    inseparable, i.e. an user cannot upgrade one app and leave another be if&lt;br /&gt;
    they share the same PND file.&lt;br /&gt;
&lt;br /&gt;
    Attributes:&lt;br /&gt;
      id:&lt;br /&gt;
        Identifies the application in application enumerations.&lt;br /&gt;
        This has to be a string that is unique to the package series; there&lt;br /&gt;
        must not be two packages with entirely different purposes and&lt;br /&gt;
        origins that share the same ID.&lt;br /&gt;
&lt;br /&gt;
        tl;dr: Choose an id like you would choose a package name on the&lt;br /&gt;
               Linux Desktop.&lt;br /&gt;
&lt;br /&gt;
        Some things you have to consider when choosing an id:&lt;br /&gt;
          - If you release new versions of your application, they should have&lt;br /&gt;
            the same id as previous versions. Packages with different id's&lt;br /&gt;
            are not considered to be related at all, while packages with&lt;br /&gt;
            identical id's are considered to be of the same kind.&lt;br /&gt;
          - Your id should not be too complex. You should choose something&lt;br /&gt;
            that is unique to your application, and not something globally&lt;br /&gt;
            unique.&lt;br /&gt;
          - The application id will be used by package managers and the like.&lt;br /&gt;
            So, choose something that you expect to be typed in as:&lt;br /&gt;
            &amp;quot;installtool install %id%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        If you are publishing an application that you created yourself,&lt;br /&gt;
        and that you don't expect anyone else to also publish, these&lt;br /&gt;
        would be GOOD id's:&lt;br /&gt;
          - &amp;quot;exaile&amp;quot;&lt;br /&gt;
          - &amp;quot;myapp&amp;quot;&lt;br /&gt;
          - &amp;quot;kdemod-extras-quassel&amp;quot;&lt;br /&gt;
          - &amp;quot;awesome-music-player&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        These would be BAD id's:&lt;br /&gt;
          - &amp;quot;Exaile&amp;quot; - This is an user-adapted name and not a machine-&lt;br /&gt;
            adapted name&lt;br /&gt;
          - &amp;quot;Exaile - A music player that rocks&amp;quot; - This contains spaces and&lt;br /&gt;
            might therefore be mistreated by shell scripts and the like.&lt;br /&gt;
          - &amp;quot;exaile-1.0&amp;quot; - This contains version information; you should&lt;br /&gt;
            put this information in the version tag below instead.&lt;br /&gt;
          - &amp;quot;exaile-written-by-foobar-in-the-year-of-the-lord-two-thousand-and-ten-and-given-to-yall-for-free&amp;quot;&lt;br /&gt;
            This is too long.&lt;br /&gt;
          - &amp;quot;ae4c8bc112cafedd&amp;quot; - This doesn't identify *the application*, but&lt;br /&gt;
            is just a random unique identifier.&lt;br /&gt;
        These would be GOOD id's if you PORTED or MODDED an existing&lt;br /&gt;
        application:&lt;br /&gt;
          - &amp;quot;exaile-dflemstr&amp;quot; - (port) The app was ported by dflemstr&lt;br /&gt;
          - &amp;quot;exaile-nox&amp;quot; - (mod) The app runs without X&lt;br /&gt;
          - &amp;quot;exaile-player&amp;quot; - (port) Only a part of the application was&lt;br /&gt;
            ported&lt;br /&gt;
          - &amp;quot;exaile-pure&amp;quot; - (mod) Substantial mods were carried through, and&lt;br /&gt;
            a rebranding was needed.&lt;br /&gt;
      appdata:&lt;br /&gt;
        Specifies a name for a data store for your application&lt;br /&gt;
        This is where all your writes to CWD will end up when you run&lt;br /&gt;
        your application. You should choose an user friendly name, but&lt;br /&gt;
        *not* an user-adapted name (think about localization and&lt;br /&gt;
        management).&lt;br /&gt;
        Good alternatives:&lt;br /&gt;
          - &amp;quot;exaile&amp;quot;&lt;br /&gt;
          - &amp;quot;exaile-1&amp;quot; - If you intend to release newer versions that use&lt;br /&gt;
            a different storage format.&lt;br /&gt;
          - &amp;quot;exaile-dev&amp;quot; - If you want an user to be able to use a dev&lt;br /&gt;
            version of your app, and a stable version of your app&lt;br /&gt;
            simultaneously.&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
  &amp;lt;application id=&amp;quot;exaile&amp;quot; appdata=&amp;quot;exaile&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      title tag(s)&lt;br /&gt;
      Defines a human-readable title for the application in a specified locale.&lt;br /&gt;
      You MUST specify a title with the language &amp;quot;en_US&amp;quot;; other localizations&lt;br /&gt;
      are optional, but it is recommended to add one for generic,&lt;br /&gt;
      not-only-american english (&amp;quot;en&amp;quot;). Titles and descriptions should also be&lt;br /&gt;
      in pairs (you should not translate a title and omit a translation for a&lt;br /&gt;
      description).&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        lang:&lt;br /&gt;
          Specifies the language of the title.&lt;br /&gt;
&lt;br /&gt;
          This is made up of two parts:&lt;br /&gt;
            - The language part. This code is the lower-case, two-letter&lt;br /&gt;
              code as defined by ISO-639.&lt;br /&gt;
            - OPTIONAL: The country part. This code is the upper-case,&lt;br /&gt;
              two-letter code as defined by ISO-3166, with an underscore&lt;br /&gt;
              as the prefix.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Exaile music player&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;sv&amp;quot;&amp;gt;Exaile musikspelare&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;de&amp;quot;&amp;gt;Exaile musikspieler&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      description tag(s)&lt;br /&gt;
      Defines a human-readable description for your application in a specified&lt;br /&gt;
      locale. The same rules apply to this element, as to title elements. Note&lt;br /&gt;
      that we by description don't mean page-long texts; the recommended length&lt;br /&gt;
      for a description is 128 characters, but certain implementations support&lt;br /&gt;
      up to 1024 or 4096 characters. More than that is absolutely not&lt;br /&gt;
      recommended. Also, please remember that newlines are ignored in&lt;br /&gt;
      descriptions according to the XML standard, but that spaces are&lt;br /&gt;
      significant. XML escaping applies for the characters less-than,&lt;br /&gt;
      greater-than and ampersand (&amp;amp;lt; &amp;amp;gt; &amp;amp;amp; respectively).&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        lang:&lt;br /&gt;
          See above.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;A versatile music player written in Python.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;sv&amp;quot;&amp;gt;En kraftfull musikspelare skriven i Python.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;de&amp;quot;&amp;gt;Ein fähiger Musikspieler, in Python geschrieben.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      version tag&lt;br /&gt;
      This specifies the version quadron for this application.&lt;br /&gt;
      ALL FIELDS MUST BE POSITIVE INTEGERS OR 0. You are free to choose your&lt;br /&gt;
      own versioning scheme (ie. &amp;quot;build&amp;quot; doesn't have to be the number of times&lt;br /&gt;
      you built the application), but you must specify all four version fields&lt;br /&gt;
      below.&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      exec tag&lt;br /&gt;
      Declares how the application should be started.&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        command:&lt;br /&gt;
          The executable to start when the program is launched. This is&lt;br /&gt;
          a path relative to the root of your PND file.&lt;br /&gt;
        arguments:&lt;br /&gt;
          Does the app need to be started with certain arguments every&lt;br /&gt;
          time it is run? This is useful for PNDs that contain&lt;br /&gt;
          multiple applications that use the same executable file.&lt;br /&gt;
        background:&lt;br /&gt;
          Can this application &amp;quot;be minimised&amp;quot; or should it run&lt;br /&gt;
          singleton?&lt;br /&gt;
          &amp;quot;true&amp;quot;, &amp;quot;false&amp;quot;, &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot; accepted.&lt;br /&gt;
        startdir:&lt;br /&gt;
          Sets the CWD for the application before it is run.&lt;br /&gt;
          Default is the PND mount point.&lt;br /&gt;
        standalone:&lt;br /&gt;
          Can this application run directly, or should it only be&lt;br /&gt;
          started via associations? If this is &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot;, it&lt;br /&gt;
          won't show up in launchers.&lt;br /&gt;
        x11:&lt;br /&gt;
          Can be one of:&lt;br /&gt;
          &amp;quot;req&amp;quot; - X11 is required for the application to run.&lt;br /&gt;
          &amp;quot;stop&amp;quot; - X11 must be stopped for the application to run.&lt;br /&gt;
          &amp;quot;ignore&amp;quot; (default) - Don't care about X11.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;exec command=&amp;quot;./bin/exaile&amp;quot; background=&amp;quot;true&amp;quot; standalone=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      author tag&lt;br /&gt;
      Contains information about the application author. All three fields&lt;br /&gt;
      are optional.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot; email=&amp;quot;a.b@c.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      icon tag&lt;br /&gt;
      Declares the icon for the application. This should be the same icon that&lt;br /&gt;
      is appended to the PND file, or something different if *this* application&lt;br /&gt;
      should have a different icon from the rest.&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        src:&lt;br /&gt;
          Relative URI to the icon (can be a relative file, or a&lt;br /&gt;
          fully-qualified URL; the latter is only supported in some&lt;br /&gt;
          implementations)&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;icon src=&amp;quot;icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
     categories tag&lt;br /&gt;
     Specifies which categories this application belongs to. See&lt;br /&gt;
     http://standards.freedesktop.org/menu-spec/latest/apa.html for more&lt;br /&gt;
     information. The optional sub-element &amp;quot;subcategory&amp;quot; is currently ignored&lt;br /&gt;
     by all implementations.&lt;br /&gt;
     --&amp;gt;&lt;br /&gt;
    &amp;lt;categories&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Audio&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Music&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;GTK&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/categories&amp;gt;&lt;br /&gt;
  &amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2393</id>
		<title>PXML specification</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2393"/>
		<updated>2010-06-08T19:35:11Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Example file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Attention:''' at the present time, the PXML file format isn't set in stone, and is therefore subject to change. There is no guarantee that the format or the schema are bug-free or will be changed at any time. Please wait until this standard is finished before writing a PXML file.&lt;br /&gt;
&lt;br /&gt;
This is the human-readable specification for the PXML file format. The PXML file format is used in your applications for the OpenPandora® that you package in &amp;quot;.pnd&amp;quot;-files or distribute otherwise, to make it possible for menus and launchers to use your applications and their properties.&lt;br /&gt;
&lt;br /&gt;
A PXML file should be appended to your &amp;quot;.pnd&amp;quot;-file, using the tools provided for that purpose, or put in a directory that you want to serve as a redistributable package, to make it possible for launchers and menus to find it. It should have the name &amp;quot;PXML.xml&amp;quot; not case sensitive, and there should only be one such file. The contents of the PXML file should also comply to this specification without exception, to guarantee that everyone will be able to read it.&lt;br /&gt;
&lt;br /&gt;
== XML compatibility ==&lt;br /&gt;
The PXML format is XML-based and fully XML-compliant, which means that it can be read and written by any XML reader or writer. Included with this specification should also be a &amp;quot;.xsd&amp;quot;-file, which is used by XML tools to validate PXML files. A &amp;quot;.xsd&amp;quot;-file is also known as a XML schema, and can be called the &amp;quot;computer-readable&amp;quot; version of this document. It is very good practice to validate your PXML-files with that schema before publishing them.&lt;br /&gt;
&lt;br /&gt;
To write a PXML file, you also need to know the basics of writing a XML file. It boils down to the following:&lt;br /&gt;
&lt;br /&gt;
# If an element contains text or other elements, it needs a start-tag and an end-tag. This looks like (1)&lt;br /&gt;
# If an element does not contain other elements or text, but only attributes, it looks like (2)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement someattribute=&amp;quot;something&amp;quot;&amp;gt;something inside it&amp;lt;/exampleelement&amp;gt; &amp;lt;!-- (1) --&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement2 someattribute=&amp;quot;something&amp;quot; /&amp;gt; &amp;lt;!-- (2) --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The PXML-file is split up into multiple so-called elements, each of which specify one property of the &amp;quot;.pnd&amp;quot;-package. All of these elements are surrounded with a &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag, which tells the readers of the file that the data within that tag belongs to a PXML file. The tag and elements should be defined as follows:&lt;br /&gt;
=== The PXML-tag ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The PXML-tag serves as the container for all PXML elements. It is the first thing that should occur in your PXML file. An example &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, the PXML tag accepts a few attributes, namely the &amp;quot;id&amp;quot; and &amp;quot;xmlns&amp;quot; attributes.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;xmlns&amp;quot; attribute is required by the XML standard, and guarantees that this file will be identified as a PXML file. You must include the xmlns attribute, exactly as shown, in your PXML file, with the URL as specified. Only then can it be guaranteed that the file will be read at all by launchers and menu apps.&lt;br /&gt;
* '''DEPRECATED; SEE &amp;quot;application&amp;quot; tag.''' The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
=== The Application-tag ===&lt;br /&gt;
====Description====&lt;br /&gt;
The Application-tag permits the PXML.xml container to have multiple applications within it; you should have at least one application tag-pair (for one app), though you may have many.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;application id=&amp;quot;uniqueID&amp;quot; appdata=&amp;quot;dirname&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;appdata&amp;quot; permits a directory name (NOT PATH) to be specified as preferred; if not present, the unique-id will be used. For example, we may want a unique-id of &amp;quot;Battlejewels.skeezix.3216836217382163.v001&amp;quot;, but a appdata path of &amp;quot;battlejewels&amp;quot; to make it easier on the user, or to have multiple different battlejewels sharing one appdata.&lt;br /&gt;
&lt;br /&gt;
A good unique-id is the application name, developer name, and some key you may wish to update on occasion (should state-data become incompatible between updates, say.)&lt;br /&gt;
&lt;br /&gt;
Consider:&lt;br /&gt;
battlejewels.skeezix.001&lt;br /&gt;
quake-1.pickle.001&lt;br /&gt;
&lt;br /&gt;
unique-id formatting: '''Should not include directory or filename invalid characters, such as ?, &amp;gt;, /, etc. Any of those will cause the pnd-file to not function.'''&lt;br /&gt;
&lt;br /&gt;
Note on Uniqueness: The unique-id should be unique against other pnd-files, but may be re-used by other 'application' tags within the pnd; for example, you may have multiple subapps that want to share the same appdata path (which is formed based on unique-id!), so use the same unique-id. You might then have a utility application in that same pnd, which needs its own appdata, and so gets its own unique-id.&lt;br /&gt;
&lt;br /&gt;
=== The title element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The title element specifies the text that is shown to the users of your PND file as the application title. This element can be specified multiple times in multiple languages (the language is indicated by the lang attribute).&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;title&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Your application name&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;Dein Programmname&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The description element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The description element specifies the text that is shown to the users of your PND file as the application description. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;description&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;Your long description of this application, describing its purpose and highlighting its features.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;Deine etwas längere Programmbeschreibung, die den Sinn des Programmes und seine wichtigsten Features beschreiben sollte.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The exec element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The exec element should specify all the information needed to execute your application.&lt;br /&gt;
An exec element must be included in every PXML file. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The command attribute specifies the path to the executable file. This should be a relative path to a file within the PND package. Must contain no arguments! One strategy you may need is to point to a sh-script in your pnd-file, which in turn sets up LD_LIBRARY_PATH, determines arguments to pass, uses zenity to pop up a pre-run menu, or other trickery.&lt;br /&gt;
* The arguments attribute may be not present, or present with 1 or more arguments to the executable.&lt;br /&gt;
* The startdir attribute specifies the starting directory (Also known as the working directory) that the application should start in. This should be a relative path to a directory within the PND package, or to a well-known directory in the Pandora file system.&lt;br /&gt;
* The standalone attribute specifies whether or not this application can run on its own, or if it needs parameters to run. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can be run without parameters. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run with parameters (Meaning that no icon will appear for it in a launcher; it will only be run via file associations or via the terminal).&lt;br /&gt;
* The background attribute specifies whether or not this application should run in the background, and it should be possible to switch to other apps while it is running, or if it is the only application that should be running. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can run in the background. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run as the only application.&lt;br /&gt;
* The x11 attribute may be missing; values are one of &amp;quot;req&amp;quot;, &amp;quot;stop&amp;quot;, and &amp;quot;ignore&amp;quot;. If &amp;quot;req&amp;quot; is set, it means the application requires X11 (and possibly could be filtered out of users display in a menu if X is not running, or perhaps such a menu would have to start X.) If &amp;quot;stop&amp;quot; is set, it means X must be not running, or temporarily shut down, for the app. If &amp;quot;ignore&amp;quot; is set, the app doesn't care if X is running or not (such as an SDL app, or a sh-script, etc.)&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;myprogram&amp;quot; arguments=&amp;quot;arg1 arg2&amp;quot; x11=&amp;quot;option&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The icon element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The icon element should specify a nice icon for your program.&lt;br /&gt;
An icon element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The src attribute specifies the path to the image file used as the icon.&lt;br /&gt;
&lt;br /&gt;
NOTE: Current implementation will use the pnd-file's appended icon; for a PXML-app-directory, it will try to use the icon mentioned in the PXML. So for a pnd-file, all subapps will show the appended-icon, regardless of the &amp;lt;icon&amp;gt; tag within the PXML.xml&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;icon src=&amp;quot;images/icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The info element ===&lt;br /&gt;
====Description====&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;info&amp;quot; element allows the PXML.xml to suggest to the desktop environment or menu a file that may be shown to the user when they want to know more - be it an About, a Install Guide, a User Guide, or all of the above.&lt;br /&gt;
&lt;br /&gt;
The file can be a txt-file or an html-file, and as the PXML-app-dir or .pnd-application will be mounted, the file may in turn branch to other files should it wish to.&lt;br /&gt;
&lt;br /&gt;
Developers do not need to have this element, if their app is nice and simple and just runs. If the application requires additional set up (such as Quake requiring separate pak files that cannot be included in the pnd), or if you wish to include sample config files or config guidelines for something complex like DosBox, or include Pandora-specific notes.. those are all good things. But the developer is encouraged to be tasteful and not go hog-wild!&lt;br /&gt;
&lt;br /&gt;
* name → the name to be shown in the menu; should be obvious that it belongs to the pnd .. Quake's game pnd could have &amp;quot;Quake 1 Setup&amp;quot;.&lt;br /&gt;
* type → the mime type for the file; in the event the consuming application can map mimetypes to an appropriate executable, this would be a good way of letting the user's preferred reader come up. Should be one of &amp;quot;text/html&amp;quot; (for an html file) or &amp;quot;text/plain&amp;quot; (for a .txt file)&lt;br /&gt;
* src → '''required''' A file (including path relative to the pnd; ie: ./index.html would be the root of the pnd) in the pnd to open up; by default, the web browser will likely be used to open it.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;text/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The previewpics element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The previewpics element is an element that contains multiple other elements.&lt;br /&gt;
A previewpics element is optional.&lt;br /&gt;
&lt;br /&gt;
It contains multiple pic-elements. Every pic-element represents one preview picture. If the previewpics element is specified, it must contain at least one pic element.&lt;br /&gt;
&lt;br /&gt;
* The src attribute on a pic element specifies the path to the image file used as the preview picture.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;previewpics&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The author element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The author element is an element that is used by the author to introduce him/herself.&lt;br /&gt;
An author element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The name attribute specifies the name of the author.&lt;br /&gt;
* The website attribute specifies the website of the author.&lt;br /&gt;
* The email attribute specifies the e-mail of the author. This attribute is not yet supported by libpnd, but please specify it anyways.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The version element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The version element specifies the application version.&lt;br /&gt;
A version element is required. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The major attribute specifies the major version number. This number should be 0 or more.&lt;br /&gt;
* The minor attribute specifies the minor version number. This number should be 0 or more.&lt;br /&gt;
* The release attribute specifies the release number. This number should be 0 or more.&lt;br /&gt;
* The build attribute specifies what build the application is at. This number should be 0 or more.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The osversion element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The osversion element specifies the minimal OS version that supports the PND file. The PND file will not be loaded by an OS that has an older version than the one specified here.&lt;br /&gt;
An osversion element is optional. It accepts the same attributes as the version element.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The categories element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The categories element is an element that contains multiple other elements.&lt;br /&gt;
A categories element is required, and must contain at least one category.&lt;br /&gt;
&lt;br /&gt;
Menus that use your PXML in any shape or form will use the category information to sort your application entry into the tree or sub menus. Depending on the menu system, this will be done differently every time. It is therefore advisable to specify as many categories and subcategories as possible (and as suitable; don't specify that your application belongs in a category if it doesn't).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;categories&amp;quot; element contains multiple category-elements. Every category-element represents one category that this app can be sorted into. Valid top-level categories are (among others):&lt;br /&gt;
&lt;br /&gt;
# AudioVideo&lt;br /&gt;
# Audio&lt;br /&gt;
# Video&lt;br /&gt;
# Development&lt;br /&gt;
# Education&lt;br /&gt;
# Game&lt;br /&gt;
# Graphics&lt;br /&gt;
# Network&lt;br /&gt;
# Office&lt;br /&gt;
# Settings&lt;br /&gt;
# System&lt;br /&gt;
# Utility&lt;br /&gt;
&lt;br /&gt;
Please see [http://standards.freedesktop.org/menu-spec/latest/apa.html the FreeDesktop specification] for more information. In it, you will also find valid subcategories for your top-level categories.&lt;br /&gt;
&lt;br /&gt;
The category-element takes one attribute: The name-attribute. This attribute represents the category name, which preferrably should be one of the above.&lt;br /&gt;
&lt;br /&gt;
A category-element can contain further child-elements: subcategory-elements. These represent the subcategories of a category that the app will be sorted into.&lt;br /&gt;
&lt;br /&gt;
The subcategory-element also takes a name-attribute; this attibute can contain a name for your subcategory.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;categories&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app belongs in the &amp;quot;Game/StrategyGame&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app also belongs in the &amp;quot;Graphics/ImageProcessing&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/categories&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The associations element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The associations element is an element that contains multiple other elements.&lt;br /&gt;
An associations element is optional, except if exec.standalone is false.&lt;br /&gt;
&lt;br /&gt;
It contains multiple association-elements. Every association-element represents one file action association.&lt;br /&gt;
&lt;br /&gt;
* The name attribute on an association element specifies the user-friendly action name for the association.&lt;br /&gt;
* The filetype attribute on an association element specifies what file types (in MIME format) that this association should apply to.&lt;br /&gt;
* The exec attribute on an association element specifies the command-line arguments that should be given to the program, when this action is performed. The exec can contain a &amp;quot;%s&amp;quot;, which indicates where the file name of the file, that the action is performed on, should be inserted. For example, if the exec-line is &amp;quot;--file %s --type lol&amp;quot;, and you have a file &amp;quot;lol.bmp&amp;quot; that the action is performed on, the exec-line is transformed into &amp;quot;--file &amp;quot;lol.bmp&amp;quot; --type lol&amp;quot;&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;associations&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Deinterlaced Bitmap Image&amp;quot; filetype=&amp;quot;image/bmp&amp;quot; exec=&amp;quot;-f %s --no-deinterlacing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Style sheet system crasher&amp;quot; filetype=&amp;quot;text/css&amp;quot; exec=&amp;quot;-f %s --crash-on-success&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/associations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The clockspeed element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The clockspeed element specifies what clockspeed this app should run at. Please do only specify this element if your application *needs* to run at the specified clock speed.&lt;br /&gt;
A clockspeed element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The frequency attribute specifies the wanted frequency, in megahertz (MHz).&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The mkdir element ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The PXML may request creation of directories on the SD card.&lt;br /&gt;
&lt;br /&gt;
'''This should be used sparingly.'''&lt;br /&gt;
&lt;br /&gt;
There are a number of scenarios in which this may be useful; should an application wish to attempt to establish a canonicle location for a file, it can request a path be created. This can avoid user confusion -- user merely plugs in SD, waits a few moments, pulls out SD, and inspects it to see what directories he may populate. Consider 'id' files for Quake -- the user might have many ports of the game, such as Quake, or ioquake, or others. They could all share the same id pak files, but the user may not know where to put them. (Especially since the pnd-file itself does not have user documentation available perhaps.) Consider ROM-paths for emulators .. perhaps the emulator expects ROMs in a specific location? If so, the author may wish to have that location created, to make it obvious.&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
The paths are created on the SD that contains the pnd.&lt;br /&gt;
The paths may not include &amp;quot;..&amp;quot; or wildcards.&lt;br /&gt;
&lt;br /&gt;
It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* dir -&amp;gt; the name of the path to be created; it may not be multiple levels deep - to effect that, include multiple &amp;lt;dir path=&amp;quot;...&amp;quot;/&amp;gt; entries&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mkdir&amp;gt;&lt;br /&gt;
  &amp;lt;dir path=&amp;quot;/foo/bar&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/mkdir&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is in /pandora/desktop on SD1 (/media/mmcblk0p1 say), then /media/mmcblk0p1/foo/bar will be created.&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
Please see the [[PXML_archetype|PXML archetype]].&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
To validate a PXML file, you need a XSD (XML schema) validator, and you have to know how to use it.&lt;br /&gt;
&lt;br /&gt;
You will also need to put the XML schema for the PXML format in the same folder as your PXML file. Note that the current PXML schema is horribly out of date.&lt;br /&gt;
&lt;br /&gt;
When you have done that, and know how to use it, you need to change a few things in your PXML file. In your PXML tag, change the contents from this...&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;PXML_schema.xsd&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the PXML file can be validated.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_archetype&amp;diff=2392</id>
		<title>PXML archetype</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_archetype&amp;diff=2392"/>
		<updated>2010-06-08T19:33:30Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: New page: This is a template for PXML files. It covers most of the spec and is considered to be ''clean'', meaning that it can be used as a sane starting point for PXML write-ups. &amp;lt;source lang=&amp;quot;xml&amp;quot;...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a template for PXML files. It covers most of the spec and is considered to be ''clean'', meaning that it can be used as a sane starting point for PXML write-ups.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!--This is an example PXML file for an application named &amp;quot;Exaile&amp;quot;, to&lt;br /&gt;
    demonstrate how a PXML file is supposed to be structured. Feel free to&lt;br /&gt;
    replace all of the field contents with your own data, and to remove these&lt;br /&gt;
    comments afterwards, in order to get a working and valid PXML file.&lt;br /&gt;
&lt;br /&gt;
    Note that this file is MINIMAL aka. this is the information you SHOULD&lt;br /&gt;
    specify if you're well-behaved (all of it isn't NEEDED per-se, though) --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
  PXML tag&lt;br /&gt;
  Indicates the root node of a PXML file.&lt;br /&gt;
&lt;br /&gt;
  Attributes:&lt;br /&gt;
    xmlns:&lt;br /&gt;
      Identifies the namespace of this PXML file. Potential future PXML&lt;br /&gt;
      specifications will use a different name space.&lt;br /&gt;
 --&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--&lt;br /&gt;
    application tag&lt;br /&gt;
    Declares a new application that this PND package provides. Most PND&lt;br /&gt;
    packages will only have one application entry, and it is discouraged to&lt;br /&gt;
    have too many application entries in one PND file, since a PND file is&lt;br /&gt;
    inseparable, i.e. an user cannot upgrade one app and leave another be if&lt;br /&gt;
    they share the same PND file.&lt;br /&gt;
&lt;br /&gt;
    Attributes:&lt;br /&gt;
      id:&lt;br /&gt;
        Identifies the application in application enumerations.&lt;br /&gt;
        This has to be a string that is unique to the package series; there&lt;br /&gt;
        must not be two packages with entirely different purposes and&lt;br /&gt;
        origins that share the same ID.&lt;br /&gt;
&lt;br /&gt;
        tl;dr: Choose an id like you would choose a package name on the&lt;br /&gt;
               Linux Desktop.&lt;br /&gt;
&lt;br /&gt;
        Some things you have to consider when choosing an id:&lt;br /&gt;
          - If you release new versions of your application, they should have&lt;br /&gt;
            the same id as previous versions. Packages with different id's&lt;br /&gt;
            are not considered to be related at all, while packages with&lt;br /&gt;
            identical id's are considered to be of the same kind.&lt;br /&gt;
          - Your id should not be too complex. You should choose something&lt;br /&gt;
            that is unique to your application, and not something globally&lt;br /&gt;
            unique.&lt;br /&gt;
          - The application id will be used by package managers and the like.&lt;br /&gt;
            So, choose something that you expect to be typed in as:&lt;br /&gt;
            &amp;quot;installtool install %id%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        If you are publishing an application that you created yourself,&lt;br /&gt;
        and that you don't expect anyone else to also publish, these&lt;br /&gt;
        would be GOOD id's:&lt;br /&gt;
          - &amp;quot;exaile&amp;quot;&lt;br /&gt;
          - &amp;quot;myapp&amp;quot;&lt;br /&gt;
          - &amp;quot;kdemod-extras-quassel&amp;quot;&lt;br /&gt;
          - &amp;quot;awesome-music-player&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        These would be BAD id's:&lt;br /&gt;
          - &amp;quot;Exaile&amp;quot; - This is an user-adapted name and not a machine-&lt;br /&gt;
            adapted name&lt;br /&gt;
          - &amp;quot;Exaile - A music player that rocks&amp;quot; - This contains spaces and&lt;br /&gt;
            might therefore be mistreated by shell scripts and the like.&lt;br /&gt;
          - &amp;quot;exaile-1.0&amp;quot; - This contains version information; you should&lt;br /&gt;
            put this information in the version tag below instead.&lt;br /&gt;
          - &amp;quot;exaile-written-by-foobar-in-the-year-of-the-lord-two-thousand-and-ten-and-given-to-yall-for-free&amp;quot;&lt;br /&gt;
            This is too long.&lt;br /&gt;
          - &amp;quot;ae4c8bc112cafedd&amp;quot; - This doesn't identify *the application*, but&lt;br /&gt;
            is just a random unique identifier.&lt;br /&gt;
        These would be GOOD id's if you PORTED or MODDED an existing&lt;br /&gt;
        application:&lt;br /&gt;
          - &amp;quot;exaile-dflemstr&amp;quot; - (port) The app was ported by dflemstr&lt;br /&gt;
          - &amp;quot;exaile-nox&amp;quot; - (mod) The app runs without X&lt;br /&gt;
          - &amp;quot;exaile-player&amp;quot; - (port) Only a part of the application was&lt;br /&gt;
            ported&lt;br /&gt;
          - &amp;quot;exaile-pure&amp;quot; - (mod) Substantial mods were carried through, and&lt;br /&gt;
            a rebranding was needed.&lt;br /&gt;
      appdata:&lt;br /&gt;
        Specifies a name for a data store for your application&lt;br /&gt;
        This is where all your writes to CWD will end up when you run&lt;br /&gt;
        your application. You should choose an user friendly name, but&lt;br /&gt;
        *not* an user-adapted name (think about localization and&lt;br /&gt;
        management).&lt;br /&gt;
        Good alternatives:&lt;br /&gt;
          - &amp;quot;exaile&amp;quot;&lt;br /&gt;
          - &amp;quot;exaile-1&amp;quot; - If you intend to release newer versions that use&lt;br /&gt;
            a different storage format.&lt;br /&gt;
          - &amp;quot;exaile-dev&amp;quot; - If you want an user to be able to use a dev&lt;br /&gt;
            version of your app, and a stable version of your app&lt;br /&gt;
            simultaneously.&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
  &amp;lt;application id=&amp;quot;exaile&amp;quot; appdata=&amp;quot;exaile&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      title tag(s)&lt;br /&gt;
      Defines a human-readable title for the application in a specified locale.&lt;br /&gt;
      You MUST specify a title with the language &amp;quot;en_US&amp;quot;; other localizations&lt;br /&gt;
      are optional, but it is recommended to add one for generic,&lt;br /&gt;
      not-only-american english (&amp;quot;en&amp;quot;). Titles and descriptions should also be&lt;br /&gt;
      in pairs (you should not translate a title and omit a translation for a&lt;br /&gt;
      description).&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        lang:&lt;br /&gt;
          Specifies the language of the title.&lt;br /&gt;
&lt;br /&gt;
          This is made up of two parts:&lt;br /&gt;
            - The language part. This code is the lower-case, two-letter&lt;br /&gt;
              code as defined by ISO-639.&lt;br /&gt;
            - OPTIONAL: The country part. This code is the upper-case,&lt;br /&gt;
              two-letter code as defined by ISO-3166, with an underscore&lt;br /&gt;
              as the prefix.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Exaile music player&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;sv&amp;quot;&amp;gt;Exaile musikspelare&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;de&amp;quot;&amp;gt;Exaile musikspieler&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      description tag(s)&lt;br /&gt;
      Defines a human-readable description for your application in a specified&lt;br /&gt;
      locale. The same rules apply to this element, as to title elements. Note&lt;br /&gt;
      that we by description don't mean page-long texts; the recommended length&lt;br /&gt;
      for a description is 128 characters, but certain implementations support&lt;br /&gt;
      up to 1024 or 4096 characters. More than that is absolutely not&lt;br /&gt;
      recommended. Also, please remember that newlines are ignored in&lt;br /&gt;
      descriptions according to the XML standard, but that spaces are&lt;br /&gt;
      significant. XML escaping applies for the characters less-than,&lt;br /&gt;
      greater-than and ampersand (&amp;amp;lt; &amp;amp;gt; &amp;amp;amp; respectively).&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        lang:&lt;br /&gt;
          See above.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;A versatile music player written in Python.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;sv&amp;quot;&amp;gt;En kraftfull musikspelare skriven i Python.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;de&amp;quot;&amp;gt;Ein fähiger Musikspieler, in Python geschrieben.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      version tag&lt;br /&gt;
      This specifies the version quadron for this application.&lt;br /&gt;
      ALL FIELDS MUST BE POSITIVE INTEGERS OR 0. You are free to choose your&lt;br /&gt;
      own versioning scheme (ie. &amp;quot;build&amp;quot; doesn't have to be the number of times&lt;br /&gt;
      you built the application), but you must specify all four version fields&lt;br /&gt;
      below.&lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      exec tag&lt;br /&gt;
      Declares how the application should be started.&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        command:&lt;br /&gt;
          The executable to start when the program is launched. This is&lt;br /&gt;
          a path relative to the root of your PND file.&lt;br /&gt;
        arguments:&lt;br /&gt;
          Does the app need to be started with certain arguments every&lt;br /&gt;
          time it is run? This is useful for PNDs that contain&lt;br /&gt;
          multiple applications that use the same executable file.&lt;br /&gt;
        background:&lt;br /&gt;
          Can this application &amp;quot;be minimised&amp;quot; or should it run&lt;br /&gt;
          singleton?&lt;br /&gt;
          &amp;quot;true&amp;quot;, &amp;quot;false&amp;quot;, &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot; accepted.&lt;br /&gt;
        startdir:&lt;br /&gt;
          Sets the CWD for the application before it is run.&lt;br /&gt;
          Default is the PND mount point.&lt;br /&gt;
        standalone:&lt;br /&gt;
          Can this application run directly, or should it only be&lt;br /&gt;
          started via associations? If this is &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot;, it&lt;br /&gt;
          won't show up in launchers.&lt;br /&gt;
        x11:&lt;br /&gt;
          Can be one of:&lt;br /&gt;
          &amp;quot;req&amp;quot; - X11 is required for the application to run.&lt;br /&gt;
          &amp;quot;stop&amp;quot; - X11 must be stopped for the application to run.&lt;br /&gt;
          &amp;quot;ignore&amp;quot; (default) - Don't care about X11.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;exec command=&amp;quot;./bin/exaile&amp;quot; background=&amp;quot;true&amp;quot; standalone=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      author tag&lt;br /&gt;
      Contains information about the application author. All three fields&lt;br /&gt;
      are optional.&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot; email=&amp;quot;a.b@c.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
      icon tag&lt;br /&gt;
      Declares the icon for the application. This should be the same icon that&lt;br /&gt;
      is appended to the PND file, or something different if *this* application&lt;br /&gt;
      should have a different icon from the rest.&lt;br /&gt;
&lt;br /&gt;
      Attributes:&lt;br /&gt;
        src&lt;br /&gt;
          Relative URI to the icon (can be a relative file, or a&lt;br /&gt;
          fully-qualified URL; the latter is only supported in some&lt;br /&gt;
          implementations)&lt;br /&gt;
      --&amp;gt;&lt;br /&gt;
    &amp;lt;icon src=&amp;quot;icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!--&lt;br /&gt;
     categories tag&lt;br /&gt;
     Specifies which categories this application belongs to. See&lt;br /&gt;
     http://standards.freedesktop.org/menu-spec/latest/apa.html for more&lt;br /&gt;
     information. The optional sub-element &amp;quot;subcategory&amp;quot; is currently ignored&lt;br /&gt;
     by all implementations.&lt;br /&gt;
     --&amp;gt;&lt;br /&gt;
    &amp;lt;categories&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Audio&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Music&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;GTK&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/categories&amp;gt;&lt;br /&gt;
  &amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2388</id>
		<title>New PND format</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2388"/>
		<updated>2010-06-06T13:51:05Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Current situation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current PND format has some shortcomings as listed below. This page should serve as a discussion page/white board for how the format could be improved.&lt;br /&gt;
&lt;br /&gt;
''' Proposal for discussion, this is just some opening shots '''&lt;br /&gt;
&lt;br /&gt;
== Current situation ==&lt;br /&gt;
The current (ISO-based) PND format has the following shortcomings:&lt;br /&gt;
&lt;br /&gt;
* It currently uses ISO, SquashFS, and other filesystems... This means that there's no standard to follow, and libpnd needs to carry around support for a multitude of file systems.&lt;br /&gt;
* It (often, but not always) uses the [http://en.wikipedia.org/wiki/ISO_9660 ISO file system] which is inefficient at storing data, because:&lt;br /&gt;
** It contains duplicate headers for each file entry[http://users.telenet.be/it3.consultants.bvba/handouts/ISO9960.html] (one version with big-endian integers, one version with little-endian integers[http://en.wikipedia.org/wiki/Endianness]) which leads to many kilobytes of wasted space.&lt;br /&gt;
** Its file tables are fixed-size, and there are therefore limitations on how many folders you can have, what names you can give your files, how big your files can be etc. For instance, files can only have names that are max 31 characters long, all upper-case, and limited to the ASCII character encoding, and an ISO does only support a folder depth of 8[http://www.on-time.com/rtos-32-docs/rtfiles-32/programming-manual/iso-9660/]. To support more, the Joliet file system extension is needed (or isofs won't recognize all file paths), and the Joliet header can be placed practically anywhere in the file, which means additional seek times.&lt;br /&gt;
** It needs various file system extensions to behave correctly, like for example [http://en.wikipedia.org/wiki/Rock_Ridge Rock Ridge Interchange Protocol] and [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet]. Without them, it becomes pretty useless as demonstrated above, and with them, it becomes difficult to read by a tool (You can only use isofs! There are no other tools out there for programmers to use!).&lt;br /&gt;
** It's very difficult to use since you need special ISO making tools to create the image. ISO is a relatively rare format if you're not technically inclined.&lt;br /&gt;
** If you want to add or remove files from it, it's near impossible if you use a compact ISO file, since there's no way that you can &amp;quot;expand&amp;quot; an existing ISO file.&lt;br /&gt;
* The PND header data is at the end (or in the middle of the file if a screenshot is included) which makes it impossible for e.g. libmagic to recognize the PND file. It will instead recognize it as an ISO file. Having the header data at the end also makes it take a very long time to find the data, making tools and the libpnd library very inefficient.&lt;br /&gt;
* The PND file uses a custom XML format for its metadata. There's no reason to do this, especially since the established &amp;quot;.desktop&amp;quot; file format fills exactly the same function.&lt;br /&gt;
(note: &amp;quot;.desktop&amp;quot; does not contain all metadata we have wanted over time, but it's of course possible to add extensions à la &amp;quot;X-Pandora-Whatever=xyz&amp;quot;)&lt;br /&gt;
* There's no &amp;quot;index&amp;quot; for the PND file. The whole file has to be scanned (albeit backwards) to find a PXML file, and there's a big chance for false positives etc.&lt;br /&gt;
* Data is just appended linearly to the file so there's no order. If the format is to be extended (to e.g. include an icon file after the screenshot file), should the data just be appended as well?&lt;br /&gt;
* UTF-8 is strictly the only encoding that is supported. If you make your PXML on a Windows machine, it won't work.&lt;br /&gt;
&lt;br /&gt;
== Proposed revisions ==&lt;br /&gt;
=== Step 1: File system ===&lt;br /&gt;
The file system for PNDs should be replaced by the ''uncompressed'' ZIP archive format. ZIP has the advantage that it's incredibly compact, and uncompressed ZIP makes it possible to read data from the file without having to do any decompression.&lt;br /&gt;
&lt;br /&gt;
ZIP files are mountable using various implementations of zipfs, and most of these implementations won't store files in memory when they are being read if the ZIP file is uncompressed.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Metadata ===&lt;br /&gt;
PND files should no longer require special tools for them to be created. Therefore, since ZIP files support random access on files, it shouldn't be necessary to append/prepend metadata to the file. The user simply includes the &amp;quot;PXML.xml&amp;quot; and &amp;quot;preview.png&amp;quot; files inside of the ZIP, and any tools that need information about the PND can simply go to the central directory of the ZIP file (or use a simple ZIP library to do it for them) and get the location of the file inside of the ZIP. This should also dramatically decrease loading times for PNDs.&lt;br /&gt;
&lt;br /&gt;
Note; performance testing is needed; at the time we started, zip was enormously slower than plain ISO; with driver changes, it may or may not be so, hence our adopted multiple-filesystem-type system. zipfs is one possible option.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Metadata format ===&lt;br /&gt;
Current PND files include so-called &amp;quot;PXML.xml&amp;quot; files. These files have a custom XML format that has a strange structure.&lt;br /&gt;
&lt;br /&gt;
These files should be replaced by &amp;quot;.desktop&amp;quot; files. A PND can contain one or more &amp;quot;.desktop&amp;quot; files in its root directory that specify how an application should be launched. PND tools simply use all &amp;quot;.desktop&amp;quot; files they can find in the PND when creating launchers for the contents of the PND.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
* There don't have to be ''any'' special tools for reading PND files. The package can be run on any platform using any programming language that can read ZIP files.&lt;br /&gt;
* We can use existing facilities to manage the launching of applications. The &amp;quot;.desktop&amp;quot; files can basically be copied without modification into standard locations of the system, and all launchers will become aware of them.&lt;br /&gt;
* Reading PND files becomes easier (because of better tool support... sorry, but you can't link to libpnd in all programming languages) and quicker (becuase of the central directory for random file access).&lt;br /&gt;
&lt;br /&gt;
=== Benchmarks ===&lt;br /&gt;
A benchmark was carried through to measure the performance of various package implementations.&lt;br /&gt;
The compared systems were:&lt;br /&gt;
* ZIP-based uncompressed packages using fuse-zip (a zipfs implementation) to read the files&lt;br /&gt;
* ZIP-based compressed packages also using fuse-zip.&lt;br /&gt;
* ISO8859-based packages using isofs&lt;br /&gt;
* CramFS-based packages.&lt;br /&gt;
&lt;br /&gt;
A total of 9 files were generated for the test. They have sizes 1, 2, 3, 4, 16, 32, 64, 128 and 256 MB, and were generated via &amp;quot;dd if=/dev/urandom of=$file bs=1M count=$size&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Because the files contain random data, they did not compress very well. The resulting files were:&lt;br /&gt;
* &amp;quot;zipcompressed.zip&amp;quot; 511.1 MB&lt;br /&gt;
* &amp;quot;zipuncompressed.zip&amp;quot; 511.0 MB&lt;br /&gt;
* &amp;quot;iso.iso&amp;quot; 511.3 MB&lt;br /&gt;
* &amp;quot;cramfs.image&amp;quot; 95.4 MB (WOW!)&lt;br /&gt;
&lt;br /&gt;
Some notes:&lt;br /&gt;
* No write tests were done for obvious reasons&lt;br /&gt;
* No random access tests were done since the Pandora will use SD cards and thus not get penalized from random access, and that's not what we're interested in anyways.&lt;br /&gt;
* Before each test, the commands &amp;quot;sync; echo 3 &amp;gt; /proc/sys/vm/drop_caches&amp;quot; were run.&lt;br /&gt;
&lt;br /&gt;
==== First test: linear read time ====&lt;br /&gt;
Command: &amp;quot;time cat mountpoint/* &amp;gt; /dev/null&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* ISO: 8.119 seconds&lt;br /&gt;
* CramFS: 1.488 seconds (WOW!)&lt;br /&gt;
* Zip (compressed): 8.535 seconds&lt;br /&gt;
* Zip (uncompressed): 8.290 seconds&lt;br /&gt;
&lt;br /&gt;
==== Second test: RAM usage ====&lt;br /&gt;
-- TODO, have to find a good method of measuring this --&lt;br /&gt;
&lt;br /&gt;
== Remaining issues ==&lt;br /&gt;
* How should libpnd tell the difference between old and new PND files? Should it depend on the &amp;quot;file&amp;quot; tool, should it run its own recognition algorithm, or what? Should the extension be changed to e.g. &amp;quot;.box&amp;quot; (Which was proposed in a thread)?&lt;br /&gt;
* How to make sure that the ZIP files are uncompressed? Should we provide a script that &amp;quot;uncompresses&amp;quot; an ordinary ZIP file?&lt;br /&gt;
* Is cramfs better than ZIP?&lt;br /&gt;
** cramfs cannot be uncompressed like ZIP can&lt;br /&gt;
** If you compare compressed ZIP and cramfs, cramfs is more efficient.&lt;br /&gt;
** cramfs is harder to use than ZIP (for the developer).&lt;br /&gt;
** cramfs ''needs'' to have all of its opened files in memory.&lt;br /&gt;
&lt;br /&gt;
== Upgrade path from the old PND format ==&lt;br /&gt;
A simple script can be written that extracts the old PND file, including the screenshot and the PXML.xml file. The PXML.xml file is then converted to one or many .desktop files, and the desktop files, the preview.png file, and the package contents are compacted into a ZIP that then is renamed to &amp;quot;*.pnd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Usage scenario ==&lt;br /&gt;
=== Repackaging of an application from another package format ===&lt;br /&gt;
* The user grabs the package for the application&lt;br /&gt;
* He dumps the executable and all required libraries into a folder&lt;br /&gt;
* He dumps a &amp;quot;screenshot.png&amp;quot; file into the folder that he's made&lt;br /&gt;
* He copies the &amp;quot;.desktop&amp;quot; file(s) for the application from the old package, opens them, replaces &amp;quot;Exec=/usr/bin/bla&amp;quot; with &amp;quot;Exec=./bla&amp;quot; and saves them in the directory&lt;br /&gt;
* He uses a ZIP archiver to make a ZIP out of the folder, making sure that he sets the &amp;quot;uncompressed&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== Creating PNDs as part of a build process ===&lt;br /&gt;
* The build tool creates a directory with all of the necessary information like above and invokes the &amp;quot;zip&amp;quot; utility to compress the folder.&lt;br /&gt;
&lt;br /&gt;
=== Accessing a PND's contents for the... ===&lt;br /&gt;
&lt;br /&gt;
==== ...lazy programmer ====&lt;br /&gt;
* The programmer extracts the PND into a folder via libzip and accesses its contents.&lt;br /&gt;
&lt;br /&gt;
==== ...pragmatic programmer ====&lt;br /&gt;
* The programmer uses zipfs to mount the ZIP and accesses the file's contents.&lt;br /&gt;
&lt;br /&gt;
==== ...smart performance-aware programmer ====&lt;br /&gt;
* The programmer fseek()'s the ZIP file until he finds 0x04034b50.&lt;br /&gt;
* He jumps 18 bytes forward and reads the int at that location, storing it in &amp;quot;length&amp;quot;.&lt;br /&gt;
* He jumps 4 bytes and checks if this int matches &amp;quot;length&amp;quot;. If it doesn't, it means that the file is compressed, and an error is reported.&lt;br /&gt;
* He then jumps forward 4 bytes and stores the short at that location in a variable &amp;quot;nameLength&amp;quot;.&lt;br /&gt;
* Another 2-byte jump gets the short &amp;quot;extensionsLength&amp;quot;.&lt;br /&gt;
* He then jumps 2 bytes and reads &amp;quot;nameLength&amp;quot; amount of bytes from the file.&lt;br /&gt;
* He then uses strcmp() to see if this string matches the sought-after file. If not, he continues the fseek().&lt;br /&gt;
* The programmer now skips &amp;quot;entensionsLength&amp;quot; amount of bytes.&lt;br /&gt;
* The programmer reads &amp;quot;length&amp;quot; amount of bytes from the file, and uses this as the sought-after file data.&lt;br /&gt;
&lt;br /&gt;
==== ...performance fascist/programmer who wants low seek times ====&lt;br /&gt;
* The programmer fseek()'s the file from the end until he finds 0x02014b50.&lt;br /&gt;
* He then uses the following table to get the information he needs:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ ZIP central directory file header&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Bytes !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4 || Central directory file header signature = 0x02014b50&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 2 || Version made by&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2 || Version needed to extract (minimum)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 2 || General purpose bit flag&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 2 || Compression method&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 2 || File last modification time&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 2 || File last modification date&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 4 || CRC-32&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 4 || Compressed size&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 4 || Uncompressed size&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 2 || File name length (''n'')&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || Extra field length (''m'')&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 2 || File comment length (''k'')&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 2 || Disk number where file starts&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 2 || Internal file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 4 || External file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 4 || Relative offset of local file header&lt;br /&gt;
|-&lt;br /&gt;
| 46 || ''n'' || File name&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n'' || ''m'' || Extra field&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n''+''m'' || ''k'' || File comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The relative file offset can then be used to jump to the file in question. The file is then scanned as described in the previous section.&lt;br /&gt;
&lt;br /&gt;
[[Category:PND]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2244</id>
		<title>PXML specification</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2244"/>
		<updated>2010-03-19T15:26:03Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Validation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Attention:''' at the present time, the PXML file format isn't set in stone, and is therefore subject to change. There is no guarantee that the format or the schema are bug-free or will be changed at any time. Please wait until this standard is finished before writing a PXML file.&lt;br /&gt;
&lt;br /&gt;
This is the human-readable specification for the PXML file format. The PXML file format is used in your applications for the OpenPandora® that you package in &amp;quot;.pnd&amp;quot;-files or distribute otherwise, to make it possible for menus and launchers to use your applications and their properties.&lt;br /&gt;
&lt;br /&gt;
A PXML file should be appended to your &amp;quot;.pnd&amp;quot;-file, using the tools provided for that purpose, or put in a directory that you want to serve as a redistributable package, to make it possible for launchers and menus to find it. It should have the name &amp;quot;PXML.xml&amp;quot; not case sensitive, and there should only be one such file. The contents of the PXML file should also comply to this specification without exception, to guarantee that everyone will be able to read it.&lt;br /&gt;
&lt;br /&gt;
== XML compatibility ==&lt;br /&gt;
The PXML format is XML-based and fully XML-compliant, which means that it can be read and written by any XML reader or writer. Included with this specification should also be a &amp;quot;.xsd&amp;quot;-file, which is used by XML tools to validate PXML files. A &amp;quot;.xsd&amp;quot;-file is also known as a XML schema, and can be called the &amp;quot;computer-readable&amp;quot; version of this document. It is very good practice to validate your PXML-files with that schema before publishing them.&lt;br /&gt;
&lt;br /&gt;
To write a PXML file, you also need to know the basics of writing a XML file. It boils down to the following:&lt;br /&gt;
&lt;br /&gt;
# If an element contains text or other elements, it needs a start-tag and an end-tag. This looks like (1)&lt;br /&gt;
# If an element does not contain other elements or text, but only attributes, it looks like (2)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement someattribute=&amp;quot;something&amp;quot;&amp;gt;something inside it&amp;lt;/exampleelement&amp;gt; &amp;lt;!-- (1) --&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement2 someattribute=&amp;quot;something&amp;quot; /&amp;gt; &amp;lt;!-- (2) --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The PXML-file is split up into multiple so-called elements, each of which specify one property of the &amp;quot;.pnd&amp;quot;-package. All of these elements are surrounded with a &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag, which tells the readers of the file that the data within that tag belongs to a PXML file. The tag and elements should be defined as follows:&lt;br /&gt;
=== The PXML-tag ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The PXML-tag serves as the container for all PXML elements. It is the first thing that should occur in your PXML file. An example &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, the PXML tag accepts a few attributes, namely the &amp;quot;id&amp;quot; and &amp;quot;xmlns&amp;quot; attributes.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;xmlns&amp;quot; attribute is required by the XML standard, and guarantees that this file will be identified as a PXML file. You must include the xmlns attribute, exactly as shown, in your PXML file, with the URL as specified. Only then can it be guaranteed that the file will be read at all by launchers and menu apps.&lt;br /&gt;
* '''DEPRECATED; SEE &amp;quot;application&amp;quot; tag.''' The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
=== The Application-tag ===&lt;br /&gt;
====Description====&lt;br /&gt;
The Application-tag permits the PXML.xml container to have multiple applications within it; you should have at least one application tag-pair (for one app), though you may have many.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;application id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
A good unique-id is the application name, developer name, and some key you may wish to update on occasion (should state-data become incompatible between updates, say.)&lt;br /&gt;
&lt;br /&gt;
Consider:&lt;br /&gt;
battlejewels.skeezix.001&lt;br /&gt;
quake-1.pickle.001&lt;br /&gt;
&lt;br /&gt;
unique-id formatting: '''Should not include directory or filename invalid characters, such as ?, &amp;gt;, /, etc. Any of those will cause the pnd-file to not function.'''&lt;br /&gt;
&lt;br /&gt;
Note on Uniqueness: The unique-id should be unique against other pnd-files, but may be re-used by other 'application' tags within the pnd; for example, you may have multiple subapps that want to share the same appdata path (which is formed based on unique-id!), so use the same unique-id. You might then have a utility application in that same pnd, which needs its own appdata, and so gets its own unique-id.&lt;br /&gt;
&lt;br /&gt;
=== The title element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The title element specifies the text that is shown to the users of your PND file as the application title. This element can be specified multiple times in multiple languages (the language is indicated by the lang attribute).&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;title&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Your application name&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;Dein Programmname&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The description element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The description element specifies the text that is shown to the users of your PND file as the application description. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;description&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;Your long description of this application, describing its purpose and highlighting its features.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;Deine etwas längere Programmbeschreibung, die den Sinn des Programmes und seine wichtigsten Features beschreiben sollte.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The exec element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The exec element should specify all the information needed to execute your application.&lt;br /&gt;
An exec element must be included in every PXML file. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The command attribute specifies the path to the executable file. This should be a relative path to a file within the PND package. Must contain no arguments! One strategy you may need is to point to a sh-script in your pnd-file, which in turn sets up LD_LIBRARY_PATH, determines arguments to pass, uses zenity to pop up a pre-run menu, or other trickery.&lt;br /&gt;
* The arguments attribute may be not present, or present with 1 or more arguments to the executable.&lt;br /&gt;
* The startdir attribute specifies the starting directory (Also known as the working directory) that the application should start in. This should be a relative path to a directory within the PND package, or to a well-known directory in the Pandora file system.&lt;br /&gt;
* The standalone attribute specifies whether or not this application can run on its own, or if it needs parameters to run. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can be run without parameters. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run with parameters (Meaning that no icon will appear for it in a launcher; it will only be run via file associations or via the terminal).&lt;br /&gt;
* The background attribute specifies whether or not this application should run in the background, and it should be possible to switch to other apps while it is running, or if it is the only application that should be running. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can run in the background. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run as the only application.&lt;br /&gt;
* The x11 attribute may be missing; values are one of &amp;quot;req&amp;quot;, &amp;quot;stop&amp;quot;, and &amp;quot;ignore&amp;quot;. If &amp;quot;req&amp;quot; is set, it means the application requires X11 (and possibly could be filtered out of users display in a menu if X is not running, or perhaps such a menu would have to start X.) If &amp;quot;stop&amp;quot; is set, it means X must be not running, or temporarily shut down, for the app. If &amp;quot;ignore&amp;quot; is set, the app doesn't care if X is running or not (such as an SDL app, or a sh-script, etc.)&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;myprogram&amp;quot; arguments=&amp;quot;arg1 arg2&amp;quot; x11=&amp;quot;option&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The icon element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The icon element should specify a nice icon for your program.&lt;br /&gt;
An icon element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The src attribute specifies the path to the image file used as the icon.&lt;br /&gt;
&lt;br /&gt;
NOTE: Current implementation will use the pnd-file's appended icon; for a PXML-app-directory, it will try to use the icon mentioned in the PXML. So for a pnd-file, all subapps will show the appended-icon, regardless of the &amp;lt;icon&amp;gt; tag within the PXML.xml&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;icon src=&amp;quot;images/icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The info element ===&lt;br /&gt;
====Description====&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;info&amp;quot; element allows the PXML.xml to suggest to the desktop environment or menu a file that may be shown to the user when they want to know more - be it an About, a Install Guide, a User Guide, or all of the above.&lt;br /&gt;
&lt;br /&gt;
The file can be a txt-file or an html-file, and as the PXML-app-dir or .pnd-application will be mounted, the file may in turn branch to other files should it wish to.&lt;br /&gt;
&lt;br /&gt;
Developers do not need to have this element, if their app is nice and simple and just runs. If the application requires additional set up (such as Quake requiring separate pak files that cannot be included in the pnd), or if you wish to include sample config files or config guidelines for something complex like DosBox, or include Pandora-specific notes.. those are all good things. But the developer is encouraged to be tasteful and not go hog-wild!&lt;br /&gt;
&lt;br /&gt;
* name → the name to be shown in the menu; should be obvious that it belongs to the pnd .. Quake's game pnd could have &amp;quot;Quake 1 Setup&amp;quot;.&lt;br /&gt;
* type → the mime type for the file; in the event the consuming application can map mimetypes to an appropriate executable, this would be a good way of letting the user's preferred reader come up. Should be one of &amp;quot;text/html&amp;quot; (for an html file) or &amp;quot;text/plain&amp;quot; (for a .txt file)&lt;br /&gt;
* src → '''required''' A file (including path relative to the pnd; ie: ./index.html would be the root of the pnd) in the pnd to open up; by default, the web browser will likely be used to open it.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;text/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The previewpics element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The previewpics element is an element that contains multiple other elements.&lt;br /&gt;
A previewpics element is optional.&lt;br /&gt;
&lt;br /&gt;
It contains multiple pic-elements. Every pic-element represents one preview picture. If the previewpics element is specified, it must contain at least one pic element.&lt;br /&gt;
&lt;br /&gt;
* The src attribute on a pic element specifies the path to the image file used as the preview picture.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;previewpics&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The author element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The author element is an element that is used by the author to introduce him/herself.&lt;br /&gt;
An author element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The name attribute specifies the name of the author.&lt;br /&gt;
* The website attribute specifies the website of the author.&lt;br /&gt;
* The email attribute specifies the e-mail of the author. This attribute is not yet supported by libpnd, but please specify it anyways.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The version element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The version element specifies the application version.&lt;br /&gt;
A version element is required. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The major attribute specifies the major version number. This number should be 0 or more.&lt;br /&gt;
* The minor attribute specifies the minor version number. This number should be 0 or more.&lt;br /&gt;
* The release attribute specifies the release number. This number should be 0 or more.&lt;br /&gt;
* The build attribute specifies what build the application is at. This number should be 0 or more.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The osversion element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The osversion element specifies the minimal OS version that supports the PND file. The PND file will not be loaded by an OS that has an older version than the one specified here.&lt;br /&gt;
An osversion element is optional. It accepts the same attributes as the version element.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The categories element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The categories element is an element that contains multiple other elements.&lt;br /&gt;
A categories element is required, and must contain at least one category.&lt;br /&gt;
&lt;br /&gt;
Menus that use your PXML in any shape or form will use the category information to sort your application entry into the tree or sub menus. Depending on the menu system, this will be done differently every time. It is therefore advisable to specify as many categories and subcategories as possible (and as suitable; don't specify that your application belongs in a category if it doesn't).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;categories&amp;quot; element contains multiple category-elements. Every category-element represents one category that this app can be sorted into. Valid top-level categories are (among others):&lt;br /&gt;
&lt;br /&gt;
# AudioVideo&lt;br /&gt;
# Audio&lt;br /&gt;
# Video&lt;br /&gt;
# Development&lt;br /&gt;
# Education&lt;br /&gt;
# Game&lt;br /&gt;
# Graphics&lt;br /&gt;
# Network&lt;br /&gt;
# Office&lt;br /&gt;
# Settings&lt;br /&gt;
# System&lt;br /&gt;
# Utility&lt;br /&gt;
&lt;br /&gt;
Please see [http://standards.freedesktop.org/menu-spec/latest/apa.html the FreeDesktop specification] for more information. In it, you will also find valid subcategories for your top-level categories.&lt;br /&gt;
&lt;br /&gt;
The category-element takes one attribute: The name-attribute. This attribute represents the category name, which preferrably should be one of the above.&lt;br /&gt;
&lt;br /&gt;
A category-element can contain further child-elements: subcategory-elements. These represent the subcategories of a category that the app will be sorted into.&lt;br /&gt;
&lt;br /&gt;
The subcategory-element also takes a name-attribute; this attibute can contain a name for your subcategory.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;categories&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app belongs in the &amp;quot;Game/StrategyGame&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app also belongs in the &amp;quot;Graphics/ImageProcessing&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/categories&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The associations element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The associations element is an element that contains multiple other elements.&lt;br /&gt;
An associations element is optional, except if exec.standalone is false.&lt;br /&gt;
&lt;br /&gt;
It contains multiple association-elements. Every association-element represents one file action association.&lt;br /&gt;
&lt;br /&gt;
* The name attribute on an association element specifies the user-friendly action name for the association.&lt;br /&gt;
* The filetype attribute on an association element specifies what file types (in MIME format) that this association should apply to.&lt;br /&gt;
* The exec attribute on an association element specifies the command-line arguments that should be given to the program, when this action is performed. The exec can contain a &amp;quot;%s&amp;quot;, which indicates where the file name of the file, that the action is performed on, should be inserted. For example, if the exec-line is &amp;quot;--file %s --type lol&amp;quot;, and you have a file &amp;quot;lol.bmp&amp;quot; that the action is performed on, the exec-line is transformed into &amp;quot;--file &amp;quot;lol.bmp&amp;quot; --type lol&amp;quot;&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;associations&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Deinterlaced Bitmap Image&amp;quot; filetype=&amp;quot;image/bmp&amp;quot; exec=&amp;quot;-f %s --no-deinterlacing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Style sheet system crasher&amp;quot; filetype=&amp;quot;text/css&amp;quot; exec=&amp;quot;-f %s --crash-on-success&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/associations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The clockspeed element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The clockspeed element specifies what clockspeed this app should run at. Please do only specify this element if your application *needs* to run at the specified clock speed.&lt;br /&gt;
A clockspeed element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The frequency attribute specifies the wanted frequency, in megahertz (MHz).&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The mkdir element ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The PXML may request creation of directories on the SD card.&lt;br /&gt;
&lt;br /&gt;
'''This should be used sparingly.'''&lt;br /&gt;
&lt;br /&gt;
There are a number of scenarios in which this may be useful; should an application wish to attempt to establish a canonicle location for a file, it can request a path be created. This can avoid user confusion -- user merely plugs in SD, waits a few moments, pulls out SD, and inspects it to see what directories he may populate. Consider 'id' files for Quake -- the user might have many ports of the game, such as Quake, or ioquake, or others. They could all share the same id pak files, but the user may not know where to put them. (Especially since the pnd-file itself does not have user documentation available perhaps.) Consider ROM-paths for emulators .. perhaps the emulator expects ROMs in a specific location? If so, the author may wish to have that location created, to make it obvious.&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
The paths are created on the SD that contains the pnd.&lt;br /&gt;
The paths may not include &amp;quot;..&amp;quot; or wildcards.&lt;br /&gt;
&lt;br /&gt;
It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* dir -&amp;gt; the name of the path to be created; it may not be multiple levels deep - to effect that, include multiple &amp;lt;dir path=&amp;quot;...&amp;quot;/&amp;gt; entries&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mkdir&amp;gt;&lt;br /&gt;
  &amp;lt;dir path=&amp;quot;/foo/bar&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/mkdir&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is in /pandora/desktop on SD1 (/media/mmcblk0p1 say), then /media/mmcblk0p1/foo/bar will be created.&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;application id=&amp;quot;youruniqueID&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;German Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;exec background=&amp;quot;true&amp;quot; command=&amp;quot;program&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;txt/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;icon src=&amp;quot;program.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;This is the English Description of the file.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;This would be the German description.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;previewpics&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;author name=&amp;quot;Some Dudeson&amp;quot; website=&amp;quot;http://a.bc.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;categories&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
    &amp;lt;/categories&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/application&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
To validate a PXML file, you need a XSD (XML schema) validator, and you have to know how to use it.&lt;br /&gt;
&lt;br /&gt;
You will also need to put the XML schema for the PXML format in the same folder as your PXML file. Note that the current PXML schema is horribly out of date.&lt;br /&gt;
&lt;br /&gt;
When you have done that, and know how to use it, you need to change a few things in your PXML file. In your PXML tag, change the contents from this...&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;PXML_schema.xsd&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the PXML file can be validated.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2243</id>
		<title>PXML specification</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2243"/>
		<updated>2010-03-19T15:24:14Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Attention:''' at the present time, the PXML file format isn't set in stone, and is therefore subject to change. There is no guarantee that the format or the schema are bug-free or will be changed at any time. Please wait until this standard is finished before writing a PXML file.&lt;br /&gt;
&lt;br /&gt;
This is the human-readable specification for the PXML file format. The PXML file format is used in your applications for the OpenPandora® that you package in &amp;quot;.pnd&amp;quot;-files or distribute otherwise, to make it possible for menus and launchers to use your applications and their properties.&lt;br /&gt;
&lt;br /&gt;
A PXML file should be appended to your &amp;quot;.pnd&amp;quot;-file, using the tools provided for that purpose, or put in a directory that you want to serve as a redistributable package, to make it possible for launchers and menus to find it. It should have the name &amp;quot;PXML.xml&amp;quot; not case sensitive, and there should only be one such file. The contents of the PXML file should also comply to this specification without exception, to guarantee that everyone will be able to read it.&lt;br /&gt;
&lt;br /&gt;
== XML compatibility ==&lt;br /&gt;
The PXML format is XML-based and fully XML-compliant, which means that it can be read and written by any XML reader or writer. Included with this specification should also be a &amp;quot;.xsd&amp;quot;-file, which is used by XML tools to validate PXML files. A &amp;quot;.xsd&amp;quot;-file is also known as a XML schema, and can be called the &amp;quot;computer-readable&amp;quot; version of this document. It is very good practice to validate your PXML-files with that schema before publishing them.&lt;br /&gt;
&lt;br /&gt;
To write a PXML file, you also need to know the basics of writing a XML file. It boils down to the following:&lt;br /&gt;
&lt;br /&gt;
# If an element contains text or other elements, it needs a start-tag and an end-tag. This looks like (1)&lt;br /&gt;
# If an element does not contain other elements or text, but only attributes, it looks like (2)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement someattribute=&amp;quot;something&amp;quot;&amp;gt;something inside it&amp;lt;/exampleelement&amp;gt; &amp;lt;!-- (1) --&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement2 someattribute=&amp;quot;something&amp;quot; /&amp;gt; &amp;lt;!-- (2) --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The PXML-file is split up into multiple so-called elements, each of which specify one property of the &amp;quot;.pnd&amp;quot;-package. All of these elements are surrounded with a &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag, which tells the readers of the file that the data within that tag belongs to a PXML file. The tag and elements should be defined as follows:&lt;br /&gt;
=== The PXML-tag ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The PXML-tag serves as the container for all PXML elements. It is the first thing that should occur in your PXML file. An example &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, the PXML tag accepts a few attributes, namely the &amp;quot;id&amp;quot; and &amp;quot;xmlns&amp;quot; attributes.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;xmlns&amp;quot; attribute is required by the XML standard, and guarantees that this file will be identified as a PXML file. You must include the xmlns attribute, exactly as shown, in your PXML file, with the URL as specified. Only then can it be guaranteed that the file will be read at all by launchers and menu apps.&lt;br /&gt;
* '''DEPRECATED; SEE &amp;quot;application&amp;quot; tag.''' The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
=== The Application-tag ===&lt;br /&gt;
====Description====&lt;br /&gt;
The Application-tag permits the PXML.xml container to have multiple applications within it; you should have at least one application tag-pair (for one app), though you may have many.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;application id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
A good unique-id is the application name, developer name, and some key you may wish to update on occasion (should state-data become incompatible between updates, say.)&lt;br /&gt;
&lt;br /&gt;
Consider:&lt;br /&gt;
battlejewels.skeezix.001&lt;br /&gt;
quake-1.pickle.001&lt;br /&gt;
&lt;br /&gt;
unique-id formatting: '''Should not include directory or filename invalid characters, such as ?, &amp;gt;, /, etc. Any of those will cause the pnd-file to not function.'''&lt;br /&gt;
&lt;br /&gt;
Note on Uniqueness: The unique-id should be unique against other pnd-files, but may be re-used by other 'application' tags within the pnd; for example, you may have multiple subapps that want to share the same appdata path (which is formed based on unique-id!), so use the same unique-id. You might then have a utility application in that same pnd, which needs its own appdata, and so gets its own unique-id.&lt;br /&gt;
&lt;br /&gt;
=== The title element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The title element specifies the text that is shown to the users of your PND file as the application title. This element can be specified multiple times in multiple languages (the language is indicated by the lang attribute).&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;title&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Your application name&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;Dein Programmname&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The description element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The description element specifies the text that is shown to the users of your PND file as the application description. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;description&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;Your long description of this application, describing its purpose and highlighting its features.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;Deine etwas längere Programmbeschreibung, die den Sinn des Programmes und seine wichtigsten Features beschreiben sollte.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The exec element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The exec element should specify all the information needed to execute your application.&lt;br /&gt;
An exec element must be included in every PXML file. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The command attribute specifies the path to the executable file. This should be a relative path to a file within the PND package. Must contain no arguments! One strategy you may need is to point to a sh-script in your pnd-file, which in turn sets up LD_LIBRARY_PATH, determines arguments to pass, uses zenity to pop up a pre-run menu, or other trickery.&lt;br /&gt;
* The arguments attribute may be not present, or present with 1 or more arguments to the executable.&lt;br /&gt;
* The startdir attribute specifies the starting directory (Also known as the working directory) that the application should start in. This should be a relative path to a directory within the PND package, or to a well-known directory in the Pandora file system.&lt;br /&gt;
* The standalone attribute specifies whether or not this application can run on its own, or if it needs parameters to run. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can be run without parameters. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run with parameters (Meaning that no icon will appear for it in a launcher; it will only be run via file associations or via the terminal).&lt;br /&gt;
* The background attribute specifies whether or not this application should run in the background, and it should be possible to switch to other apps while it is running, or if it is the only application that should be running. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can run in the background. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run as the only application.&lt;br /&gt;
* The x11 attribute may be missing; values are one of &amp;quot;req&amp;quot;, &amp;quot;stop&amp;quot;, and &amp;quot;ignore&amp;quot;. If &amp;quot;req&amp;quot; is set, it means the application requires X11 (and possibly could be filtered out of users display in a menu if X is not running, or perhaps such a menu would have to start X.) If &amp;quot;stop&amp;quot; is set, it means X must be not running, or temporarily shut down, for the app. If &amp;quot;ignore&amp;quot; is set, the app doesn't care if X is running or not (such as an SDL app, or a sh-script, etc.)&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;myprogram&amp;quot; arguments=&amp;quot;arg1 arg2&amp;quot; x11=&amp;quot;option&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The icon element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The icon element should specify a nice icon for your program.&lt;br /&gt;
An icon element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The src attribute specifies the path to the image file used as the icon.&lt;br /&gt;
&lt;br /&gt;
NOTE: Current implementation will use the pnd-file's appended icon; for a PXML-app-directory, it will try to use the icon mentioned in the PXML. So for a pnd-file, all subapps will show the appended-icon, regardless of the &amp;lt;icon&amp;gt; tag within the PXML.xml&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;icon src=&amp;quot;images/icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The info element ===&lt;br /&gt;
====Description====&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;info&amp;quot; element allows the PXML.xml to suggest to the desktop environment or menu a file that may be shown to the user when they want to know more - be it an About, a Install Guide, a User Guide, or all of the above.&lt;br /&gt;
&lt;br /&gt;
The file can be a txt-file or an html-file, and as the PXML-app-dir or .pnd-application will be mounted, the file may in turn branch to other files should it wish to.&lt;br /&gt;
&lt;br /&gt;
Developers do not need to have this element, if their app is nice and simple and just runs. If the application requires additional set up (such as Quake requiring separate pak files that cannot be included in the pnd), or if you wish to include sample config files or config guidelines for something complex like DosBox, or include Pandora-specific notes.. those are all good things. But the developer is encouraged to be tasteful and not go hog-wild!&lt;br /&gt;
&lt;br /&gt;
* name → the name to be shown in the menu; should be obvious that it belongs to the pnd .. Quake's game pnd could have &amp;quot;Quake 1 Setup&amp;quot;.&lt;br /&gt;
* type → the mime type for the file; in the event the consuming application can map mimetypes to an appropriate executable, this would be a good way of letting the user's preferred reader come up. Should be one of &amp;quot;text/html&amp;quot; (for an html file) or &amp;quot;text/plain&amp;quot; (for a .txt file)&lt;br /&gt;
* src → '''required''' A file (including path relative to the pnd; ie: ./index.html would be the root of the pnd) in the pnd to open up; by default, the web browser will likely be used to open it.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;text/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The previewpics element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The previewpics element is an element that contains multiple other elements.&lt;br /&gt;
A previewpics element is optional.&lt;br /&gt;
&lt;br /&gt;
It contains multiple pic-elements. Every pic-element represents one preview picture. If the previewpics element is specified, it must contain at least one pic element.&lt;br /&gt;
&lt;br /&gt;
* The src attribute on a pic element specifies the path to the image file used as the preview picture.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;previewpics&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The author element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The author element is an element that is used by the author to introduce him/herself.&lt;br /&gt;
An author element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The name attribute specifies the name of the author.&lt;br /&gt;
* The website attribute specifies the website of the author.&lt;br /&gt;
* The email attribute specifies the e-mail of the author. This attribute is not yet supported by libpnd, but please specify it anyways.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The version element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The version element specifies the application version.&lt;br /&gt;
A version element is required. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The major attribute specifies the major version number. This number should be 0 or more.&lt;br /&gt;
* The minor attribute specifies the minor version number. This number should be 0 or more.&lt;br /&gt;
* The release attribute specifies the release number. This number should be 0 or more.&lt;br /&gt;
* The build attribute specifies what build the application is at. This number should be 0 or more.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The osversion element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The osversion element specifies the minimal OS version that supports the PND file. The PND file will not be loaded by an OS that has an older version than the one specified here.&lt;br /&gt;
An osversion element is optional. It accepts the same attributes as the version element.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The categories element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The categories element is an element that contains multiple other elements.&lt;br /&gt;
A categories element is required, and must contain at least one category.&lt;br /&gt;
&lt;br /&gt;
Menus that use your PXML in any shape or form will use the category information to sort your application entry into the tree or sub menus. Depending on the menu system, this will be done differently every time. It is therefore advisable to specify as many categories and subcategories as possible (and as suitable; don't specify that your application belongs in a category if it doesn't).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;categories&amp;quot; element contains multiple category-elements. Every category-element represents one category that this app can be sorted into. Valid top-level categories are (among others):&lt;br /&gt;
&lt;br /&gt;
# AudioVideo&lt;br /&gt;
# Audio&lt;br /&gt;
# Video&lt;br /&gt;
# Development&lt;br /&gt;
# Education&lt;br /&gt;
# Game&lt;br /&gt;
# Graphics&lt;br /&gt;
# Network&lt;br /&gt;
# Office&lt;br /&gt;
# Settings&lt;br /&gt;
# System&lt;br /&gt;
# Utility&lt;br /&gt;
&lt;br /&gt;
Please see [http://standards.freedesktop.org/menu-spec/latest/apa.html the FreeDesktop specification] for more information. In it, you will also find valid subcategories for your top-level categories.&lt;br /&gt;
&lt;br /&gt;
The category-element takes one attribute: The name-attribute. This attribute represents the category name, which preferrably should be one of the above.&lt;br /&gt;
&lt;br /&gt;
A category-element can contain further child-elements: subcategory-elements. These represent the subcategories of a category that the app will be sorted into.&lt;br /&gt;
&lt;br /&gt;
The subcategory-element also takes a name-attribute; this attibute can contain a name for your subcategory.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;categories&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app belongs in the &amp;quot;Game/StrategyGame&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app also belongs in the &amp;quot;Graphics/ImageProcessing&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/categories&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The associations element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The associations element is an element that contains multiple other elements.&lt;br /&gt;
An associations element is optional, except if exec.standalone is false.&lt;br /&gt;
&lt;br /&gt;
It contains multiple association-elements. Every association-element represents one file action association.&lt;br /&gt;
&lt;br /&gt;
* The name attribute on an association element specifies the user-friendly action name for the association.&lt;br /&gt;
* The filetype attribute on an association element specifies what file types (in MIME format) that this association should apply to.&lt;br /&gt;
* The exec attribute on an association element specifies the command-line arguments that should be given to the program, when this action is performed. The exec can contain a &amp;quot;%s&amp;quot;, which indicates where the file name of the file, that the action is performed on, should be inserted. For example, if the exec-line is &amp;quot;--file %s --type lol&amp;quot;, and you have a file &amp;quot;lol.bmp&amp;quot; that the action is performed on, the exec-line is transformed into &amp;quot;--file &amp;quot;lol.bmp&amp;quot; --type lol&amp;quot;&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;associations&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Deinterlaced Bitmap Image&amp;quot; filetype=&amp;quot;image/bmp&amp;quot; exec=&amp;quot;-f %s --no-deinterlacing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Style sheet system crasher&amp;quot; filetype=&amp;quot;text/css&amp;quot; exec=&amp;quot;-f %s --crash-on-success&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/associations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The clockspeed element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The clockspeed element specifies what clockspeed this app should run at. Please do only specify this element if your application *needs* to run at the specified clock speed.&lt;br /&gt;
A clockspeed element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The frequency attribute specifies the wanted frequency, in megahertz (MHz).&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The mkdir element ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The PXML may request creation of directories on the SD card.&lt;br /&gt;
&lt;br /&gt;
'''This should be used sparingly.'''&lt;br /&gt;
&lt;br /&gt;
There are a number of scenarios in which this may be useful; should an application wish to attempt to establish a canonicle location for a file, it can request a path be created. This can avoid user confusion -- user merely plugs in SD, waits a few moments, pulls out SD, and inspects it to see what directories he may populate. Consider 'id' files for Quake -- the user might have many ports of the game, such as Quake, or ioquake, or others. They could all share the same id pak files, but the user may not know where to put them. (Especially since the pnd-file itself does not have user documentation available perhaps.) Consider ROM-paths for emulators .. perhaps the emulator expects ROMs in a specific location? If so, the author may wish to have that location created, to make it obvious.&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
The paths are created on the SD that contains the pnd.&lt;br /&gt;
The paths may not include &amp;quot;..&amp;quot; or wildcards.&lt;br /&gt;
&lt;br /&gt;
It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* dir -&amp;gt; the name of the path to be created; it may not be multiple levels deep - to effect that, include multiple &amp;lt;dir path=&amp;quot;...&amp;quot;/&amp;gt; entries&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mkdir&amp;gt;&lt;br /&gt;
  &amp;lt;dir path=&amp;quot;/foo/bar&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/mkdir&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is in /pandora/desktop on SD1 (/media/mmcblk0p1 say), then /media/mmcblk0p1/foo/bar will be created.&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;application id=&amp;quot;youruniqueID&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;German Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;exec background=&amp;quot;true&amp;quot; command=&amp;quot;program&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;txt/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;icon src=&amp;quot;program.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;This is the English Description of the file.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;This would be the German description.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;previewpics&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;author name=&amp;quot;Some Dudeson&amp;quot; website=&amp;quot;http://a.bc.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;categories&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
    &amp;lt;/categories&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/application&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
To validate a PXML file, you need a XSD (XML schema) validator, and you have to know how to use it.&lt;br /&gt;
&lt;br /&gt;
You will also need to put the XML schema for the PXML format in the same folder as your PXML file. Note that the current PXML schema is horribly out of date.&lt;br /&gt;
&lt;br /&gt;
When you have done that, and know how to use it, you need to change a few things in your PXML file. In your PXML tag, change the contents from this...&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;PXML_schema.xsd&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the PXML file can be validated.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2242</id>
		<title>PXML specification</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2242"/>
		<updated>2010-03-19T15:21:30Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Attention:''' at the present time, the PXML file format isn't set in stone, and is therefore subject to change. There is no guarantee that the format or the schema are bug-free or will be changed at any time. Please wait until this standard is finished before writing a PXML file.&lt;br /&gt;
&lt;br /&gt;
This is the human-readable specification for the PXML file format. The PXML file format is used in your applications for the OpenPandora® that you package in &amp;quot;.pnd&amp;quot;-files or distribute otherwise, to make it possible for menus and launchers to use your applications and their properties.&lt;br /&gt;
&lt;br /&gt;
A PXML file should be appended to your &amp;quot;.pnd&amp;quot;-file, using the tools provided for that purpose, or put in a directory that you want to serve as a redistributable package, to make it possible for launchers and menus to find it. It should have the name &amp;quot;PXML.xml&amp;quot; not case sensitive, and there should only be one such file. The contents of the PXML file should also comply to this specification without exception, to guarantee that everyone will be able to read it.&lt;br /&gt;
&lt;br /&gt;
== XML compatibility ==&lt;br /&gt;
The PXML format is XML-based and fully XML-compliant, which means that it can be read and written by any XML reader or writer. Included with this specification should also be a &amp;quot;.xsd&amp;quot;-file, which is used by XML tools to validate PXML files. A &amp;quot;.xsd&amp;quot;-file is also known as a XML schema, and can be called the &amp;quot;computer-readable&amp;quot; version of this document. It is very good practice to validate your PXML-files with that schema before publishing them.&lt;br /&gt;
&lt;br /&gt;
To write a PXML file, you also need to know the basics of writing a XML file. It boils down to the following:&lt;br /&gt;
&lt;br /&gt;
# If an element contains text or other elements, it needs a start-tag and an end-tag. This looks like (1)&lt;br /&gt;
# If an element does not contain other elements or text, but only attributes, it looks like (2)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement someattribute=&amp;quot;something&amp;quot;&amp;gt;something inside it&amp;lt;/exampleelement&amp;gt; &amp;lt;!-- (1) --&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement2 someattribute=&amp;quot;something&amp;quot; /&amp;gt; &amp;lt;!-- (2) --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The PXML-file is split up into multiple so-called elements, each of which specify one property of the &amp;quot;.pnd&amp;quot;-package. All of these elements are surrounded with a &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag, which tells the readers of the file that the data within that tag belongs to a PXML file. The tag and elements should be defined as follows:&lt;br /&gt;
=== The PXML-tag ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The PXML-tag serves as the container for all PXML elements. It is the first thing that should occur in your PXML file. An example &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, the PXML tag accepts a few attributes, namely the &amp;quot;id&amp;quot; and &amp;quot;xmlns&amp;quot; attributes.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;xmlns&amp;quot; attribute is required by the XML standard, and guarantees that this file will be identified as a PXML file. You must include the xmlns attribute, exactly as shown, in your PXML file, with the URL as specified. Only then can it be guaranteed that the file will be read at all by launchers and menu apps.&lt;br /&gt;
* '''DEPRECATED; SEE &amp;quot;application&amp;quot; tag.''' The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
=== The Application-tag ===&lt;br /&gt;
====Description====&lt;br /&gt;
The Application-tag permits the PXML.xml container to have multiple applications within it; you should have at least one application tag-pair (for one app), though you may have many.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;application id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
A good unique-id is the application name, developer name, and some key you may wish to update on occasion (should state-data become incompatible between updates, say.)&lt;br /&gt;
&lt;br /&gt;
Consider:&lt;br /&gt;
battlejewels.skeezix.001&lt;br /&gt;
quake-1.pickle.001&lt;br /&gt;
&lt;br /&gt;
unique-id formatting: '''Should not include directory or filename invalid characters, such as ?, &amp;gt;, /, etc. Any of those will cause the pnd-file to not function.'''&lt;br /&gt;
&lt;br /&gt;
Note on Uniqueness: The unique-id should be unique against other pnd-files, but may be re-used by other 'application' tags within the pnd; for example, you may have multiple subapps that want to share the same appdata path (which is formed based on unique-id!), so use the same unique-id. You might then have a utility application in that same pnd, which needs its own appdata, and so gets its own unique-id.&lt;br /&gt;
&lt;br /&gt;
=== The title element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The title element specifies the text that is shown to the users of your PND file as the application title. This element can be specified multiple times in multiple languages (the language is indicated by the lang attribute).&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;title&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Your application name&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;Dein Programmname&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The description element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The description element specifies the text that is shown to the users of your PND file as the application description. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;description&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;Your long description of this application, describing its purpose and highlighting its features.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;Deine etwas längere Programmbeschreibung, die den Sinn des Programmes und seine wichtigsten Features beschreiben sollte.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The exec element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The exec element should specify all the information needed to execute your application.&lt;br /&gt;
An exec element must be included in every PXML file. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The command attribute specifies the path to the executable file. This should be a relative path to a file within the PND package. Must contain no arguments! One strategy you may need is to point to a sh-script in your pnd-file, which in turn sets up LD_LIBRARY_PATH, determines arguments to pass, uses zenity to pop up a pre-run menu, or other trickery.&lt;br /&gt;
* The arguments attribute may be not present, or present with 1 or more arguments to the executable.&lt;br /&gt;
* The startdir attribute specifies the starting directory (Also known as the working directory) that the application should start in. This should be a relative path to a directory within the PND package, or to a well-known directory in the Pandora file system.&lt;br /&gt;
* The standalone attribute specifies whether or not this application can run on its own, or if it needs parameters to run. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can be run without parameters. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run with parameters (Meaning that no icon will appear for it in a launcher; it will only be run via file associations or via the terminal).&lt;br /&gt;
* The background attribute specifies whether or not this application should run in the background, and it should be possible to switch to other apps while it is running, or if it is the only application that should be running. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can run in the background. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run as the only application.&lt;br /&gt;
* The x11 attribute may be missing; values are one of &amp;quot;req&amp;quot;, &amp;quot;stop&amp;quot;, and &amp;quot;ignore&amp;quot;. If &amp;quot;req&amp;quot; is set, it means the application requires X11 (and possibly could be filtered out of users display in a menu if X is not running, or perhaps such a menu would have to start X.) If &amp;quot;stop&amp;quot; is set, it means X must be not running, or temporarily shut down, for the app. If &amp;quot;ignore&amp;quot; is set, the app doesn't care if X is running or not (such as an SDL app, or a sh-script, etc.)&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;myprogram&amp;quot; arguments=&amp;quot;arg1 arg2&amp;quot; x11=&amp;quot;option&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The icon element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The icon element should specify a nice icon for your program.&lt;br /&gt;
An icon element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The src attribute specifies the path to the image file used as the icon.&lt;br /&gt;
&lt;br /&gt;
NOTE: Current implementation will use the pnd-file's appended icon; for a PXML-app-directory, it will try to use the icon mentioned in the PXML. So for a pnd-file, all subapps will show the appended-icon, regardless of the &amp;lt;icon&amp;gt; tag within the PXML.xml&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;icon src=&amp;quot;images/icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The info element ===&lt;br /&gt;
====Description====&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;info&amp;quot; element allows the PXML.xml to suggest to the desktop environment or menu a file that may be shown to the user when they want to know more - be it an About, a Install Guide, a User Guide, or all of the above.&lt;br /&gt;
&lt;br /&gt;
The file can be a txt-file or an html-file, and as the PXML-app-dir or .pnd-application will be mounted, the file may in turn branch to other files should it wish to.&lt;br /&gt;
&lt;br /&gt;
Developers do not need to have this element, if their app is nice and simple and just runs. If the application requires additional set up (such as Quake requiring separate pak files that cannot be included in the pnd), or if you wish to include sample config files or config guidelines for something complex like DosBox, or include Pandora-specific notes.. those are all good things. But the developer is encouraged to be tasteful and not go hog-wild!&lt;br /&gt;
&lt;br /&gt;
* name → the name to be shown in the menu; should be obvious that it belongs to the pnd .. Quake's game pnd could have &amp;quot;Quake 1 Setup&amp;quot;.&lt;br /&gt;
* type → the mime type for the file; in the event the consuming application can map mimetypes to an appropriate executable, this would be a good way of letting the user's preferred reader come up. Should be one of &amp;quot;text/html&amp;quot; (for an html file) or &amp;quot;text/plain&amp;quot; (for a .txt file)&lt;br /&gt;
* src → '''required''' A file (including path relative to the pnd; ie: ./index.html would be the root of the pnd) in the pnd to open up; by default, the web browser will likely be used to open it.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;text/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The previewpics element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The previewpics element is an element that contains multiple other elements.&lt;br /&gt;
A previewpics element is optional.&lt;br /&gt;
&lt;br /&gt;
It contains multiple pic-elements. Every pic-element represents one preview picture. If the previewpics element is specified, it must contain at least one pic element.&lt;br /&gt;
&lt;br /&gt;
* The src attribute on a pic element specifies the path to the image file used as the preview picture.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;previewpics&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The author element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The author element is an element that is used by the author to introduce him/herself.&lt;br /&gt;
An author element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The name attribute specifies the name of the author.&lt;br /&gt;
* The website attribute specifies the website of the author.&lt;br /&gt;
* The email attribute specifies the e-mail of the author. This attribute is not yet supported by libpnd, but please specify it anyways.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The version element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The version element specifies the application version.&lt;br /&gt;
A version element is required. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The major attribute specifies the major version number. This number should be 0 or more.&lt;br /&gt;
* The minor attribute specifies the minor version number. This number should be 0 or more.&lt;br /&gt;
* The release attribute specifies the release number. This number should be 0 or more.&lt;br /&gt;
* The build attribute specifies what build the application is at. This number should be 0 or more.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The osversion element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The osversion element specifies the minimal OS version that supports the PND file. The PND file will not be loaded by an OS that has an older version than the one specified here.&lt;br /&gt;
An osversion element is optional. It accepts the same attributes as the version element.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The categories element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The categories element is an element that contains multiple other elements.&lt;br /&gt;
A categories element is required, and must contain at least one category.&lt;br /&gt;
&lt;br /&gt;
Menus that use your PXML in any shape or form will use the category information to sort your application entry into the tree or sub menus. Depending on the menu system, this will be done differently every time. It is therefore advisable to specify as many categories and subcategories as possible (and as suitable; don't specify that your application belongs in a category if it doesn't).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;categories&amp;quot; element contains multiple category-elements. Every category-element represents one category that this app can be sorted into. Valid top-level categories are (among others):&lt;br /&gt;
&lt;br /&gt;
# AudioVideo&lt;br /&gt;
# Audio&lt;br /&gt;
# Video&lt;br /&gt;
# Development&lt;br /&gt;
# Education&lt;br /&gt;
# Game&lt;br /&gt;
# Graphics&lt;br /&gt;
# Network&lt;br /&gt;
# Office&lt;br /&gt;
# Settings&lt;br /&gt;
# System&lt;br /&gt;
# Utility&lt;br /&gt;
&lt;br /&gt;
Please see [http://standards.freedesktop.org/menu-spec/latest/apa.html the FreeDesktop specification] for more information. In it, you will also find valid subcategories for your top-level categories.&lt;br /&gt;
&lt;br /&gt;
The category-element takes one attribute: The name-attribute. This attribute represents the category name, which preferrably should be one of the above.&lt;br /&gt;
&lt;br /&gt;
A category-element can contain further child-elements: subcategory-elements. These represent the subcategories of a category that the app will be sorted into.&lt;br /&gt;
&lt;br /&gt;
The subcategory-element also takes a name-attribute; this attibute can contain a name for your subcategory.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;categories&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app belongs in the &amp;quot;Game/StrategyGame&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app also belongs in the &amp;quot;Graphics/ImageProcessing&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/categories&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The associations element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The associations element is an element that contains multiple other elements.&lt;br /&gt;
An associations element is optional, except if exec.standalone is false.&lt;br /&gt;
&lt;br /&gt;
It contains multiple association-elements. Every association-element represents one file action association.&lt;br /&gt;
&lt;br /&gt;
* The name attribute on an association element specifies the user-friendly action name for the association.&lt;br /&gt;
* The filetype attribute on an association element specifies what file types (in MIME format) that this association should apply to.&lt;br /&gt;
* The exec attribute on an association element specifies the command-line arguments that should be given to the program, when this action is performed. The exec can contain a &amp;quot;%s&amp;quot;, which indicates where the file name of the file, that the action is performed on, should be inserted. For example, if the exec-line is &amp;quot;--file %s --type lol&amp;quot;, and you have a file &amp;quot;lol.bmp&amp;quot; that the action is performed on, the exec-line is transformed into &amp;quot;--file &amp;quot;lol.bmp&amp;quot; --type lol&amp;quot;&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;associations&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Open Bitmap Image&amp;quot; filetype=&amp;quot;image/bmp&amp;quot; exec=&amp;quot;-f %s --no-deinterlacing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Crash the computer with a stylesheet&amp;quot; filetype=&amp;quot;text/css&amp;quot; exec=&amp;quot;-f %s --crash-on-success&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/associations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The clockspeed element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The clockspeed element specifies what clockspeed this app should run at. Please do only specify this element if your application *needs* to run at the specified clock speed.&lt;br /&gt;
A clockspeed element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The frequency attribute specifies the wanted frequency, in megahertz (MHz).&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The mkdir element ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The PXML may request creation of directories on the SD card.&lt;br /&gt;
&lt;br /&gt;
'''This should be used sparingly.'''&lt;br /&gt;
&lt;br /&gt;
There are a number of scenarios in which this may be useful; should an application wish to attempt to establish a canonicle location for a file, it can request a path be created. This can avoid user confusion -- user merely plugs in SD, waits a few moments, pulls out SD, and inspects it to see what directories he may populate. Consider 'id' files for Quake -- the user might have many ports of the game, such as Quake, or ioquake, or others. They could all share the same id pak files, but the user may not know where to put them. (Especially since the pnd-file itself does not have user documentation available perhaps.) Consider ROM-paths for emulators .. perhaps the emulator expects ROMs in a specific location? If so, the author may wish to have that location created, to make it obvious.&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
The paths are created on the SD that contains the pnd.&lt;br /&gt;
The paths may not include &amp;quot;..&amp;quot; or wildcards.&lt;br /&gt;
&lt;br /&gt;
It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* dir -&amp;gt; the name of the path to be created; it may not be multiple levels deep - to effect that, include multiple &amp;lt;dir path=&amp;quot;...&amp;quot;/&amp;gt; entries&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mkdir&amp;gt;&lt;br /&gt;
  &amp;lt;dir path=&amp;quot;/foo/bar&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/mkdir&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is in /pandora/desktop on SD1 (/media/mmcblk0p1 say), then /media/mmcblk0p1/foo/bar will be created.&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;application id=&amp;quot;youruniqueID&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;German Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;exec background=&amp;quot;true&amp;quot; command=&amp;quot;program&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;txt/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;icon src=&amp;quot;program.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;This is the English Description of the file.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;This would be the German description.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;previewpics&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;author name=&amp;quot;Some Dudeson&amp;quot; website=&amp;quot;http://a.bc.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;categories&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
    &amp;lt;/categories&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/application&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
To validate a PXML file, you need a XSD (XML schema) validator, and you have to know how to use it.&lt;br /&gt;
&lt;br /&gt;
You will also need to put the XML schema for the PXML format in the same folder as your PXML file. Note that the current PXML schema is horribly out of date.&lt;br /&gt;
&lt;br /&gt;
When you have done that, and know how to use it, you need to change a few things in your PXML file. In your PXML tag, change the contents from this...&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;PXML_schema.xsd&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the PXML file can be validated.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2241</id>
		<title>PXML specification</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2241"/>
		<updated>2010-03-19T15:15:53Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Attention:''' at the present time, the PXML file format isn't set in stone, and is therefore subject to change. There is no guarantee that the format or the schema are bug-free or will be changed at any time. Please wait until this standard is finished before writing a PXML file.&lt;br /&gt;
&lt;br /&gt;
This is the human-readable specification for the PXML file format. The PXML file format is used in your applications for the OpenPandora® that you package in &amp;quot;.pnd&amp;quot;-files or distribute otherwise, to make it possible for menus and launchers to use your applications and their properties.&lt;br /&gt;
&lt;br /&gt;
A PXML file should be appended to your &amp;quot;.pnd&amp;quot;-file, using the tools provided for that purpose, or put in a directory that you want to serve as a redistributable package, to make it possible for launchers and menus to find it. It should have the name &amp;quot;PXML.xml&amp;quot; not case sensitive, and there should only be one such file. The contents of the PXML file should also comply to this specification without exception, to guarantee that everyone will be able to read it.&lt;br /&gt;
&lt;br /&gt;
== XML compatibility ==&lt;br /&gt;
The PXML format is XML-based and fully XML-compliant, which means that it can be read and written by any XML reader or writer. Included with this specification should also be a &amp;quot;.xsd&amp;quot;-file, which is used by XML tools to validate PXML files. A &amp;quot;.xsd&amp;quot;-file is also known as a XML schema, and can be called the &amp;quot;computer-readable&amp;quot; version of this document. It is very good practice to validate your PXML-files with that schema before publishing them.&lt;br /&gt;
&lt;br /&gt;
To write a PXML file, you also need to know the basics of writing a XML file. It boils down to the following:&lt;br /&gt;
&lt;br /&gt;
# If an element contains text or other elements, it needs a start-tag and an end-tag. This looks like (1)&lt;br /&gt;
# If an element does not contain other elements or text, but only attributes, it looks like (2)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement someattribute=&amp;quot;something&amp;quot;&amp;gt;something inside it&amp;lt;/exampleelement&amp;gt; &amp;lt;!-- (1) --&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement2 someattribute=&amp;quot;something&amp;quot; /&amp;gt; &amp;lt;!-- (2) --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The PXML-file is split up into multiple so-called elements, each of which specify one property of the &amp;quot;.pnd&amp;quot;-package. All of these elements are surrounded with a &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag, which tells the readers of the file that the data within that tag belongs to a PXML file. The tag and elements should be defined as follows:&lt;br /&gt;
=== The PXML-tag ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The PXML-tag serves as the container for all PXML elements. It is the first thing that should occur in your PXML file. An example &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, the PXML tag accepts a few attributes, namely the &amp;quot;id&amp;quot; and &amp;quot;xmlns&amp;quot; attributes.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;xmlns&amp;quot; attribute is required by the XML standard, and guarantees that this file will be identified as a PXML file. You must include the xmlns attribute, exactly as shown, in your PXML file, with the URL as specified. Only then can it be guaranteed that the file will be read at all by launchers and menu apps.&lt;br /&gt;
* '''DEPRECATED; SEE &amp;quot;application&amp;quot; tag.''' The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
=== The Application-tag ===&lt;br /&gt;
====Description====&lt;br /&gt;
The Application-tag permits the PXML.xml container to have multiple applications within it; you should have at least one application tag-pair (for one app), though you may have many.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;application id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
A good unique-id is the application name, developer name, and some key you may wish to update on occasion (should state-data become incompatible between updates, say.)&lt;br /&gt;
&lt;br /&gt;
Consider:&lt;br /&gt;
battlejewels.skeezix.001&lt;br /&gt;
quake-1.pickle.001&lt;br /&gt;
&lt;br /&gt;
unique-id formatting: '''Should not include directory or filename invalid characters, such as ?, &amp;gt;, /, etc. Any of those will cause the pnd-file to not function.'''&lt;br /&gt;
&lt;br /&gt;
Note on Uniqueness: The unique-id should be unique against other pnd-files, but may be re-used by other 'application' tags within the pnd; for example, you may have multiple subapps that want to share the same appdata path (which is formed based on unique-id!), so use the same unique-id. You might then have a utility application in that same pnd, which needs its own appdata, and so gets its own unique-id.&lt;br /&gt;
&lt;br /&gt;
=== The title element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The title element specifies the text that is shown to the users of your PND file as the application title. This element can be specified multiple times in multiple languages (the language is indicated by the lang attribute).&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;title&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Your application name&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;Dein Programmname&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The description element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The description element specifies the text that is shown to the users of your PND file as the application description. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;description&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;Your long description of this application, describing its purpose and highlighting its features.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;Deine etwas längere Programmbeschreibung, die den Sinn des Programmes und seine wichtigsten Features beschreiben sollte.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The exec element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The exec element should specify all the information needed to execute your application.&lt;br /&gt;
An exec element must be included in every PXML file. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The command attribute specifies the path to the executable file. This should be a relative path to a file within the PND package. Must contain no arguments! One strategy you may need is to point to a sh-script in your pnd-file, which in turn sets up LD_LIBRARY_PATH, determines arguments to pass, uses zenity to pop up a pre-run menu, or other trickery.&lt;br /&gt;
* The arguments attribute may be not present, or present with 1 or more arguments to the executable.&lt;br /&gt;
* The startdir attribute specifies the starting directory (Also known as the working directory) that the application should start in. This should be a relative path to a directory within the PND package, or to a well-known directory in the Pandora file system.&lt;br /&gt;
* The standalone attribute specifies whether or not this application can run on its own, or if it needs parameters to run. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can be run without parameters. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run with parameters (Meaning that no icon will appear for it in a launcher; it will only be run via file associations or via the terminal).&lt;br /&gt;
* The background attribute specifies whether or not this application should run in the background, and it should be possible to switch to other apps while it is running, or if it is the only application that should be running. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can run in the background. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run as the only application.&lt;br /&gt;
* The x11 attribute may be missing; values are one of &amp;quot;req&amp;quot;, &amp;quot;stop&amp;quot;, and &amp;quot;ignore&amp;quot;. If &amp;quot;req&amp;quot; is set, it means the application requires X11 (and possibly could be filtered out of users display in a menu if X is not running, or perhaps such a menu would have to start X.) If &amp;quot;stop&amp;quot; is set, it means X must be not running, or temporarily shut down, for the app. If &amp;quot;ignore&amp;quot; is set, the app doesn't care if X is running or not (such as an SDL app, or a sh-script, etc.)&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;myprogram&amp;quot; arguments=&amp;quot;arg1 arg2&amp;quot; x11=&amp;quot;option&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The icon element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The icon element should specify a nice icon for your program.&lt;br /&gt;
An icon element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The src attribute specifies the path to the image file used as the icon.&lt;br /&gt;
&lt;br /&gt;
NOTE: Current implementation will use the pnd-file's appended icon; for a PXML-app-directory, it will try to use the icon mentioned in the PXML. So for a pnd-file, all subapps will show the appended-icon, regardless of the &amp;lt;icon&amp;gt; tag within the PXML.xml&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;icon src=&amp;quot;images/icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The info element ===&lt;br /&gt;
====Description====&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;info&amp;quot; element allows the PXML.xml to suggest to the desktop environment or menu a file that may be shown to the user when they want to know more - be it an About, a Install Guide, a User Guide, or all of the above.&lt;br /&gt;
&lt;br /&gt;
The file can be a txt-file or an html-file, and as the PXML-app-dir or .pnd-application will be mounted, the file may in turn branch to other files should it wish to.&lt;br /&gt;
&lt;br /&gt;
Developers do not need to have this element, if their app is nice and simple and just runs. If the application requires additional set up (such as Quake requiring separate pak files that cannot be included in the pnd), or if you wish to include sample config files or config guidelines for something complex like DosBox, or include Pandora-specific notes.. those are all good things. But the developer is encouraged to be tasteful and not go hog-wild!&lt;br /&gt;
&lt;br /&gt;
* name → the name to be shown in the menu; should be obvious that it belongs to the pnd .. Quake's game pnd could have &amp;quot;Quake 1 Setup&amp;quot;.&lt;br /&gt;
* type → the mime type for the file; in the event the consuming application can map mimetypes to an appropriate executable, this would be a good way of letting the user's preferred reader come up. Should be one of &amp;quot;text/html&amp;quot; (for an html file) or &amp;quot;text/plain&amp;quot; (for a .txt file)&lt;br /&gt;
* src → '''required''' A file (including path relative to the pnd; ie: ./index.html would be the root of the pnd) in the pnd to open up; by default, the web browser will likely be used to open it.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;text/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The previewpics element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The previewpics element is an element that contains multiple other elements.&lt;br /&gt;
A previewpics element is optional.&lt;br /&gt;
&lt;br /&gt;
It contains multiple pic-elements. Every pic-element represents one preview picture. If the previewpics element is specified, it must contain at least one pic element.&lt;br /&gt;
&lt;br /&gt;
* The src attribute on a pic element specifies the path to the image file used as the preview picture.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;previewpics&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The author element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The author element is an element that is used by the author to introduce him/herself.&lt;br /&gt;
An author element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The name attribute specifies the name of the author.&lt;br /&gt;
* The website attribute specifies the website of the author.&lt;br /&gt;
* The email attribute specifies the e-mail of the author. This attribute is not yet supported by libpnd, but please specify it anyways.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The version element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The version element specifies the application version.&lt;br /&gt;
A version element is required. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The major attribute specifies the major version number. This number should be 0 or more.&lt;br /&gt;
* The minor attribute specifies the minor version number. This number should be 0 or more.&lt;br /&gt;
* The release attribute specifies the release number. This number should be 0 or more.&lt;br /&gt;
* The build attribute specifies what build the application is at. This number should be 0 or more.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The osversion element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The osversion element specifies the application version.&lt;br /&gt;
An osversion element is optional. It accepts the same attributes as the version element.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The categories element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The categories element is an element that contains multiple other elements.&lt;br /&gt;
A categories element is required, and must contain at least one category.&lt;br /&gt;
&lt;br /&gt;
Menus that use your PXML in any shape or form will use the category information to sort your application entry into the tree or sub menus. Depending on the menu system, this will be done differently every time. It is therefore advisable to specify as many categories and subcategories as possible (and as suitable; don't specify that your application belongs in a category if it doesn't).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;categories&amp;quot; element contains multiple category-elements. Every category-element represents one category that this app can be sorted into. Valid top-level categories are (among others):&lt;br /&gt;
&lt;br /&gt;
# AudioVideo&lt;br /&gt;
# Audio&lt;br /&gt;
# Video&lt;br /&gt;
# Development&lt;br /&gt;
# Education&lt;br /&gt;
# Game&lt;br /&gt;
# Graphics&lt;br /&gt;
# Network&lt;br /&gt;
# Office&lt;br /&gt;
# Settings&lt;br /&gt;
# System&lt;br /&gt;
# Utility&lt;br /&gt;
&lt;br /&gt;
Please see [http://standards.freedesktop.org/menu-spec/latest/apa.html the FreeDesktop specification] for more information. In it, you will also find valid subcategories for your top-level categories.&lt;br /&gt;
&lt;br /&gt;
The category-element takes one attribute: The name-attribute. This attribute represents the category name, which preferrably should be one of the above.&lt;br /&gt;
&lt;br /&gt;
A category-element can contain further child-elements: subcategory-elements. These represent the subcategories of a category that the app will be sorted into.&lt;br /&gt;
&lt;br /&gt;
The subcategory-element also takes a name-attribute; this attibute can contain a name for your subcategory.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;categories&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app belongs in the &amp;quot;Game/StrategyGame&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app also belongs in the &amp;quot;Graphics/ImageProcessing&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/categories&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The associations element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The associations element is an element that contains multiple other elements.&lt;br /&gt;
An associations element is optional, except if exec.standalone is false.&lt;br /&gt;
&lt;br /&gt;
It contains multiple association-elements. Every association-element represents one file action association.&lt;br /&gt;
&lt;br /&gt;
* The name attribute on an association element specifies the user-friendly action name for the association.&lt;br /&gt;
* The filetype attribute on an association element specifies what file types (in MIME format) that this association should apply to.&lt;br /&gt;
* The exec attribute on an association element specifies the command-line arguments that should be given to the program, when this action is performed. The exec can contain a &amp;quot;%s&amp;quot;, which indicates where the file name of the file, that the action is performed on, should be inserted. For example, if the exec-line is &amp;quot;--file %s --type lol&amp;quot;, and you have a file &amp;quot;lol.bmp&amp;quot; that the action is performed on, the exec-line is transformed into &amp;quot;--file &amp;quot;lol.bmp&amp;quot; --type lol&amp;quot;&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;associations&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Open Bitmap Image&amp;quot; filetype=&amp;quot;image/bmp&amp;quot; exec=&amp;quot;-f %s --no-deinterlacing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Crash the computer with a stylesheet&amp;quot; filetype=&amp;quot;text/css&amp;quot; exec=&amp;quot;-f %s --crash-on-success&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/associations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The clockspeed element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The clockspeed element specifies what clockspeed this app should run at. Please do only specify this element if your application *needs* to run at the specified clock speed.&lt;br /&gt;
A clockspeed element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The frequency attribute specifies the wanted frequency, in megahertz (MHz).&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The mkdir element ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The PXML may request creation of directories on the SD card.&lt;br /&gt;
&lt;br /&gt;
'''This should be used sparingly.'''&lt;br /&gt;
&lt;br /&gt;
There are a number of scenarios in which this may be useful; should an application wish to attempt to establish a canonicle location for a file, it can request a path be created. This can avoid user confusion -- user merely plugs in SD, waits a few moments, pulls out SD, and inspects it to see what directories he may populate. Consider 'id' files for Quake -- the user might have many ports of the game, such as Quake, or ioquake, or others. They could all share the same id pak files, but the user may not know where to put them. (Especially since the pnd-file itself does not have user documentation available perhaps.) Consider ROM-paths for emulators .. perhaps the emulator expects ROMs in a specific location? If so, the author may wish to have that location created, to make it obvious.&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
The paths are created on the SD that contains the pnd.&lt;br /&gt;
The paths may not include &amp;quot;..&amp;quot; or wildcards.&lt;br /&gt;
&lt;br /&gt;
It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* dir -&amp;gt; the name of the path to be created; it may not be multiple levels deep - to effect that, include multiple &amp;lt;dir path=&amp;quot;...&amp;quot;/&amp;gt; entries&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mkdir&amp;gt;&lt;br /&gt;
  &amp;lt;dir path=&amp;quot;/foo/bar&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/mkdir&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is in /pandora/desktop on SD1 (/media/mmcblk0p1 say), then /media/mmcblk0p1/foo/bar will be created.&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;application id=&amp;quot;youruniqueID&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;German Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;exec background=&amp;quot;true&amp;quot; command=&amp;quot;program&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;txt/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;icon src=&amp;quot;program.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;This is the English Description of the file.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;This would be the German description.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;previewpics&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;author name=&amp;quot;Some Dudeson&amp;quot; website=&amp;quot;http://a.bc.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;categories&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
    &amp;lt;/categories&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/application&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
To validate a PXML file, you need a XSD (XML schema) validator, and you have to know how to use it.&lt;br /&gt;
&lt;br /&gt;
You will also need to put the XML schema for the PXML format in the same folder as your PXML file. Note that the current PXML schema is horribly out of date.&lt;br /&gt;
&lt;br /&gt;
When you have done that, and know how to use it, you need to change a few things in your PXML file. In your PXML tag, change the contents from this...&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;PXML_schema.xsd&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the PXML file can be validated.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2226</id>
		<title>PXML specification</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2226"/>
		<updated>2010-03-11T16:17:17Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Attention:''' at the present time, the PXML file format isn't set in stone, and is therefore subject to change. There is no guarantee that the format or the schema are bug-free or will be changed at any time. Please wait until this standard is finished before writing a PXML file.&lt;br /&gt;
&lt;br /&gt;
This is the human-readable specification for the PXML file format. The PXML file format is used in your applications for the OpenPandora® that you package in &amp;quot;.pnd&amp;quot;-files or distribute otherwise, to make it possible for menus and launchers to use your applications and their properties.&lt;br /&gt;
&lt;br /&gt;
A PXML file should be appended to your &amp;quot;.pnd&amp;quot;-file, using the tools provided for that purpose, or put in a directory that you want to serve as a redistributable package, to make it possible for launchers and menus to find it. It should have the name &amp;quot;PXML.xml&amp;quot; not case sensitive, and there should only be one such file. The contents of the PXML file should also comply to this specification without exception, to guarantee that everyone will be able to read it.&lt;br /&gt;
&lt;br /&gt;
== XML compatibility ==&lt;br /&gt;
The PXML format is XML-based and fully XML-compliant, which means that it can be read and written by any XML reader or writer. Included with this specification should also be a &amp;quot;.xsd&amp;quot;-file, which is used by XML tools to validate PXML files. A &amp;quot;.xsd&amp;quot;-file is also known as a XML schema, and can be called the &amp;quot;computer-readable&amp;quot; version of this document. It is very good practice to validate your PXML-files with that schema before publishing them.&lt;br /&gt;
&lt;br /&gt;
To write a PXML file, you also need to know the basics of writing a XML file. It boils down to the following:&lt;br /&gt;
&lt;br /&gt;
# If an element contains text or other elements, it needs a start-tag and an end-tag. This looks like (1)&lt;br /&gt;
# If an element does not contain other elements or text, but only attributes, it looks like (2)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement someattribute=&amp;quot;something&amp;quot;&amp;gt;something inside it&amp;lt;/exampleelement&amp;gt; &amp;lt;!-- (1) --&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement2 someattribute=&amp;quot;something&amp;quot; /&amp;gt; &amp;lt;!-- (2) --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The PXML-file is split up into multiple so-called elements, each of which specify one property of the &amp;quot;.pnd&amp;quot;-package. All of these elements are surrounded with a &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag, which tells the readers of the file that the data within that tag belongs to a PXML file. The tag and elements should be defined as follows:&lt;br /&gt;
=== The PXML-tag ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The PXML-tag serves as the container for all PXML elements. It is the first thing that should occur in your PXML file. An example &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, the PXML tag accepts a few attributes, namely the &amp;quot;id&amp;quot; and &amp;quot;xmlns&amp;quot; attributes.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;xmlns&amp;quot; attribute is required by the XML standard, and guarantees that this file will be identified as a PXML file. You must include the xmlns attribute, exactly as shown, in your PXML file, with the URL as specified. Only then can it be guaranteed that the file will be read at all by launchers and menu apps.&lt;br /&gt;
* '''DEPRECATED; SEE &amp;quot;application&amp;quot; tag.''' The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
=== The Application-tag ===&lt;br /&gt;
====Description====&lt;br /&gt;
The Application-tag permits the PXML.xml container to have multiple applications within it; you should have at least one application tag-pair (for one app), though you may have many.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;application id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
A good unique-id is the application name, developer name, and some key you may wish to update on occasion (should state-data become incompatible between updates, say.)&lt;br /&gt;
&lt;br /&gt;
Consider:&lt;br /&gt;
battlejewels.skeezix.001&lt;br /&gt;
quake-1.pickle.001&lt;br /&gt;
&lt;br /&gt;
unique-id formatting: '''Should not include directory or filename invalid characters, such as ?, &amp;gt;, /, etc. Any of those will cause the pnd-file to not function.'''&lt;br /&gt;
&lt;br /&gt;
Note on Uniqueness: The unique-id should be unique against other pnd-files, but may be re-used by other 'application' tags within the pnd; for example, you may have multiple subapps that want to share the same appdata path (which is formed based on unique-id!), so use the same unique-id. You might then have a utility application in that same pnd, which needs its own appdata, and so gets its own unique-id.&lt;br /&gt;
&lt;br /&gt;
=== The title element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The title element specifies the text that is shown to the users of your PND file as the application title. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;title&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Your application name&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;Dein Programmname&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The description element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The description element specifies the text that is shown to the users of your PND file as the application description. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;description&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;Your long description of this application, describing its purpose and highlighting its features.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;Deine etwas längere Programmbeschreibung, die den Sinn des Programmes und seine wichtigsten Features beschreiben sollte.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The exec element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The exec element should specify all the information needed to execute your application.&lt;br /&gt;
An exec element must be included in every PXML file. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The command attribute specifies the path to the executable file. This should be a relative path to a file within the PND package. Must contain no arguments! One strategy you may need is to point to a sh-script in your pnd-file, which in turn sets up LD_LIBRARY_PATH, determines arguments to pass, uses zenity to pop up a pre-run menu, or other trickery.&lt;br /&gt;
* The arguments attribute may be not present, or present with 1 or more arguments to the executable.&lt;br /&gt;
* The startdir attribute specifies the starting directory (Also known as the working directory) that the application should start in. This should be a relative path to a directory within the PND package, or to a well-known directory in the Pandora file system.&lt;br /&gt;
* The standalone attribute specifies whether or not this application can run on its own, or if it needs parameters to run. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can be run without parameters. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run with parameters (Meaning that no icon will appear for it in a launcher; it will only be run via file associations or via the terminal).&lt;br /&gt;
* The background attribute specifies whether or not this application should run in the background, and it should be possible to switch to other apps while it is running, or if it is the only application that should be running. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can run in the background. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run as the only application.&lt;br /&gt;
* The x11 attribute may be missing; values are one of &amp;quot;req&amp;quot;, &amp;quot;stop&amp;quot;, and &amp;quot;ignore&amp;quot;. If &amp;quot;req&amp;quot; is set, it means the application requires X11 (and possibly could be filtered out of users display in a menu if X is not running, or perhaps such a menu would have to start X.) If &amp;quot;stop&amp;quot; is set, it means X must be not running, or temporarily shut down, for the app. If &amp;quot;ignore&amp;quot; is set, the app doesn't care if X is running or not (such as an SDL app, or a sh-script, etc.)&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;myprogram&amp;quot; arguments=&amp;quot;arg1 arg2&amp;quot; x11=&amp;quot;option&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The icon element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The icon element should specify a nice icon for your program.&lt;br /&gt;
An icon element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The src attribute specifies the path to the image file used as the icon.&lt;br /&gt;
&lt;br /&gt;
NOTE: Current implementation will use the pnd-file's appended icon; for a PXML-app-directory, it will try to use the icon mentioned in the PXML. So for a pnd-file, all subapps will show the appended-icon, regardless of the &amp;lt;icon&amp;gt; tag within the PXML.xml&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;icon src=&amp;quot;images/icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The info element ===&lt;br /&gt;
====Description====&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;info&amp;quot; element allows the PXML.xml to suggest to the desktop environment or menu a file that may be shown to the user when they want to know more - be it an About, a Install Guide, a User Guide, or all of the above.&lt;br /&gt;
&lt;br /&gt;
The file can be a txt-file or an html-file, and as the PXML-app-dir or .pnd-application will be mounted, the file may in turn branch to other files should it wish to.&lt;br /&gt;
&lt;br /&gt;
Developers do not need to have this element, if their app is nice and simple and just runs. If the application requires additional set up (such as Quake requiring separate pak files that cannot be included in the pnd), or if you wish to include sample config files or config guidelines for something complex like DosBox, or include Pandora-specific notes.. those are all good things. But the developer is encouraged to be tasteful and not go hog-wild!&lt;br /&gt;
&lt;br /&gt;
* name → the name to be shown in the menu; should be obvious that it belongs to the pnd .. Quake's game pnd could have &amp;quot;Quake 1 Setup&amp;quot;.&lt;br /&gt;
* type → the mime type for the file; in the event the consuming application can map mimetypes to an appropriate executable, this would be a good way of letting the user's preferred reader come up.&lt;br /&gt;
* src → '''required''' A file (including path relative to the pnd; ie: ./index.html would be the root of the pnd) in the pnd to open up; by default, the web browser will likely be used to open it.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;text/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The previewpics element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The previewpics element is an element that contains multiple other elements.&lt;br /&gt;
A previewpics element is optional.&lt;br /&gt;
&lt;br /&gt;
It contains multiple pic-elements. Every pic-element represents one preview picture. If the previewpics element is specified, it must contain at least one pic element.&lt;br /&gt;
&lt;br /&gt;
* The src attribute on a pic element specifies the path to the image file used as the preview picture.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;previewpics&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The author element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The author element is an element that is used by the author to introduce him/herself.&lt;br /&gt;
An author element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The name attribute specifies the name of the author.&lt;br /&gt;
* The website attribute specifies the website of the author.&lt;br /&gt;
* The email attribute specifies the e-mail of the author. This attribute is not yet supported by libpnd, but please specify it anyways.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The version element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The version element specifies the application version.&lt;br /&gt;
A version element is required. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The major attribute specifies the major version number. This number should be 0 or more.&lt;br /&gt;
* The minor attribute specifies the minor version number. This number should be 0 or more.&lt;br /&gt;
* The release attribute specifies the release number. This number should be 0 or more.&lt;br /&gt;
* The build attribute specifies what build the application is at. This number should be 0 or more.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The osversion element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The osversion element specifies the application version.&lt;br /&gt;
An osversion element is optional. It accepts the same attributes as the version element.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The categories element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The categories element is an element that contains multiple other elements.&lt;br /&gt;
A categories element is required, and must contain at least one category.&lt;br /&gt;
&lt;br /&gt;
Menus that use your PXML in any shape or form will use the category information to sort your application entry into the tree or sub menus. Depending on the menu system, this will be done differently every time. It is therefore advisable to specify as many categories and subcategories as possible (and as suitable; don't specify that your application belongs in a category if it doesn't).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;categories&amp;quot; element contains multiple category-elements. Every category-element represents one category that this app can be sorted into. Valid top-level categories are (among others):&lt;br /&gt;
&lt;br /&gt;
# AudioVideo&lt;br /&gt;
# Audio&lt;br /&gt;
# Video&lt;br /&gt;
# Development&lt;br /&gt;
# Education&lt;br /&gt;
# Game&lt;br /&gt;
# Graphics&lt;br /&gt;
# Network&lt;br /&gt;
# Office&lt;br /&gt;
# Settings&lt;br /&gt;
# System&lt;br /&gt;
# Utility&lt;br /&gt;
&lt;br /&gt;
Please see [http://standards.freedesktop.org/menu-spec/latest/apa.html the FreeDesktop specification] for more information. In it, you will also find valid subcategories for your top-level categories.&lt;br /&gt;
&lt;br /&gt;
The category-element takes one attribute: The name-attribute. This attribute represents the category name, which preferrably should be one of the above.&lt;br /&gt;
&lt;br /&gt;
A category-element can contain further child-elements: subcategory-elements. These represent the subcategories of a category that the app will be sorted into.&lt;br /&gt;
&lt;br /&gt;
The subcategory-element also takes a name-attribute; this attibute can contain a name for your subcategory.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;categories&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app belongs in the &amp;quot;Game/StrategyGame&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app also belongs in the &amp;quot;Graphics/ImageProcessing&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/categories&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The associations element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The associations element is an element that contains multiple other elements.&lt;br /&gt;
An associations element is optional, except if exec.standalone is false.&lt;br /&gt;
&lt;br /&gt;
It contains multiple association-elements. Every association-element represents one file action association.&lt;br /&gt;
&lt;br /&gt;
* The name attribute on an association element specifies the user-friendly action name for the association.&lt;br /&gt;
* The filetype attribute on an association element specifies what file types (in MIME format) that this association should apply to.&lt;br /&gt;
* The exec attribute on an association element specifies the command-line arguments that should be given to the program, when this action is performed. The exec can contain a &amp;quot;%s&amp;quot;, which indicates where the file name of the file, that the action is performed on, should be inserted. For example, if the exec-line is &amp;quot;--file %s --type lol&amp;quot;, and you have a file &amp;quot;lol.bmp&amp;quot; that the action is performed on, the exec-line is transformed into &amp;quot;--file &amp;quot;lol.bmp&amp;quot; --type lol&amp;quot;&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;associations&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Open Bitmap Image&amp;quot; filetype=&amp;quot;image/bmp&amp;quot; exec=&amp;quot;-f %s --no-deinterlacing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Crash the computer with a stylesheet&amp;quot; filetype=&amp;quot;text/css&amp;quot; exec=&amp;quot;-f %s --crash-on-success&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/associations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The clockspeed element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The clockspeed element specifies what clockspeed this app should run at. Please do only specify this element if your application *needs* to run at the specified clock speed.&lt;br /&gt;
A clockspeed element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The frequency attribute specifies the wanted frequency, in megahertz (MHz).&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The mkdir element ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The PXML may request creation of directories on the SD card.&lt;br /&gt;
&lt;br /&gt;
'''This should be used sparingly.'''&lt;br /&gt;
&lt;br /&gt;
There are a number of scenarios in which this may be useful; should an application wish to attempt to establish a canonicle location for a file, it can request a path be created. This can avoid user confusion -- user merely plugs in SD, waits a few moments, pulls out SD, and inspects it to see what directories he may populate. Consider 'id' files for Quake -- the user might have many ports of the game, such as Quake, or ioquake, or others. They could all share the same id pak files, but the user may not know where to put them. (Especially since the pnd-file itself does not have user documentation available perhaps.) Consider ROM-paths for emulators .. perhaps the emulator expects ROMs in a specific location? If so, the author may wish to have that location created, to make it obvious.&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
The paths are created on the SD that contains the pnd.&lt;br /&gt;
The paths may not include &amp;quot;..&amp;quot; or wildcards.&lt;br /&gt;
&lt;br /&gt;
It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* dir -&amp;gt; the name of the path to be created; it may not be multiple levels deep - to effect that, include multiple &amp;lt;dir path=&amp;quot;...&amp;quot;/&amp;gt; entries&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mkdir&amp;gt;&lt;br /&gt;
  &amp;lt;dir path=&amp;quot;/foo/bar&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/mkdir&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is in /pandora/desktop on SD1 (/media/mmcblk0p1 say), then /media/mmcblk0p1/foo/bar will be created.&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;application id=&amp;quot;youruniqueID&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;German Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;exec background=&amp;quot;true&amp;quot; command=&amp;quot;program&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;txt/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;icon src=&amp;quot;program.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;This is the English Description of the file.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;This would be the German description.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;previewpics&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;author name=&amp;quot;Some Dudeson&amp;quot; website=&amp;quot;http://a.bc.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;categories&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
    &amp;lt;/categories&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/application&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
To validate a PXML file, you need a XSD (XML schema) validator, and you have to know how to use it.&lt;br /&gt;
&lt;br /&gt;
You will also need to put the XML schema for the PXML format in the same folder as your PXML file. Note that the current PXML schema is horribly out of date.&lt;br /&gt;
&lt;br /&gt;
When you have done that, and know how to use it, you need to change a few things in your PXML file. In your PXML tag, change the contents from this...&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;PXML_schema.xsd&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the PXML file can be validated.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2225</id>
		<title>PXML specification</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2225"/>
		<updated>2010-03-11T16:16:46Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Attention:''' at the present time, the PXML file format isn't set in stone, and is therefore subject to change. There is no guarantee that the format or the schema are bug-free or will be changed at any time. Please wait until this standard is finished before writing a PXML file.&lt;br /&gt;
&lt;br /&gt;
This is the human-readable specification for the PXML file format. The PXML file format is used in your applications for the OpenPandora® that you package in &amp;quot;.pnd&amp;quot;-files or distribute otherwise, to make it possible for menus and launchers to use your applications and their properties.&lt;br /&gt;
&lt;br /&gt;
A PXML file should be appended to your &amp;quot;.pnd&amp;quot;-file, using the tools provided for that purpose, or put in a directory that you want to serve as a redistributable package, to make it possible for launchers and menus to find it. It should have the name &amp;quot;PXML.xml&amp;quot; not case sensitive, and there should only be one such file. The contents of the PXML file should also comply to this specification without exception, to guarantee that everyone will be able to read it.&lt;br /&gt;
&lt;br /&gt;
== XML compatibility ==&lt;br /&gt;
The PXML format is XML-based and fully XML-compliant, which means that it can be read and written by any XML reader or writer. Included with this specification should also be a &amp;quot;.xsd&amp;quot;-file, which is used by XML tools to validate PXML files. A &amp;quot;.xsd&amp;quot;-file is also known as a XML schema, and can be called the &amp;quot;computer-readable&amp;quot; version of this document. It is very good practice to validate your PXML-files with that schema before publishing them.&lt;br /&gt;
&lt;br /&gt;
To write a PXML file, you also need to know the basics of writing a XML file. It boils down to the following:&lt;br /&gt;
&lt;br /&gt;
# If an element contains text or other elements, it needs a start-tag and an end-tag. This looks like (1)&lt;br /&gt;
# If an element does not contain other elements or text, but only attributes, it looks like (2)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement someattribute=&amp;quot;something&amp;quot;&amp;gt;something inside it&amp;lt;/exampleelement&amp;gt; &amp;lt;!-- (1) --&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement2 someattribute=&amp;quot;something&amp;quot; /&amp;gt; &amp;lt;!-- (2) --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The PXML-file is split up into multiple so-called elements, each of which specify one property of the &amp;quot;.pnd&amp;quot;-package. All of these elements are surrounded with a &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag, which tells the readers of the file that the data within that tag belongs to a PXML file. The tag and elements should be defined as follows:&lt;br /&gt;
=== The PXML-tag ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The PXML-tag serves as the container for all PXML elements. It is the first thing that should occur in your PXML file. An example &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, the PXML tag accepts a few attributes, namely the &amp;quot;id&amp;quot; and &amp;quot;xmlns&amp;quot; attributes.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;xmlns&amp;quot; attribute is required by the XML standard, and guarantees that this file will be identified as a PXML file. You must include the xmlns attribute, exactly as shown, in your PXML file, with the URL as specified. Only then can it be guaranteed that the file will be read at all by launchers and menu apps.&lt;br /&gt;
* '''DEPRECATED; SEE &amp;quot;application&amp;quot; tag.''' The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
=== The Application-tag ===&lt;br /&gt;
====Description====&lt;br /&gt;
The Application-tag permits the PXML.xml container to have multiple applications within it; you should have at least one application tag-pair (for one app), though you may have many.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;application id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
A good unique-id is the application name, developer name, and some key you may wish to update on occasion (should state-data become incompatible between updates, say.)&lt;br /&gt;
&lt;br /&gt;
Consider:&lt;br /&gt;
battlejewels.skeezix.001&lt;br /&gt;
quake-1.pickle.001&lt;br /&gt;
&lt;br /&gt;
unique-id formatting: '''Should not include directory or filename invalid characters, such as ?, &amp;gt;, /, etc. Any of those will cause the pnd-file to not function.'''&lt;br /&gt;
&lt;br /&gt;
Note on Uniqueness: The unique-id should be unique against other pnd-files, but may be re-used by other 'application' tags within the pnd; for example, you may have multiple subapps that want to share the same appdata path (which is formed based on unique-id!), so use the same unique-id. You might then have a utility application in that same pnd, which needs its own appdata, and so gets its own unique-id.&lt;br /&gt;
&lt;br /&gt;
=== The title element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The title element specifies the text that is shown to the users of your PND file as the application title. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;title&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Your application name&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;Dein Programmname&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The description element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The description element specifies the text that is shown to the users of your PND file as the application description. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;description&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;Your long description of this application, describing its purpose and highlighting its features.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;Deine etwas längere Programmbeschreibung, die den Sinn des Programmes und seine wichtigsten Features beschreiben sollte.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The exec element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The exec element should specify all the information needed to execute your application.&lt;br /&gt;
An exec element must be included in every PXML file. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The command attribute specifies the path to the executable file. This should be a relative path to a file within the PND package. Must contain no arguments! One strategy you may need is to point to a sh-script in your pnd-file, which in turn sets up LD_LIBRARY_PATH, determines arguments to pass, uses zenity to pop up a pre-run menu, or other trickery.&lt;br /&gt;
* The arguments attribute may be not present, or present with 1 or more arguments to the executable.&lt;br /&gt;
* The startdir attribute specifies the starting directory (Also known as the working directory) that the application should start in. This should be a relative path to a directory within the PND package, or to a well-known directory in the Pandora file system.&lt;br /&gt;
* The standalone attribute specifies whether or not this application can run on its own, or if it needs parameters to run. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can be run without parameters. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run with parameters (Meaning that no icon will appear for it in a launcher; it will only be run via file associations or via the terminal).&lt;br /&gt;
* The background attribute specifies whether or not this application should run in the background, and it should be possible to switch to other apps while it is running, or if it is the only application that should be running. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can run in the background. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run as the only application.&lt;br /&gt;
* The x11 attribute may be missing; values are one of &amp;quot;req&amp;quot;, &amp;quot;stop&amp;quot;, and &amp;quot;ignore&amp;quot;. If &amp;quot;req&amp;quot; is set, it means the application requires X11 (and possibly could be filtered out of users display in a menu if X is not running, or perhaps such a menu would have to start X.) If &amp;quot;stop&amp;quot; is set, it means X must be not running, or temporarily shut down, for the app. If &amp;quot;ignore&amp;quot; is set, the app doesn't care if X is running or not (such as an SDL app, or a sh-script, etc.)&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;myprogram&amp;quot; arguments=&amp;quot;arg1 arg2&amp;quot; x11=&amp;quot;option&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The icon element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The icon element should specify a nice icon for your program.&lt;br /&gt;
An icon element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The src attribute specifies the path to the image file used as the icon.&lt;br /&gt;
&lt;br /&gt;
NOTE: Current implementation will use the pnd-file's appended icon; for a PXML-app-directory, it will try to use the icon mentioned in the PXML. So for a pnd-file, all subapps will show the appended-icon, regardless of the &amp;lt;icon&amp;gt; tag within the PXML.xml&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;icon src=&amp;quot;images/icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The info element ===&lt;br /&gt;
====Description====&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;info&amp;quot; element allows the PXML.xml to suggest to the desktop environment or menu a file that may be shown to the user when they want to know more - be it an About, a Install Guide, a User Guide, or all of the above.&lt;br /&gt;
&lt;br /&gt;
The file can be a txt-file or an html-file, and as the PXML-app-dir or .pnd-application will be mounted, the file may in turn branch to other files should it wish to.&lt;br /&gt;
&lt;br /&gt;
Developers do not need to have this element, if their app is nice and simple and just runs. If the application requires additional set up (such as Quake requiring separate pak files that cannot be included in the pnd), or if you wish to include sample config files or config guidelines for something complex like DosBox, or include Pandora-specific notes.. those are all good things. But the developer is encouraged to be tasteful and not go hog-wild!&lt;br /&gt;
&lt;br /&gt;
* name -&amp;gt; the name to be shown in the menu; should be obvious that it belongs to the pnd .. Quake's game pnd could have &amp;quot;Quake 1 Setup&amp;quot;.&lt;br /&gt;
* type -&amp;gt; the mime type for the file; in the event the consuming application can map mimetypes to an appropriate executable, this would be a good way of letting the user's preferred reader come up.&lt;br /&gt;
* src -&amp;gt; '''required''' A file (including path relative to the pnd; ie: ./index.html would be the root of the pnd) in the pnd to open up; by default, the web browser will likely be used to open it.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;text/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The previewpics element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The previewpics element is an element that contains multiple other elements.&lt;br /&gt;
A previewpics element is optional.&lt;br /&gt;
&lt;br /&gt;
It contains multiple pic-elements. Every pic-element represents one preview picture. If the previewpics element is specified, it must contain at least one pic element.&lt;br /&gt;
&lt;br /&gt;
* The src attribute on a pic element specifies the path to the image file used as the preview picture.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;previewpics&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The author element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The author element is an element that is used by the author to introduce him/herself.&lt;br /&gt;
An author element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The name attribute specifies the name of the author.&lt;br /&gt;
* The website attribute specifies the website of the author.&lt;br /&gt;
* The email attribute specifies the e-mail of the author. This attribute is not yet supported by libpnd, but please specify it anyways.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The version element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The version element specifies the application version.&lt;br /&gt;
A version element is required. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The major attribute specifies the major version number. This number should be 0 or more.&lt;br /&gt;
* The minor attribute specifies the minor version number. This number should be 0 or more.&lt;br /&gt;
* The release attribute specifies the release number. This number should be 0 or more.&lt;br /&gt;
* The build attribute specifies what build the application is at. This number should be 0 or more.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The osversion element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The osversion element specifies the application version.&lt;br /&gt;
An osversion element is optional. It accepts the same attributes as the version element.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The categories element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The categories element is an element that contains multiple other elements.&lt;br /&gt;
A categories element is required, and must contain at least one category.&lt;br /&gt;
&lt;br /&gt;
Menus that use your PXML in any shape or form will use the category information to sort your application entry into the tree or sub menus. Depending on the menu system, this will be done differently every time. It is therefore advisable to specify as many categories and subcategories as possible (and as suitable; don't specify that your application belongs in a category if it doesn't).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;categories&amp;quot; element contains multiple category-elements. Every category-element represents one category that this app can be sorted into. Valid top-level categories are (among others):&lt;br /&gt;
&lt;br /&gt;
# AudioVideo&lt;br /&gt;
# Audio&lt;br /&gt;
# Video&lt;br /&gt;
# Development&lt;br /&gt;
# Education&lt;br /&gt;
# Game&lt;br /&gt;
# Graphics&lt;br /&gt;
# Network&lt;br /&gt;
# Office&lt;br /&gt;
# Settings&lt;br /&gt;
# System&lt;br /&gt;
# Utility&lt;br /&gt;
&lt;br /&gt;
Please see [http://standards.freedesktop.org/menu-spec/latest/apa.html the FreeDesktop specification] for more information. In it, you will also find valid subcategories for your top-level categories.&lt;br /&gt;
&lt;br /&gt;
The category-element takes one attribute: The name-attribute. This attribute represents the category name, which preferrably should be one of the above.&lt;br /&gt;
&lt;br /&gt;
A category-element can contain further child-elements: subcategory-elements. These represent the subcategories of a category that the app will be sorted into.&lt;br /&gt;
&lt;br /&gt;
The subcategory-element also takes a name-attribute; this attibute can contain a name for your subcategory.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;categories&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app belongs in the &amp;quot;Game/StrategyGame&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app also belongs in the &amp;quot;Graphics/ImageProcessing&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/categories&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The associations element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The associations element is an element that contains multiple other elements.&lt;br /&gt;
An associations element is optional, except if exec.standalone is false.&lt;br /&gt;
&lt;br /&gt;
It contains multiple association-elements. Every association-element represents one file action association.&lt;br /&gt;
&lt;br /&gt;
* The name attribute on an association element specifies the user-friendly action name for the association.&lt;br /&gt;
* The filetype attribute on an association element specifies what file types (in MIME format) that this association should apply to.&lt;br /&gt;
* The exec attribute on an association element specifies the command-line arguments that should be given to the program, when this action is performed. The exec can contain a &amp;quot;%s&amp;quot;, which indicates where the file name of the file, that the action is performed on, should be inserted. For example, if the exec-line is &amp;quot;--file %s --type lol&amp;quot;, and you have a file &amp;quot;lol.bmp&amp;quot; that the action is performed on, the exec-line is transformed into &amp;quot;--file &amp;quot;lol.bmp&amp;quot; --type lol&amp;quot;&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;associations&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Open Bitmap Image&amp;quot; filetype=&amp;quot;image/bmp&amp;quot; exec=&amp;quot;-f %s --no-deinterlacing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Crash the computer with a stylesheet&amp;quot; filetype=&amp;quot;text/css&amp;quot; exec=&amp;quot;-f %s --crash-on-success&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/associations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The clockspeed element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The clockspeed element specifies what clockspeed this app should run at. Please do only specify this element if your application *needs* to run at the specified clock speed.&lt;br /&gt;
A clockspeed element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The frequency attribute specifies the wanted frequency, in megahertz (MHz).&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The mkdir element ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The PXML may request creation of directories on the SD card.&lt;br /&gt;
&lt;br /&gt;
'''This should be used sparingly.'''&lt;br /&gt;
&lt;br /&gt;
There are a number of scenarios in which this may be useful; should an application wish to attempt to establish a canonicle location for a file, it can request a path be created. This can avoid user confusion -- user merely plugs in SD, waits a few moments, pulls out SD, and inspects it to see what directories he may populate. Consider 'id' files for Quake -- the user might have many ports of the game, such as Quake, or ioquake, or others. They could all share the same id pak files, but the user may not know where to put them. (Especially since the pnd-file itself does not have user documentation available perhaps.) Consider ROM-paths for emulators .. perhaps the emulator expects ROMs in a specific location? If so, the author may wish to have that location created, to make it obvious.&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
The paths are created on the SD that contains the pnd.&lt;br /&gt;
The paths may not include &amp;quot;..&amp;quot; or wildcards.&lt;br /&gt;
&lt;br /&gt;
It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* dir -&amp;gt; the name of the path to be created; it may not be multiple levels deep - to effect that, include multiple &amp;lt;dir path=&amp;quot;...&amp;quot;/&amp;gt; entries&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mkdir&amp;gt;&lt;br /&gt;
  &amp;lt;dir path=&amp;quot;/foo/bar&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/mkdir&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is in /pandora/desktop on SD1 (/media/mmcblk0p1 say), then /media/mmcblk0p1/foo/bar will be created.&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;application id=&amp;quot;youruniqueID&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;German Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;exec background=&amp;quot;true&amp;quot; command=&amp;quot;program&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;txt/html&amp;quot; src=&amp;quot;index.html&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;icon src=&amp;quot;program.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;This is the English Description of the file.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;This would be the German description.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;previewpics&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;author name=&amp;quot;Some Dudeson&amp;quot; website=&amp;quot;http://a.bc.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;categories&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
    &amp;lt;/categories&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/application&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
To validate a PXML file, you need a XSD (XML schema) validator, and you have to know how to use it.&lt;br /&gt;
&lt;br /&gt;
You will also need to put the XML schema for the PXML format in the same folder as your PXML file. Note that the current PXML schema is horribly out of date.&lt;br /&gt;
&lt;br /&gt;
When you have done that, and know how to use it, you need to change a few things in your PXML file. In your PXML tag, change the contents from this...&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;PXML_schema.xsd&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the PXML file can be validated.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2222</id>
		<title>PXML specification</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2222"/>
		<updated>2010-03-11T15:28:13Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Validation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Attention:''' at the present time, the PXML file format isn't set in stone, and is therefore subject to change. There is no guarantee that the format or the schema are bug-free or will be changed at any time. Please wait until this standard is finished before writing a PXML file.&lt;br /&gt;
&lt;br /&gt;
This is the human-readable specification for the PXML file format. The PXML file format is used in your applications for the OpenPandora® that you package in &amp;quot;.pnd&amp;quot;-files or distribute otherwise, to make it possible for menus and launchers to use your applications and their properties.&lt;br /&gt;
&lt;br /&gt;
A PXML file should be appended to your &amp;quot;.pnd&amp;quot;-file, using the tools provided for that purpose, or put in a directory that you want to serve as a redistributable package, to make it possible for launchers and menus to find it. It should have the name &amp;quot;PXML.xml&amp;quot; not case sensitive, and there should only be one such file. The contents of the PXML file should also comply to this specification without exception, to guarantee that everyone will be able to read it.&lt;br /&gt;
&lt;br /&gt;
== XML compatibility ==&lt;br /&gt;
The PXML format is XML-based and fully XML-compliant, which means that it can be read and written by any XML reader or writer. Included with this specification should also be a &amp;quot;.xsd&amp;quot;-file, which is used by XML tools to validate PXML files. A &amp;quot;.xsd&amp;quot;-file is also known as a XML schema, and can be called the &amp;quot;computer-readable&amp;quot; version of this document. It is very good practice to validate your PXML-files with that schema before publishing them.&lt;br /&gt;
&lt;br /&gt;
To write a PXML file, you also need to know the basics of writing a XML file. It boils down to the following:&lt;br /&gt;
&lt;br /&gt;
# If an element contains text or other elements, it needs a start-tag and an end-tag. This looks like (1)&lt;br /&gt;
# If an element does not contain other elements or text, but only attributes, it looks like (2)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement someattribute=&amp;quot;something&amp;quot;&amp;gt;something inside it&amp;lt;/exampleelement&amp;gt; &amp;lt;!-- (1) --&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement2 someattribute=&amp;quot;something&amp;quot; /&amp;gt; &amp;lt;!-- (2) --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The PXML-file is split up into multiple so-called elements, each of which specify one property of the &amp;quot;.pnd&amp;quot;-package. All of these elements are surrounded with a &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag, which tells the readers of the file that the data within that tag belongs to a PXML file. The tag and elements should be defined as follows:&lt;br /&gt;
=== The PXML-tag ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The PXML-tag serves as the container for all PXML elements. It is the first thing that should occur in your PXML file. An example &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, the PXML tag accepts a few attributes, namely the &amp;quot;id&amp;quot; and &amp;quot;xmlns&amp;quot; attributes.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;xmlns&amp;quot; attribute is required by the XML standard, and guarantees that this file will be identified as a PXML file. You must include the xmlns attribute, exactly as shown, in your PXML file, with the URL as specified. Only then can it be guaranteed that the file will be read at all by launchers and menu apps.&lt;br /&gt;
* '''DEPRECATED; SEE &amp;quot;application&amp;quot; tag.''' The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
=== The Application-tag ===&lt;br /&gt;
====Description====&lt;br /&gt;
The Application-tag permits the PXML.xml container to have multiple applications within it; you should have at least one application tag-pair (for one app), though you may have many.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;application id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
A good unique-id is the application name, developer name, and some key you may wish to update on occasion (should state-data become incompatible between updates, say.)&lt;br /&gt;
&lt;br /&gt;
Consider:&lt;br /&gt;
battlejewels.skeezix.001&lt;br /&gt;
quake-1.pickle.001&lt;br /&gt;
&lt;br /&gt;
unique-id formatting: '''Should not include directory or filename invalid characters, such as ?, &amp;gt;, /, etc. Any of those will cause the pnd-file to not function.'''&lt;br /&gt;
&lt;br /&gt;
Note on Uniqueness: The unique-id should be unique against other pnd-files, but may be re-used by other 'application' tags within the pnd; for example, you may have multiple subapps that want to share the same appdata path (which is formed based on unique-id!), so use the same unique-id. You might then have a utility application in that same pnd, which needs its own appdata, and so gets its own unique-id.&lt;br /&gt;
&lt;br /&gt;
=== The title element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The title element specifies the text that is shown to the users of your PND file as the application title. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;title&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Your application name&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;Dein Programmname&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The description element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The description element specifies the text that is shown to the users of your PND file as the application description. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;description&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;Your long description of this application, describing its purpose and highlighting its features.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;Deine etwas längere Programmbeschreibung, die den Sinn des Programmes und seine wichtigsten Features beschreiben sollte.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The exec element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The exec element should specify all the information needed to execute your application.&lt;br /&gt;
An exec element must be included in every PXML file. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The command attribute specifies the path to the executable file. This should be a relative path to a file within the PND package. Must contain no arguments! One strategy you may need is to point to a sh-script in your pnd-file, which in turn sets up LD_LIBRARY_PATH, determines arguments to pass, uses zenity to pop up a pre-run menu, or other trickery.&lt;br /&gt;
* The arguments attribute may be not present, or present with 1 or more arguments to the executable.&lt;br /&gt;
* The startdir attribute specifies the starting directory (Also known as the working directory) that the application should start in. This should be a relative path to a directory within the PND package, or to a well-known directory in the Pandora file system.&lt;br /&gt;
* The standalone attribute specifies whether or not this application can run on its own, or if it needs parameters to run. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can be run without parameters. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run with parameters (Meaning that no icon will appear for it in a launcher; it will only be run via file associations or via the terminal).&lt;br /&gt;
* The background attribute specifies whether or not this application should run in the background, and it should be possible to switch to other apps while it is running, or if it is the only application that should be running. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can run in the background. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run as the only application.&lt;br /&gt;
* The x11 attribute may be missing; values are one of &amp;quot;req&amp;quot;, &amp;quot;stop&amp;quot;, and &amp;quot;ignore&amp;quot;. If &amp;quot;req&amp;quot; is set, it means the application requires X11 (and possibly could be filtered out of users display in a menu if X is not running, or perhaps such a menu would have to start X.) If &amp;quot;stop&amp;quot; is set, it means X must be not running, or temporarily shut down, for the app. If &amp;quot;ignore&amp;quot; is set, the app doesn't care if X is running or not (such as an SDL app, or a sh-script, etc.)&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;myprogram&amp;quot; arguments=&amp;quot;arg1 arg2&amp;quot; x11=&amp;quot;option&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The icon element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The icon element should specify a nice icon for your program.&lt;br /&gt;
An icon element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The src attribute specifies the path to the image file used as the icon.&lt;br /&gt;
&lt;br /&gt;
NOTE: Current implementation will use the pnd-file's appended icon; for a PXML-app-directory, it will try to use the icon mentioned in the PXML. So for a pnd-file, all subapps will show the appended-icon, regardless of the &amp;lt;icon&amp;gt; tag within the PXML.xml&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;icon src=&amp;quot;images/icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The info element ===&lt;br /&gt;
====Description====&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;info&amp;quot; element allows the PXML.xml to suggest to the desktop environment or menu a file that may be shown to the user when they want to know more - be it an About, a Install Guide, a User Guide, or all of the above.&lt;br /&gt;
&lt;br /&gt;
The file can be a txt-file or an html-file, and as the PXML-app-dir or .pnd-application will be mounted, the file may in turn branch to other files should it wish to.&lt;br /&gt;
&lt;br /&gt;
Developers do not need to have this element, if their app is nice and simple and just runs. If the application requires additional set up (such as Quake requiring separate pak files that cannot be included in the pnd), or if you wish to include sample config files or config guidelines for something complex like DosBox, or include Pandora-specific notes.. those are all good things. But the developer is encouraged to be tasteful and not go hog-wild!&lt;br /&gt;
&lt;br /&gt;
* name -&amp;gt; the name to be shown in the menu; should be obvious that it belongs to the pnd .. Quake's game pnd could have &amp;quot;Quake 1 Setup&amp;quot;.&lt;br /&gt;
* type -&amp;gt; the mime type for the file; in the event the consuming application can map mimetypes to an appropriate executable, this would be a good way of letting the user's preferred reader come up.&lt;br /&gt;
* src -&amp;gt; '''required''' A file (including path relative to the pnd; ie: ./index.html would be the root of the pnd) in the pnd to open up; by default, the web browser will likely be used to open it.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;txt/html&amp;quot; src=&amp;quot;index.html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The previewpics element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The previewpics element is an element that contains multiple other elements.&lt;br /&gt;
A previewpics element is optional.&lt;br /&gt;
&lt;br /&gt;
It contains multiple pic-elements. Every pic-element represents one preview picture. If the previewpics element is specified, it must contain at least one pic element.&lt;br /&gt;
&lt;br /&gt;
* The src attribute on a pic element specifies the path to the image file used as the preview picture.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;previewpics&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The author element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The author element is an element that is used by the author to introduce him/herself.&lt;br /&gt;
An author element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The name attribute specifies the name of the author.&lt;br /&gt;
* The website attribute specifies the website of the author.&lt;br /&gt;
* The email attribute specifies the e-mail of the author. This attribute is not yet supported by libpnd, but please specify it anyways.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The version element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The version element specifies the application version.&lt;br /&gt;
A version element is required. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The major attribute specifies the major version number. This number should be 0 or more.&lt;br /&gt;
* The minor attribute specifies the minor version number. This number should be 0 or more.&lt;br /&gt;
* The release attribute specifies the release number. This number should be 0 or more.&lt;br /&gt;
* The build attribute specifies what build the application is at. This number should be 0 or more.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The osversion element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The osversion element specifies the application version.&lt;br /&gt;
An osversion element is optional. It accepts the same attributes as the version element.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The categories element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The categories element is an element that contains multiple other elements.&lt;br /&gt;
A categories element is required, and must contain at least one category.&lt;br /&gt;
&lt;br /&gt;
Menus that use your PXML in any shape or form will use the category information to sort your application entry into the tree or sub menus. Depending on the menu system, this will be done differently every time. It is therefore advisable to specify as many categories and subcategories as possible (and as suitable; don't specify that your application belongs in a category if it doesn't).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;categories&amp;quot; element contains multiple category-elements. Every category-element represents one category that this app can be sorted into. Valid top-level categories are (among others):&lt;br /&gt;
&lt;br /&gt;
# AudioVideo&lt;br /&gt;
# Audio&lt;br /&gt;
# Video&lt;br /&gt;
# Development&lt;br /&gt;
# Education&lt;br /&gt;
# Game&lt;br /&gt;
# Graphics&lt;br /&gt;
# Network&lt;br /&gt;
# Office&lt;br /&gt;
# Settings&lt;br /&gt;
# System&lt;br /&gt;
# Utility&lt;br /&gt;
&lt;br /&gt;
Please see [http://standards.freedesktop.org/menu-spec/latest/apa.html the FreeDesktop specification] for more information. In it, you will also find valid subcategories for your top-level categories.&lt;br /&gt;
&lt;br /&gt;
The category-element takes one attribute: The name-attribute. This attribute represents the category name, which preferrably should be one of the above.&lt;br /&gt;
&lt;br /&gt;
A category-element can contain further child-elements: subcategory-elements. These represent the subcategories of a category that the app will be sorted into.&lt;br /&gt;
&lt;br /&gt;
The subcategory-element also takes a name-attribute; this attibute can contain a name for your subcategory.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;categories&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app belongs in the &amp;quot;Game/StrategyGame&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app also belongs in the &amp;quot;Graphics/ImageProcessing&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/categories&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The associations element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The associations element is an element that contains multiple other elements.&lt;br /&gt;
An associations element is optional, except if exec.standalone is false.&lt;br /&gt;
&lt;br /&gt;
It contains multiple association-elements. Every association-element represents one file action association.&lt;br /&gt;
&lt;br /&gt;
* The name attribute on an association element specifies the user-friendly action name for the association.&lt;br /&gt;
* The filetype attribute on an association element specifies what file types (in MIME format) that this association should apply to.&lt;br /&gt;
* The exec attribute on an association element specifies the command-line arguments that should be given to the program, when this action is performed. The exec can contain a &amp;quot;%s&amp;quot;, which indicates where the file name of the file, that the action is performed on, should be inserted. For example, if the exec-line is &amp;quot;--file %s --type lol&amp;quot;, and you have a file &amp;quot;lol.bmp&amp;quot; that the action is performed on, the exec-line is transformed into &amp;quot;--file &amp;quot;lol.bmp&amp;quot; --type lol&amp;quot;&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;associations&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Open Bitmap Image&amp;quot; filetype=&amp;quot;image/bmp&amp;quot; exec=&amp;quot;-f %s --no-deinterlacing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Crash the computer with a stylesheet&amp;quot; filetype=&amp;quot;text/css&amp;quot; exec=&amp;quot;-f %s --crash-on-success&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/associations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The clockspeed element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The clockspeed element specifies what clockspeed this app should run at. Please do only specify this element if your application *needs* to run at the specified clock speed.&lt;br /&gt;
A clockspeed element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The frequency attribute specifies the wanted frequency, in megahertz (MHz).&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The mkdir element ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The PXML may request creation of directories on the SD card.&lt;br /&gt;
&lt;br /&gt;
'''This should be used sparingly.'''&lt;br /&gt;
&lt;br /&gt;
There are a number of scenarios in which this may be useful; should an application wish to attempt to establish a canonicle location for a file, it can request a path be created. This can avoid user confusion -- user merely plugs in SD, waits a few moments, pulls out SD, and inspects it to see what directories he may populate. Consider 'id' files for Quake -- the user might have many ports of the game, such as Quake, or ioquake, or others. They could all share the same id pak files, but the user may not know where to put them. (Especially since the pnd-file itself does not have user documentation available perhaps.) Consider ROM-paths for emulators .. perhaps the emulator expects ROMs in a specific location? If so, the author may wish to have that location created, to make it obvious.&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
The paths are created on the SD that contains the pnd.&lt;br /&gt;
The paths may not include &amp;quot;..&amp;quot; or wildcards.&lt;br /&gt;
&lt;br /&gt;
It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* dir -&amp;gt; the name of the path to be created; it may not be multiple levels deep - to effect that, include multiple &amp;lt;dir path=&amp;quot;...&amp;quot;/&amp;gt; entries&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mkdir&amp;gt;&lt;br /&gt;
  &amp;lt;dir path=&amp;quot;/foo/bar&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/mkdir&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is in /pandora/desktop on SD1 (/media/mmcblk0p1 say), then /media/mmcblk0p1/foo/bar will be created.&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;application id=&amp;quot;youruniqueID&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;German Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;exec background=&amp;quot;true&amp;quot; command=&amp;quot;program&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;info name=&amp;quot;AwesomeGame Setup&amp;quot; type=&amp;quot;txt/html&amp;quot; src=&amp;quot;index.html&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;icon src=&amp;quot;program.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;This is the English Description of the file.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;This would be the German description.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;previewpics&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;author name=&amp;quot;Some Dudeson&amp;quot; website=&amp;quot;http://a.bc.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;categories&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
      &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/category&amp;gt;&lt;br /&gt;
    &amp;lt;/categories&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   &amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/application&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
To validate a PXML file, you need a XSD (XML schema) validator, and you have to know how to use it.&lt;br /&gt;
&lt;br /&gt;
You will also need to put the XML schema for the PXML format in the same folder as your PXML file. Note that the current PXML schema is horribly out of date.&lt;br /&gt;
&lt;br /&gt;
When you have done that, and know how to use it, you need to change a few things in your PXML file. In your PXML tag, change the contents from this...&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;PXML_schema.xsd&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the PXML file can be validated.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2196</id>
		<title>New PND format</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2196"/>
		<updated>2010-03-05T23:56:14Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current PND format has some shortcomings as listed below. This page should serve as a discussion page/white board for how the format could be improved.&lt;br /&gt;
&lt;br /&gt;
''' Proposal for discussion, this is just some opening shots '''&lt;br /&gt;
&lt;br /&gt;
== Current situation ==&lt;br /&gt;
The current (ISO-based) PND format has the following shortcomings:&lt;br /&gt;
&lt;br /&gt;
* It currently uses ISO, CramFS, and other filesystems... This means that there's no standard to follow, and libpnd needs to carry around support for a multitude of file systems.&lt;br /&gt;
* It (often, but not always) uses the [http://en.wikipedia.org/wiki/ISO_9660 ISO file system] which is inefficient at storing data, because:&lt;br /&gt;
** It contains duplicate headers for each file entry[http://users.telenet.be/it3.consultants.bvba/handouts/ISO9960.html] (one version with big-endian integers, one version with little-endian integers[http://en.wikipedia.org/wiki/Endianness]) which leads to many kilobytes of wasted space.&lt;br /&gt;
** Its file tables are fixed-size, and there are therefore limitations on how many folders you can have, what names you can give your files, how big your files can be etc. For instance, files can only have names that are max 31 characters long, all upper-case, and limited to the ASCII character encoding, and an ISO does only support a folder depth of 8[http://www.on-time.com/rtos-32-docs/rtfiles-32/programming-manual/iso-9660/]. To support more, the Joliet file system extension is needed (or isofs won't recognize all file paths), and the Joliet header can be placed practically anywhere in the file, which means additional seek times.&lt;br /&gt;
** It needs various file system extensions to behave correctly, like for example [http://en.wikipedia.org/wiki/Rock_Ridge Rock Ridge Interchange Protocol] and [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet]. Without them, it becomes pretty useless as demonstrated above, and with them, it becomes difficult to read by a tool (You can only use isofs! There are no other tools out there for programmers to use!).&lt;br /&gt;
** It's very difficult to use since you need special ISO making tools to create the image. ISO is a relatively rare format if you're not technically inclined.&lt;br /&gt;
** If you want to add or remove files from it, it's near impossible if you use a compact ISO file, since there's no way that you can &amp;quot;expand&amp;quot; an existing ISO file.&lt;br /&gt;
* The PND header data is at the end (or in the middle of the file if a screenshot is included) which makes it impossible for e.g. libmagic to recognize the PND file. It will instead recognize it as an ISO file. Having the header data at the end also makes it take a very long time to find the data, making tools and the libpnd library very inefficient.&lt;br /&gt;
* The PND file uses a custom XML format for its metadata. There's no reason to do this, especially since the established &amp;quot;.desktop&amp;quot; file format fills exactly the same function.&lt;br /&gt;
(note: &amp;quot;.desktop&amp;quot; does not contain all metadata we have wanted over time, but it's of course possible to add extensions à la &amp;quot;X-Pandora-Whatever=xyz&amp;quot;)&lt;br /&gt;
* There's no &amp;quot;index&amp;quot; for the PND file. The whole file has to be scanned (albeit backwards) to find a PXML file, and there's a big chance for false positives etc.&lt;br /&gt;
* Data is just appended linearly to the file so there's no order. If the format is to be extended (to e.g. include an icon file after the screenshot file), should the data just be appended as well?&lt;br /&gt;
* UTF-8 is strictly the only encoding that is supported. If you make your PXML on a Windows machine, it won't work.&lt;br /&gt;
&lt;br /&gt;
== Proposed revisions ==&lt;br /&gt;
=== Step 1: File system ===&lt;br /&gt;
The file system for PNDs should be replaced by the ''uncompressed'' ZIP archive format. ZIP has the advantage that it's incredibly compact, and uncompressed ZIP makes it possible to read data from the file without having to do any decompression.&lt;br /&gt;
&lt;br /&gt;
ZIP files are mountable using various implementations of zipfs, and most of these implementations won't store files in memory when they are being read if the ZIP file is uncompressed.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Metadata ===&lt;br /&gt;
PND files should no longer require special tools for them to be created. Therefore, since ZIP files support random access on files, it shouldn't be necessary to append/prepend metadata to the file. The user simply includes the &amp;quot;PXML.xml&amp;quot; and &amp;quot;preview.png&amp;quot; files inside of the ZIP, and any tools that need information about the PND can simply go to the central directory of the ZIP file (or use a simple ZIP library to do it for them) and get the location of the file inside of the ZIP. This should also dramatically decrease loading times for PNDs.&lt;br /&gt;
&lt;br /&gt;
Note; performance testing is needed; at the time we started, zip was enormously slower than plain ISO; with driver changes, it may or may not be so, hence our adopted multiple-filesystem-type system. zipfs is one possible option.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Metadata format ===&lt;br /&gt;
Current PND files include so-called &amp;quot;PXML.xml&amp;quot; files. These files have a custom XML format that has a strange structure.&lt;br /&gt;
&lt;br /&gt;
These files should be replaced by &amp;quot;.desktop&amp;quot; files. A PND can contain one or more &amp;quot;.desktop&amp;quot; files in its root directory that specify how an application should be launched. PND tools simply use all &amp;quot;.desktop&amp;quot; files they can find in the PND when creating launchers for the contents of the PND.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
* There don't have to be ''any'' special tools for reading PND files. The package can be run on any platform using any programming language that can read ZIP files.&lt;br /&gt;
* We can use existing facilities to manage the launching of applications. The &amp;quot;.desktop&amp;quot; files can basically be copied without modification into standard locations of the system, and all launchers will become aware of them.&lt;br /&gt;
* Reading PND files becomes easier (because of better tool support... sorry, but you can't link to libpnd in all programming languages) and quicker (becuase of the central directory for random file access).&lt;br /&gt;
&lt;br /&gt;
=== Benchmarks ===&lt;br /&gt;
A benchmark was carried through to measure the performance of various package implementations.&lt;br /&gt;
The compared systems were:&lt;br /&gt;
* ZIP-based uncompressed packages using fuse-zip (a zipfs implementation) to read the files&lt;br /&gt;
* ZIP-based compressed packages also using fuse-zip.&lt;br /&gt;
* ISO8859-based packages using isofs&lt;br /&gt;
* CramFS-based packages.&lt;br /&gt;
&lt;br /&gt;
A total of 9 files were generated for the test. They have sizes 1, 2, 3, 4, 16, 32, 64, 128 and 256 MB, and were generated via &amp;quot;dd if=/dev/urandom of=$file bs=1M count=$size&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Because the files contain random data, they did not compress very well. The resulting files were:&lt;br /&gt;
* &amp;quot;zipcompressed.zip&amp;quot; 511.1 MB&lt;br /&gt;
* &amp;quot;zipuncompressed.zip&amp;quot; 511.0 MB&lt;br /&gt;
* &amp;quot;iso.iso&amp;quot; 511.3 MB&lt;br /&gt;
* &amp;quot;cramfs.image&amp;quot; 95.4 MB (WOW!)&lt;br /&gt;
&lt;br /&gt;
Some notes:&lt;br /&gt;
* No write tests were done for obvious reasons&lt;br /&gt;
* No random access tests were done since the Pandora will use SD cards and thus not get penalized from random access, and that's not what we're interested in anyways.&lt;br /&gt;
* Before each test, the commands &amp;quot;sync; echo 3 &amp;gt; /proc/sys/vm/drop_caches&amp;quot; were run.&lt;br /&gt;
&lt;br /&gt;
==== First test: linear read time ====&lt;br /&gt;
Command: &amp;quot;time cat mountpoint/* &amp;gt; /dev/null&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* ISO: 8.119 seconds&lt;br /&gt;
* CramFS: 1.488 seconds (WOW!)&lt;br /&gt;
* Zip (compressed): 8.535 seconds&lt;br /&gt;
* Zip (uncompressed): 8.290 seconds&lt;br /&gt;
&lt;br /&gt;
==== Second test: RAM usage ====&lt;br /&gt;
-- TODO, have to find a good method of measuring this --&lt;br /&gt;
&lt;br /&gt;
== Remaining issues ==&lt;br /&gt;
* How should libpnd tell the difference between old and new PND files? Should it depend on the &amp;quot;file&amp;quot; tool, should it run its own recognition algorithm, or what? Should the extension be changed to e.g. &amp;quot;.box&amp;quot; (Which was proposed in a thread)?&lt;br /&gt;
* How to make sure that the ZIP files are uncompressed? Should we provide a script that &amp;quot;uncompresses&amp;quot; an ordinary ZIP file?&lt;br /&gt;
* Is cramfs better than ZIP?&lt;br /&gt;
** cramfs cannot be uncompressed like ZIP can&lt;br /&gt;
** If you compare compressed ZIP and cramfs, cramfs is more efficient.&lt;br /&gt;
** cramfs is harder to use than ZIP (for the developer).&lt;br /&gt;
** cramfs ''needs'' to have all of its opened files in memory.&lt;br /&gt;
&lt;br /&gt;
== Upgrade path from the old PND format ==&lt;br /&gt;
A simple script can be written that extracts the old PND file, including the screenshot and the PXML.xml file. The PXML.xml file is then converted to one or many .desktop files, and the desktop files, the preview.png file, and the package contents are compacted into a ZIP that then is renamed to &amp;quot;*.pnd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Usage scenario ==&lt;br /&gt;
=== Repackaging of an application from another package format ===&lt;br /&gt;
* The user grabs the package for the application&lt;br /&gt;
* He dumps the executable and all required libraries into a folder&lt;br /&gt;
* He dumps a &amp;quot;screenshot.png&amp;quot; file into the folder that he's made&lt;br /&gt;
* He copies the &amp;quot;.desktop&amp;quot; file(s) for the application from the old package, opens them, replaces &amp;quot;Exec=/usr/bin/bla&amp;quot; with &amp;quot;Exec=./bla&amp;quot; and saves them in the directory&lt;br /&gt;
* He uses a ZIP archiver to make a ZIP out of the folder, making sure that he sets the &amp;quot;uncompressed&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== Creating PNDs as part of a build process ===&lt;br /&gt;
* The build tool creates a directory with all of the necessary information like above and invokes the &amp;quot;zip&amp;quot; utility to compress the folder.&lt;br /&gt;
&lt;br /&gt;
=== Accessing a PND's contents for the... ===&lt;br /&gt;
&lt;br /&gt;
==== ...lazy programmer ====&lt;br /&gt;
* The programmer extracts the PND into a folder via libzip and accesses its contents.&lt;br /&gt;
&lt;br /&gt;
==== ...pragmatic programmer ====&lt;br /&gt;
* The programmer uses zipfs to mount the ZIP and accesses the file's contents.&lt;br /&gt;
&lt;br /&gt;
==== ...smart performance-aware programmer ====&lt;br /&gt;
* The programmer fseek()'s the ZIP file until he finds 0x04034b50.&lt;br /&gt;
* He jumps 18 bytes forward and reads the int at that location, storing it in &amp;quot;length&amp;quot;.&lt;br /&gt;
* He jumps 4 bytes and checks if this int matches &amp;quot;length&amp;quot;. If it doesn't, it means that the file is compressed, and an error is reported.&lt;br /&gt;
* He then jumps forward 4 bytes and stores the short at that location in a variable &amp;quot;nameLength&amp;quot;.&lt;br /&gt;
* Another 2-byte jump gets the short &amp;quot;extensionsLength&amp;quot;.&lt;br /&gt;
* He then jumps 2 bytes and reads &amp;quot;nameLength&amp;quot; amount of bytes from the file.&lt;br /&gt;
* He then uses strcmp() to see if this string matches the sought-after file. If not, he continues the fseek().&lt;br /&gt;
* The programmer now skips &amp;quot;entensionsLength&amp;quot; amount of bytes.&lt;br /&gt;
* The programmer reads &amp;quot;length&amp;quot; amount of bytes from the file, and uses this as the sought-after file data.&lt;br /&gt;
&lt;br /&gt;
==== ...performance fascist/programmer who wants low seek times ====&lt;br /&gt;
* The programmer fseek()'s the file from the end until he finds 0x02014b50.&lt;br /&gt;
* He then uses the following table to get the information he needs:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ ZIP central directory file header&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Bytes !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4 || Central directory file header signature = 0x02014b50&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 2 || Version made by&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2 || Version needed to extract (minimum)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 2 || General purpose bit flag&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 2 || Compression method&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 2 || File last modification time&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 2 || File last modification date&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 4 || CRC-32&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 4 || Compressed size&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 4 || Uncompressed size&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 2 || File name length (''n'')&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || Extra field length (''m'')&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 2 || File comment length (''k'')&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 2 || Disk number where file starts&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 2 || Internal file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 4 || External file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 4 || Relative offset of local file header&lt;br /&gt;
|-&lt;br /&gt;
| 46 || ''n'' || File name&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n'' || ''m'' || Extra field&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n''+''m'' || ''k'' || File comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The relative file offset can then be used to jump to the file in question. The file is then scanned as described in the previous section.&lt;br /&gt;
&lt;br /&gt;
[[Category:PND]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=Libpnd_hub&amp;diff=2195</id>
		<title>Libpnd hub</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=Libpnd_hub&amp;diff=2195"/>
		<updated>2010-03-05T23:55:54Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=libpnd - the Pandora Library=&lt;br /&gt;
&lt;br /&gt;
libpnd is a basic collection of functions and tools to make working Pandora-specific operations easier; to wit, it is hoped multiple applications will make use of this library rather than re-implement similar functionality and lead to problems down the road. (Instead we can run into problems together and thus clobberize them.) &lt;br /&gt;
&lt;br /&gt;
libpnd thus is a collection of ...&lt;br /&gt;
&lt;br /&gt;
* handy system code that hopefully is reusable - IO functions, CPU clock setting, etc.&lt;br /&gt;
* applications for supporting the Pandora unique features, such as pndnotifyd for auto-discovery of PXML and .pnd applicatons&lt;br /&gt;
* libraries for support of the .pnd and PXML systems; i.e.: for locating, executable, mounting and unmounting PXML-directory and .pnd applications, loading PXML and handling overrides&lt;br /&gt;
* hopefully reusable code for support of these things; i.e.: a rudimentary but useful config-file parser, rudimentary singly-linked-list container, etc.&lt;br /&gt;
&lt;br /&gt;
libpnd will/does also include utility functions for setting the CPU clock, reading GPIO inputs without depending on SDL, and other handy bits.&lt;br /&gt;
&lt;br /&gt;
'''You can, nay, are needed - contribute to libpnd!'''&lt;br /&gt;
&lt;br /&gt;
==Design considerations and philosophy==&lt;br /&gt;
&lt;br /&gt;
While much of libpnd is obvious, some decisions had to be made and it may help to know the guiding principle behind it; the Pandora device will be a handheld _computer_, but libpnd is designed to facilitate certain operations with goals towards..&lt;br /&gt;
&lt;br /&gt;
- simplicity - just work right, configuration not generally needed&lt;br /&gt;
&lt;br /&gt;
- obviousness - work as one would expect for this sort of device; i.e.: the user assumes something will work a certain way, and it does&lt;br /&gt;
&lt;br /&gt;
- like other guys - as an extension of the prior point, we have tried to follow UNIX spirit and provide reusable small tools to do the work those bits can be leveraged, but further tried to follow the spirit of other consoles. So while the device is a powerful little computer, it is probably going to be used by gaming and retro enthusiasts and so we color some of our decisions that way. (i.e.: consider that a PS2/xbox/PSP/etc will have save-game or data management as a separate application, for instance. If thats the best multi-million dollar companies can come up with over decades, well, its not so bad for us to fall back on!)&lt;br /&gt;
&lt;br /&gt;
- not over-defined; libpnd and PXML try to define a bunch of things, but we also do not _over define_; we try to lead by providing examples and styles, and while we have designed ahead for many things, we have also not nailed a lot of that down too early. It is better to be simple and shipped, then complex and a mess.. adaptable rather than scary.&lt;br /&gt;
&lt;br /&gt;
The library is of course broken into parts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include     - include these files to make use of the lib&lt;br /&gt;
lib         - the code that produces the lib&lt;br /&gt;
test        - mini tools to test various pieces of the lib in isolation&lt;br /&gt;
bin         - test tools - tools for testing the lib as it is developed, not anticipated to be used by many&lt;br /&gt;
testdata/   - for testing /etc/pandora; will contain 'conf' dir, for example&lt;br /&gt;
apps/       - actual applications people may use, such as pndnotifyd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For now though, here are a couple notes about the design.&lt;br /&gt;
&lt;br /&gt;
- it is straight C code, to be maximumly re-usable (perhaps C++ and other language bindings will tie back to it). I have gone out of my way to limit external references so that bindings are easier to make. &lt;br /&gt;
&lt;br /&gt;
- contrary to the previous comment, we've used a bit of C++ for the tinyxml parser .. hopefully this is not an issue.&lt;br /&gt;
&lt;br /&gt;
- I have tried to keep the API relatively simple and am faking some OO like data hiding to try to keep dev noses out of structures that are subject to change. i.e.: functions for list management and node access are provided, don't dig into the void* cast structs, or you could get burnt.&lt;br /&gt;
&lt;br /&gt;
- the API should be pretty stable; so far very few user-code changes have ever been needed.. lib internal changes should be binary compatible.&lt;br /&gt;
&lt;br /&gt;
- As a result of that decision, 'handles' are used; a handle is a 'black box' type, something you cannot just use 'handle h; h -&amp;gt; foo = 5' type code for. Instead, internally the library will cast the handle to the actual useful type (which may involve pointer arith etc). This way the user can be returned a handle, and pass the handle to various access functions to get useful data/operations.. but the user is not encouraged to look inside the data objects himself&lt;br /&gt;
&lt;br /&gt;
- As another implication, access functions are available aplenty; it is a little unwieldy perhaps, but its all about keeping the API good without the user peeking inside and risking being broken down the road. (By example, consider.. you use ftell() on a FILE object; you don't go looking in FILE for the 'position' member, since it might be platform specific, etc.)&lt;br /&gt;
&lt;br /&gt;
- The lib works pretty well, but there is room for improvement internally; it won't hurt my feelings for you to suggest improvements, and I'm sure we would all be grateful for any patches you provide. We've _started_ this library, but by no means wish to carry it alone!&lt;br /&gt;
&lt;br /&gt;
==Opportunities for improvement==&lt;br /&gt;
&lt;br /&gt;
Certainly nothing is perfect, especially when chasing moving targets.  Some aspects of the library are less efficient, or missing, or buggy, and a few things are noted here should someone have time. The API was designed to be pretty stable so the internal code could be altered without breaking the API interface.&lt;br /&gt;
&lt;br /&gt;
- better ISO lang handling .. due to shift from original PXML spec to new PXML spec with better lang support I've not updated some of the internal code, API uses etc to handle it. (even .desktop files could include all iso-lang titles, and let the WM pick through as the spec suggests.)&lt;br /&gt;
&lt;br /&gt;
==License==&lt;br /&gt;
&lt;br /&gt;
libpnd (including all the apps etc) are released under the LGPL (ie: so there should be no encumbrances that prevent linking to commercial applications.)&lt;br /&gt;
&lt;br /&gt;
   1                   GNU LESSER GENERAL PUBLIC LICENSE&lt;br /&gt;
&lt;br /&gt;
   2                        Version 2.1, February 1999&lt;br /&gt;
&lt;br /&gt;
==Obtaining the library==&lt;br /&gt;
&lt;br /&gt;
libpnd is in the Official Pandora GIT repo: [http://git.openpandora.org/cgi-bin/gitweb.cgi]&lt;br /&gt;
&lt;br /&gt;
To obtain yourself a copy, use something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.openpandora.org/pandora-libraries.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thats all you normally need. For copy-paste from the private Wiki sake, heres what I had before:&lt;br /&gt;
&lt;br /&gt;
Without going into how to set up a GIT, the summary that I (as a registered dev in the repo) used was:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir libpnd&lt;br /&gt;
cd libpnd&lt;br /&gt;
git init&lt;br /&gt;
git remote add libpnd ssh://foo@git.openpandora.org/srv/git/pandora-libraries.git&lt;br /&gt;
git pull libpnd master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Building the library==&lt;br /&gt;
&lt;br /&gt;
Standard 'make' should be sufficient here; pull down the directory from the GIT, cd into it, and run make. Thats it.&lt;br /&gt;
&lt;br /&gt;
Note that the make default target is 'everything', which will emit:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
libpnd.a - the static linked version of the lib&lt;br /&gt;
libpnd.so.1.0.1 - the dynlinked version&lt;br /&gt;
libpnd.so.1 - the stub for the shared lib; i.e.: apps should link against libpnd.so.1 and not the 1.0.1 over-specific version&lt;br /&gt;
bin/* - the 'test' dir and the 'apps' dir builds will end up in bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a few additional make targets, however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make clean - wipes out the object files, the bin files, and *~* (emacs backup files), empties some of the deploy stuff, etc. Do this before committing to GIT or we will beat you with sticks.&lt;br /&gt;
make deploy - populates the deploy/ directory, which is what is used inthe shipping images; i.e.: testdata/conf includes test configs, while deploy/etc/pandora/conf includes the configs we ship with. This make will copy over some of the libs and binaries and such.&lt;br /&gt;
make pnd - create a few sample pnd files for testing the lib on an x86 machine&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Included Applications==&lt;br /&gt;
&lt;br /&gt;
===pndnotifyd===&lt;br /&gt;
&lt;br /&gt;
Manages the auto-discovery mechanism and integrating PXML.xml dir-apps and .pnd files into the FreeDesktop standard system (.desktop files). A dedicated libpnd-aware menu could leverage libpnd directly and not need pndnotifyd, though pndnotifyd does offer some handy bits such as HUPping apps to suggest to them that applications may have been added/removed (libpnd includes all the necessary functions for this as well.)&lt;br /&gt;
&lt;br /&gt;
===pndvalidator===&lt;br /&gt;
&lt;br /&gt;
Is mostly a skeleton right now; in the future, it is hoped it will inspect a PXML.xml and then check to ensure the referenced assets are present; the goal to validate the PXML.xml is spec compliant, and the resulting application would be useful.&lt;br /&gt;
&lt;br /&gt;
===discotest===&lt;br /&gt;
&lt;br /&gt;
One of the test tools; it essentially runs an auto-discovery to list off the found apps (be they PXML.xml dir apps or .pnd files), and can dump various data or invoke one or other little tasks; used to test lots of&lt;br /&gt;
bits of libpnd as it was developed.&lt;br /&gt;
&lt;br /&gt;
===rawpxmltest===&lt;br /&gt;
&lt;br /&gt;
Reads a given PXML.xml and spits out some of the fields found within.&lt;br /&gt;
&lt;br /&gt;
===test tools===&lt;br /&gt;
&lt;br /&gt;
See the test/ dir in the libpnd source for assorted goofy little test apps used for testing bits of libpnd over time. They also may serve as source examples for using some of the APIs. They're old and shoddy probably too.&lt;br /&gt;
&lt;br /&gt;
==Distributed PXML.xml-directory and pnd applications, how does running them actually work?==&lt;br /&gt;
&lt;br /&gt;
This is just a quick summary to save you guessing by reading this whole document.&lt;br /&gt;
&lt;br /&gt;
In essence, libpnd includes lots of real code, but in many places it passes heavy lifting off to shellscripts. This is both handy because the scripts are easily modified without recompilation, and further extends our design goals of making the library bindable to any other language.&lt;br /&gt;
&lt;br /&gt;
Remember, PXML.xml directories are just as executable/mountable as .pnd apps.&lt;br /&gt;
&lt;br /&gt;
So while libpnd is mostly straight-C and so easily bound to python or perl or whatever, libpnd itself invokes many scripts. Those scripts can be directly used by other applications, including other shellscripts.. so libnd functionality can even have bindings in other scripts. This is very flexible and powerful, and handy during debugging or SSHing into the Pandora, etc.&lt;br /&gt;
&lt;br /&gt;
The application lifecycle goes like this:&lt;br /&gt;
&lt;br /&gt;
- device is turned on&lt;br /&gt;
&lt;br /&gt;
- during init, pndnotifyd is brought up and inhales the config giles&lt;br /&gt;
&lt;br /&gt;
- pndnotidyd will attempt to auto-discover what PXML.xml directory apps and .pnd-file apps are in the configured searchpaths&lt;br /&gt;
&lt;br /&gt;
- pndnotifyd will set up filesystem watches on the directories in the notify searchpath; if any of those directories are touched, pndnotifyd will wake up and re-auto-discover .. possibly removing .desktop entries or creating new ones. (i.e.: you drop a new app into the app searchpath, or remove one, or mount an SD card, etc. This is how appications immediately show up or vanish from the window manager desktops.)&lt;br /&gt;
&lt;br /&gt;
- a libpnd aware launcher can execute applications direct (using libpnd)&lt;br /&gt;
&lt;br /&gt;
- a libpnd unaware launcher can execute applications via the .desktop standard system; pndnotidyd will emit .desktop files as needed.&lt;br /&gt;
&lt;br /&gt;
- when libpnd or a .desktop file need to execute an application, they do it via pnd_run.sh (which may be leveraged by other applications, but they hould use libpnd if they can instead, for utmost compatiblity down the road.) pnd_run.sh does the mount of the ISO, runs the actual execable and so on, as directed by libpnd or the command-line args from the .desktop. pnd_run.sh will clean up after everything as well.&lt;br /&gt;
&lt;br /&gt;
So it all works like magic, but it is not that complex a system once you've got the hang of what all is going on.&lt;br /&gt;
&lt;br /&gt;
application -&amp;gt; libpnd -&amp;gt; shellscripts -&amp;gt; system&lt;br /&gt;
&lt;br /&gt;
==FAQ: IF you want to make files visible to the apps, do you have to modify the pnd?==&lt;br /&gt;
&lt;br /&gt;
No. When apps write back to themselves, the writes go to their /pandora/appdata on the SD that houses them. The next time the app reads a file in its directory, the OS will ensure they get the newer file, which is the one in the appdata.&lt;br /&gt;
&lt;br /&gt;
Likewise, you can just drop a file into the appdata and the app will see it.&lt;br /&gt;
&lt;br /&gt;
The app doesn't know about appdata and its pnd file.. the OS and libpnd take care of all the magic.. the app sees one directory, but the reality is there is magic merging going on behind the scenes.&lt;br /&gt;
&lt;br /&gt;
==Assumptions about the filesystem and Configuration==&lt;br /&gt;
&lt;br /&gt;
Note that for libpnd to work, it makes certain assumptions about the filesystem and config files. Since libpnd was developed with the images it should work for the Pandora .. but just dropping libpnd onto another Linux distribution and it won't likely 'work out of the box'. Certain config files will need to be set, and certain conventions followed.&lt;br /&gt;
&lt;br /&gt;
===Searchpaths===&lt;br /&gt;
&lt;br /&gt;
libpnd was designed so that most everything is configured in files, and that these files should be easily hackable and easily overriden, without compromising the machine. It should be feasible to add a config file to an SD card, have it take over if available when required, and then 'undo' those configs simply by removal of the SD card and rebooting.&lt;br /&gt;
&lt;br /&gt;
To facilitate this design goal, all config files are 'sought' using a search-path system.&lt;br /&gt;
&lt;br /&gt;
Developers should be mindful of using the libpnd APIs so this behaviour is inherited to interested applications; developers could also reuse the logic for searching for files, if they find it useful.&lt;br /&gt;
&lt;br /&gt;
Searchpaths are colon-delimited list of paths, searched left to right.&lt;br /&gt;
&lt;br /&gt;
ex: foo:bar:/my/baz means to look for a given file in 'foo', then in 'bar', then in '/my/baz'.&lt;br /&gt;
&lt;br /&gt;
The standard config files have a default searchpath, and those config files will define further searchpaths for scripts and such the system uses. This makes the system highly flexible -- default scripts are included, but can be overridden by dropping the right named script on an SD card, or by altering a config file.&lt;br /&gt;
&lt;br /&gt;
See the example config files below for example searchpaths -- i.e.: how pndnotifyd searches for pnd_run, etc.&lt;br /&gt;
&lt;br /&gt;
===Notification paths===&lt;br /&gt;
&lt;br /&gt;
The 'apps' config includes a searchpath that specifies the sub-paths to be 'watched'. Various watch mechanisms exist for various filesystem types, but over the course of Pandora development (various kernels, various k-modules, various DM and WM's, I found the included system most stable, though not most current. After a final device image is settled on, it might be time to alter the notification system, but it should not impact the libpnd API.)&lt;br /&gt;
&lt;br /&gt;
Anyway, watches are placed upon the paths defined, and if anything in those paths changes, the auto-discovery code is kicked off to seek our PXML.xml and .pnd type applications in the search paths.&lt;br /&gt;
&lt;br /&gt;
Note that searchpath and notifypaths are different (and usually very similar, but have the option to be very different.)&lt;br /&gt;
&lt;br /&gt;
===Config files===&lt;br /&gt;
&lt;br /&gt;
libpnd includes a generic simple config file parser and assumes the presence of a few config files. It also includes defaults&lt;br /&gt;
so if a config is missing or broken things should work.&lt;br /&gt;
&lt;br /&gt;
In general, Pandora specific config files should be located in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/pandora/conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The config files are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
conf -- this file is generally _not_ included with the Pandora and left to default; its job is to define the basic default searchpath for config files, so should you wish to override things entirely, you may need to alter this file. i.e.: If you wish to switch to test config files on SD or in /tmp, instead of using any other conf files .. you can create this guy. This provides a mechanism to short circuit the entire conf system.&lt;br /&gt;
&lt;br /&gt;
apps -- this config file defines auto-discovery and other application bundle parameters&lt;br /&gt;
&lt;br /&gt;
desktop -- this config defines &amp;quot;dotdesktop&amp;quot; .desktop and FreeDesktop integration paramters -- example is where to spit out icons or .desktop files from discovered PXML.xml or pnd applications&lt;br /&gt;
&lt;br /&gt;
categories -- this config maps PXML.xml spec based categories to FreeDesktop standard categories; in this way a PXML based applicatoin can show up in the appropriate categories of a WM that does not use libpnd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====conf File====&lt;br /&gt;
&lt;br /&gt;
No default is included with the distribution.&lt;br /&gt;
&lt;br /&gt;
The default search path is reasonable and assumes we want the official /etc/pandora/conf near the end, with checks to the SD cards for overrides first. (Likely most people will not override, so the canonical location will be used 99.9% of the time.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PND_CONF_SEARCHPATH &amp;quot;/media/mmcblk0p1/pandora/conf:/media/mmcblk1p1/pandora/conf:/etc/pandora/conf:./testdata/conf&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The key for override is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PND_CONF_KEY        &amp;quot;conf.searchpath&amp;quot; /* if not found, use PND_CONF_SEARCHPATH */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which suggests using something like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[conf]&lt;br /&gt;
searchpath   /foo/bar:/baz/bing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====desktop File====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Desktop configuration&lt;br /&gt;
&lt;br /&gt;
[dotfiles]&lt;br /&gt;
#(~/Desktop for xfce, /usr/share/applications for WMs that actually follow spec)&lt;br /&gt;
dotdesktoppath  ~/Desktop/      # path for pndnotifyd to spit .desktop files into (run as root)&lt;br /&gt;
iconpath        /tmp    # path for pndnotifyd to drop icons into (can be same as .desktop if WM permits)&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
# if hupscript is commented out entirely, pndnotifyd will not try to find/run the hup&lt;br /&gt;
# if it is uncommented, pndnotifyd will attempt to invoke the hupscript after emitting .desktop files&lt;br /&gt;
# (the hupscript exists to hup the WMs to redisplay .desktop apps)&lt;br /&gt;
#hupscript      pnd_hup.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====apps File====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Application configuration&lt;br /&gt;
&lt;br /&gt;
[autodiscovery]&lt;br /&gt;
# searchpath is a list of paths (colon separated) in which to look for PXML.xml or .pnd-file applications&lt;br /&gt;
searchpath      /media/*/pandora/apps:/usr/pandora/apps&lt;br /&gt;
# notifypath is a list of paths to monitor; if anything in those paths changes, the searchpath is rescanned&lt;br /&gt;
# note that for each path chunk, all current subdirs of that path are also watched)&lt;br /&gt;
notifypath      /media:/media/*/pandora/apps:/usr/pandora/apps:./testdata/app?&lt;br /&gt;
&lt;br /&gt;
# PXMLs may be overridden .. i.e.: overrides are a subset of PXML, where the values are copied over the full PXML&lt;br /&gt;
[overrides]&lt;br /&gt;
# searchpath to look for PXML overrides (which are named by the unique-id)&lt;br /&gt;
searchpath      ~/pxml-overrides&lt;br /&gt;
&lt;br /&gt;
# [pnd] defines where to locate the pnd support scripts, so the user may override pnd_run.sh without clobbering built in&lt;br /&gt;
[pnd]&lt;br /&gt;
searchpath      /media/*/pandora/scripts:/usr/pandora/scripts&lt;br /&gt;
runscript       pnd_run.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====categories File====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# dotdesktop configuration&lt;br /&gt;
&lt;br /&gt;
# this config file maps 'PXML' categories to free-desktop standard categories&lt;br /&gt;
# i.e.: category 'Foo' could map to more standard 'Utility', thus making .desktop file&lt;br /&gt;
# emitting a more useful thing&lt;br /&gt;
&lt;br /&gt;
# the standard listing of categories is:&lt;br /&gt;
# http://standards.freedesktop.org/menu-spec/latest/apa.html&lt;br /&gt;
&lt;br /&gt;
# note that 'map' section in the config is _required_ for a match to be found; this&lt;br /&gt;
# is done to separate categories from (future) top-level directives&lt;br /&gt;
&lt;br /&gt;
default Application;Utility;Network;&lt;br /&gt;
&lt;br /&gt;
[map]&lt;br /&gt;
Development     Development&lt;br /&gt;
Education       Education&lt;br /&gt;
Games   Game&lt;br /&gt;
Graphics        Graphics&lt;br /&gt;
Internet        Network&lt;br /&gt;
Multimedia      AudioVideo&lt;br /&gt;
Office  Office&lt;br /&gt;
Settings        Settings&lt;br /&gt;
System  System&lt;br /&gt;
Utilities       Utility&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SD card layout===&lt;br /&gt;
&lt;br /&gt;
libpnd concerns itself with things in the 'pandora' root folder on SD. We agonized over this decision, but settled on this to avoid cases where someone with a 16GB SDHC card puts 50-million files with &amp;quot;.pnd&amp;quot; on them, and expects reasonable performance. Instead, applications for instance would have to be in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/pandora/menu -&amp;gt; apps that will go to /usr/share/applications and should show up in xfce menu by category&lt;br /&gt;
/pandora/desktop -&amp;gt; apps that will go to ~/Desktop and show up on user desktop as icons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following location is used by pmenu (and may get deprecated, but I've not discussed it with cpasjuste yet.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/pandora/apps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i.e.: the searchpath for autodiscovery includes /media/*/pandora/apps (and desktop and menu now)&lt;br /&gt;
&lt;br /&gt;
Also in the /pandora/ folder is a magic 'appdata' folder:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/pandora/appdata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a .pndfile or PXML.xml dir get mounted, any writes back to the mounted area are put into appdata, with a subdir by the unique-id. i.e.: With the hypothetical MAME.pnd, it might update its config files after a user changes something, or create new files, or store hiscores or whatever. If it doesn't write them to NAND, and doesn't want ot write them to /mame/some/dir, but instead record it to itself for whatever reason, it would go to /pandora/appdata/MAMEs-ID/ instead. The pnd or PXML.xml app area is never modified during a run, only the appdata. (But when an application reads its own path, it will pick up the appdata version of the file instead of the actual file. Then magic of union-type filesystems!)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
If Myapp with unique-id foo.123 is mounted, then any write-backs are directed to..&lt;br /&gt;
&lt;br /&gt;
/pandora/appdata/foo.123/&lt;br /&gt;
&lt;br /&gt;
On the SD that hosts the application.&lt;br /&gt;
&lt;br /&gt;
===NAND layout===&lt;br /&gt;
&lt;br /&gt;
In addition to seeking applications in SD cards, /usr/pandora/apps is included in the default searchpath, so that 'built in' apps can be listed, or users can drop them there.&lt;br /&gt;
&lt;br /&gt;
It might be a cool addition to put a user homedir into the searchpath as well, so NAND but user-homedir (for on-device browser downloads, say.)&lt;br /&gt;
&lt;br /&gt;
==Command line tools and testing==&lt;br /&gt;
&lt;br /&gt;
A number of scripts and tools are included or built with libpnd, to facilitate testing of the lib as its being developed and to assist in making .pnd files and PXML.xml files.&lt;br /&gt;
&lt;br /&gt;
==PXML.xml and .pnd files==&lt;br /&gt;
&lt;br /&gt;
On most platforms, applications are distributed as an executable and optional datafiles and likely an installer. The installers job is to integrate the application into the filesystem, as the transport mechanism itself is not executable and is considered temporary. In Windows an application might be installed into Program Files, while in Unix an application might be dropped into /usr/local/bin .. data files in various other places.&lt;br /&gt;
&lt;br /&gt;
For the Pandora platform we wanted a very easy to use workflow -- download and run -- and also have a very different operating environment. With multiple SD cards available for expansion (and that space being highly desirable due to a smaller internal store) it is desirable to install applications to SD, and yet SD cards are by definition something users will wish to carry multiple of. With two slots, it could be quite a chore to install an application to SD1, its data to SD2, and then say have only one of them plugged in at a time, or switch which slot they're in, or any number of scenarios. i.e.: Installing onto a medium which may be present or not at any time is very different to how most operating systems work. So we made something new and awesome.&lt;br /&gt;
&lt;br /&gt;
The PXML.xml and .pnd-file approach we came up with attempts to address these issues.&lt;br /&gt;
&lt;br /&gt;
The goals:&lt;br /&gt;
&lt;br /&gt;
- for the user, an application can be a single file download&lt;br /&gt;
&lt;br /&gt;
- furthermore, there is no installation whatsoever, beyond dropping that single file into the right place on the SD card&lt;br /&gt;
&lt;br /&gt;
- using the application should be easy -- stick in the SD card, and tap/launch on the icon.&lt;br /&gt;
&lt;br /&gt;
- for uninstallation, delete the single file. Thats it, no fuss.&lt;br /&gt;
&lt;br /&gt;
- for the developer, creating that single file should be easy to do&lt;br /&gt;
&lt;br /&gt;
- for the system, performance should be high&lt;br /&gt;
&lt;br /&gt;
Remember, an application can be a .pnd 'bundle' (single file containing all the sub-files), or a PXML.xml 'dir application' (an unpacked .pnd esentially.) '''BOTH PXML.xml-dirs and .pnd's ARE EXECUTABLE.'''&lt;br /&gt;
&lt;br /&gt;
pndnotifyd will auto-discover PXML.xml in a directory and consider that an application, emitting a .desktop file, just as well as a .pnd file. i.e.: This can be hand for development or users. Remember that a mounted PXML.xml dir still redirect write-backs to the /pandora/appdata directory, just like a full .pnd application. They are treated the same!&lt;br /&gt;
&lt;br /&gt;
===What are PXML.xml and .pnd files?===&lt;br /&gt;
&lt;br /&gt;
PXML.xml is a file describing an application&lt;br /&gt;
&lt;br /&gt;
A directory containing a PXML.xml _is executable_&lt;br /&gt;
&lt;br /&gt;
A .pnd file is the packaged up version of the directory that is executable.&lt;br /&gt;
&lt;br /&gt;
i.e.: a PXML.xml in a directory is just as executable as a .pnd representation of that directory.&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
mkdir OutcaST&lt;br /&gt;
cp outcast.bin OutcaST/&lt;br /&gt;
cp PXML.xml OutcaST/&lt;br /&gt;
# at this point, the OutcaST directory is now discoverable and executable&lt;br /&gt;
&lt;br /&gt;
pnd_make.sh -this -that OutcaST outcast.pnd&lt;br /&gt;
# at this point, outcast.pnd is executable (as is the OutcaST directory), so upload outcast.pnd to the Open Handhelds Archive and let people enjoy!&lt;br /&gt;
&lt;br /&gt;
===A note on including shared libs===&lt;br /&gt;
A philsophy for packaging that I am advocating is to 'just make applications work' -- avoid dependancy trees.&lt;br /&gt;
&lt;br /&gt;
Some guidelines:&lt;br /&gt;
&lt;br /&gt;
1) you can depend on shared libs included with the firmware to always be there&lt;br /&gt;
&lt;br /&gt;
2) you should include any shared libs you need for your app, that are not in the firmware (yes, this increases app size a little bit, and potentially makes for duplication among apps that use the same shared libs)&lt;br /&gt;
&lt;br /&gt;
3) if a shared lib becomes desirable in the firmware, it can be added there as a firmware patch easily (this has the advantage of gradulaly updating the entire user based, and apps easily saying 'we depend in firmware version X', rather than making for pnd-dependnacies and the equivilent of 'dll hell'&lt;br /&gt;
&lt;br /&gt;
4) You'll have to be careful in linking your application to ensure that the shared libs you are including in the pnd/PXML-dir are to be locatable by your binaries. ie: stick them in a 'lib/' dir in your bundle, and stamp your binary with a library-path './dir/' so they can be found, say. More later.&lt;br /&gt;
&lt;br /&gt;
===Future idea: pnd's for containing system-wide shared libs===&lt;br /&gt;
&lt;br /&gt;
This is something we've bounced around for quite awhile, but not committed to. As it keeps coming up I thought I'd put some notes here in public.&lt;br /&gt;
&lt;br /&gt;
It is possibly desirable to make a special searchpath that is discovered during machine boot, and any pnd's found there are automatically mounted (and left mounted) into a special path (say /usr/local/pandora/lib or somesuch.) This way, collections of handy utilities or shared libraries could be distributed as a pnd, and become available in consistent locations. If 10 applications need a shared lib, and don't want to duplciate it in each of their pnd files, this could be an approach.&lt;br /&gt;
&lt;br /&gt;
I tend to think it is best avoided, however, since it complicates the user experience -- we end up with pnd depandancies, and apps nolonger about to 'just work', and apps that did work and 'suddenly break' when other files are altered. The philosphy we're going for with pnd files is 'drag and drop' -- user downloads a pnd file, and it works.. a self contained application, nice and easy. We start complicating the dependancies, and it turns into 'dll hell' as seen on other platforms.&lt;br /&gt;
&lt;br /&gt;
That said, it is _not_ difficult to add into the existing system and design; we've been mulling it over, but it is best avoided for now. rather than complicate the system up front, let us try to get a functional and as lightweight-as-possible system on the uptake, gather some usage data points and then worry about upgrades :)&lt;br /&gt;
&lt;br /&gt;
===File format - PXML.xml / PXML Specification===&lt;br /&gt;
See the [[PXML_specification|PXML specification]]&lt;br /&gt;
&lt;br /&gt;
Alternatively the spec is included in the docs/ directory of the libpnd distribution, though the wiki version linked above should be considered cannon.&lt;br /&gt;
&lt;br /&gt;
A note on history; the PXML spec was originally created by EvilDragon, and went through a number of revisions as suggestions came in; as these things are wont to do, the target was ever moving and the scope and meaning of PXML changed so at some point a more strategic approach was needed. dflemstr took it upon himself to help recode some of the parse and re-evaluate many of the PXML decisions and hence was born the PXML-version-2 spec.&lt;br /&gt;
&lt;br /&gt;
===File format - .pnd files===&lt;br /&gt;
The pnd file format is pretty straight forward, though most will interact with it through the included (or community supplied) tools.&lt;br /&gt;
&lt;br /&gt;
Basically its just an ISO file (or other filesystem type) with a PXML.xml and an optional PNG icon appended. (example: cat appfolder.iso app.pxml icon.png &amp;gt; app.pnd) For ease of discussion, I refer to ISO but in fact you coudl be using squashfs or other types.&lt;br /&gt;
&lt;br /&gt;
The ISO filesystem portion of the file can include anything the developer wishes, as long as it includes a PXML.xml in its root file and an executable somewhere in there. It can also include images, audio files, data files of any kind. It can be small or large.&lt;br /&gt;
&lt;br /&gt;
Yes, the PXML.xml is included in the ISO portion (in the root directory), and also appended to the end of the .pnd file (for _convenience_ .. it is very easy and fast to locate in this position; we can backseek into the ISO to find the PXML, but if its a 500MB ISO it could take awhile. Hence, we append it and can find it in one seek.)&lt;br /&gt;
&lt;br /&gt;
This simple format makes it possible to easily create .pnd files with the default utility's of most operating systems. Further, it is a fairly fail-safe system -- the PXML is appended, but is also included within the ISO image part of the file so if the appended-PXML is ever lost (unpack and repack poorly, say) the system will still work (the PXML inside the ISO can be found easily, even without mounting the ISO _as_ an ISO, since it is a plaintext uncompressed image format.) &lt;br /&gt;
&lt;br /&gt;
Manually creating a .pnd (or even a PXML) is a pain so there will be a few helper scripts or maybe even a gui app out when we launch.&lt;br /&gt;
&lt;br /&gt;
Included with libpnd are some scripts to create PXML and pndfiles, though it is expected people will create handier utilities. See the tool section of this wiki for some details.&lt;br /&gt;
&lt;br /&gt;
Question from the gp32x forum regarding confusion of PXML location -- remember that in general mot developers will keep a directory that represents the .pnd or PXML-dir application. Their makefile/build-process will drop the executable(s) into that directory, which inludes a PXML.xml description of the application, and possibly an icon (and whatever all else they wish.) To build the .pnd file, a script (say) is used which compresses all this into the pnd format (including appending the PXML.) So yes, the PXML is in two places in the .pnd file and one place in the source directory. You'll get used to it ;)&lt;br /&gt;
&lt;br /&gt;
Rationale --&lt;br /&gt;
&lt;br /&gt;
Several iterations of pnd files have been considered, from zipfiles to cramfs to other formats, to putting in a key/value set of information tags in the file, to table-of-contents indexes, to any number of options to help performance, and so on. In the end we went for a good overall and simple solution and dropped getting fancy -- PXML.xml can be extended to define the type of the file if it cannot be magic'd, so we could using other filesystem types in the future (and this is why people should use libpnd rather than rolling their own solution.) For now however, pnd files are ISO files with the PXML.xml appended and an optional icon. This keeps the PXML and icon easy to locate, and yet a easy file format.&lt;br /&gt;
&lt;br /&gt;
====What filesystem types can be contained within a pnd-file?====&lt;br /&gt;
&lt;br /&gt;
The pnd container can really contain a large variety of filesystem types; day-zero we're aiming for ISO since it is simple, easy build across every major OS, and fast to use. But it is not the only supported filesystem type, and more should be added all the time. (Possibly '-auto' can be added to pnd-run and it'll &amp;quot;just work&amp;quot; for dozens of types!)&lt;br /&gt;
&lt;br /&gt;
A compressed filesystem type has always been desirable for file sizing reasons, though it potentially impacts performance (depending on the application operation really.)&lt;br /&gt;
&lt;br /&gt;
Supported types (not an exhaustive list!):&lt;br /&gt;
&lt;br /&gt;
o ISO&lt;br /&gt;
&lt;br /&gt;
o squashfs&lt;br /&gt;
&lt;br /&gt;
====PND generation workflow====&lt;br /&gt;
&lt;br /&gt;
- create a directory to represent the application on SD card; i.e.: ./mame-app&lt;br /&gt;
&lt;br /&gt;
- create a PXML.xml fil and drop it into the dir (./mame-app/PXML.xml); genpxml script can be used, or do it by hand&lt;br /&gt;
&lt;br /&gt;
- drop the executable and data files into this dir (say, ./mame-app/mame.bin, and ./mame-app/artwork/foo, etc.)''' &amp;lt;- note, with a PXML.xml and executabe, it can now be discovered and run without even bundling into .pnd!'''&lt;br /&gt;
&lt;br /&gt;
- invoke pnd-make.sh to produce mame4all-pandora-1.0-arm.pnd or whatever you want to call it (foobearspanky.pnd, we don't care.)&lt;br /&gt;
&lt;br /&gt;
- you're done, distribute it as you see fit&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Windows / DOS commandline====&lt;br /&gt;
&lt;br /&gt;
There should be a basic GUI along very soon, and more advanced friendlier GUIs in due time. But for now, we thought it prudent to include some basic instructions on the command line for day-zero.&lt;br /&gt;
&lt;br /&gt;
For this command-line tutorial, I will assume you have already created a PXML.xml file; copy one of the templates and then edit it, using notepad or whatever _TEXT_ editor you see fit.&lt;br /&gt;
&lt;br /&gt;
Prepare in advance:&lt;br /&gt;
&lt;br /&gt;
1) Make a PXML.xml file (through whatever means; copy a template, or get a PXML.xml tool when they come available.) Ensure that you've got a reasonably unique-id in that field (ie: say, app-name, your name, and date/time all catenated together.) &lt;br /&gt;
&lt;br /&gt;
2) Get yourself mkisofs tools; for example, grab from here: http://www.student.tugraz.at/thomas.plank/ -- get cdrtools-2.01-win32-bin.zip and DLL version 1.5.25, and extract to somewhere. That lets you run 'mkisofs' to spit out .iso files&lt;br /&gt;
&lt;br /&gt;
2b) If you want to make a compressed image, use squashfs tools here: ftp://ftp.slax.org/useful-binaries/win32/squashfs-tools/&lt;br /&gt;
&lt;br /&gt;
3) Put your application and all needed files into a single directory .. say &amp;quot;myapp&amp;quot;; it doesn't matter what you call it. Might be cool as a Makefile step&lt;br /&gt;
&lt;br /&gt;
4) In your app-dir, put the PXML.xml file in the root&lt;br /&gt;
&lt;br /&gt;
5) Put the icon in the root of that dir as well (make it a .png file)&lt;br /&gt;
&lt;br /&gt;
6) Make sure the PXML.xml names the icon (just its filename.png), and specifies the executable (foo.bin or whatever.)&lt;br /&gt;
&lt;br /&gt;
Generate the actual PND-file, fully manual method:&lt;br /&gt;
&lt;br /&gt;
1) Make yourself the iso; this step produces the iso, but to turn the iso into a pnd you need a couple last steps. You could also use some fancy iso-building tool.&lt;br /&gt;
'''mkisofs -o foo.iso -R /path/to/folder/myapp'''&lt;br /&gt;
&lt;br /&gt;
2) Append PXML.xml to the .iso (yes, the PXML.xml is included in the iso, but we also want to append it for performance reasons.) &lt;br /&gt;
'''copy foo.iso+PXML.xml foo.step2'''&lt;br /&gt;
&lt;br /&gt;
3) Append the icon PNG file to the .iso (if you have an icon; if not, you can leave this step out.)&lt;br /&gt;
'''copy foo.step2+myicon.png foo.pnd'''&lt;br /&gt;
&lt;br /&gt;
4) Clean up: del''' foo.step2 foo.iso'''&lt;br /&gt;
&lt;br /&gt;
5) Profit!&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Linux/BSD/Unix (including on Pandora)====&lt;br /&gt;
&lt;br /&gt;
=====Command-line=====&lt;br /&gt;
&lt;br /&gt;
Tools are included in the libpnd distribution; see below for discussion, but suffice to say they are included int he GIT. Look in testdata/scripts for:&lt;br /&gt;
&lt;br /&gt;
o genpxml - spits out a template PXML.xml for you, and even includes a reasonably unique-id&lt;br /&gt;
o pnd-make.sh - given a directory and some arguments, will spit out a .pnd file; great for use in Makefiles&lt;br /&gt;
&lt;br /&gt;
We're working on others as well, so piece of cake under Unix and Unix-like OSes.&lt;br /&gt;
&lt;br /&gt;
=====GUI=====&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Windows GUI====&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Mac OSX====&lt;br /&gt;
&lt;br /&gt;
===PXML overrides===&lt;br /&gt;
&lt;br /&gt;
PXML.xml files can have any number of their elements over-ridden by user preferences. &lt;br /&gt;
&lt;br /&gt;
The design goal here was to make it so user-preferences could alter the impact of the PXML.xml in any way, but without requiring the actual PXML.xml in the .pnd (and within the ISO therein) to be altered (could be a 500MB ISO after all!), and further, for these changes to persist. Consider than an SD card could be removed and inserted into the other slot, or the app could be removed entirely and come back another day, or other scenarios.&lt;br /&gt;
&lt;br /&gt;
As such, the PXML-overrides are kept in NAND in the user homedirectory (See the config files to find out where.)&lt;br /&gt;
&lt;br /&gt;
libpnd includes functions to pull in PXML, and also functions to then look for and merge in overrides. It is not always done since you may wish to inspect the PXML or the overrides, so the developers job is to do as they see fit -- pull the XML, and likely also pull in the overrides.&lt;br /&gt;
&lt;br /&gt;
At this time I'm not sure if people will ever use overrides, but the system has been built in should it be needed.&lt;br /&gt;
&lt;br /&gt;
===Included shellscripts to generate files and other sundry duties===&lt;br /&gt;
&lt;br /&gt;
====genpxml====&lt;br /&gt;
&lt;br /&gt;
This tool can spit out a basic but correct PXML.xml, faking up a halfway-useful unique-id in the process. It might be handy in saving you writing up a PXML.xml from scratch.&lt;br /&gt;
&lt;br /&gt;
====pnd_hup.sh====&lt;br /&gt;
&lt;br /&gt;
pndnotifyd will attempt to locate this script and invoke it after an auto-discovery run, if the pnd_hup entry is present (and uncommented) in the config files. It is expected to be commented out in release images, as xfce watches directories for .desktop files and does not need a HUP; some desktop managers need to be HUPped to rescan for .desktop files in a timely fashion, so the pnd_hup config entry can be uncommented and this script will attempt to figure out who to HUP.&lt;br /&gt;
&lt;br /&gt;
====pnd_make.sh====&lt;br /&gt;
&lt;br /&gt;
This is one of the great ones :)&lt;br /&gt;
&lt;br /&gt;
Given a directory with a PXML.xml (see genpxml above) and an executable and any other goo you want in there, this script will spit out a .pnd file you can execute or distribute as an application.&lt;br /&gt;
&lt;br /&gt;
====pnd_run.sh====&lt;br /&gt;
&lt;br /&gt;
This job does a lot of the heavy lifting for libpnd, including setting up the 'union filesystems', doing .pnd and PXML.xml-app-dir execution and mounting, and so on. Generally you will talk to it via libpnd or .desktop files, but you can invoke it dorectly from your apps if you wish to circumvent libpnd or mount .pnd files within a shellscript/perlscript/etc.&lt;br /&gt;
&lt;br /&gt;
==Auto-discovery of applications==&lt;br /&gt;
&lt;br /&gt;
TBD.&lt;br /&gt;
&lt;br /&gt;
==Integration with FreeDesktop .desktop systems==&lt;br /&gt;
&lt;br /&gt;
===dotdesktop (.desktop) files===&lt;br /&gt;
&lt;br /&gt;
===Icons===&lt;br /&gt;
&lt;br /&gt;
There are some rules for Icons in PXML.xml and pnd/directory bundles&lt;br /&gt;
&lt;br /&gt;
- An Icon should be in the root of the directory or .pnd bundle&lt;br /&gt;
&lt;br /&gt;
- An Icon must be specified in the PXML.xml if you expect it to work&lt;br /&gt;
&lt;br /&gt;
- As the PXML.xml is parsed, the icon is sought; if the icon is specified, but not found, it is assumed to be a system default icon and the filename will be placed into the .desktop Icon= line verbatim (ex: Icon=foo.png), and the window manager presumably will know how to locate it. If the icon is specified, and is found, then it will be copied into the configured IconPath, and the full path to it will be used for the Icon= line in the .desktop file ex: Icon=/tmp/myicon.png). If no icon is specified in the PXML file, then no Icon= line will be entered into the .desktop and the WM will presumably apply a default icon based on category or whatever.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==APIs==&lt;br /&gt;
&lt;br /&gt;
Feel free to just go read the .h files; I have tried to comment liberally :)&lt;br /&gt;
&lt;br /&gt;
===Setting and Getting the CPU clock speed===&lt;br /&gt;
&lt;br /&gt;
===Device paramaters - brightness, etc===&lt;br /&gt;
&lt;br /&gt;
===PND files, exec and mount===&lt;br /&gt;
&lt;br /&gt;
===Application discovery===&lt;br /&gt;
&lt;br /&gt;
===Config file parsing===&lt;br /&gt;
&lt;br /&gt;
===Boxing, the singly-linked list container===&lt;br /&gt;
&lt;br /&gt;
===Directory watching===&lt;br /&gt;
&lt;br /&gt;
===Logging api===&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:PND]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=Category:PND&amp;diff=2194</id>
		<title>Category:PND</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=Category:PND&amp;diff=2194"/>
		<updated>2010-03-05T23:54:50Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: New page: Articles about PND, the Pandora package format.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Articles about PND, the Pandora package format.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PND:FAQ&amp;diff=2193</id>
		<title>PND:FAQ</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PND:FAQ&amp;diff=2193"/>
		<updated>2010-03-05T23:54:08Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of '''frequently asked questions''' about using the Pandora PND package format. For factual and other kinds of questions, use the [[Special:Search|search box]]. If your question is not answered on this page, do some research and include it!&lt;br /&gt;
__NOTOC__ __TOC__&lt;br /&gt;
&lt;br /&gt;
==The PND system==&lt;br /&gt;
&lt;br /&gt;
===What is a PND file?===&lt;br /&gt;
:A PND file is a compact file that contains one or more runnable applications for the Pandora. The file is basically an archive (like a ZIP, RAR or ISO) that contains all the data that the provided set of applications require, along with some meta data about the applications themselves.&lt;br /&gt;
&lt;br /&gt;
===Why are PNDs useful?===&lt;br /&gt;
:Normally, on an ordinary computer, it is necessary to install an application in order to run it. This usually happens in one of many different ways; an installer might be run, or an archive might become extracted, etc.&lt;br /&gt;
:PND files are used to allow for applications to be executed ''without'' them being installed first. They are supposed to work in a way similar to game cartridges, in that they contain all of the necessary information in one tight package that can be executed independently.&lt;br /&gt;
:This system is inspired by similar systems such as the Apple OS 10 DMG file system, the Puppy Linux package format, or the Haiku Box package management system.&lt;br /&gt;
&lt;br /&gt;
===How is a PND file structured? (Advanced)===&lt;br /&gt;
:The PND file is simply an archive or file system image (currently, ISO and SquashFS are supported) with a &amp;quot;PXML.xml&amp;quot; appended at the end. There can also be an accompanying screenshot that is appended as well.&lt;br /&gt;
&lt;br /&gt;
===Can I modify a PND file?===&lt;br /&gt;
:You can, but you need special tools to do so. It is advised that only developers modify or create PND files.&lt;br /&gt;
&lt;br /&gt;
===Can a PND file modify itself?===&lt;br /&gt;
:No, not without serious hacks.&lt;br /&gt;
&lt;br /&gt;
===How does a PND store application data?===&lt;br /&gt;
:Since the PND cannot modify itself, there has to be a way for it to store runtime data, such as configuration files and user-added level files. This is achieved in the PND system by creating an application data directory for each application that is inside a PND. Since a PND can contain many applications, there can, and will, be multiple application data folders per PND, and each application declares its own application data folder name.&lt;br /&gt;
:The application data folders are located in &amp;quot;pandora/appdata/*&amp;quot; on the device that the PND is stored on.&lt;br /&gt;
&lt;br /&gt;
===How does the PND discovery mechanism work? (Advanced)===&lt;br /&gt;
:There is a special process called &amp;quot;pndnotifyd&amp;quot; that watches the PND search paths for file changes. Once it finds a new PND file, it mounts the file system image or archive portion of the file, and uses the PXML.xml file to generate one or multiple &amp;quot;*.desktop&amp;quot; files for the PND.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
===How do I use PND files?===&lt;br /&gt;
:Using PND files on your Pandora is easy: You simply get hold of a PND file, presumably via a web page of some kind, and store it in a special folder on one of your SD cards. The default location is &amp;quot;/media/*/pandora/apps&amp;quot; which means that PNDs will be found on any SD card, USB stick or similar that has a &amp;quot;pandora/apps&amp;quot; folder.&lt;br /&gt;
:Once you've put your PND in a known location, the PND system will pick up the new PND, &amp;quot;activate&amp;quot; it, and create shortcut icons to the applications inside of the PND. You can then use these icons to launch the applications.&lt;br /&gt;
&lt;br /&gt;
===How do I change the search paths for PND files? (Advanced)===&lt;br /&gt;
:Simply edit the &amp;quot;/etc/pandora/conf/apps&amp;quot; file, and change the &amp;quot;searchpath&amp;quot; entry to include the paths you want to use. Paths are separated by colons (&amp;quot;:&amp;quot;) and may include wildcards (in the shape of &amp;quot;*&amp;quot;) anywhere in the path.&lt;br /&gt;
&lt;br /&gt;
===How do I launch a PND application without putting it in a special location?===&lt;br /&gt;
:If you open a PND file in your file manager, the first application in the PND will be launched without you having to move the PND file.&lt;br /&gt;
&lt;br /&gt;
===How do I choose where the shortcut icons for a PND appear?===&lt;br /&gt;
:With the default configuration, there are four different folders you can put your PND files in to have their applications show up in different locations:&lt;br /&gt;
:* &amp;quot;/media/*/pandora/menu&amp;quot; - These PND-files will only generate shortcut icons in the system's application menu. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;/usr/share/applications&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/desktop&amp;quot; - These PND files will only generate shortcut icons on the Desktop. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;~/Desktop&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/apps&amp;quot; - At the moment, this path does the same as the &amp;quot;desktop&amp;quot; path: it extracts shortcuts on the desktop.&lt;br /&gt;
:* &amp;quot;/usr/pandora/apps&amp;quot; This also extracts shortcut icons to the desktop.&lt;br /&gt;
&lt;br /&gt;
===How do I configure different locations for my PND shortcuts? (Advanced)===&lt;br /&gt;
:Edit the file &amp;quot;/etc/pandora/conf/desktop&amp;quot; (The &amp;quot;desktop&amp;quot; refers to &amp;quot;*.desktop files&amp;quot;). It will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Desktop configuration&lt;br /&gt;
&lt;br /&gt;
[desktop]&lt;br /&gt;
searchpath	/media/*/pandora/desktop:/media/*/pandora/apps:/usr/pandora/apps&lt;br /&gt;
dotdesktoppath	~/Desktop/&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&lt;br /&gt;
[menu]&lt;br /&gt;
searchpath	/media/*/pandora/menu&lt;br /&gt;
dotdesktoppath	/usr/share/applications&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:You should leave the &amp;quot;iconpath&amp;quot; variables be, but you can change which paths are searched through and where &amp;quot;*.desktop&amp;quot; files are extracted with the &amp;quot;searchpath&amp;quot; and &amp;quot;dotdesktoppath&amp;quot; variables, respectively.&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]] [[Category:PND]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PND:FAQ&amp;diff=2192</id>
		<title>PND:FAQ</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PND:FAQ&amp;diff=2192"/>
		<updated>2010-03-05T22:30:51Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* How does a PND store application data? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of '''frequently asked questions''' about using the Pandora PND package format. For factual and other kinds of questions, use the [[Special:Search|search box]]. If your question is not answered on this page, do some research and include it!&lt;br /&gt;
__NOTOC__ __TOC__&lt;br /&gt;
&lt;br /&gt;
==The PND system==&lt;br /&gt;
&lt;br /&gt;
===What is a PND file?===&lt;br /&gt;
:A PND file is a compact file that contains one or more runnable applications for the Pandora. The file is basically an archive (like a ZIP, RAR or ISO) that contains all the data that the provided set of applications require, along with some meta data about the applications themselves.&lt;br /&gt;
&lt;br /&gt;
===Why are PNDs useful?===&lt;br /&gt;
:Normally, on an ordinary computer, it is necessary to install an application in order to run it. This usually happens in one of many different ways; an installer might be run, or an archive might become extracted, etc.&lt;br /&gt;
:PND files are used to allow for applications to be executed ''without'' them being installed first. They are supposed to work in a way similar to game cartridges, in that they contain all of the necessary information in one tight package that can be executed independently.&lt;br /&gt;
:This system is inspired by similar systems such as the Apple OS 10 DMG file system, the Puppy Linux package format, or the Haiku Box package management system.&lt;br /&gt;
&lt;br /&gt;
===How is a PND file structured? (Advanced)===&lt;br /&gt;
:The PND file is simply an archive or file system image (currently, ISO and SquashFS are supported) with a &amp;quot;PXML.xml&amp;quot; appended at the end. There can also be an accompanying screenshot that is appended as well.&lt;br /&gt;
&lt;br /&gt;
===Can I modify a PND file?===&lt;br /&gt;
:You can, but you need special tools to do so. It is advised that only developers modify or create PND files.&lt;br /&gt;
&lt;br /&gt;
===Can a PND file modify itself?===&lt;br /&gt;
:No, not without serious hacks.&lt;br /&gt;
&lt;br /&gt;
===How does a PND store application data?===&lt;br /&gt;
:Since the PND cannot modify itself, there has to be a way for it to store runtime data, such as configuration files and user-added level files. This is achieved in the PND system by creating an application data directory for each application that is inside a PND. Since a PND can contain many applications, there can, and will, be multiple application data folders per PND, and each application declares its own application data folder name.&lt;br /&gt;
:The application data folders are located in &amp;quot;pandora/appdata/*&amp;quot; on the device that the PND is stored on.&lt;br /&gt;
&lt;br /&gt;
===How does the PND discovery mechanism work? (Advanced)===&lt;br /&gt;
:There is a special process called &amp;quot;pndnotifyd&amp;quot; that watches the PND search paths for file changes. Once it finds a new PND file, it mounts the file system image or archive portion of the file, and uses the PXML.xml file to generate one or multiple &amp;quot;*.desktop&amp;quot; files for the PND.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
===How do I use PND files?===&lt;br /&gt;
:Using PND files on your Pandora is easy: You simply get hold of a PND file, presumably via a web page of some kind, and store it in a special folder on one of your SD cards. The default location is &amp;quot;/media/*/pandora/apps&amp;quot; which means that PNDs will be found on any SD card, USB stick or similar that has a &amp;quot;pandora/apps&amp;quot; folder.&lt;br /&gt;
:Once you've put your PND in a known location, the PND system will pick up the new PND, &amp;quot;activate&amp;quot; it, and create shortcut icons to the applications inside of the PND. You can then use these icons to launch the applications.&lt;br /&gt;
&lt;br /&gt;
===How do I change the search paths for PND files? (Advanced)===&lt;br /&gt;
:Simply edit the &amp;quot;/etc/pandora/conf/apps&amp;quot; file, and change the &amp;quot;searchpath&amp;quot; entry to include the paths you want to use. Paths are separated by colons (&amp;quot;:&amp;quot;) and may include wildcards (in the shape of &amp;quot;*&amp;quot;) anywhere in the path.&lt;br /&gt;
&lt;br /&gt;
===How do I launch a PND application without putting it in a special location?===&lt;br /&gt;
:If you open a PND file in your file manager, the first application in the PND will be launched without you having to move the PND file.&lt;br /&gt;
&lt;br /&gt;
===How do I choose where the shortcut icons for a PND appear?===&lt;br /&gt;
:With the default configuration, there are four different folders you can put your PND files in to have their applications show up in different locations:&lt;br /&gt;
:* &amp;quot;/media/*/pandora/menu&amp;quot; - These PND-files will only generate shortcut icons in the system's application menu. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;/usr/share/applications&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/desktop&amp;quot; - These PND files will only generate shortcut icons on the Desktop. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;~/Desktop&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/apps&amp;quot; - At the moment, this path does the same as the &amp;quot;desktop&amp;quot; path: it extracts shortcuts on the desktop.&lt;br /&gt;
:* &amp;quot;/usr/pandora/apps&amp;quot; This also extracts shortcut icons to the desktop.&lt;br /&gt;
&lt;br /&gt;
===How do I configure different locations for my PND shortcuts? (Advanced)===&lt;br /&gt;
:Edit the file &amp;quot;/etc/pandora/conf/desktop&amp;quot; (The &amp;quot;desktop&amp;quot; refers to &amp;quot;*.desktop files&amp;quot;). It will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Desktop configuration&lt;br /&gt;
&lt;br /&gt;
[desktop]&lt;br /&gt;
searchpath	/media/*/pandora/desktop:/media/*/pandora/apps:/usr/pandora/apps&lt;br /&gt;
dotdesktoppath	~/Desktop/&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&lt;br /&gt;
[menu]&lt;br /&gt;
searchpath	/media/*/pandora/menu&lt;br /&gt;
dotdesktoppath	/usr/share/applications&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:You should leave the &amp;quot;iconpath&amp;quot; variables be, but you can change which paths are searched through and where &amp;quot;*.desktop&amp;quot; files are extracted with the &amp;quot;searchpath&amp;quot; and &amp;quot;dotdesktoppath&amp;quot; variables, respectively.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PND:FAQ&amp;diff=2191</id>
		<title>PND:FAQ</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PND:FAQ&amp;diff=2191"/>
		<updated>2010-03-05T21:36:05Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of '''frequently asked questions''' about using the Pandora PND package format. For factual and other kinds of questions, use the [[Special:Search|search box]]. If your question is not answered on this page, do some research and include it!&lt;br /&gt;
__NOTOC__ __TOC__&lt;br /&gt;
&lt;br /&gt;
==The PND system==&lt;br /&gt;
&lt;br /&gt;
===What is a PND file?===&lt;br /&gt;
:A PND file is a compact file that contains one or more runnable applications for the Pandora. The file is basically an archive (like a ZIP, RAR or ISO) that contains all the data that the provided set of applications require, along with some meta data about the applications themselves.&lt;br /&gt;
&lt;br /&gt;
===Why are PNDs useful?===&lt;br /&gt;
:Normally, on an ordinary computer, it is necessary to install an application in order to run it. This usually happens in one of many different ways; an installer might be run, or an archive might become extracted, etc.&lt;br /&gt;
:PND files are used to allow for applications to be executed ''without'' them being installed first. They are supposed to work in a way similar to game cartridges, in that they contain all of the necessary information in one tight package that can be executed independently.&lt;br /&gt;
:This system is inspired by similar systems such as the Apple OS 10 DMG file system, the Puppy Linux package format, or the Haiku Box package management system.&lt;br /&gt;
&lt;br /&gt;
===How is a PND file structured? (Advanced)===&lt;br /&gt;
:The PND file is simply an archive or file system image (currently, ISO and SquashFS are supported) with a &amp;quot;PXML.xml&amp;quot; appended at the end. There can also be an accompanying screenshot that is appended as well.&lt;br /&gt;
&lt;br /&gt;
===Can I modify a PND file?===&lt;br /&gt;
:You can, but you need special tools to do so. It is advised that only developers modify or create PND files.&lt;br /&gt;
&lt;br /&gt;
===Can a PND file modify itself?===&lt;br /&gt;
:No, not without serious hacks.&lt;br /&gt;
&lt;br /&gt;
===How does a PND store application data?===&lt;br /&gt;
:Since the PND cannot modify itself, there has to be a way for it to store runtime data, such as configuration files and user-added level files. This is achieved in the PND system by creating an application data directory for each application that is inside a PND. Since a PND can contain many applications, there can, and will, be multiple application data folders per PND, and each application declares its own application data folder name.&lt;br /&gt;
:The application data folders are located in &amp;quot;pandora/appdata/*&amp;quot; on the primary SD card of the system.&lt;br /&gt;
&lt;br /&gt;
===How does the PND discovery mechanism work? (Advanced)===&lt;br /&gt;
:There is a special process called &amp;quot;pndnotifyd&amp;quot; that watches the PND search paths for file changes. Once it finds a new PND file, it mounts the file system image or archive portion of the file, and uses the PXML.xml file to generate one or multiple &amp;quot;*.desktop&amp;quot; files for the PND.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
===How do I use PND files?===&lt;br /&gt;
:Using PND files on your Pandora is easy: You simply get hold of a PND file, presumably via a web page of some kind, and store it in a special folder on one of your SD cards. The default location is &amp;quot;/media/*/pandora/apps&amp;quot; which means that PNDs will be found on any SD card, USB stick or similar that has a &amp;quot;pandora/apps&amp;quot; folder.&lt;br /&gt;
:Once you've put your PND in a known location, the PND system will pick up the new PND, &amp;quot;activate&amp;quot; it, and create shortcut icons to the applications inside of the PND. You can then use these icons to launch the applications.&lt;br /&gt;
&lt;br /&gt;
===How do I change the search paths for PND files? (Advanced)===&lt;br /&gt;
:Simply edit the &amp;quot;/etc/pandora/conf/apps&amp;quot; file, and change the &amp;quot;searchpath&amp;quot; entry to include the paths you want to use. Paths are separated by colons (&amp;quot;:&amp;quot;) and may include wildcards (in the shape of &amp;quot;*&amp;quot;) anywhere in the path.&lt;br /&gt;
&lt;br /&gt;
===How do I launch a PND application without putting it in a special location?===&lt;br /&gt;
:If you open a PND file in your file manager, the first application in the PND will be launched without you having to move the PND file.&lt;br /&gt;
&lt;br /&gt;
===How do I choose where the shortcut icons for a PND appear?===&lt;br /&gt;
:With the default configuration, there are four different folders you can put your PND files in to have their applications show up in different locations:&lt;br /&gt;
:* &amp;quot;/media/*/pandora/menu&amp;quot; - These PND-files will only generate shortcut icons in the system's application menu. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;/usr/share/applications&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/desktop&amp;quot; - These PND files will only generate shortcut icons on the Desktop. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;~/Desktop&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/apps&amp;quot; - At the moment, this path does the same as the &amp;quot;desktop&amp;quot; path: it extracts shortcuts on the desktop.&lt;br /&gt;
:* &amp;quot;/usr/pandora/apps&amp;quot; This also extracts shortcut icons to the desktop.&lt;br /&gt;
&lt;br /&gt;
===How do I configure different locations for my PND shortcuts? (Advanced)===&lt;br /&gt;
:Edit the file &amp;quot;/etc/pandora/conf/desktop&amp;quot; (The &amp;quot;desktop&amp;quot; refers to &amp;quot;*.desktop files&amp;quot;). It will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Desktop configuration&lt;br /&gt;
&lt;br /&gt;
[desktop]&lt;br /&gt;
searchpath	/media/*/pandora/desktop:/media/*/pandora/apps:/usr/pandora/apps&lt;br /&gt;
dotdesktoppath	~/Desktop/&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&lt;br /&gt;
[menu]&lt;br /&gt;
searchpath	/media/*/pandora/menu&lt;br /&gt;
dotdesktoppath	/usr/share/applications&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:You should leave the &amp;quot;iconpath&amp;quot; variables be, but you can change which paths are searched through and where &amp;quot;*.desktop&amp;quot; files are extracted with the &amp;quot;searchpath&amp;quot; and &amp;quot;dotdesktoppath&amp;quot; variables, respectively.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PND:FAQ&amp;diff=2190</id>
		<title>PND:FAQ</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PND:FAQ&amp;diff=2190"/>
		<updated>2010-03-05T21:35:37Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* The PND system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of '''frequently asked questions''' about using the Pandora PND package format. For factual and other kinds of questions, use the [[Special:Search|search box]]. If your question is not answered on this page, do some research and include it!&lt;br /&gt;
__NOTOC__ __TOC__&lt;br /&gt;
&lt;br /&gt;
==The PND system==&lt;br /&gt;
&lt;br /&gt;
===What is a PND file?===&lt;br /&gt;
:A PND file is a compact file that contains one or more runnable applications for the Pandora. The file is basically an archive (like a ZIP, RAR or ISO) that contains all the data that the provided set of applications require, along with some meta data about the applications themselves.&lt;br /&gt;
&lt;br /&gt;
===Why are PNDs useful?===&lt;br /&gt;
:Normally, on an ordinary computer, it is necessary to install an application in order to run it. This usually happens in one of many different ways; an installer might be run, or an archive might become extracted, etc.&lt;br /&gt;
:PND files are used to allow for applications to be executed ''without'' them being installed first. They are supposed to work in a way similar to game cartridges, in that they contain all of the necessary information in one tight package that can be executed independently.&lt;br /&gt;
:This system is inspired by similar systems such as the Apple OS 10 DMG file system, the Puppy Linux package format, or the Haiku Box package management system.&lt;br /&gt;
&lt;br /&gt;
===How is a PND file structured?===&lt;br /&gt;
:The PND file is simply an archive or file system image (currently, ISO and SquashFS are supported) with a &amp;quot;PXML.xml&amp;quot; appended at the end. There can also be an accompanying screenshot that is appended as well.&lt;br /&gt;
&lt;br /&gt;
===Can I modify a PND file?===&lt;br /&gt;
:You can, but you need special tools to do so. It is advised that only developers modify or create PND files.&lt;br /&gt;
&lt;br /&gt;
===Can a PND file modify itself?===&lt;br /&gt;
:No, not without serious hacks.&lt;br /&gt;
&lt;br /&gt;
===How does a PND store application data?===&lt;br /&gt;
:Since the PND cannot modify itself, there has to be a way for it to store runtime data, such as configuration files and user-added level files. This is achieved in the PND system by creating an application data directory for each application that is inside a PND. Since a PND can contain many applications, there can, and will, be multiple application data folders per PND, and each application declares its own application data folder name.&lt;br /&gt;
:The application data folders are located in &amp;quot;pandora/appdata/*&amp;quot; on the primary SD card of the system.&lt;br /&gt;
&lt;br /&gt;
===How does the PND discovery mechanism work?===&lt;br /&gt;
:There is a special process called &amp;quot;pndnotifyd&amp;quot; that watches the PND search paths for file changes. Once it finds a new PND file, it mounts the file system image or archive portion of the file, and uses the PXML.xml file to generate one or multiple &amp;quot;*.desktop&amp;quot; files for the PND.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
===How do I use PND files?===&lt;br /&gt;
:Using PND files on your Pandora is easy: You simply get hold of a PND file, presumably via a web page of some kind, and store it in a special folder on one of your SD cards. The default location is &amp;quot;/media/*/pandora/apps&amp;quot; which means that PNDs will be found on any SD card, USB stick or similar that has a &amp;quot;pandora/apps&amp;quot; folder.&lt;br /&gt;
:Once you've put your PND in a known location, the PND system will pick up the new PND, &amp;quot;activate&amp;quot; it, and create shortcut icons to the applications inside of the PND. You can then use these icons to launch the applications.&lt;br /&gt;
&lt;br /&gt;
===How do I change the search paths for PND files?===&lt;br /&gt;
:Simply edit the &amp;quot;/etc/pandora/conf/apps&amp;quot; file, and change the &amp;quot;searchpath&amp;quot; entry to include the paths you want to use. Paths are separated by colons (&amp;quot;:&amp;quot;) and may include wildcards (in the shape of &amp;quot;*&amp;quot;) anywhere in the path.&lt;br /&gt;
&lt;br /&gt;
===How do I launch a PND application without putting it in a special location?===&lt;br /&gt;
:If you open a PND file in your file manager, the first application in the PND will be launched without you having to move the PND file.&lt;br /&gt;
&lt;br /&gt;
===How do I choose where the shortcut icons for a PND appear?===&lt;br /&gt;
:With the default configuration, there are four different folders you can put your PND files in to have their applications show up in different locations:&lt;br /&gt;
:* &amp;quot;/media/*/pandora/menu&amp;quot; - These PND-files will only generate shortcut icons in the system's application menu. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;/usr/share/applications&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/desktop&amp;quot; - These PND files will only generate shortcut icons on the Desktop. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;~/Desktop&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/apps&amp;quot; - At the moment, this path does the same as the &amp;quot;desktop&amp;quot; path: it extracts shortcuts on the desktop.&lt;br /&gt;
:* &amp;quot;/usr/pandora/apps&amp;quot; This also extracts shortcut icons to the desktop.&lt;br /&gt;
&lt;br /&gt;
===How do I configure different locations for my PND shortcuts?===&lt;br /&gt;
:Edit the file &amp;quot;/etc/pandora/conf/desktop&amp;quot; (The &amp;quot;desktop&amp;quot; refers to &amp;quot;*.desktop files&amp;quot;). It will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Desktop configuration&lt;br /&gt;
&lt;br /&gt;
[desktop]&lt;br /&gt;
searchpath	/media/*/pandora/desktop:/media/*/pandora/apps:/usr/pandora/apps&lt;br /&gt;
dotdesktoppath	~/Desktop/&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&lt;br /&gt;
[menu]&lt;br /&gt;
searchpath	/media/*/pandora/menu&lt;br /&gt;
dotdesktoppath	/usr/share/applications&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:You should leave the &amp;quot;iconpath&amp;quot; variables be, but you can change which paths are searched through and where &amp;quot;*.desktop&amp;quot; files are extracted with the &amp;quot;searchpath&amp;quot; and &amp;quot;dotdesktoppath&amp;quot; variables, respectively.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PND:FAQ&amp;diff=2189</id>
		<title>PND:FAQ</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PND:FAQ&amp;diff=2189"/>
		<updated>2010-03-05T21:33:34Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* The PND system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of '''frequently asked questions''' about using the Pandora PND package format. For factual and other kinds of questions, use the [[Special:Search|search box]]. If your question is not answered on this page, do some research and include it!&lt;br /&gt;
__NOTOC__ __TOC__&lt;br /&gt;
&lt;br /&gt;
==The PND system==&lt;br /&gt;
&lt;br /&gt;
===What is a PND file?===&lt;br /&gt;
:A PND file is a compact file that contains one or more runnable applications for the Pandora. The file is basically an archive (like a ZIP, RAR or ISO) that contains all the data that the provided set of applications require, along with some meta data about the applications themselves.&lt;br /&gt;
&lt;br /&gt;
===Why are PNDs useful?===&lt;br /&gt;
:Normally, on an ordinary computer, it is necessary to install an application in order to run it. This usually happens in one of many different ways; an installer might be run, or an archive might become extracted, etc.&lt;br /&gt;
:PND files are used to allow for applications to be executed ''without'' them being installed first. They are supposed to work in a way similar to game cartridges, in that they contain all of the necessary information in one tight package that can be executed independently.&lt;br /&gt;
:This system is inspired by similar systems such as the Apple OS 10 DMG file system, the Puppy Linux package format, or the Haiku Box package management system.&lt;br /&gt;
&lt;br /&gt;
===How is a PND file structured?===&lt;br /&gt;
:The PND file is simply an archive or file system image (currently, ISO and SquashFS are supported) with a &amp;quot;PXML.xml&amp;quot; appended at the end. There can also be an accompanying screenshot that is appended as well.&lt;br /&gt;
&lt;br /&gt;
===Can I modify a PND file?===&lt;br /&gt;
:You can, but you need special tools to do so. It is advised that only developers modify or create PND files.&lt;br /&gt;
&lt;br /&gt;
===Can a PND file modify itself?===&lt;br /&gt;
:No, not without serious hacks.&lt;br /&gt;
&lt;br /&gt;
===How does a PND store application data?===&lt;br /&gt;
:Since the PND cannot modify itself, there has to be a way for it to store runtime data, such as configuration files and user-added level files. This is achieved in the PND system by creating an application data directory for each application that is inside a PND. Since a PND can contain many applications, there can, and will, be multiple application data folders per PND, and each application declares its own application data folder name.&lt;br /&gt;
:The application data folders are located in &amp;quot;pandora/appdata/*&amp;quot; on the primary SD card of the system.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
===How do I use PND files?===&lt;br /&gt;
:Using PND files on your Pandora is easy: You simply get hold of a PND file, presumably via a web page of some kind, and store it in a special folder on one of your SD cards. The default location is &amp;quot;/media/*/pandora/apps&amp;quot; which means that PNDs will be found on any SD card, USB stick or similar that has a &amp;quot;pandora/apps&amp;quot; folder.&lt;br /&gt;
:Once you've put your PND in a known location, the PND system will pick up the new PND, &amp;quot;activate&amp;quot; it, and create shortcut icons to the applications inside of the PND. You can then use these icons to launch the applications.&lt;br /&gt;
&lt;br /&gt;
===How do I change the search paths for PND files?===&lt;br /&gt;
:Simply edit the &amp;quot;/etc/pandora/conf/apps&amp;quot; file, and change the &amp;quot;searchpath&amp;quot; entry to include the paths you want to use. Paths are separated by colons (&amp;quot;:&amp;quot;) and may include wildcards (in the shape of &amp;quot;*&amp;quot;) anywhere in the path.&lt;br /&gt;
&lt;br /&gt;
===How do I launch a PND application without putting it in a special location?===&lt;br /&gt;
:If you open a PND file in your file manager, the first application in the PND will be launched without you having to move the PND file.&lt;br /&gt;
&lt;br /&gt;
===How do I choose where the shortcut icons for a PND appear?===&lt;br /&gt;
:With the default configuration, there are four different folders you can put your PND files in to have their applications show up in different locations:&lt;br /&gt;
:* &amp;quot;/media/*/pandora/menu&amp;quot; - These PND-files will only generate shortcut icons in the system's application menu. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;/usr/share/applications&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/desktop&amp;quot; - These PND files will only generate shortcut icons on the Desktop. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;~/Desktop&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/apps&amp;quot; - At the moment, this path does the same as the &amp;quot;desktop&amp;quot; path: it extracts shortcuts on the desktop.&lt;br /&gt;
:* &amp;quot;/usr/pandora/apps&amp;quot; This also extracts shortcut icons to the desktop.&lt;br /&gt;
&lt;br /&gt;
===How do I configure different locations for my PND shortcuts?===&lt;br /&gt;
:Edit the file &amp;quot;/etc/pandora/conf/desktop&amp;quot; (The &amp;quot;desktop&amp;quot; refers to &amp;quot;*.desktop files&amp;quot;). It will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Desktop configuration&lt;br /&gt;
&lt;br /&gt;
[desktop]&lt;br /&gt;
searchpath	/media/*/pandora/desktop:/media/*/pandora/apps:/usr/pandora/apps&lt;br /&gt;
dotdesktoppath	~/Desktop/&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&lt;br /&gt;
[menu]&lt;br /&gt;
searchpath	/media/*/pandora/menu&lt;br /&gt;
dotdesktoppath	/usr/share/applications&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:You should leave the &amp;quot;iconpath&amp;quot; variables be, but you can change which paths are searched through and where &amp;quot;*.desktop&amp;quot; files are extracted with the &amp;quot;searchpath&amp;quot; and &amp;quot;dotdesktoppath&amp;quot; variables, respectively.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PND:FAQ&amp;diff=2188</id>
		<title>PND:FAQ</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PND:FAQ&amp;diff=2188"/>
		<updated>2010-03-05T21:30:52Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: New page: This is a list of '''frequently asked questions''' about using the Pandora PND package format. For factual and other kinds of questions, use the search box. If your ques...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of '''frequently asked questions''' about using the Pandora PND package format. For factual and other kinds of questions, use the [[Special:Search|search box]]. If your question is not answered on this page, do some research and include it!&lt;br /&gt;
__NOTOC__ __TOC__&lt;br /&gt;
&lt;br /&gt;
==The PND system==&lt;br /&gt;
&lt;br /&gt;
===What is a PND file?===&lt;br /&gt;
:A PND file is a compact file that contains one or more runnable applications for the Pandora. The file is basically an archive (like a ZIP, RAR or ISO) that contains all the data that the provided set of applications require, along with some meta data about the applications themselves.&lt;br /&gt;
&lt;br /&gt;
===Why are PNDs useful?===&lt;br /&gt;
:Normally, on an ordinary computer, it is necessary to install an application in order to run it. This usually happens in one of many different ways; an installer might be run, or an archive might become extracted, etc.&lt;br /&gt;
:PND files are used to allow for applications to be executed ''without'' them being installed first. They are supposed to work in a way similar to game cartridges, in that they contain all of the necessary information in one tight package that can be executed independently.&lt;br /&gt;
:This system is inspired by similar systems such as the Apple OS 10 DMG file system, the Puppy Linux package format, or the Haiku Box package management system.&lt;br /&gt;
&lt;br /&gt;
===Can I modify a PND file?===&lt;br /&gt;
:You can, but you need special tools to do so. It is advised that only developers modify or create PND files.&lt;br /&gt;
&lt;br /&gt;
===Can a PND file modify itself?===&lt;br /&gt;
:No, not without serious hacks.&lt;br /&gt;
&lt;br /&gt;
===How does a PND store application data?===&lt;br /&gt;
:Since the PND cannot modify itself, there has to be a way for it to store runtime data, such as configuration files and user-added level files. This is achieved in the PND system by creating an application data directory for each application that is inside a PND. Since a PND can contain many applications, there can, and will, be multiple application data folders per PND, and each application declares its own application data folder name.&lt;br /&gt;
:The application data folders are located in &amp;quot;pandora/appdata/*&amp;quot; on the primary SD card of the system.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
===How do I use PND files?===&lt;br /&gt;
:Using PND files on your Pandora is easy: You simply get hold of a PND file, presumably via a web page of some kind, and store it in a special folder on one of your SD cards. The default location is &amp;quot;/media/*/pandora/apps&amp;quot; which means that PNDs will be found on any SD card, USB stick or similar that has a &amp;quot;pandora/apps&amp;quot; folder.&lt;br /&gt;
:Once you've put your PND in a known location, the PND system will pick up the new PND, &amp;quot;activate&amp;quot; it, and create shortcut icons to the applications inside of the PND. You can then use these icons to launch the applications.&lt;br /&gt;
&lt;br /&gt;
===How do I change the search paths for PND files?===&lt;br /&gt;
:Simply edit the &amp;quot;/etc/pandora/conf/apps&amp;quot; file, and change the &amp;quot;searchpath&amp;quot; entry to include the paths you want to use. Paths are separated by colons (&amp;quot;:&amp;quot;) and may include wildcards (in the shape of &amp;quot;*&amp;quot;) anywhere in the path.&lt;br /&gt;
&lt;br /&gt;
===How do I launch a PND application without putting it in a special location?===&lt;br /&gt;
:If you open a PND file in your file manager, the first application in the PND will be launched without you having to move the PND file.&lt;br /&gt;
&lt;br /&gt;
===How do I choose where the shortcut icons for a PND appear?===&lt;br /&gt;
:With the default configuration, there are four different folders you can put your PND files in to have their applications show up in different locations:&lt;br /&gt;
:* &amp;quot;/media/*/pandora/menu&amp;quot; - These PND-files will only generate shortcut icons in the system's application menu. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;/usr/share/applications&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/desktop&amp;quot; - These PND files will only generate shortcut icons on the Desktop. (&amp;quot;*.desktop&amp;quot; files will be written to &amp;quot;~/Desktop&amp;quot;)&lt;br /&gt;
:* &amp;quot;/media/*/pandora/apps&amp;quot; - At the moment, this path does the same as the &amp;quot;desktop&amp;quot; path: it extracts shortcuts on the desktop.&lt;br /&gt;
:* &amp;quot;/usr/pandora/apps&amp;quot; This also extracts shortcut icons to the desktop.&lt;br /&gt;
&lt;br /&gt;
===How do I configure different locations for my PND shortcuts?===&lt;br /&gt;
:Edit the file &amp;quot;/etc/pandora/conf/desktop&amp;quot; (The &amp;quot;desktop&amp;quot; refers to &amp;quot;*.desktop files&amp;quot;). It will look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Desktop configuration&lt;br /&gt;
&lt;br /&gt;
[desktop]&lt;br /&gt;
searchpath	/media/*/pandora/desktop:/media/*/pandora/apps:/usr/pandora/apps&lt;br /&gt;
dotdesktoppath	~/Desktop/&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&lt;br /&gt;
[menu]&lt;br /&gt;
searchpath	/media/*/pandora/menu&lt;br /&gt;
dotdesktoppath	/usr/share/applications&lt;br /&gt;
iconpath	/tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:You should leave the &amp;quot;iconpath&amp;quot; variables be, but you can change which paths are searched through and where &amp;quot;*.desktop&amp;quot; files are extracted with the &amp;quot;searchpath&amp;quot; and &amp;quot;dotdesktoppath&amp;quot; variables, respectively.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2187</id>
		<title>PXML specification</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2187"/>
		<updated>2010-03-05T20:18:59Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Attention:''' at the present time, the PXML file format isn't set in stone, and is therefore subject to change. There is no guarantee that the format or the schema are bug-free or will be changed at any time. Please wait until this standard is finished before writing a PXML file.&lt;br /&gt;
&lt;br /&gt;
This is the human-readable specification for the PXML file format. The PXML file format is used in your applications for the OpenPandora® that you package in &amp;quot;.pnd&amp;quot;-files or distribute otherwise, to make it possible for menus and launchers to use your applications and their properties.&lt;br /&gt;
&lt;br /&gt;
A PXML file should be appended to your &amp;quot;.pnd&amp;quot;-file, using the tools provided for that purpose, or put in a directory that you want to serve as a redistributable package, to make it possible for launchers and menus to find it. It should have the name &amp;quot;PXML.xml&amp;quot; not case sensitive, and there should only be one such file. The contents of the PXML file should also comply to this specification without exception, to guarantee that everyone will be able to read it.&lt;br /&gt;
&lt;br /&gt;
== XML compatibility ==&lt;br /&gt;
The PXML format is XML-based and fully XML-compliant, which means that it can be read and written by any XML reader or writer. Included with this specification should also be a &amp;quot;.xsd&amp;quot;-file, which is used by XML tools to validate PXML files. A &amp;quot;.xsd&amp;quot;-file is also known as a XML schema, and can be called the &amp;quot;computer-readable&amp;quot; version of this document. It is very good practice to validate your PXML-files with that schema before publishing them.&lt;br /&gt;
&lt;br /&gt;
To write a PXML file, you also need to know the basics of writing a XML file. It boils down to the following:&lt;br /&gt;
&lt;br /&gt;
# If an element contains text or other elements, it needs a start-tag and an end-tag. This looks like (1)&lt;br /&gt;
# If an element does not contain other elements or text, but only attributes, it looks like (2)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement someattribute=&amp;quot;something&amp;quot;&amp;gt;something inside it&amp;lt;/exampleelement&amp;gt; &amp;lt;!-- (1) --&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement2 someattribute=&amp;quot;something&amp;quot; /&amp;gt; &amp;lt;!-- (2) --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The PXML-file is split up into multiple so-called elements, each of which specify one property of the &amp;quot;.pnd&amp;quot;-package. All of these elements are surrounded with a &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag, which tells the readers of the file that the data within that tag belongs to a PXML file. The tag and elements should be defined as follows:&lt;br /&gt;
=== The PXML-tag ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The PXML-tag serves as the container for all PXML elements. It is the first thing that should occur in your PXML file. An example &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, the PXML tag accepts a few attributes, namely the &amp;quot;id&amp;quot; and &amp;quot;xmlns&amp;quot; attributes.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;xmlns&amp;quot; attribute is required by the XML standard, and guarantees that this file will be identified as a PXML file. You must include the xmlns attribute, exactly as shown, in your PXML file, with the URL as specified. Only then can it be guaranteed that the file will be read at all by launchers and menu apps.&lt;br /&gt;
* '''DEPRECATED; SEE &amp;quot;application&amp;quot; tag.''' The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
=== The Application-tag ===&lt;br /&gt;
====Description====&lt;br /&gt;
The Application-tag permits the PXML.xml container to have multiple applications within it; you should have at least one application tag-pair (for one app), though you may have many.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;application id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
A good unique-id is the application name, developer name, and some key you may wish to update on occasion (should state-data become incompatible between updates, say.)&lt;br /&gt;
&lt;br /&gt;
Consider:&lt;br /&gt;
battlejewels.skeezix.001&lt;br /&gt;
quake-1.pickle.001&lt;br /&gt;
&lt;br /&gt;
unique-id formatting: '''Should not include directory or filename invalid characters, such as ?, &amp;gt;, /, etc. Any of those will cause the pnd-file to not function.'''&lt;br /&gt;
&lt;br /&gt;
Note on Uniqueness: The unique-id should be unique against other pnd-files, but may be re-used by other 'application' tags within the pnd; for example, you may have multiple subapps that want to share the same appdata path (which is formed based on unique-id!), so use the same unique-id. You might then have a utility application in that same pnd, which needs its own appdata, and so gets its own unique-id.&lt;br /&gt;
&lt;br /&gt;
=== The title element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The title element specifies the text that is shown to the users of your PND file as the application title. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;title&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Your application name&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;Dein Programmname&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The description element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The description element specifies the text that is shown to the users of your PND file as the application description. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;description&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;Your long description of this application, describing its purpose and highlighting its features.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;Deine etwas längere Programmbeschreibung, die den Sinn des Programmes und seine wichtigsten Features beschreiben sollte.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The exec element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The exec element should specify all the information needed to execute your application.&lt;br /&gt;
An exec element must be included in every PXML file. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The command attribute specifies the path to the executable file. This should be a relative path to a file within the PND package. Must contain no arguments! One strategy you may need is to point to a sh-script in your pnd-file, which in turn sets up LD_LIBRARY_PATH, determines arguments to pass, uses zenity to pop up a pre-run menu, or other trickery.&lt;br /&gt;
* The arguments attribute may be not present, or present with 1 or more arguments to the executable.&lt;br /&gt;
* The startdir attribute specifies the starting directory (Also known as the working directory) that the application should start in. This should be a relative path to a directory within the PND package, or to a well-known directory in the Pandora file system.&lt;br /&gt;
* The standalone attribute specifies whether or not this application can run on its own, or if it needs parameters to run. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can be run without parameters. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run with parameters (Meaning that no icon will appear for it in a launcher; it will only be run via file associations or via the terminal).&lt;br /&gt;
* The background attribute specifies whether or not this application should run in the background, and it should be possible to switch to other apps while it is running, or if it is the only application that should be running. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can run in the background. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run as the only application.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;myprogram&amp;quot; arguments=&amp;quot;arg1 arg2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The icon element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The icon element should specify a nice icon for your program.&lt;br /&gt;
An icon element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The src attribute specifies the path to the image file used as the icon.&lt;br /&gt;
&lt;br /&gt;
NOTE: Current implementation will use the pnd-file's appended icon; for a PXML-app-directory, it will try to use the icon mentioned in the PXML. So for a pnd-file, all subapps will show the appended-icon, regardless of the &amp;lt;icon&amp;gt; tag within the PXML.xml&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;icon src=&amp;quot;images/icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The previewpics element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The previewpics element is an element that contains multiple other elements.&lt;br /&gt;
A previewpics element is optional.&lt;br /&gt;
&lt;br /&gt;
It contains multiple pic-elements. Every pic-element represents one preview picture. If the previewpics element is specified, it must contain at least one pic element.&lt;br /&gt;
&lt;br /&gt;
* The src attribute on a pic element specifies the path to the image file used as the preview picture.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;previewpics&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The author element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The author element is an element that is used by the author to introduce him/herself.&lt;br /&gt;
An author element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The name attribute specifies the name of the author.&lt;br /&gt;
* The website attribute specifies the website of the author.&lt;br /&gt;
* The email attribute specifies the e-mail of the author. This attribute is not yet supported by libpnd, but please specify it anyways.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The version element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The version element specifies the application version.&lt;br /&gt;
A version element is required. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The major attribute specifies the major version number. This number should be 0 or more.&lt;br /&gt;
* The minor attribute specifies the minor version number. This number should be 0 or more.&lt;br /&gt;
* The release attribute specifies the release number. This number should be 0 or more.&lt;br /&gt;
* The build attribute specifies what build the application is at. This number should be 0 or more.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The osversion element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The osversion element specifies the application version.&lt;br /&gt;
An osversion element is optional. It accepts the same attributes as the version element.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The categories element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The categories element is an element that contains multiple other elements.&lt;br /&gt;
A categories element is required, and must contain at least one category.&lt;br /&gt;
&lt;br /&gt;
Menus that use your PXML in any shape or form will use the category information to sort your application entry into the tree or sub menus. Depending on the menu system, this will be done differently every time. It is therefore advisable to specify as many categories and subcategories as possible (and as suitable; don't specify that your application belongs in a category if it doesn't).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;categories&amp;quot; element contains multiple category-elements. Every category-element represents one category that this app can be sorted into. Valid top-level categories are (among others):&lt;br /&gt;
&lt;br /&gt;
# AudioVideo&lt;br /&gt;
# Audio&lt;br /&gt;
# Video&lt;br /&gt;
# Development&lt;br /&gt;
# Education&lt;br /&gt;
# Game&lt;br /&gt;
# Graphics&lt;br /&gt;
# Network&lt;br /&gt;
# Office&lt;br /&gt;
# Settings&lt;br /&gt;
# System&lt;br /&gt;
# Utility&lt;br /&gt;
&lt;br /&gt;
Please see [http://standards.freedesktop.org/menu-spec/latest/apa.html the FreeDesktop specification] for more information. In it, you will also find valid subcategories for your top-level categories.&lt;br /&gt;
&lt;br /&gt;
The category-element takes one attribute: The name-attribute. This attribute represents the category name, which preferrably should be one of the above.&lt;br /&gt;
&lt;br /&gt;
A category-element can contain further child-elements: subcategory-elements. These represent the subcategories of a category that the app will be sorted into.&lt;br /&gt;
&lt;br /&gt;
The subcategory-element also takes a name-attribute; this attibute can contain a name for your subcategory.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;categories&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app belongs in the &amp;quot;Game/StrategyGame&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app also belongs in the &amp;quot;Graphics/ImageProcessing&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/categories&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The associations element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The associations element is an element that contains multiple other elements.&lt;br /&gt;
An associations element is optional, except if exec.standalone is false.&lt;br /&gt;
&lt;br /&gt;
It contains multiple association-elements. Every association-element represents one file action association.&lt;br /&gt;
&lt;br /&gt;
* The name attribute on an association element specifies the user-friendly action name for the association.&lt;br /&gt;
* The filetype attribute on an association element specifies what file types (in MIME format) that this association should apply to.&lt;br /&gt;
* The exec attribute on an association element specifies the command-line arguments that should be given to the program, when this action is performed. The exec can contain a &amp;quot;%s&amp;quot;, which indicates where the file name of the file, that the action is performed on, should be inserted. For example, if the exec-line is &amp;quot;--file %s --type lol&amp;quot;, and you have a file &amp;quot;lol.bmp&amp;quot; that the action is performed on, the exec-line is transformed into &amp;quot;--file &amp;quot;lol.bmp&amp;quot; --type lol&amp;quot;&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;associations&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Open Bitmap Image&amp;quot; filetype=&amp;quot;image/bmp&amp;quot; exec=&amp;quot;-f %s --no-deinterlacing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Crash the computer with a stylesheet&amp;quot; filetype=&amp;quot;text/css&amp;quot; exec=&amp;quot;-f %s --crash-on-success&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/associations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The clockspeed element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The clockspeed element specifies what clockspeed this app should run at. Please do only specify this element if your application *needs* to run at the specified clock speed.&lt;br /&gt;
A clockspeed element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The frequency attribute specifies the wanted frequency, in megahertz (MHz).&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The mkdir element ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The PXML may request creation of directories on the SD card.&lt;br /&gt;
&lt;br /&gt;
'''This should be used sparingly.'''&lt;br /&gt;
&lt;br /&gt;
There are a number of scenarios in which this may be useful; should an application wish to attempt to establish a canonicle location for a file, it can request a path be created. This can avoid user confusion -- user merely plugs in SD, waits a few moments, pulls out SD, and inspects it to see what directories he may populate. Consider 'id' files for Quake -- the user might have many ports of the game, such as Quake, or ioquake, or others. They could all share the same id pak files, but the user may not know where to put them. (Especially since the pnd-file itself does not have user documentation available perhaps.) Consider ROM-paths for emulators .. perhaps the emulator expects ROMs in a specific location? If so, the author may wish to have that location created, to make it obvious.&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
The paths are created on the SD that contains the pnd.&lt;br /&gt;
The paths may not include &amp;quot;..&amp;quot; or wildcards.&lt;br /&gt;
&lt;br /&gt;
It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* dir -&amp;gt; the name of the path to be created; it may not be multiple levels deep - to effect that, include multiple &amp;lt;dir path=&amp;quot;...&amp;quot;/&amp;gt; entries&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mkdir&amp;gt;&lt;br /&gt;
  &amp;lt;dir path=&amp;quot;/foo/bar&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/mkdir&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is in /pandora/desktop on SD1 (/media/mmcblk0p1 say), then /media/mmcblk0p1/foo/bar will be created.&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;youruniqueID&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
  &amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;German Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;program&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;icon src=&amp;quot;program.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;This is the English Description of the file.&amp;lt;/description&amp;gt;&lt;br /&gt;
  &amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;This would be the German description.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;previewpics&amp;gt;&lt;br /&gt;
    &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;author name=&amp;quot;Some Dudeson&amp;quot; website=&amp;quot;http://a.bc.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;categories&amp;gt;&lt;br /&gt;
    &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/category&amp;gt;&lt;br /&gt;
    &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;/categories&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;associations&amp;gt;&lt;br /&gt;
    &amp;lt;association name=&amp;quot;View Word File&amp;quot; filetype=&amp;quot;application/msword&amp;quot; exec=&amp;quot;-f %s -t doc&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/associations&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
To validate a PXML file, you need a XSD (XML schema) validator, and you have to know how to use it.&lt;br /&gt;
&lt;br /&gt;
You will also need to put the XML schema for the PXML format in the same folder as your PXML file.&lt;br /&gt;
&lt;br /&gt;
When you have done that, and know how to use it, you need to change a few things in your PXML file. In your PXML tag, change the contents from this...&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;PXML_schema.xsd&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the PXML file can be validated.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2186</id>
		<title>PXML specification</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=PXML_specification&amp;diff=2186"/>
		<updated>2010-03-05T19:48:51Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''DEPRECATED:''' [http://dl.openhandhelds.org/cgi-bin/pandora.cgi?0,1,0,0,45,35 Download this page as PDF]&lt;br /&gt;
&lt;br /&gt;
'''Attention:''' at the present time, the PXML file format isn't set in stone, and is therefore subject to change. There is no guarantee that the format or the schema are bug-free or will be changed at any time. Please wait until this standard is finished before writing a PXML file.&lt;br /&gt;
&lt;br /&gt;
This is the human-readable specification for the PXML file format. The PXML file format is used in your applications for the OpenPandora® that you package in &amp;quot;.pnd&amp;quot;-files or distribute otherwise, to make it possible for menus and launchers to use your applications and their properties.&lt;br /&gt;
&lt;br /&gt;
A PXML file should be appended to your &amp;quot;.pnd&amp;quot;-file, using the tools provided for that purpose, or put in a directory that you want to serve as a redistributable package, to make it possible for launchers and menus to find it. It should have the name &amp;quot;PXML.xml&amp;quot; not case sensitive, and there should only be one such file. The contents of the PXML file should also comply to this specification without exception, to guarantee that everyone will be able to read it.&lt;br /&gt;
&lt;br /&gt;
== XML compatibility ==&lt;br /&gt;
The PXML format is XML-based and fully XML-compliant, which means that it can be read and written by any XML reader or writer. Included with this specification should also be a &amp;quot;.xsd&amp;quot;-file, which is used by XML tools to validate PXML files. A &amp;quot;.xsd&amp;quot;-file is also known as a XML schema, and can be called the &amp;quot;computer-readable&amp;quot; version of this document. It is very good practice to validate your PXML-files with that schema before publishing them.&lt;br /&gt;
&lt;br /&gt;
To write a PXML file, you also need to know the basics of writing a XML file. It boils down to the following:&lt;br /&gt;
&lt;br /&gt;
# If an element contains text or other elements, it needs a start-tag and an end-tag. This looks like (1)&lt;br /&gt;
# If an element does not contain other elements or text, but only attributes, it looks like (2)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement someattribute=&amp;quot;something&amp;quot;&amp;gt;something inside it&amp;lt;/exampleelement&amp;gt; &amp;lt;!-- (1) --&amp;gt;&lt;br /&gt;
&amp;lt;exampleelement2 someattribute=&amp;quot;something&amp;quot; /&amp;gt; &amp;lt;!-- (2) --&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
The PXML-file is split up into multiple so-called elements, each of which specify one property of the &amp;quot;.pnd&amp;quot;-package. All of these elements are surrounded with a &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag, which tells the readers of the file that the data within that tag belongs to a PXML file. The tag and elements should be defined as follows:&lt;br /&gt;
=== The PXML-tag ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
The PXML-tag serves as the container for all PXML elements. It is the first thing that should occur in your PXML file. An example &amp;quot;&amp;lt;PXML&amp;gt;&amp;quot;-tag would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, the PXML tag accepts a few attributes, namely the &amp;quot;id&amp;quot; and &amp;quot;xmlns&amp;quot; attributes.&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;xmlns&amp;quot; attribute is required by the XML standard, and guarantees that this file will be identified as a PXML file. You must include the xmlns attribute, exactly as shown, in your PXML file, with the URL as specified. Only then can it be guaranteed that the file will be read at all by launchers and menu apps.&lt;br /&gt;
* '''DEPRECATED; SEE &amp;quot;application&amp;quot; tag.''' The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
=== The Application-tag ===&lt;br /&gt;
====Description====&lt;br /&gt;
The Application-tag permits the PXML.xml container to have multiple applications within it; you should have at least one application tag-pair (for one app), though you may have many.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;application id=&amp;quot;uniqueID&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!--All of the PXML elements should be put here--&amp;gt;&lt;br /&gt;
&amp;lt;/application&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;id&amp;quot; attribute specifies an identifier for your PND package, and should be something globally unique so that no two PND packages have the same id. This can be achieved by appending some random number to your application name, and to use that as your id; or to simply generate a completely random, very long id. If this id already is used in another PND file, those two PND files will conflict with each other, and unforseeable errors will occur. Please put effort into generating an unique id for your PXML-file.&lt;br /&gt;
&lt;br /&gt;
A good unique-id is the application name, developer name, and some key you may wish to update on occasion (should state-data become incompatible between updates, say.)&lt;br /&gt;
&lt;br /&gt;
Consider:&lt;br /&gt;
battlejewels.skeezix.001&lt;br /&gt;
quake-1.pickle.001&lt;br /&gt;
&lt;br /&gt;
unique-id formatting: '''Should not include directory or filename invalid characters, such as ?, &amp;gt;, /, etc. Any of those will cause the pnd-file to not function.'''&lt;br /&gt;
&lt;br /&gt;
Note on Uniqueness: The unique-id should be unique against other pnd-files, but may be re-used by other 'application' tags within the pnd; for example, you may have multiple subapps that want to share the same appdata path (which is formed based on unique-id!), so use the same unique-id. You might then have a utility application in that same pnd, which needs its own appdata, and so gets its own unique-id.&lt;br /&gt;
&lt;br /&gt;
=== The title element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The title element specifies the text that is shown to the users of your PND file as the application title. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;title&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Your application name&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;Dein Programmname&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The description element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The description element specifies the text that is shown to the users of your PND file as the application description. This element can be specified multiple times in multiple languages the language is indicated by the lang attribute.&lt;br /&gt;
&lt;br /&gt;
At least one &amp;quot;description&amp;quot;-element is required, in the &amp;quot;en_US&amp;quot; American English language.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;Your long description of this application, describing its purpose and highlighting its features.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;Deine etwas längere Programmbeschreibung, die den Sinn des Programmes und seine wichtigsten Features beschreiben sollte.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The exec element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The exec element should specify all the information needed to execute your application.&lt;br /&gt;
An exec element must be included in every PXML file. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The command attribute specifies the path to the executable file. This should be a relative path to a file within the PND package. Must contain no arguments! One strategy you may need is to point to a sh-script in your pnd-file, which in turn sets up LD_LIBRARY_PATH, determines arguments to pass, uses zenity to pop up a pre-run menu, or other trickery.&lt;br /&gt;
* The arguments attribute may be not present, or present with 1 or more arguments to the executable.&lt;br /&gt;
* The startdir attribute specifies the starting directory (Also known as the working directory) that the application should start in. This should be a relative path to a directory within the PND package, or to a well-known directory in the Pandora file system.&lt;br /&gt;
* The standalone attribute specifies whether or not this application can run on its own, or if it needs parameters to run. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can be run without parameters. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run with parameters (Meaning that no icon will appear for it in a launcher; it will only be run via file associations or via the terminal).&lt;br /&gt;
* The background attribute specifies whether or not this application should run in the background, and it should be possible to switch to other apps while it is running, or if it is the only application that should be running. A value of &amp;quot;true&amp;quot; or &amp;quot;1&amp;quot; means that the application can run in the background. A value of &amp;quot;false&amp;quot; or &amp;quot;0&amp;quot; means that the application must be run as the only application.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;myprogram&amp;quot; arguments=&amp;quot;arg1 arg2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The icon element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The icon element should specify a nice icon for your program.&lt;br /&gt;
An icon element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The src attribute specifies the path to the image file used as the icon.&lt;br /&gt;
&lt;br /&gt;
NOTE: Current implementation will use the pnd-file's appended icon; for a PXML-app-directory, it will try to use the icon mentioned in the PXML. So for a pnd-file, all subapps will show the appended-icon, regardless of the &amp;lt;icon&amp;gt; tag within the PXML.xml&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;icon src=&amp;quot;images/icon.png&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The previewpics element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The previewpics element is an element that contains multiple other elements.&lt;br /&gt;
A previewpics element is optional.&lt;br /&gt;
&lt;br /&gt;
It contains multiple pic-elements. Every pic-element represents one preview picture. If the previewpics element is specified, it must contain at least one pic element.&lt;br /&gt;
&lt;br /&gt;
* The src attribute on a pic element specifies the path to the image file used as the preview picture.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;previewpics&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The author element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The author element is an element that is used by the author to introduce him/herself.&lt;br /&gt;
An author element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The name attribute specifies the name of the author.&lt;br /&gt;
* The website attribute specifies the website of the author.&lt;br /&gt;
* The email attribute specifies the e-mail of the author. This attribute is not yet supported by libpnd, but please specify it anyways.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;author name=&amp;quot;Bjornhild Andersson&amp;quot; website=&amp;quot;http://some.website.with.author.info&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The version element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The version element specifies the application version.&lt;br /&gt;
A version element is required. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The major attribute specifies the major version number. This number should be 0 or more.&lt;br /&gt;
* The minor attribute specifies the minor version number. This number should be 0 or more.&lt;br /&gt;
* The release attribute specifies the release number. This number should be 0 or more.&lt;br /&gt;
* The build attribute specifies what build the application is at. This number should be 0 or more.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The osversion element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The osversion element specifies the application version.&lt;br /&gt;
An osversion element is optional. It accepts the same attributes as the version element.&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The categories element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The categories element is an element that contains multiple other elements.&lt;br /&gt;
A categories element is required, and must contain at least one category.&lt;br /&gt;
&lt;br /&gt;
Menus that use your PXML in any shape or form will use the category information to sort your application entry into the tree or sub menus. Depending on the menu system, this will be done differently every time. It is therefore advisable to specify as many categories and subcategories as possible (and as suitable; don't specify that your application belongs in a category if it doesn't).&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;categories&amp;quot; element contains multiple category-elements. Every category-element represents one category that this app can be sorted into. Valid top-level categories are (among others):&lt;br /&gt;
&lt;br /&gt;
# AudioVideo&lt;br /&gt;
# Audio&lt;br /&gt;
# Video&lt;br /&gt;
# Development&lt;br /&gt;
# Education&lt;br /&gt;
# Game&lt;br /&gt;
# Graphics&lt;br /&gt;
# Network&lt;br /&gt;
# Office&lt;br /&gt;
# Settings&lt;br /&gt;
# System&lt;br /&gt;
# Utility&lt;br /&gt;
&lt;br /&gt;
Please see [http://standards.freedesktop.org/menu-spec/latest/apa.html the FreeDesktop specification] for more information. In it, you will also find valid subcategories for your top-level categories.&lt;br /&gt;
&lt;br /&gt;
The category-element takes one attribute: The name-attribute. This attribute represents the category name, which preferrably should be one of the above.&lt;br /&gt;
&lt;br /&gt;
A category-element can contain further child-elements: subcategory-elements. These represent the subcategories of a category that the app will be sorted into.&lt;br /&gt;
&lt;br /&gt;
The subcategory-element also takes a name-attribute; this attibute can contain a name for your subcategory.&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;categories&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app belongs in the &amp;quot;Game/StrategyGame&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;!-- This app also belongs in the &amp;quot;Graphics/ImageProcessing&amp;quot; category --&amp;gt;&lt;br /&gt;
  &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/categories&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The associations element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The associations element is an element that contains multiple other elements.&lt;br /&gt;
An associations element is optional, except if exec.standalone is false.&lt;br /&gt;
&lt;br /&gt;
It contains multiple association-elements. Every association-element represents one file action association.&lt;br /&gt;
&lt;br /&gt;
* The name attribute on an association element specifies the user-friendly action name for the association.&lt;br /&gt;
* The filetype attribute on an association element specifies what file types (in MIME format) that this association should apply to.&lt;br /&gt;
* The exec attribute on an association element specifies the command-line arguments that should be given to the program, when this action is performed. The exec can contain a &amp;quot;%s&amp;quot;, which indicates where the file name of the file, that the action is performed on, should be inserted. For example, if the exec-line is &amp;quot;--file %s --type lol&amp;quot;, and you have a file &amp;quot;lol.bmp&amp;quot; that the action is performed on, the exec-line is transformed into &amp;quot;--file &amp;quot;lol.bmp&amp;quot; --type lol&amp;quot;&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;associations&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Open Bitmap Image&amp;quot; filetype=&amp;quot;image/bmp&amp;quot; exec=&amp;quot;-f %s --no-deinterlacing&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;association name=&amp;quot;Crash the computer with a stylesheet&amp;quot; filetype=&amp;quot;text/css&amp;quot; exec=&amp;quot;-f %s --crash-on-success&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/associations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== The clockspeed element ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The clockspeed element specifies what clockspeed this app should run at. Please do only specify this element if your application *needs* to run at the specified clock speed.&lt;br /&gt;
A clockspeed element is optional. It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* The frequency attribute specifies the wanted frequency, in megahertz (MHz).&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The mkdir element ===&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
The PXML may request creation of directories on the SD card.&lt;br /&gt;
&lt;br /&gt;
'''This should be used sparingly.'''&lt;br /&gt;
&lt;br /&gt;
There are a number of scenarios in which this may be useful; should an application wish to attempt to establish a canonicle location for a file, it can request a path be created. This can avoid user confusion -- user merely plugs in SD, waits a few moments, pulls out SD, and inspects it to see what directories he may populate. Consider 'id' files for Quake -- the user might have many ports of the game, such as Quake, or ioquake, or others. They could all share the same id pak files, but the user may not know where to put them. (Especially since the pnd-file itself does not have user documentation available perhaps.) Consider ROM-paths for emulators .. perhaps the emulator expects ROMs in a specific location? If so, the author may wish to have that location created, to make it obvious.&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
The paths are created on the SD that contains the pnd.&lt;br /&gt;
The paths may not include &amp;quot;..&amp;quot; or wildcards.&lt;br /&gt;
&lt;br /&gt;
It accepts the following attributes:&lt;br /&gt;
&lt;br /&gt;
* dir -&amp;gt; the name of the path to be created; it may not be multiple levels deep - to effect that, include multiple &amp;lt;dir path=&amp;quot;...&amp;quot;/&amp;gt; entries&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;mkdir&amp;gt;&lt;br /&gt;
  &amp;lt;dir path=&amp;quot;/foo/bar&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/mkdir&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is in /pandora/desktop on SD1 (/media/mmcblk0p1 say), then /media/mmcblk0p1/foo/bar will be created.&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;youruniqueID&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;title lang=&amp;quot;en_US&amp;quot;&amp;gt;Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
  &amp;lt;title lang=&amp;quot;de_DE&amp;quot;&amp;gt;German Program Title&amp;lt;/title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;exec background=&amp;quot;true&amp;quot; startdir=&amp;quot;/usr/share/icons/&amp;quot; standalone=&amp;quot;true&amp;quot; command=&amp;quot;program&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;icon src=&amp;quot;program.png&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;description lang=&amp;quot;en_US&amp;quot;&amp;gt;This is the English Description of the file.&amp;lt;/description&amp;gt;&lt;br /&gt;
  &amp;lt;description lang=&amp;quot;de_DE&amp;quot;&amp;gt;This would be the German description.&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;previewpics&amp;gt;&lt;br /&gt;
    &amp;lt;pic src=&amp;quot;preview/pic1.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;pic src=&amp;quot;preview/pic2.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/previewpics&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;author name=&amp;quot;Some Dudeson&amp;quot; website=&amp;quot;http://a.bc.de&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;version major=&amp;quot;1&amp;quot; minor=&amp;quot;1&amp;quot; release=&amp;quot;1&amp;quot; build=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;osversion major=&amp;quot;1&amp;quot; minor=&amp;quot;0&amp;quot; release=&amp;quot;0&amp;quot; build=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;categories&amp;gt;&lt;br /&gt;
    &amp;lt;category name=&amp;quot;Game&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;subcategory name=&amp;quot;StrategyGame&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/category&amp;gt;&lt;br /&gt;
    &amp;lt;category name=&amp;quot;Graphics&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;subcategory name=&amp;quot;ImageProcessing&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/category&amp;gt;&lt;br /&gt;
  &amp;lt;/categories&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;associations&amp;gt;&lt;br /&gt;
    &amp;lt;association name=&amp;quot;View Word File&amp;quot; filetype=&amp;quot;application/msword&amp;quot; exec=&amp;quot;-f %s -t doc&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/associations&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;clockspeed frequency=&amp;quot;600&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/PXML&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
&lt;br /&gt;
To validate a PXML file, you need a XSD (XML schema) validator, and you have to know how to use it.&lt;br /&gt;
&lt;br /&gt;
You will also need to put the XML schema for the PXML format in the same folder as your PXML file.&lt;br /&gt;
&lt;br /&gt;
When you have done that, and know how to use it, you need to change a few things in your PXML file. In your PXML tag, change the contents from this...&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...to this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;PXML id=&amp;quot;...&amp;quot; xmlns=&amp;quot;http://openpandora.org/namespaces/PXML&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;PXML_schema.xsd&amp;quot;&amp;gt; ...&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the PXML file can be validated.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2183</id>
		<title>New PND format</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2183"/>
		<updated>2010-03-03T22:17:49Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Advantages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current PND format has some shortcomings as listed below. This page should serve as a discussion page/white board for how the format could be improved.&lt;br /&gt;
&lt;br /&gt;
''' Proposal for discussion, this is just some opening shots '''&lt;br /&gt;
&lt;br /&gt;
== Current situation ==&lt;br /&gt;
The current (ISO-based) PND format has the following shortcomings:&lt;br /&gt;
&lt;br /&gt;
* It currently uses ISO, CramFS, and other filesystems... This means that there's no standard to follow, and libpnd needs to carry around support for a multitude of file systems.&lt;br /&gt;
* It (often, but not always) uses the [http://en.wikipedia.org/wiki/ISO_9660 ISO file system] which is inefficient at storing data, because:&lt;br /&gt;
** It contains duplicate headers for each file entry[http://users.telenet.be/it3.consultants.bvba/handouts/ISO9960.html] (one version with big-endian integers, one version with little-endian integers[http://en.wikipedia.org/wiki/Endianness]) which leads to many kilobytes of wasted space.&lt;br /&gt;
** Its file tables are fixed-size, and there are therefore limitations on how many folders you can have, what names you can give your files, how big your files can be etc. For instance, files can only have names that are max 31 characters long, all upper-case, and limited to the ASCII character encoding, and an ISO does only support a folder depth of 8[http://www.on-time.com/rtos-32-docs/rtfiles-32/programming-manual/iso-9660/]. To support more, the Joliet file system extension is needed (or isofs won't recognize all file paths), and the Joliet header can be placed practically anywhere in the file, which means additional seek times.&lt;br /&gt;
** It needs various file system extensions to behave correctly, like for example [http://en.wikipedia.org/wiki/Rock_Ridge Rock Ridge Interchange Protocol] and [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet]. Without them, it becomes pretty useless as demonstrated above, and with them, it becomes difficult to read by a tool (You can only use isofs! There are no other tools out there for programmers to use!).&lt;br /&gt;
** It's very difficult to use since you need special ISO making tools to create the image. ISO is a relatively rare format if you're not technically inclined.&lt;br /&gt;
** If you want to add or remove files from it, it's near impossible if you use a compact ISO file, since there's no way that you can &amp;quot;expand&amp;quot; an existing ISO file.&lt;br /&gt;
* The PND header data is at the end (or in the middle of the file if a screenshot is included) which makes it impossible for e.g. libmagic to recognize the PND file. It will instead recognize it as an ISO file. Having the header data at the end also makes it take a very long time to find the data, making tools and the libpnd library very inefficient.&lt;br /&gt;
* The PND file uses a custom XML format for its metadata. There's no reason to do this, especially since the established &amp;quot;.desktop&amp;quot; file format fills exactly the same function.&lt;br /&gt;
(note: &amp;quot;.desktop&amp;quot; does not contain all metadata we have wanted over time, but it's of course possible to add extensions à la &amp;quot;X-Pandora-Whatever=xyz&amp;quot;)&lt;br /&gt;
* There's no &amp;quot;index&amp;quot; for the PND file. The whole file has to be scanned (albeit backwards) to find a PXML file, and there's a big chance for false positives etc.&lt;br /&gt;
* Data is just appended linearly to the file so there's no order. If the format is to be extended (to e.g. include an icon file after the screenshot file), should the data just be appended as well?&lt;br /&gt;
* UTF-8 is strictly the only encoding that is supported. If you make your PXML on a Windows machine, it won't work.&lt;br /&gt;
&lt;br /&gt;
== Proposed revisions ==&lt;br /&gt;
=== Step 1: File system ===&lt;br /&gt;
The file system for PNDs should be replaced by the ''uncompressed'' ZIP archive format. ZIP has the advantage that it's incredibly compact, and uncompressed ZIP makes it possible to read data from the file without having to do any decompression.&lt;br /&gt;
&lt;br /&gt;
ZIP files are mountable using various implementations of zipfs, and most of these implementations won't store files in memory when they are being read if the ZIP file is uncompressed.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Metadata ===&lt;br /&gt;
PND files should no longer require special tools for them to be created. Therefore, since ZIP files support random access on files, it shouldn't be necessary to append/prepend metadata to the file. The user simply includes the &amp;quot;PXML.xml&amp;quot; and &amp;quot;preview.png&amp;quot; files inside of the ZIP, and any tools that need information about the PND can simply go to the central directory of the ZIP file (or use a simple ZIP library to do it for them) and get the location of the file inside of the ZIP. This should also dramatically decrease loading times for PNDs.&lt;br /&gt;
&lt;br /&gt;
Note; performance testing is needed; at the time we started, zip was enormously slower than plain ISO; with driver changes, it may or may not be so, hence our adopted multiple-filesystem-type system. zipfs is one possible option.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Metadata format ===&lt;br /&gt;
Current PND files include so-called &amp;quot;PXML.xml&amp;quot; files. These files have a custom XML format that has a strange structure.&lt;br /&gt;
&lt;br /&gt;
These files should be replaced by &amp;quot;.desktop&amp;quot; files. A PND can contain one or more &amp;quot;.desktop&amp;quot; files in its root directory that specify how an application should be launched. PND tools simply use all &amp;quot;.desktop&amp;quot; files they can find in the PND when creating launchers for the contents of the PND.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
* There don't have to be ''any'' special tools for reading PND files. The package can be run on any platform using any programming language that can read ZIP files.&lt;br /&gt;
* We can use existing facilities to manage the launching of applications. The &amp;quot;.desktop&amp;quot; files can basically be copied without modification into standard locations of the system, and all launchers will become aware of them.&lt;br /&gt;
* Reading PND files becomes easier (because of better tool support... sorry, but you can't link to libpnd in all programming languages) and quicker (becuase of the central directory for random file access).&lt;br /&gt;
&lt;br /&gt;
=== Benchmarks ===&lt;br /&gt;
A benchmark was carried through to measure the performance of various package implementations.&lt;br /&gt;
The compared systems were:&lt;br /&gt;
* ZIP-based uncompressed packages using fuse-zip (a zipfs implementation) to read the files&lt;br /&gt;
* ZIP-based compressed packages also using fuse-zip.&lt;br /&gt;
* ISO8859-based packages using isofs&lt;br /&gt;
* CramFS-based packages.&lt;br /&gt;
&lt;br /&gt;
A total of 9 files were generated for the test. They have sizes 1, 2, 3, 4, 16, 32, 64, 128 and 256 MB, and were generated via &amp;quot;dd if=/dev/urandom of=$file bs=1M count=$size&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Because the files contain random data, they did not compress very well. The resulting files were:&lt;br /&gt;
* &amp;quot;zipcompressed.zip&amp;quot; 511.1 MB&lt;br /&gt;
* &amp;quot;zipuncompressed.zip&amp;quot; 511.0 MB&lt;br /&gt;
* &amp;quot;iso.iso&amp;quot; 511.3 MB&lt;br /&gt;
* &amp;quot;cramfs.image&amp;quot; 95.4 MB (WOW!)&lt;br /&gt;
&lt;br /&gt;
Some notes:&lt;br /&gt;
* No write tests were done for obvious reasons&lt;br /&gt;
* No random access tests were done since the Pandora will use SD cards and thus not get penalized from random access, and that's not what we're interested in anyways.&lt;br /&gt;
* Before each test, the commands &amp;quot;sync; echo 3 &amp;gt; /proc/sys/vm/drop_caches&amp;quot; were run.&lt;br /&gt;
&lt;br /&gt;
==== First test: linear read time ====&lt;br /&gt;
Command: &amp;quot;time cat mountpoint/* &amp;gt; /dev/null&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* ISO: 8.119 seconds&lt;br /&gt;
* CramFS: 1.488 seconds (WOW!)&lt;br /&gt;
* Zip (compressed): 8.535 seconds&lt;br /&gt;
* Zip (uncompressed): 8.290 seconds&lt;br /&gt;
&lt;br /&gt;
==== Second test: RAM usage ====&lt;br /&gt;
-- TODO, have to find a good method of measuring this --&lt;br /&gt;
&lt;br /&gt;
== Remaining issues ==&lt;br /&gt;
* How should libpnd tell the difference between old and new PND files? Should it depend on the &amp;quot;file&amp;quot; tool, should it run its own recognition algorithm, or what? Should the extension be changed to e.g. &amp;quot;.box&amp;quot; (Which was proposed in a thread)?&lt;br /&gt;
* How to make sure that the ZIP files are uncompressed? Should we provide a script that &amp;quot;uncompresses&amp;quot; an ordinary ZIP file?&lt;br /&gt;
* Is cramfs better than ZIP?&lt;br /&gt;
** cramfs cannot be uncompressed like ZIP can&lt;br /&gt;
** If you compare compressed ZIP and cramfs, cramfs is more efficient.&lt;br /&gt;
** cramfs is harder to use than ZIP (for the developer).&lt;br /&gt;
** cramfs ''needs'' to have all of its opened files in memory.&lt;br /&gt;
&lt;br /&gt;
== Upgrade path from the old PND format ==&lt;br /&gt;
A simple script can be written that extracts the old PND file, including the screenshot and the PXML.xml file. The PXML.xml file is then converted to one or many .desktop files, and the desktop files, the preview.png file, and the package contents are compacted into a ZIP that then is renamed to &amp;quot;*.pnd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Usage scenario ==&lt;br /&gt;
=== Repackaging of an application from another package format ===&lt;br /&gt;
* The user grabs the package for the application&lt;br /&gt;
* He dumps the executable and all required libraries into a folder&lt;br /&gt;
* He dumps a &amp;quot;screenshot.png&amp;quot; file into the folder that he's made&lt;br /&gt;
* He copies the &amp;quot;.desktop&amp;quot; file(s) for the application from the old package, opens them, replaces &amp;quot;Exec=/usr/bin/bla&amp;quot; with &amp;quot;Exec=./bla&amp;quot; and saves them in the directory&lt;br /&gt;
* He uses a ZIP archiver to make a ZIP out of the folder, making sure that he sets the &amp;quot;uncompressed&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== Creating PNDs as part of a build process ===&lt;br /&gt;
* The build tool creates a directory with all of the necessary information like above and invokes the &amp;quot;zip&amp;quot; utility to compress the folder.&lt;br /&gt;
&lt;br /&gt;
=== Accessing a PND's contents for the... ===&lt;br /&gt;
&lt;br /&gt;
==== ...lazy programmer ====&lt;br /&gt;
* The programmer extracts the PND into a folder via libzip and accesses its contents.&lt;br /&gt;
&lt;br /&gt;
==== ...pragmatic programmer ====&lt;br /&gt;
* The programmer uses zipfs to mount the ZIP and accesses the file's contents.&lt;br /&gt;
&lt;br /&gt;
==== ...smart performance-aware programmer ====&lt;br /&gt;
* The programmer fseek()'s the ZIP file until he finds 0x04034b50.&lt;br /&gt;
* He jumps 18 bytes forward and reads the int at that location, storing it in &amp;quot;length&amp;quot;.&lt;br /&gt;
* He jumps 4 bytes and checks if this int matches &amp;quot;length&amp;quot;. If it doesn't, it means that the file is compressed, and an error is reported.&lt;br /&gt;
* He then jumps forward 4 bytes and stores the short at that location in a variable &amp;quot;nameLength&amp;quot;.&lt;br /&gt;
* Another 2-byte jump gets the short &amp;quot;extensionsLength&amp;quot;.&lt;br /&gt;
* He then jumps 2 bytes and reads &amp;quot;nameLength&amp;quot; amount of bytes from the file.&lt;br /&gt;
* He then uses strcmp() to see if this string matches the sought-after file. If not, he continues the fseek().&lt;br /&gt;
* The programmer now skips &amp;quot;entensionsLength&amp;quot; amount of bytes.&lt;br /&gt;
* The programmer reads &amp;quot;length&amp;quot; amount of bytes from the file, and uses this as the sought-after file data.&lt;br /&gt;
&lt;br /&gt;
==== ...performance fascist/programmer who wants low seek times ====&lt;br /&gt;
* The programmer fseek()'s the file from the end until he finds 0x02014b50.&lt;br /&gt;
* He then uses the following table to get the information he needs:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ ZIP central directory file header&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Bytes !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4 || Central directory file header signature = 0x02014b50&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 2 || Version made by&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2 || Version needed to extract (minimum)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 2 || General purpose bit flag&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 2 || Compression method&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 2 || File last modification time&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 2 || File last modification date&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 4 || CRC-32&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 4 || Compressed size&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 4 || Uncompressed size&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 2 || File name length (''n'')&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || Extra field length (''m'')&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 2 || File comment length (''k'')&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 2 || Disk number where file starts&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 2 || Internal file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 4 || External file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 4 || Relative offset of local file header&lt;br /&gt;
|-&lt;br /&gt;
| 46 || ''n'' || File name&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n'' || ''m'' || Extra field&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n''+''m'' || ''k'' || File comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The relative file offset can then be used to jump to the file in question. The file is then scanned as described in the previous section.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2182</id>
		<title>New PND format</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2182"/>
		<updated>2010-03-03T21:36:44Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Current situation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current PND format has some shortcomings as listed below. This page should serve as a discussion page/white board for how the format could be improved.&lt;br /&gt;
&lt;br /&gt;
''' Proposal for discussion, this is just some opening shots '''&lt;br /&gt;
&lt;br /&gt;
== Current situation ==&lt;br /&gt;
The current (ISO-based) PND format has the following shortcomings:&lt;br /&gt;
&lt;br /&gt;
* It currently uses ISO, CramFS, and other filesystems... This means that there's no standard to follow, and libpnd needs to carry around support for a multitude of file systems.&lt;br /&gt;
* It (often, but not always) uses the [http://en.wikipedia.org/wiki/ISO_9660 ISO file system] which is inefficient at storing data, because:&lt;br /&gt;
** It contains duplicate headers for each file entry[http://users.telenet.be/it3.consultants.bvba/handouts/ISO9960.html] (one version with big-endian integers, one version with little-endian integers[http://en.wikipedia.org/wiki/Endianness]) which leads to many kilobytes of wasted space.&lt;br /&gt;
** Its file tables are fixed-size, and there are therefore limitations on how many folders you can have, what names you can give your files, how big your files can be etc. For instance, files can only have names that are max 31 characters long, all upper-case, and limited to the ASCII character encoding, and an ISO does only support a folder depth of 8[http://www.on-time.com/rtos-32-docs/rtfiles-32/programming-manual/iso-9660/]. To support more, the Joliet file system extension is needed (or isofs won't recognize all file paths), and the Joliet header can be placed practically anywhere in the file, which means additional seek times.&lt;br /&gt;
** It needs various file system extensions to behave correctly, like for example [http://en.wikipedia.org/wiki/Rock_Ridge Rock Ridge Interchange Protocol] and [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet]. Without them, it becomes pretty useless as demonstrated above, and with them, it becomes difficult to read by a tool (You can only use isofs! There are no other tools out there for programmers to use!).&lt;br /&gt;
** It's very difficult to use since you need special ISO making tools to create the image. ISO is a relatively rare format if you're not technically inclined.&lt;br /&gt;
** If you want to add or remove files from it, it's near impossible if you use a compact ISO file, since there's no way that you can &amp;quot;expand&amp;quot; an existing ISO file.&lt;br /&gt;
* The PND header data is at the end (or in the middle of the file if a screenshot is included) which makes it impossible for e.g. libmagic to recognize the PND file. It will instead recognize it as an ISO file. Having the header data at the end also makes it take a very long time to find the data, making tools and the libpnd library very inefficient.&lt;br /&gt;
* The PND file uses a custom XML format for its metadata. There's no reason to do this, especially since the established &amp;quot;.desktop&amp;quot; file format fills exactly the same function.&lt;br /&gt;
(note: &amp;quot;.desktop&amp;quot; does not contain all metadata we have wanted over time, but it's of course possible to add extensions à la &amp;quot;X-Pandora-Whatever=xyz&amp;quot;)&lt;br /&gt;
* There's no &amp;quot;index&amp;quot; for the PND file. The whole file has to be scanned (albeit backwards) to find a PXML file, and there's a big chance for false positives etc.&lt;br /&gt;
* Data is just appended linearly to the file so there's no order. If the format is to be extended (to e.g. include an icon file after the screenshot file), should the data just be appended as well?&lt;br /&gt;
* UTF-8 is strictly the only encoding that is supported. If you make your PXML on a Windows machine, it won't work.&lt;br /&gt;
&lt;br /&gt;
== Proposed revisions ==&lt;br /&gt;
=== Step 1: File system ===&lt;br /&gt;
The file system for PNDs should be replaced by the ''uncompressed'' ZIP archive format. ZIP has the advantage that it's incredibly compact, and uncompressed ZIP makes it possible to read data from the file without having to do any decompression.&lt;br /&gt;
&lt;br /&gt;
ZIP files are mountable using various implementations of zipfs, and most of these implementations won't store files in memory when they are being read if the ZIP file is uncompressed.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Metadata ===&lt;br /&gt;
PND files should no longer require special tools for them to be created. Therefore, since ZIP files support random access on files, it shouldn't be necessary to append/prepend metadata to the file. The user simply includes the &amp;quot;PXML.xml&amp;quot; and &amp;quot;preview.png&amp;quot; files inside of the ZIP, and any tools that need information about the PND can simply go to the central directory of the ZIP file (or use a simple ZIP library to do it for them) and get the location of the file inside of the ZIP. This should also dramatically decrease loading times for PNDs.&lt;br /&gt;
&lt;br /&gt;
Note; performance testing is needed; at the time we started, zip was enormously slower than plain ISO; with driver changes, it may or may not be so, hence our adopted multiple-filesystem-type system. zipfs is one possible option.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Metadata format ===&lt;br /&gt;
Current PND files include so-called &amp;quot;PXML.xml&amp;quot; files. These files have a custom XML format that has a strange structure.&lt;br /&gt;
&lt;br /&gt;
These files should be replaced by &amp;quot;.desktop&amp;quot; files. A PND can contain one or more &amp;quot;.desktop&amp;quot; files in its root directory that specify how an application should be launched. PND tools simply use all &amp;quot;.desktop&amp;quot; files they can find in the PND when creating launchers for the contents of the PND.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
* There don't have to be ''any'' special tools for reading PND files. The package can be run on any platform using any programming language that can read ZIP files.&lt;br /&gt;
* We can use existing facilities to manage the launching of applications. The &amp;quot;.desktop&amp;quot; files can basically be copied without modification into standard locations of the system, and all launchers will become aware of them.&lt;br /&gt;
* Reading PND files becomes easier (because of better tool support... sorry, but you can't link to libpnd in all programming languages) and quicker (becuase of the central directory for random file access).&lt;br /&gt;
&lt;br /&gt;
== Remaining issues ==&lt;br /&gt;
* How should libpnd tell the difference between old and new PND files? Should it depend on the &amp;quot;file&amp;quot; tool, should it run its own recognition algorithm, or what? Should the extension be changed to e.g. &amp;quot;.box&amp;quot; (Which was proposed in a thread)?&lt;br /&gt;
* How to make sure that the ZIP files are uncompressed? Should we provide a script that &amp;quot;uncompresses&amp;quot; an ordinary ZIP file?&lt;br /&gt;
* Is cramfs better than ZIP?&lt;br /&gt;
** cramfs cannot be uncompressed like ZIP can&lt;br /&gt;
** If you compare compressed ZIP and cramfs, cramfs is more efficient.&lt;br /&gt;
** cramfs is harder to use than ZIP (for the developer).&lt;br /&gt;
** cramfs ''needs'' to have all of its opened files in memory.&lt;br /&gt;
&lt;br /&gt;
== Upgrade path from the old PND format ==&lt;br /&gt;
A simple script can be written that extracts the old PND file, including the screenshot and the PXML.xml file. The PXML.xml file is then converted to one or many .desktop files, and the desktop files, the preview.png file, and the package contents are compacted into a ZIP that then is renamed to &amp;quot;*.pnd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Usage scenario ==&lt;br /&gt;
=== Repackaging of an application from another package format ===&lt;br /&gt;
* The user grabs the package for the application&lt;br /&gt;
* He dumps the executable and all required libraries into a folder&lt;br /&gt;
* He dumps a &amp;quot;screenshot.png&amp;quot; file into the folder that he's made&lt;br /&gt;
* He copies the &amp;quot;.desktop&amp;quot; file(s) for the application from the old package, opens them, replaces &amp;quot;Exec=/usr/bin/bla&amp;quot; with &amp;quot;Exec=./bla&amp;quot; and saves them in the directory&lt;br /&gt;
* He uses a ZIP archiver to make a ZIP out of the folder, making sure that he sets the &amp;quot;uncompressed&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== Creating PNDs as part of a build process ===&lt;br /&gt;
* The build tool creates a directory with all of the necessary information like above and invokes the &amp;quot;zip&amp;quot; utility to compress the folder.&lt;br /&gt;
&lt;br /&gt;
=== Accessing a PND's contents for the... ===&lt;br /&gt;
&lt;br /&gt;
==== ...lazy programmer ====&lt;br /&gt;
* The programmer extracts the PND into a folder via libzip and accesses its contents.&lt;br /&gt;
&lt;br /&gt;
==== ...pragmatic programmer ====&lt;br /&gt;
* The programmer uses zipfs to mount the ZIP and accesses the file's contents.&lt;br /&gt;
&lt;br /&gt;
==== ...smart performance-aware programmer ====&lt;br /&gt;
* The programmer fseek()'s the ZIP file until he finds 0x04034b50.&lt;br /&gt;
* He jumps 18 bytes forward and reads the int at that location, storing it in &amp;quot;length&amp;quot;.&lt;br /&gt;
* He jumps 4 bytes and checks if this int matches &amp;quot;length&amp;quot;. If it doesn't, it means that the file is compressed, and an error is reported.&lt;br /&gt;
* He then jumps forward 4 bytes and stores the short at that location in a variable &amp;quot;nameLength&amp;quot;.&lt;br /&gt;
* Another 2-byte jump gets the short &amp;quot;extensionsLength&amp;quot;.&lt;br /&gt;
* He then jumps 2 bytes and reads &amp;quot;nameLength&amp;quot; amount of bytes from the file.&lt;br /&gt;
* He then uses strcmp() to see if this string matches the sought-after file. If not, he continues the fseek().&lt;br /&gt;
* The programmer now skips &amp;quot;entensionsLength&amp;quot; amount of bytes.&lt;br /&gt;
* The programmer reads &amp;quot;length&amp;quot; amount of bytes from the file, and uses this as the sought-after file data.&lt;br /&gt;
&lt;br /&gt;
==== ...performance fascist/programmer who wants low seek times ====&lt;br /&gt;
* The programmer fseek()'s the file from the end until he finds 0x02014b50.&lt;br /&gt;
* He then uses the following table to get the information he needs:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ ZIP central directory file header&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Bytes !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4 || Central directory file header signature = 0x02014b50&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 2 || Version made by&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2 || Version needed to extract (minimum)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 2 || General purpose bit flag&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 2 || Compression method&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 2 || File last modification time&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 2 || File last modification date&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 4 || CRC-32&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 4 || Compressed size&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 4 || Uncompressed size&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 2 || File name length (''n'')&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || Extra field length (''m'')&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 2 || File comment length (''k'')&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 2 || Disk number where file starts&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 2 || Internal file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 4 || External file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 4 || Relative offset of local file header&lt;br /&gt;
|-&lt;br /&gt;
| 46 || ''n'' || File name&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n'' || ''m'' || Extra field&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n''+''m'' || ''k'' || File comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The relative file offset can then be used to jump to the file in question. The file is then scanned as described in the previous section.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2181</id>
		<title>New PND format</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2181"/>
		<updated>2010-03-03T21:30:53Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Current situation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current PND format has some shortcomings as listed below. This page should serve as a discussion page/white board for how the format could be improved.&lt;br /&gt;
&lt;br /&gt;
''' Proposal for discussion, this is just some opening shots '''&lt;br /&gt;
&lt;br /&gt;
== Current situation ==&lt;br /&gt;
The current (ISO-based) PND format has the following shortcomings:&lt;br /&gt;
&lt;br /&gt;
* It currently uses ISO, CramFS, and other filesystems... This means that there's no standard to follow, and libpnd needs to carry around support for a multitude of file systems.&lt;br /&gt;
* It (often, but not always) uses the [http://en.wikipedia.org/wiki/ISO_9660 ISO file system] which is inefficient at storing data, because:&lt;br /&gt;
** It contains duplicate headers for each file entry (one version with big-endian integers[http://users.telenet.be/it3.consultants.bvba/handouts/ISO9960.html], one version with little-endian integers[http://en.wikipedia.org/wiki/Endianness]) which leads to many kilobytes of wasted space.&lt;br /&gt;
** Its file tables are fixed-size, and there are therefore limitations on how many folders you can have, what names you can give your files, how big your files can be etc. For instance, files can only have names that are max 31 characters long, all upper-case, and limited to the ASCII character encoding, and an ISO does only support a folder depth of 8[http://www.on-time.com/rtos-32-docs/rtfiles-32/programming-manual/iso-9660/]. To support more, the Joliet file system extension is needed (or isofs won't recognize all file paths).&lt;br /&gt;
** It needs various file system extensions to behave correctly, like for example [http://en.wikipedia.org/wiki/Rock_Ridge Rock Ridge Interchange Protocol] and [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet]. Without them, it becomes pretty useless as demonstrated above, and with them, it becomes difficult to read by a tool (You can only use isofs! There are no other tools out there for programmers to use!).&lt;br /&gt;
** It's very difficult to use since you need special ISO making tools to create the image. ISO is a relatively rare format if you're not technically inclined.&lt;br /&gt;
** If you want to add or remove files from it, it's near impossible if you use a compact ISO file, since there's no way that you can &amp;quot;expand&amp;quot; an existing ISO file.&lt;br /&gt;
* The PND header data is at the end (or in the middle of the file if a screenshot is included) which makes it impossible for e.g. libmagic to recognize the PND file. It will instead recognize it as an ISO file. Having the header data at the end also makes it take a very long time to find the data, making tools and the libpnd library very inefficient.&lt;br /&gt;
* The PND file uses a custom XML format for its metadata. There's no reason to do this, especially since the established &amp;quot;.desktop&amp;quot; file format fills exactly the same function.&lt;br /&gt;
(note: &amp;quot;.desktop&amp;quot; does not contain all metadata we have wanted over time, but it's of course possible to add extensions à la &amp;quot;X-Pandora-Whatever=xyz&amp;quot;)&lt;br /&gt;
* There's no &amp;quot;index&amp;quot; for the PND file. The whole file has to be scanned (albeit backwards) to find a PXML file, and there's a big chance for false positives etc.&lt;br /&gt;
* Data is just appended linearly to the file so there's no order. If the format is to be extended (to e.g. include an icon file after the screenshot file), should the data just be appended as well?&lt;br /&gt;
* UTF-8 is strictly the only encoding that is supported. If you make your PXML on a Windows machine, it won't work.&lt;br /&gt;
&lt;br /&gt;
== Proposed revisions ==&lt;br /&gt;
=== Step 1: File system ===&lt;br /&gt;
The file system for PNDs should be replaced by the ''uncompressed'' ZIP archive format. ZIP has the advantage that it's incredibly compact, and uncompressed ZIP makes it possible to read data from the file without having to do any decompression.&lt;br /&gt;
&lt;br /&gt;
ZIP files are mountable using various implementations of zipfs, and most of these implementations won't store files in memory when they are being read if the ZIP file is uncompressed.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Metadata ===&lt;br /&gt;
PND files should no longer require special tools for them to be created. Therefore, since ZIP files support random access on files, it shouldn't be necessary to append/prepend metadata to the file. The user simply includes the &amp;quot;PXML.xml&amp;quot; and &amp;quot;preview.png&amp;quot; files inside of the ZIP, and any tools that need information about the PND can simply go to the central directory of the ZIP file (or use a simple ZIP library to do it for them) and get the location of the file inside of the ZIP. This should also dramatically decrease loading times for PNDs.&lt;br /&gt;
&lt;br /&gt;
Note; performance testing is needed; at the time we started, zip was enormously slower than plain ISO; with driver changes, it may or may not be so, hence our adopted multiple-filesystem-type system. zipfs is one possible option.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Metadata format ===&lt;br /&gt;
Current PND files include so-called &amp;quot;PXML.xml&amp;quot; files. These files have a custom XML format that has a strange structure.&lt;br /&gt;
&lt;br /&gt;
These files should be replaced by &amp;quot;.desktop&amp;quot; files. A PND can contain one or more &amp;quot;.desktop&amp;quot; files in its root directory that specify how an application should be launched. PND tools simply use all &amp;quot;.desktop&amp;quot; files they can find in the PND when creating launchers for the contents of the PND.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
* There don't have to be ''any'' special tools for reading PND files. The package can be run on any platform using any programming language that can read ZIP files.&lt;br /&gt;
* We can use existing facilities to manage the launching of applications. The &amp;quot;.desktop&amp;quot; files can basically be copied without modification into standard locations of the system, and all launchers will become aware of them.&lt;br /&gt;
* Reading PND files becomes easier (because of better tool support... sorry, but you can't link to libpnd in all programming languages) and quicker (becuase of the central directory for random file access).&lt;br /&gt;
&lt;br /&gt;
== Remaining issues ==&lt;br /&gt;
* How should libpnd tell the difference between old and new PND files? Should it depend on the &amp;quot;file&amp;quot; tool, should it run its own recognition algorithm, or what? Should the extension be changed to e.g. &amp;quot;.box&amp;quot; (Which was proposed in a thread)?&lt;br /&gt;
* How to make sure that the ZIP files are uncompressed? Should we provide a script that &amp;quot;uncompresses&amp;quot; an ordinary ZIP file?&lt;br /&gt;
* Is cramfs better than ZIP?&lt;br /&gt;
** cramfs cannot be uncompressed like ZIP can&lt;br /&gt;
** If you compare compressed ZIP and cramfs, cramfs is more efficient.&lt;br /&gt;
** cramfs is harder to use than ZIP (for the developer).&lt;br /&gt;
** cramfs ''needs'' to have all of its opened files in memory.&lt;br /&gt;
&lt;br /&gt;
== Upgrade path from the old PND format ==&lt;br /&gt;
A simple script can be written that extracts the old PND file, including the screenshot and the PXML.xml file. The PXML.xml file is then converted to one or many .desktop files, and the desktop files, the preview.png file, and the package contents are compacted into a ZIP that then is renamed to &amp;quot;*.pnd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Usage scenario ==&lt;br /&gt;
=== Repackaging of an application from another package format ===&lt;br /&gt;
* The user grabs the package for the application&lt;br /&gt;
* He dumps the executable and all required libraries into a folder&lt;br /&gt;
* He dumps a &amp;quot;screenshot.png&amp;quot; file into the folder that he's made&lt;br /&gt;
* He copies the &amp;quot;.desktop&amp;quot; file(s) for the application from the old package, opens them, replaces &amp;quot;Exec=/usr/bin/bla&amp;quot; with &amp;quot;Exec=./bla&amp;quot; and saves them in the directory&lt;br /&gt;
* He uses a ZIP archiver to make a ZIP out of the folder, making sure that he sets the &amp;quot;uncompressed&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== Creating PNDs as part of a build process ===&lt;br /&gt;
* The build tool creates a directory with all of the necessary information like above and invokes the &amp;quot;zip&amp;quot; utility to compress the folder.&lt;br /&gt;
&lt;br /&gt;
=== Accessing a PND's contents for the... ===&lt;br /&gt;
&lt;br /&gt;
==== ...lazy programmer ====&lt;br /&gt;
* The programmer extracts the PND into a folder via libzip and accesses its contents.&lt;br /&gt;
&lt;br /&gt;
==== ...pragmatic programmer ====&lt;br /&gt;
* The programmer uses zipfs to mount the ZIP and accesses the file's contents.&lt;br /&gt;
&lt;br /&gt;
==== ...smart performance-aware programmer ====&lt;br /&gt;
* The programmer fseek()'s the ZIP file until he finds 0x04034b50.&lt;br /&gt;
* He jumps 18 bytes forward and reads the int at that location, storing it in &amp;quot;length&amp;quot;.&lt;br /&gt;
* He jumps 4 bytes and checks if this int matches &amp;quot;length&amp;quot;. If it doesn't, it means that the file is compressed, and an error is reported.&lt;br /&gt;
* He then jumps forward 4 bytes and stores the short at that location in a variable &amp;quot;nameLength&amp;quot;.&lt;br /&gt;
* Another 2-byte jump gets the short &amp;quot;extensionsLength&amp;quot;.&lt;br /&gt;
* He then jumps 2 bytes and reads &amp;quot;nameLength&amp;quot; amount of bytes from the file.&lt;br /&gt;
* He then uses strcmp() to see if this string matches the sought-after file. If not, he continues the fseek().&lt;br /&gt;
* The programmer now skips &amp;quot;entensionsLength&amp;quot; amount of bytes.&lt;br /&gt;
* The programmer reads &amp;quot;length&amp;quot; amount of bytes from the file, and uses this as the sought-after file data.&lt;br /&gt;
&lt;br /&gt;
==== ...performance fascist/programmer who wants low seek times ====&lt;br /&gt;
* The programmer fseek()'s the file from the end until he finds 0x02014b50.&lt;br /&gt;
* He then uses the following table to get the information he needs:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ ZIP central directory file header&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Bytes !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4 || Central directory file header signature = 0x02014b50&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 2 || Version made by&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2 || Version needed to extract (minimum)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 2 || General purpose bit flag&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 2 || Compression method&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 2 || File last modification time&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 2 || File last modification date&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 4 || CRC-32&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 4 || Compressed size&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 4 || Uncompressed size&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 2 || File name length (''n'')&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || Extra field length (''m'')&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 2 || File comment length (''k'')&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 2 || Disk number where file starts&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 2 || Internal file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 4 || External file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 4 || Relative offset of local file header&lt;br /&gt;
|-&lt;br /&gt;
| 46 || ''n'' || File name&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n'' || ''m'' || Extra field&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n''+''m'' || ''k'' || File comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The relative file offset can then be used to jump to the file in question. The file is then scanned as described in the previous section.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2180</id>
		<title>New PND format</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2180"/>
		<updated>2010-03-03T20:03:36Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Current situation */ added .desktop extension information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current PND format has some shortcomings as listed below. This page should serve as a discussion page/white board for how the format could be improved.&lt;br /&gt;
&lt;br /&gt;
''' Proposal for discussion, this is just some opening shots '''&lt;br /&gt;
&lt;br /&gt;
== Current situation ==&lt;br /&gt;
The current (ISO-based) PND format has the following shortcomings:&lt;br /&gt;
&lt;br /&gt;
* It currently uses ISO, CramFS, and other filesystems... This means that there's no standard to follow, and libpnd needs to carry around support for a multitude of file systems.&lt;br /&gt;
* It (often, but not always) uses the [http://en.wikipedia.org/wiki/ISO_9660 ISO file system] which is inefficient at storing data, because:&lt;br /&gt;
** It contains duplicate headers for each file entry (one version with big-endian integers, one version with little-endian integers[http://en.wikipedia.org/wiki/Endianness]) which leads to many kilobytes of wasted space.&lt;br /&gt;
** Its file tables are fixed-size, and there are therefore limitations on how many folders you can have, what names you can give your files, how big your files can be etc.&lt;br /&gt;
** It needs various file system extensions to behave correctly, like for example [http://en.wikipedia.org/wiki/Rock_Ridge Rock Ridge Interchange Protocol] and [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet]. Without them, it becomes pretty useless (only DOS-like filenames supported) and with them, it becomes difficult to read by a tool (You can only use isofs! There are no other tools out there for programmers to use!).&lt;br /&gt;
** It's very difficult to use since you need special ISO making tools to create the image. ISO is a relatively rare format if you're not technically inclined.&lt;br /&gt;
** If you want to add or remove files from it, it's near impossible if you use a compact ISO file, since there's no way that you can &amp;quot;expand&amp;quot; an existing ISO file.&lt;br /&gt;
* The PND header data is at the end (or in the middle of the file if a screenshot is included) which makes it impossible for e.g. libmagic to recognize the PND file. It will instead recognize it as an ISO file. Having the header data at the end also makes it take a very long time to find the data, making tools and the libpnd library very inefficient.&lt;br /&gt;
* The PND file uses a custom XML format for its metadata. There's no reason to do this, especially since the established &amp;quot;.desktop&amp;quot; file format fills exactly the same function.&lt;br /&gt;
(note: &amp;quot;.desktop&amp;quot; does not contain all metadata we have wanted over time, but it's of course possible to add extensions à la &amp;quot;X-Pandora-Whatever=xyz&amp;quot;)&lt;br /&gt;
* There's no &amp;quot;index&amp;quot; for the PND file. The whole file has to be scanned (albeit backwards) to find a PXML file, and there's a big chance for false positives etc.&lt;br /&gt;
* Data is just appended linearly to the file so there's no order. If the format is to be extended (to e.g. include an icon file after the screenshot file), should the data just be appended as well?&lt;br /&gt;
* UTF-8 is strictly the only encoding that is supported. If you make your PXML on a Windows machine, it won't work.&lt;br /&gt;
&lt;br /&gt;
== Proposed revisions ==&lt;br /&gt;
=== Step 1: File system ===&lt;br /&gt;
The file system for PNDs should be replaced by the ''uncompressed'' ZIP archive format. ZIP has the advantage that it's incredibly compact, and uncompressed ZIP makes it possible to read data from the file without having to do any decompression.&lt;br /&gt;
&lt;br /&gt;
ZIP files are mountable using various implementations of zipfs, and most of these implementations won't store files in memory when they are being read if the ZIP file is uncompressed.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Metadata ===&lt;br /&gt;
PND files should no longer require special tools for them to be created. Therefore, since ZIP files support random access on files, it shouldn't be necessary to append/prepend metadata to the file. The user simply includes the &amp;quot;PXML.xml&amp;quot; and &amp;quot;preview.png&amp;quot; files inside of the ZIP, and any tools that need information about the PND can simply go to the central directory of the ZIP file (or use a simple ZIP library to do it for them) and get the location of the file inside of the ZIP. This should also dramatically decrease loading times for PNDs.&lt;br /&gt;
&lt;br /&gt;
Note; performance testing is needed; at the time we started, zip was enormously slower than plain ISO; with driver changes, it may or may not be so, hence our adopted multiple-filesystem-type system. zipfs is one possible option.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Metadata format ===&lt;br /&gt;
Current PND files include so-called &amp;quot;PXML.xml&amp;quot; files. These files have a custom XML format that has a strange structure.&lt;br /&gt;
&lt;br /&gt;
These files should be replaced by &amp;quot;.desktop&amp;quot; files. A PND can contain one or more &amp;quot;.desktop&amp;quot; files in its root directory that specify how an application should be launched. PND tools simply use all &amp;quot;.desktop&amp;quot; files they can find in the PND when creating launchers for the contents of the PND.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
* There don't have to be ''any'' special tools for reading PND files. The package can be run on any platform using any programming language that can read ZIP files.&lt;br /&gt;
* We can use existing facilities to manage the launching of applications. The &amp;quot;.desktop&amp;quot; files can basically be copied without modification into standard locations of the system, and all launchers will become aware of them.&lt;br /&gt;
* Reading PND files becomes easier (because of better tool support... sorry, but you can't link to libpnd in all programming languages) and quicker (becuase of the central directory for random file access).&lt;br /&gt;
&lt;br /&gt;
== Remaining issues ==&lt;br /&gt;
* How should libpnd tell the difference between old and new PND files? Should it depend on the &amp;quot;file&amp;quot; tool, should it run its own recognition algorithm, or what? Should the extension be changed to e.g. &amp;quot;.box&amp;quot; (Which was proposed in a thread)?&lt;br /&gt;
* How to make sure that the ZIP files are uncompressed? Should we provide a script that &amp;quot;uncompresses&amp;quot; an ordinary ZIP file?&lt;br /&gt;
* Is cramfs better than ZIP?&lt;br /&gt;
** cramfs cannot be uncompressed like ZIP can&lt;br /&gt;
** If you compare compressed ZIP and cramfs, cramfs is more efficient.&lt;br /&gt;
** cramfs is harder to use than ZIP (for the developer).&lt;br /&gt;
** cramfs ''needs'' to have all of its opened files in memory.&lt;br /&gt;
&lt;br /&gt;
== Upgrade path from the old PND format ==&lt;br /&gt;
A simple script can be written that extracts the old PND file, including the screenshot and the PXML.xml file. The PXML.xml file is then converted to one or many .desktop files, and the desktop files, the preview.png file, and the package contents are compacted into a ZIP that then is renamed to &amp;quot;*.pnd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Usage scenario ==&lt;br /&gt;
=== Repackaging of an application from another package format ===&lt;br /&gt;
* The user grabs the package for the application&lt;br /&gt;
* He dumps the executable and all required libraries into a folder&lt;br /&gt;
* He dumps a &amp;quot;screenshot.png&amp;quot; file into the folder that he's made&lt;br /&gt;
* He copies the &amp;quot;.desktop&amp;quot; file(s) for the application from the old package, opens them, replaces &amp;quot;Exec=/usr/bin/bla&amp;quot; with &amp;quot;Exec=./bla&amp;quot; and saves them in the directory&lt;br /&gt;
* He uses a ZIP archiver to make a ZIP out of the folder, making sure that he sets the &amp;quot;uncompressed&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== Creating PNDs as part of a build process ===&lt;br /&gt;
* The build tool creates a directory with all of the necessary information like above and invokes the &amp;quot;zip&amp;quot; utility to compress the folder.&lt;br /&gt;
&lt;br /&gt;
=== Accessing a PND's contents for the... ===&lt;br /&gt;
&lt;br /&gt;
==== ...lazy programmer ====&lt;br /&gt;
* The programmer extracts the PND into a folder via libzip and accesses its contents.&lt;br /&gt;
&lt;br /&gt;
==== ...pragmatic programmer ====&lt;br /&gt;
* The programmer uses zipfs to mount the ZIP and accesses the file's contents.&lt;br /&gt;
&lt;br /&gt;
==== ...smart performance-aware programmer ====&lt;br /&gt;
* The programmer fseek()'s the ZIP file until he finds 0x04034b50.&lt;br /&gt;
* He jumps 18 bytes forward and reads the int at that location, storing it in &amp;quot;length&amp;quot;.&lt;br /&gt;
* He jumps 4 bytes and checks if this int matches &amp;quot;length&amp;quot;. If it doesn't, it means that the file is compressed, and an error is reported.&lt;br /&gt;
* He then jumps forward 4 bytes and stores the short at that location in a variable &amp;quot;nameLength&amp;quot;.&lt;br /&gt;
* Another 2-byte jump gets the short &amp;quot;extensionsLength&amp;quot;.&lt;br /&gt;
* He then jumps 2 bytes and reads &amp;quot;nameLength&amp;quot; amount of bytes from the file.&lt;br /&gt;
* He then uses strcmp() to see if this string matches the sought-after file. If not, he continues the fseek().&lt;br /&gt;
* The programmer now skips &amp;quot;entensionsLength&amp;quot; amount of bytes.&lt;br /&gt;
* The programmer reads &amp;quot;length&amp;quot; amount of bytes from the file, and uses this as the sought-after file data.&lt;br /&gt;
&lt;br /&gt;
==== ...performance fascist/programmer who wants low seek times ====&lt;br /&gt;
* The programmer fseek()'s the file from the end until he finds 0x02014b50.&lt;br /&gt;
* He then uses the following table to get the information he needs:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ ZIP central directory file header&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Bytes !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4 || Central directory file header signature = 0x02014b50&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 2 || Version made by&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2 || Version needed to extract (minimum)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 2 || General purpose bit flag&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 2 || Compression method&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 2 || File last modification time&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 2 || File last modification date&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 4 || CRC-32&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 4 || Compressed size&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 4 || Uncompressed size&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 2 || File name length (''n'')&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || Extra field length (''m'')&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 2 || File comment length (''k'')&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 2 || Disk number where file starts&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 2 || Internal file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 4 || External file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 4 || Relative offset of local file header&lt;br /&gt;
|-&lt;br /&gt;
| 46 || ''n'' || File name&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n'' || ''m'' || Extra field&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n''+''m'' || ''k'' || File comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The relative file offset can then be used to jump to the file in question. The file is then scanned as described in the previous section.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2179</id>
		<title>New PND format</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2179"/>
		<updated>2010-03-03T19:18:01Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Remaining issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current PND format has some shortcomings as listed below. This page should serve as a discussion page/white board for how the format could be improved.&lt;br /&gt;
&lt;br /&gt;
''' Proposal for discussion, this is just some opening shots '''&lt;br /&gt;
&lt;br /&gt;
== Current situation ==&lt;br /&gt;
The current (ISO-based) PND format has the following shortcomings:&lt;br /&gt;
&lt;br /&gt;
* It currently uses ISO, CramFS, and other filesystems... This means that there's no standard to follow, and libpnd needs to carry around support for a multitude of file systems.&lt;br /&gt;
* It (often, but not always) uses the [http://en.wikipedia.org/wiki/ISO_9660 ISO file system] which is inefficient at storing data, because:&lt;br /&gt;
** It contains duplicate headers for each file entry (one version with big-endian integers, one version with little-endian integers[http://en.wikipedia.org/wiki/Endianness]) which leads to many kilobytes of wasted space.&lt;br /&gt;
** Its file tables are fixed-size, and there are therefore limitations on how many folders you can have, what names you can give your files, how big your files can be etc.&lt;br /&gt;
** It needs various file system extensions to behave correctly, like for example [http://en.wikipedia.org/wiki/Rock_Ridge Rock Ridge Interchange Protocol] and [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet]. Without them, it becomes pretty useless (only DOS-like filenames supported) and with them, it becomes difficult to read by a tool (You can only use isofs! There are no other tools out there for programmers to use!).&lt;br /&gt;
** It's very difficult to use since you need special ISO making tools to create the image. ISO is a relatively rare format if you're not technically inclined.&lt;br /&gt;
** If you want to add or remove files from it, it's near impossible if you use a compact ISO file, since there's no way that you can &amp;quot;expand&amp;quot; an existing ISO file.&lt;br /&gt;
* The PND header data is at the end (or in the middle of the file if a screenshot is included) which makes it impossible for e.g. libmagic to recognize the PND file. It will instead recognize it as an ISO file. Having the header data at the end also makes it take a very long time to find the data, making tools and the libpnd library very inefficient.&lt;br /&gt;
* The PND file uses a custom XML format for its metadata. There's no reason to do this, especially since the established &amp;quot;.desktop&amp;quot; file format fills exactly the same function.&lt;br /&gt;
(note: .desktop does not contain all metadata we have wanted over time, though it may or may not right now.)&lt;br /&gt;
* There's no &amp;quot;index&amp;quot; for the PND file. The whole file has to be scanned (albeit backwards) to find a PXML file, and there's a big chance for false positives etc.&lt;br /&gt;
* Data is just appended linearly to the file so there's no order. If the format is to be extended (to e.g. include an icon file after the screenshot file), should the data just be appended as well?&lt;br /&gt;
* UTF-8 is strictly the only encoding that is supported. If you make your PXML on a Windows machine, it won't work.&lt;br /&gt;
&lt;br /&gt;
== Proposed revisions ==&lt;br /&gt;
=== Step 1: File system ===&lt;br /&gt;
The file system for PNDs should be replaced by the ''uncompressed'' ZIP archive format. ZIP has the advantage that it's incredibly compact, and uncompressed ZIP makes it possible to read data from the file without having to do any decompression.&lt;br /&gt;
&lt;br /&gt;
ZIP files are mountable using various implementations of zipfs, and most of these implementations won't store files in memory when they are being read if the ZIP file is uncompressed.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Metadata ===&lt;br /&gt;
PND files should no longer require special tools for them to be created. Therefore, since ZIP files support random access on files, it shouldn't be necessary to append/prepend metadata to the file. The user simply includes the &amp;quot;PXML.xml&amp;quot; and &amp;quot;preview.png&amp;quot; files inside of the ZIP, and any tools that need information about the PND can simply go to the central directory of the ZIP file (or use a simple ZIP library to do it for them) and get the location of the file inside of the ZIP. This should also dramatically decrease loading times for PNDs.&lt;br /&gt;
&lt;br /&gt;
Note; performance testing is needed; at the time we started, zip was enormously slower than plain ISO; with driver changes, it may or may not be so, hence our adopted multiple-filesystem-type system. zipfs is one possible option.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Metadata format ===&lt;br /&gt;
Current PND files include so-called &amp;quot;PXML.xml&amp;quot; files. These files have a custom XML format that has a strange structure.&lt;br /&gt;
&lt;br /&gt;
These files should be replaced by &amp;quot;.desktop&amp;quot; files. A PND can contain one or more &amp;quot;.desktop&amp;quot; files in its root directory that specify how an application should be launched. PND tools simply use all &amp;quot;.desktop&amp;quot; files they can find in the PND when creating launchers for the contents of the PND.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
* There don't have to be ''any'' special tools for reading PND files. The package can be run on any platform using any programming language that can read ZIP files.&lt;br /&gt;
* We can use existing facilities to manage the launching of applications. The &amp;quot;.desktop&amp;quot; files can basically be copied without modification into standard locations of the system, and all launchers will become aware of them.&lt;br /&gt;
* Reading PND files becomes easier (because of better tool support... sorry, but you can't link to libpnd in all programming languages) and quicker (becuase of the central directory for random file access).&lt;br /&gt;
&lt;br /&gt;
== Remaining issues ==&lt;br /&gt;
* How should libpnd tell the difference between old and new PND files? Should it depend on the &amp;quot;file&amp;quot; tool, should it run its own recognition algorithm, or what? Should the extension be changed to e.g. &amp;quot;.box&amp;quot; (Which was proposed in a thread)?&lt;br /&gt;
* How to make sure that the ZIP files are uncompressed? Should we provide a script that &amp;quot;uncompresses&amp;quot; an ordinary ZIP file?&lt;br /&gt;
* Is cramfs better than ZIP?&lt;br /&gt;
** cramfs cannot be uncompressed like ZIP can&lt;br /&gt;
** If you compare compressed ZIP and cramfs, cramfs is more efficient.&lt;br /&gt;
** cramfs is harder to use than ZIP (for the developer).&lt;br /&gt;
** cramfs ''needs'' to have all of its opened files in memory.&lt;br /&gt;
&lt;br /&gt;
== Upgrade path from the old PND format ==&lt;br /&gt;
A simple script can be written that extracts the old PND file, including the screenshot and the PXML.xml file. The PXML.xml file is then converted to one or many .desktop files, and the desktop files, the preview.png file, and the package contents are compacted into a ZIP that then is renamed to &amp;quot;*.pnd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Usage scenario ==&lt;br /&gt;
=== Repackaging of an application from another package format ===&lt;br /&gt;
* The user grabs the package for the application&lt;br /&gt;
* He dumps the executable and all required libraries into a folder&lt;br /&gt;
* He dumps a &amp;quot;screenshot.png&amp;quot; file into the folder that he's made&lt;br /&gt;
* He copies the &amp;quot;.desktop&amp;quot; file(s) for the application from the old package, opens them, replaces &amp;quot;Exec=/usr/bin/bla&amp;quot; with &amp;quot;Exec=./bla&amp;quot; and saves them in the directory&lt;br /&gt;
* He uses a ZIP archiver to make a ZIP out of the folder, making sure that he sets the &amp;quot;uncompressed&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== Creating PNDs as part of a build process ===&lt;br /&gt;
* The build tool creates a directory with all of the necessary information like above and invokes the &amp;quot;zip&amp;quot; utility to compress the folder.&lt;br /&gt;
&lt;br /&gt;
=== Accessing a PND's contents for the... ===&lt;br /&gt;
&lt;br /&gt;
==== ...lazy programmer ====&lt;br /&gt;
* The programmer extracts the PND into a folder via libzip and accesses its contents.&lt;br /&gt;
&lt;br /&gt;
==== ...pragmatic programmer ====&lt;br /&gt;
* The programmer uses zipfs to mount the ZIP and accesses the file's contents.&lt;br /&gt;
&lt;br /&gt;
==== ...smart performance-aware programmer ====&lt;br /&gt;
* The programmer fseek()'s the ZIP file until he finds 0x04034b50.&lt;br /&gt;
* He jumps 18 bytes forward and reads the int at that location, storing it in &amp;quot;length&amp;quot;.&lt;br /&gt;
* He jumps 4 bytes and checks if this int matches &amp;quot;length&amp;quot;. If it doesn't, it means that the file is compressed, and an error is reported.&lt;br /&gt;
* He then jumps forward 4 bytes and stores the short at that location in a variable &amp;quot;nameLength&amp;quot;.&lt;br /&gt;
* Another 2-byte jump gets the short &amp;quot;extensionsLength&amp;quot;.&lt;br /&gt;
* He then jumps 2 bytes and reads &amp;quot;nameLength&amp;quot; amount of bytes from the file.&lt;br /&gt;
* He then uses strcmp() to see if this string matches the sought-after file. If not, he continues the fseek().&lt;br /&gt;
* The programmer now skips &amp;quot;entensionsLength&amp;quot; amount of bytes.&lt;br /&gt;
* The programmer reads &amp;quot;length&amp;quot; amount of bytes from the file, and uses this as the sought-after file data.&lt;br /&gt;
&lt;br /&gt;
==== ...performance fascist/programmer who wants low seek times ====&lt;br /&gt;
* The programmer fseek()'s the file from the end until he finds 0x02014b50.&lt;br /&gt;
* He then uses the following table to get the information he needs:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ ZIP central directory file header&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Bytes !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4 || Central directory file header signature = 0x02014b50&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 2 || Version made by&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2 || Version needed to extract (minimum)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 2 || General purpose bit flag&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 2 || Compression method&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 2 || File last modification time&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 2 || File last modification date&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 4 || CRC-32&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 4 || Compressed size&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 4 || Uncompressed size&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 2 || File name length (''n'')&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || Extra field length (''m'')&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 2 || File comment length (''k'')&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 2 || Disk number where file starts&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 2 || Internal file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 4 || External file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 4 || Relative offset of local file header&lt;br /&gt;
|-&lt;br /&gt;
| 46 || ''n'' || File name&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n'' || ''m'' || Extra field&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n''+''m'' || ''k'' || File comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The relative file offset can then be used to jump to the file in question. The file is then scanned as described in the previous section.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2178</id>
		<title>New PND format</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2178"/>
		<updated>2010-03-03T19:05:48Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Current situation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current PND format has some shortcomings as listed below. This page should serve as a discussion page/white board for how the format could be improved.&lt;br /&gt;
&lt;br /&gt;
''' Proposal for discussion, this is just some opening shots '''&lt;br /&gt;
&lt;br /&gt;
== Current situation ==&lt;br /&gt;
The current (ISO-based) PND format has the following shortcomings:&lt;br /&gt;
&lt;br /&gt;
* It currently uses ISO, CramFS, and other filesystems... This means that there's no standard to follow, and libpnd needs to carry around support for a multitude of file systems.&lt;br /&gt;
* It (often, but not always) uses the [http://en.wikipedia.org/wiki/ISO_9660 ISO file system] which is inefficient at storing data, because:&lt;br /&gt;
** It contains duplicate headers for each file entry (one version with big-endian integers, one version with little-endian integers[http://en.wikipedia.org/wiki/Endianness]) which leads to many kilobytes of wasted space.&lt;br /&gt;
** Its file tables are fixed-size, and there are therefore limitations on how many folders you can have, what names you can give your files, how big your files can be etc.&lt;br /&gt;
** It needs various file system extensions to behave correctly, like for example [http://en.wikipedia.org/wiki/Rock_Ridge Rock Ridge Interchange Protocol] and [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet]. Without them, it becomes pretty useless (only DOS-like filenames supported) and with them, it becomes difficult to read by a tool (You can only use isofs! There are no other tools out there for programmers to use!).&lt;br /&gt;
** It's very difficult to use since you need special ISO making tools to create the image. ISO is a relatively rare format if you're not technically inclined.&lt;br /&gt;
** If you want to add or remove files from it, it's near impossible if you use a compact ISO file, since there's no way that you can &amp;quot;expand&amp;quot; an existing ISO file.&lt;br /&gt;
* The PND header data is at the end (or in the middle of the file if a screenshot is included) which makes it impossible for e.g. libmagic to recognize the PND file. It will instead recognize it as an ISO file. Having the header data at the end also makes it take a very long time to find the data, making tools and the libpnd library very inefficient.&lt;br /&gt;
* The PND file uses a custom XML format for its metadata. There's no reason to do this, especially since the established &amp;quot;.desktop&amp;quot; file format fills exactly the same function.&lt;br /&gt;
(note: .desktop does not contain all metadata we have wanted over time, though it may or may not right now.)&lt;br /&gt;
* There's no &amp;quot;index&amp;quot; for the PND file. The whole file has to be scanned (albeit backwards) to find a PXML file, and there's a big chance for false positives etc.&lt;br /&gt;
* Data is just appended linearly to the file so there's no order. If the format is to be extended (to e.g. include an icon file after the screenshot file), should the data just be appended as well?&lt;br /&gt;
* UTF-8 is strictly the only encoding that is supported. If you make your PXML on a Windows machine, it won't work.&lt;br /&gt;
&lt;br /&gt;
== Proposed revisions ==&lt;br /&gt;
=== Step 1: File system ===&lt;br /&gt;
The file system for PNDs should be replaced by the ''uncompressed'' ZIP archive format. ZIP has the advantage that it's incredibly compact, and uncompressed ZIP makes it possible to read data from the file without having to do any decompression.&lt;br /&gt;
&lt;br /&gt;
ZIP files are mountable using various implementations of zipfs, and most of these implementations won't store files in memory when they are being read if the ZIP file is uncompressed.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Metadata ===&lt;br /&gt;
PND files should no longer require special tools for them to be created. Therefore, since ZIP files support random access on files, it shouldn't be necessary to append/prepend metadata to the file. The user simply includes the &amp;quot;PXML.xml&amp;quot; and &amp;quot;preview.png&amp;quot; files inside of the ZIP, and any tools that need information about the PND can simply go to the central directory of the ZIP file (or use a simple ZIP library to do it for them) and get the location of the file inside of the ZIP. This should also dramatically decrease loading times for PNDs.&lt;br /&gt;
&lt;br /&gt;
Note; performance testing is needed; at the time we started, zip was enormously slower than plain ISO; with driver changes, it may or may not be so, hence our adopted multiple-filesystem-type system. zipfs is one possible option.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Metadata format ===&lt;br /&gt;
Current PND files include so-called &amp;quot;PXML.xml&amp;quot; files. These files have a custom XML format that has a strange structure.&lt;br /&gt;
&lt;br /&gt;
These files should be replaced by &amp;quot;.desktop&amp;quot; files. A PND can contain one or more &amp;quot;.desktop&amp;quot; files in its root directory that specify how an application should be launched. PND tools simply use all &amp;quot;.desktop&amp;quot; files they can find in the PND when creating launchers for the contents of the PND.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
* There don't have to be ''any'' special tools for reading PND files. The package can be run on any platform using any programming language that can read ZIP files.&lt;br /&gt;
* We can use existing facilities to manage the launching of applications. The &amp;quot;.desktop&amp;quot; files can basically be copied without modification into standard locations of the system, and all launchers will become aware of them.&lt;br /&gt;
* Reading PND files becomes easier (because of better tool support... sorry, but you can't link to libpnd in all programming languages) and quicker (becuase of the central directory for random file access).&lt;br /&gt;
&lt;br /&gt;
== Remaining issues ==&lt;br /&gt;
* How should libpnd tell the difference between old and new PND files? Should it depend on the &amp;quot;file&amp;quot; tool, should it run its own recognition algorithm, or what? Should the extension be changed to e.g. &amp;quot;.box&amp;quot; (Which was proposed in a thread)?&lt;br /&gt;
* How to make sure that the ZIP files are uncompressed? Should we provide a script that &amp;quot;uncompresses&amp;quot; an ordinary ZIP file?&lt;br /&gt;
* Is squashfs better than ZIP?&lt;br /&gt;
** Squashfs cannot be uncompressed like ZIP can&lt;br /&gt;
** If you compare compressed ZIP and Squashfs, Squashfs is more efficient.&lt;br /&gt;
** Squashfs is harder to use than ZIP (for the developer).&lt;br /&gt;
** Squashfs ''needs'' to have all of its opened files in memory.&lt;br /&gt;
&lt;br /&gt;
== Upgrade path from the old PND format ==&lt;br /&gt;
A simple script can be written that extracts the old PND file, including the screenshot and the PXML.xml file. The PXML.xml file is then converted to one or many .desktop files, and the desktop files, the preview.png file, and the package contents are compacted into a ZIP that then is renamed to &amp;quot;*.pnd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Usage scenario ==&lt;br /&gt;
=== Repackaging of an application from another package format ===&lt;br /&gt;
* The user grabs the package for the application&lt;br /&gt;
* He dumps the executable and all required libraries into a folder&lt;br /&gt;
* He dumps a &amp;quot;screenshot.png&amp;quot; file into the folder that he's made&lt;br /&gt;
* He copies the &amp;quot;.desktop&amp;quot; file(s) for the application from the old package, opens them, replaces &amp;quot;Exec=/usr/bin/bla&amp;quot; with &amp;quot;Exec=./bla&amp;quot; and saves them in the directory&lt;br /&gt;
* He uses a ZIP archiver to make a ZIP out of the folder, making sure that he sets the &amp;quot;uncompressed&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== Creating PNDs as part of a build process ===&lt;br /&gt;
* The build tool creates a directory with all of the necessary information like above and invokes the &amp;quot;zip&amp;quot; utility to compress the folder.&lt;br /&gt;
&lt;br /&gt;
=== Accessing a PND's contents for the... ===&lt;br /&gt;
&lt;br /&gt;
==== ...lazy programmer ====&lt;br /&gt;
* The programmer extracts the PND into a folder via libzip and accesses its contents.&lt;br /&gt;
&lt;br /&gt;
==== ...pragmatic programmer ====&lt;br /&gt;
* The programmer uses zipfs to mount the ZIP and accesses the file's contents.&lt;br /&gt;
&lt;br /&gt;
==== ...smart performance-aware programmer ====&lt;br /&gt;
* The programmer fseek()'s the ZIP file until he finds 0x04034b50.&lt;br /&gt;
* He jumps 18 bytes forward and reads the int at that location, storing it in &amp;quot;length&amp;quot;.&lt;br /&gt;
* He jumps 4 bytes and checks if this int matches &amp;quot;length&amp;quot;. If it doesn't, it means that the file is compressed, and an error is reported.&lt;br /&gt;
* He then jumps forward 4 bytes and stores the short at that location in a variable &amp;quot;nameLength&amp;quot;.&lt;br /&gt;
* Another 2-byte jump gets the short &amp;quot;extensionsLength&amp;quot;.&lt;br /&gt;
* He then jumps 2 bytes and reads &amp;quot;nameLength&amp;quot; amount of bytes from the file.&lt;br /&gt;
* He then uses strcmp() to see if this string matches the sought-after file. If not, he continues the fseek().&lt;br /&gt;
* The programmer now skips &amp;quot;entensionsLength&amp;quot; amount of bytes.&lt;br /&gt;
* The programmer reads &amp;quot;length&amp;quot; amount of bytes from the file, and uses this as the sought-after file data.&lt;br /&gt;
&lt;br /&gt;
==== ...performance fascist/programmer who wants low seek times ====&lt;br /&gt;
* The programmer fseek()'s the file from the end until he finds 0x02014b50.&lt;br /&gt;
* He then uses the following table to get the information he needs:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ ZIP central directory file header&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Bytes !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4 || Central directory file header signature = 0x02014b50&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 2 || Version made by&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2 || Version needed to extract (minimum)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 2 || General purpose bit flag&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 2 || Compression method&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 2 || File last modification time&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 2 || File last modification date&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 4 || CRC-32&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 4 || Compressed size&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 4 || Uncompressed size&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 2 || File name length (''n'')&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || Extra field length (''m'')&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 2 || File comment length (''k'')&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 2 || Disk number where file starts&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 2 || Internal file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 4 || External file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 4 || Relative offset of local file header&lt;br /&gt;
|-&lt;br /&gt;
| 46 || ''n'' || File name&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n'' || ''m'' || Extra field&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n''+''m'' || ''k'' || File comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The relative file offset can then be used to jump to the file in question. The file is then scanned as described in the previous section.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2175</id>
		<title>New PND format</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2175"/>
		<updated>2010-03-03T16:13:36Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Remaining issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current PND format has some shortcomings as listed below. This page should serve as a discussion page/white board for how the format could be improved.&lt;br /&gt;
&lt;br /&gt;
== Current situation ==&lt;br /&gt;
The current (ISO-based) PND format has the following shortcomings:&lt;br /&gt;
&lt;br /&gt;
* It uses the [http://en.wikipedia.org/wiki/ISO_9660 ISO file system] which is inefficient at storing data, because:&lt;br /&gt;
** It contains duplicate headers for each file entry (one version with big-endian integers, one version with little-endian integers[http://en.wikipedia.org/wiki/Endianness]) which leads to multiple kilobytes of wasted space.&lt;br /&gt;
** Its file tables are fixed-size, and there are therefore limitations on how many folders you can have, what names you can give your files, how big your files can be etc.&lt;br /&gt;
** It needs various file system extensions to behave correctly, like for example [http://en.wikipedia.org/wiki/Rock_Ridge Rock Ridge Interchange Protocol] and [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet]. Without them, it becomes pretty useless (only DOS-like filenames supported) and with them, it becomes difficult to read by a tool.&lt;br /&gt;
** It's very difficult to use since you need special ISO making tools to create the image.&lt;br /&gt;
** If you want to add or remove files from it, it's near impossible if you use a compact ISO file, since there's no way that you can &amp;quot;expand&amp;quot; an existing ISO file.&lt;br /&gt;
* The PND header data is at the end (or in the middle of the file if a screenshot is included) which makes it impossible for e.g. libmagic to recognize the PND file. It will instead recognize it as an ISO file. Having the header data at the end also makes it take a very long time to find the data, making tools and the libpnd library very inefficient.&lt;br /&gt;
* The PND file uses a custom XML format for its metadata. There's no reason to do this, especially since the established &amp;quot;.desktop&amp;quot; file format fills exactly the same function.&lt;br /&gt;
&lt;br /&gt;
== Proposed revisions ==&lt;br /&gt;
=== Step 1: File system ===&lt;br /&gt;
The file system for PNDs should be replaced by the ''uncompressed'' ZIP archive format. ZIP has the advantage that it's incredibly compact, and uncompressed ZIP makes it possible to read data from the file without having to do any decompression.&lt;br /&gt;
&lt;br /&gt;
ZIP files are mountable using various implementations of zipfs, and most of these implementations won't store files in memory when they are being read if the ZIP file is uncompressed.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Metadata ===&lt;br /&gt;
PND files should no longer require special tools for them to be created. Therefore, since ZIP files support random access on files, it shouldn't be necessary to append/prepend metadata to the file. The user simply includes the &amp;quot;PXML.xml&amp;quot; and &amp;quot;preview.png&amp;quot; files inside of the ZIP, and any tools that need information about the PND can simply go to the central directory of the ZIP file (or use a simple ZIP library to do it for them) and get the location of the file inside of the ZIP. This should also dramatically decrease loading times for PNDs.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Metadata format ===&lt;br /&gt;
Current PND files include so-called &amp;quot;PXML.xml&amp;quot; files. These files have a custom XML format that has a strange structure.&lt;br /&gt;
&lt;br /&gt;
These files should be replaced by &amp;quot;.desktop&amp;quot; files. A PND can contain one or more &amp;quot;.desktop&amp;quot; files in its root directory that specify how an application should be launched. PND tools simply use all &amp;quot;.desktop&amp;quot; files they can find in the PND when creating launchers for the contents of the PND.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
* There don't have to be ''any'' special tools for reading PND files. The package can be run on any platform using any programming language that can read ZIP files.&lt;br /&gt;
* We can use existing facilities to manage the launching of applications. The &amp;quot;.desktop&amp;quot; files can basically be copied without modification into standard locations of the system, and all launchers will become aware of them.&lt;br /&gt;
* Reading PND files becomes easier (because of better tool support... sorry, but you can't link to libpnd in all programming languages) and quicker (becuase of the central directory for random file access).&lt;br /&gt;
&lt;br /&gt;
== Remaining issues ==&lt;br /&gt;
* How should libpnd tell the difference between old and new PND files? Should it depend on the &amp;quot;file&amp;quot; tool, should it run its own recognition algorithm, or what? Should the extension be changed to e.g. &amp;quot;.box&amp;quot; (Which was proposed in a thread)?&lt;br /&gt;
* How to make sure that the ZIP files are uncompressed? Should we provide a script that &amp;quot;uncompresses&amp;quot; an ordinary ZIP file?&lt;br /&gt;
* Is squashfs better than ZIP?&lt;br /&gt;
** Squashfs cannot be uncompressed like ZIP can&lt;br /&gt;
** If you compare compressed ZIP and Squashfs, Squashfs is more efficient.&lt;br /&gt;
** Squashfs is harder to use than ZIP (for the developer).&lt;br /&gt;
** Squashfs ''needs'' to have all of its opened files in memory.&lt;br /&gt;
&lt;br /&gt;
== Upgrade path from the old PND format ==&lt;br /&gt;
A simple script can be written that extracts the old PND file, including the screenshot and the PXML.xml file. The PXML.xml file is then converted to one or many .desktop files, and the desktop files, the preview.png file, and the package contents are compacted into a ZIP that then is renamed to &amp;quot;*.pnd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Usage scenario ==&lt;br /&gt;
=== Repackaging of an application from another package format ===&lt;br /&gt;
* The user grabs the package for the application&lt;br /&gt;
* He dumps the executable and all required libraries into a folder&lt;br /&gt;
* He dumps a &amp;quot;screenshot.png&amp;quot; file into the folder that he's made&lt;br /&gt;
* He copies the &amp;quot;.desktop&amp;quot; file(s) for the application from the old package, opens them, replaces &amp;quot;Exec=/usr/bin/bla&amp;quot; with &amp;quot;Exec=./bla&amp;quot; and saves them in the directory&lt;br /&gt;
* He uses a ZIP archiver to make a ZIP out of the folder, making sure that he sets the &amp;quot;uncompressed&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== Creating PNDs as part of a build process ===&lt;br /&gt;
* The build tool creates a directory with all of the necessary information like above and invokes the &amp;quot;zip&amp;quot; utility to compress the folder.&lt;br /&gt;
&lt;br /&gt;
=== Accessing a PND's contents for the... ===&lt;br /&gt;
&lt;br /&gt;
==== ...lazy programmer ====&lt;br /&gt;
* The programmer extracts the PND into a folder via libzip and accesses its contents.&lt;br /&gt;
&lt;br /&gt;
==== ...pragmatic programmer ====&lt;br /&gt;
* The programmer uses zipfs to mount the ZIP and accesses the file's contents.&lt;br /&gt;
&lt;br /&gt;
==== ...smart performance-aware programmer ====&lt;br /&gt;
* The programmer fseek()'s the ZIP file until he finds 0x04034b50.&lt;br /&gt;
* He jumps 18 bytes forward and reads the int at that location, storing it in &amp;quot;length&amp;quot;.&lt;br /&gt;
* He jumps 4 bytes and checks if this int matches &amp;quot;length&amp;quot;. If it doesn't, it means that the file is compressed, and an error is reported.&lt;br /&gt;
* He then jumps forward 4 bytes and stores the short at that location in a variable &amp;quot;nameLength&amp;quot;.&lt;br /&gt;
* Another 2-byte jump gets the short &amp;quot;extensionsLength&amp;quot;.&lt;br /&gt;
* He then jumps 2 bytes and reads &amp;quot;nameLength&amp;quot; amount of bytes from the file.&lt;br /&gt;
* He then uses strcmp() to see if this string matches the sought-after file. If not, he continues the fseek().&lt;br /&gt;
* The programmer now skips &amp;quot;entensionsLength&amp;quot; amount of bytes.&lt;br /&gt;
* The programmer reads &amp;quot;length&amp;quot; amount of bytes from the file, and uses this as the sought-after file data.&lt;br /&gt;
&lt;br /&gt;
==== ...performance fascist/programmer who wants low seek times ====&lt;br /&gt;
* The programmer fseek()'s the file from the end until he finds 0x02014b50.&lt;br /&gt;
* He then uses the following table to get the information he needs:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ ZIP central directory file header&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Bytes !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4 || Central directory file header signature = 0x02014b50&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 2 || Version made by&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2 || Version needed to extract (minimum)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 2 || General purpose bit flag&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 2 || Compression method&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 2 || File last modification time&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 2 || File last modification date&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 4 || CRC-32&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 4 || Compressed size&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 4 || Uncompressed size&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 2 || File name length (''n'')&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || Extra field length (''m'')&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 2 || File comment length (''k'')&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 2 || Disk number where file starts&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 2 || Internal file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 4 || External file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 4 || Relative offset of local file header&lt;br /&gt;
|-&lt;br /&gt;
| 46 || ''n'' || File name&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n'' || ''m'' || Extra field&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n''+''m'' || ''k'' || File comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The relative file offset can then be used to jump to the file in question. The file is then scanned as described in the previous section.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2174</id>
		<title>New PND format</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2174"/>
		<updated>2010-03-03T16:06:53Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Remaining issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current PND format has some shortcomings as listed below. This page should serve as a discussion page/white board for how the format could be improved.&lt;br /&gt;
&lt;br /&gt;
== Current situation ==&lt;br /&gt;
The current (ISO-based) PND format has the following shortcomings:&lt;br /&gt;
&lt;br /&gt;
* It uses the [http://en.wikipedia.org/wiki/ISO_9660 ISO file system] which is inefficient at storing data, because:&lt;br /&gt;
** It contains duplicate headers for each file entry (one version with big-endian integers, one version with little-endian integers[http://en.wikipedia.org/wiki/Endianness]) which leads to multiple kilobytes of wasted space.&lt;br /&gt;
** Its file tables are fixed-size, and there are therefore limitations on how many folders you can have, what names you can give your files, how big your files can be etc.&lt;br /&gt;
** It needs various file system extensions to behave correctly, like for example [http://en.wikipedia.org/wiki/Rock_Ridge Rock Ridge Interchange Protocol] and [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet]. Without them, it becomes pretty useless (only DOS-like filenames supported) and with them, it becomes difficult to read by a tool.&lt;br /&gt;
** It's very difficult to use since you need special ISO making tools to create the image.&lt;br /&gt;
** If you want to add or remove files from it, it's near impossible if you use a compact ISO file, since there's no way that you can &amp;quot;expand&amp;quot; an existing ISO file.&lt;br /&gt;
* The PND header data is at the end (or in the middle of the file if a screenshot is included) which makes it impossible for e.g. libmagic to recognize the PND file. It will instead recognize it as an ISO file. Having the header data at the end also makes it take a very long time to find the data, making tools and the libpnd library very inefficient.&lt;br /&gt;
* The PND file uses a custom XML format for its metadata. There's no reason to do this, especially since the established &amp;quot;.desktop&amp;quot; file format fills exactly the same function.&lt;br /&gt;
&lt;br /&gt;
== Proposed revisions ==&lt;br /&gt;
=== Step 1: File system ===&lt;br /&gt;
The file system for PNDs should be replaced by the ''uncompressed'' ZIP archive format. ZIP has the advantage that it's incredibly compact, and uncompressed ZIP makes it possible to read data from the file without having to do any decompression.&lt;br /&gt;
&lt;br /&gt;
ZIP files are mountable using various implementations of zipfs, and most of these implementations won't store files in memory when they are being read if the ZIP file is uncompressed.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Metadata ===&lt;br /&gt;
PND files should no longer require special tools for them to be created. Therefore, since ZIP files support random access on files, it shouldn't be necessary to append/prepend metadata to the file. The user simply includes the &amp;quot;PXML.xml&amp;quot; and &amp;quot;preview.png&amp;quot; files inside of the ZIP, and any tools that need information about the PND can simply go to the central directory of the ZIP file (or use a simple ZIP library to do it for them) and get the location of the file inside of the ZIP. This should also dramatically decrease loading times for PNDs.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Metadata format ===&lt;br /&gt;
Current PND files include so-called &amp;quot;PXML.xml&amp;quot; files. These files have a custom XML format that has a strange structure.&lt;br /&gt;
&lt;br /&gt;
These files should be replaced by &amp;quot;.desktop&amp;quot; files. A PND can contain one or more &amp;quot;.desktop&amp;quot; files in its root directory that specify how an application should be launched. PND tools simply use all &amp;quot;.desktop&amp;quot; files they can find in the PND when creating launchers for the contents of the PND.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
* There don't have to be ''any'' special tools for reading PND files. The package can be run on any platform using any programming language that can read ZIP files.&lt;br /&gt;
* We can use existing facilities to manage the launching of applications. The &amp;quot;.desktop&amp;quot; files can basically be copied without modification into standard locations of the system, and all launchers will become aware of them.&lt;br /&gt;
* Reading PND files becomes easier (because of better tool support... sorry, but you can't link to libpnd in all programming languages) and quicker (becuase of the central directory for random file access).&lt;br /&gt;
&lt;br /&gt;
== Remaining issues ==&lt;br /&gt;
* How should libpnd tell the difference between old and new PND files? Should it depend on the &amp;quot;file&amp;quot; tool, should it run its own recognition algorithm, or what? Should the extension be changed to e.g. &amp;quot;.box&amp;quot; (Which was proposed in a thread)?&lt;br /&gt;
* How to make sure that the ZIP files are uncompressed? Should we provide a script that &amp;quot;uncompresses&amp;quot; an ordinary ZIP file?&lt;br /&gt;
* Is squashfs better than ZIP?&lt;br /&gt;
&lt;br /&gt;
== Upgrade path from the old PND format ==&lt;br /&gt;
A simple script can be written that extracts the old PND file, including the screenshot and the PXML.xml file. The PXML.xml file is then converted to one or many .desktop files, and the desktop files, the preview.png file, and the package contents are compacted into a ZIP that then is renamed to &amp;quot;*.pnd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Usage scenario ==&lt;br /&gt;
=== Repackaging of an application from another package format ===&lt;br /&gt;
* The user grabs the package for the application&lt;br /&gt;
* He dumps the executable and all required libraries into a folder&lt;br /&gt;
* He dumps a &amp;quot;screenshot.png&amp;quot; file into the folder that he's made&lt;br /&gt;
* He copies the &amp;quot;.desktop&amp;quot; file(s) for the application from the old package, opens them, replaces &amp;quot;Exec=/usr/bin/bla&amp;quot; with &amp;quot;Exec=./bla&amp;quot; and saves them in the directory&lt;br /&gt;
* He uses a ZIP archiver to make a ZIP out of the folder, making sure that he sets the &amp;quot;uncompressed&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== Creating PNDs as part of a build process ===&lt;br /&gt;
* The build tool creates a directory with all of the necessary information like above and invokes the &amp;quot;zip&amp;quot; utility to compress the folder.&lt;br /&gt;
&lt;br /&gt;
=== Accessing a PND's contents for the... ===&lt;br /&gt;
&lt;br /&gt;
==== ...lazy programmer ====&lt;br /&gt;
* The programmer extracts the PND into a folder via libzip and accesses its contents.&lt;br /&gt;
&lt;br /&gt;
==== ...pragmatic programmer ====&lt;br /&gt;
* The programmer uses zipfs to mount the ZIP and accesses the file's contents.&lt;br /&gt;
&lt;br /&gt;
==== ...smart performance-aware programmer ====&lt;br /&gt;
* The programmer fseek()'s the ZIP file until he finds 0x04034b50.&lt;br /&gt;
* He jumps 18 bytes forward and reads the int at that location, storing it in &amp;quot;length&amp;quot;.&lt;br /&gt;
* He jumps 4 bytes and checks if this int matches &amp;quot;length&amp;quot;. If it doesn't, it means that the file is compressed, and an error is reported.&lt;br /&gt;
* He then jumps forward 4 bytes and stores the short at that location in a variable &amp;quot;nameLength&amp;quot;.&lt;br /&gt;
* Another 2-byte jump gets the short &amp;quot;extensionsLength&amp;quot;.&lt;br /&gt;
* He then jumps 2 bytes and reads &amp;quot;nameLength&amp;quot; amount of bytes from the file.&lt;br /&gt;
* He then uses strcmp() to see if this string matches the sought-after file. If not, he continues the fseek().&lt;br /&gt;
* The programmer now skips &amp;quot;entensionsLength&amp;quot; amount of bytes.&lt;br /&gt;
* The programmer reads &amp;quot;length&amp;quot; amount of bytes from the file, and uses this as the sought-after file data.&lt;br /&gt;
&lt;br /&gt;
==== ...performance fascist/programmer who wants low seek times ====&lt;br /&gt;
* The programmer fseek()'s the file from the end until he finds 0x02014b50.&lt;br /&gt;
* He then uses the following table to get the information he needs:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ ZIP central directory file header&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Bytes !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4 || Central directory file header signature = 0x02014b50&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 2 || Version made by&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2 || Version needed to extract (minimum)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 2 || General purpose bit flag&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 2 || Compression method&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 2 || File last modification time&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 2 || File last modification date&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 4 || CRC-32&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 4 || Compressed size&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 4 || Uncompressed size&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 2 || File name length (''n'')&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || Extra field length (''m'')&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 2 || File comment length (''k'')&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 2 || Disk number where file starts&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 2 || Internal file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 4 || External file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 4 || Relative offset of local file header&lt;br /&gt;
|-&lt;br /&gt;
| 46 || ''n'' || File name&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n'' || ''m'' || Extra field&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n''+''m'' || ''k'' || File comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The relative file offset can then be used to jump to the file in question. The file is then scanned as described in the previous section.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2173</id>
		<title>New PND format</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2173"/>
		<updated>2010-03-03T14:23:33Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current PND format has some shortcomings as listed below. This page should serve as a discussion page/white board for how the format could be improved.&lt;br /&gt;
&lt;br /&gt;
== Current situation ==&lt;br /&gt;
The current (ISO-based) PND format has the following shortcomings:&lt;br /&gt;
&lt;br /&gt;
* It uses the [http://en.wikipedia.org/wiki/ISO_9660 ISO file system] which is inefficient at storing data, because:&lt;br /&gt;
** It contains duplicate headers for each file entry (one version with big-endian integers, one version with little-endian integers[http://en.wikipedia.org/wiki/Endianness]) which leads to multiple kilobytes of wasted space.&lt;br /&gt;
** Its file tables are fixed-size, and there are therefore limitations on how many folders you can have, what names you can give your files, how big your files can be etc.&lt;br /&gt;
** It needs various file system extensions to behave correctly, like for example [http://en.wikipedia.org/wiki/Rock_Ridge Rock Ridge Interchange Protocol] and [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet]. Without them, it becomes pretty useless (only DOS-like filenames supported) and with them, it becomes difficult to read by a tool.&lt;br /&gt;
** It's very difficult to use since you need special ISO making tools to create the image.&lt;br /&gt;
** If you want to add or remove files from it, it's near impossible if you use a compact ISO file, since there's no way that you can &amp;quot;expand&amp;quot; an existing ISO file.&lt;br /&gt;
* The PND header data is at the end (or in the middle of the file if a screenshot is included) which makes it impossible for e.g. libmagic to recognize the PND file. It will instead recognize it as an ISO file. Having the header data at the end also makes it take a very long time to find the data, making tools and the libpnd library very inefficient.&lt;br /&gt;
* The PND file uses a custom XML format for its metadata. There's no reason to do this, especially since the established &amp;quot;.desktop&amp;quot; file format fills exactly the same function.&lt;br /&gt;
&lt;br /&gt;
== Proposed revisions ==&lt;br /&gt;
=== Step 1: File system ===&lt;br /&gt;
The file system for PNDs should be replaced by the ''uncompressed'' ZIP archive format. ZIP has the advantage that it's incredibly compact, and uncompressed ZIP makes it possible to read data from the file without having to do any decompression.&lt;br /&gt;
&lt;br /&gt;
ZIP files are mountable using various implementations of zipfs, and most of these implementations won't store files in memory when they are being read if the ZIP file is uncompressed.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Metadata ===&lt;br /&gt;
PND files should no longer require special tools for them to be created. Therefore, since ZIP files support random access on files, it shouldn't be necessary to append/prepend metadata to the file. The user simply includes the &amp;quot;PXML.xml&amp;quot; and &amp;quot;preview.png&amp;quot; files inside of the ZIP, and any tools that need information about the PND can simply go to the central directory of the ZIP file (or use a simple ZIP library to do it for them) and get the location of the file inside of the ZIP. This should also dramatically decrease loading times for PNDs.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Metadata format ===&lt;br /&gt;
Current PND files include so-called &amp;quot;PXML.xml&amp;quot; files. These files have a custom XML format that has a strange structure.&lt;br /&gt;
&lt;br /&gt;
These files should be replaced by &amp;quot;.desktop&amp;quot; files. A PND can contain one or more &amp;quot;.desktop&amp;quot; files in its root directory that specify how an application should be launched. PND tools simply use all &amp;quot;.desktop&amp;quot; files they can find in the PND when creating launchers for the contents of the PND.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
* There don't have to be ''any'' special tools for reading PND files. The package can be run on any platform using any programming language that can read ZIP files.&lt;br /&gt;
* We can use existing facilities to manage the launching of applications. The &amp;quot;.desktop&amp;quot; files can basically be copied without modification into standard locations of the system, and all launchers will become aware of them.&lt;br /&gt;
* Reading PND files becomes easier (because of better tool support... sorry, but you can't link to libpnd in all programming languages) and quicker (becuase of the central directory for random file access).&lt;br /&gt;
&lt;br /&gt;
== Remaining issues ==&lt;br /&gt;
* How should libpnd tell the difference between old and new PND files? Should it depend on the &amp;quot;file&amp;quot; tool, should it run its own recognition algorithm, or what? Should the extension be changed to e.g. &amp;quot;.box&amp;quot; (Which was proposed in a thread)?&lt;br /&gt;
* How to make sure that the ZIP files are uncompressed? Should we provide a script that &amp;quot;uncompresses&amp;quot; an ordinary ZIP file?&lt;br /&gt;
&lt;br /&gt;
== Upgrade path from the old PND format ==&lt;br /&gt;
A simple script can be written that extracts the old PND file, including the screenshot and the PXML.xml file. The PXML.xml file is then converted to one or many .desktop files, and the desktop files, the preview.png file, and the package contents are compacted into a ZIP that then is renamed to &amp;quot;*.pnd&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Usage scenario ==&lt;br /&gt;
=== Repackaging of an application from another package format ===&lt;br /&gt;
* The user grabs the package for the application&lt;br /&gt;
* He dumps the executable and all required libraries into a folder&lt;br /&gt;
* He dumps a &amp;quot;screenshot.png&amp;quot; file into the folder that he's made&lt;br /&gt;
* He copies the &amp;quot;.desktop&amp;quot; file(s) for the application from the old package, opens them, replaces &amp;quot;Exec=/usr/bin/bla&amp;quot; with &amp;quot;Exec=./bla&amp;quot; and saves them in the directory&lt;br /&gt;
* He uses a ZIP archiver to make a ZIP out of the folder, making sure that he sets the &amp;quot;uncompressed&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== Creating PNDs as part of a build process ===&lt;br /&gt;
* The build tool creates a directory with all of the necessary information like above and invokes the &amp;quot;zip&amp;quot; utility to compress the folder.&lt;br /&gt;
&lt;br /&gt;
=== Accessing a PND's contents for the... ===&lt;br /&gt;
&lt;br /&gt;
==== ...lazy programmer ====&lt;br /&gt;
* The programmer extracts the PND into a folder via libzip and accesses its contents.&lt;br /&gt;
&lt;br /&gt;
==== ...pragmatic programmer ====&lt;br /&gt;
* The programmer uses zipfs to mount the ZIP and accesses the file's contents.&lt;br /&gt;
&lt;br /&gt;
==== ...smart performance-aware programmer ====&lt;br /&gt;
* The programmer fseek()'s the ZIP file until he finds 0x04034b50.&lt;br /&gt;
* He jumps 18 bytes forward and reads the int at that location, storing it in &amp;quot;length&amp;quot;.&lt;br /&gt;
* He jumps 4 bytes and checks if this int matches &amp;quot;length&amp;quot;. If it doesn't, it means that the file is compressed, and an error is reported.&lt;br /&gt;
* He then jumps forward 4 bytes and stores the short at that location in a variable &amp;quot;nameLength&amp;quot;.&lt;br /&gt;
* Another 2-byte jump gets the short &amp;quot;extensionsLength&amp;quot;.&lt;br /&gt;
* He then jumps 2 bytes and reads &amp;quot;nameLength&amp;quot; amount of bytes from the file.&lt;br /&gt;
* He then uses strcmp() to see if this string matches the sought-after file. If not, he continues the fseek().&lt;br /&gt;
* The programmer now skips &amp;quot;entensionsLength&amp;quot; amount of bytes.&lt;br /&gt;
* The programmer reads &amp;quot;length&amp;quot; amount of bytes from the file, and uses this as the sought-after file data.&lt;br /&gt;
&lt;br /&gt;
==== ...performance fascist/programmer who wants low seek times ====&lt;br /&gt;
* The programmer fseek()'s the file from the end until he finds 0x02014b50.&lt;br /&gt;
* He then uses the following table to get the information he needs:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ ZIP central directory file header&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Bytes !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4 || Central directory file header signature = 0x02014b50&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 2 || Version made by&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2 || Version needed to extract (minimum)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 2 || General purpose bit flag&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 2 || Compression method&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 2 || File last modification time&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 2 || File last modification date&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 4 || CRC-32&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 4 || Compressed size&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 4 || Uncompressed size&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 2 || File name length (''n'')&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || Extra field length (''m'')&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 2 || File comment length (''k'')&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 2 || Disk number where file starts&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 2 || Internal file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 4 || External file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 4 || Relative offset of local file header&lt;br /&gt;
|-&lt;br /&gt;
| 46 || ''n'' || File name&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n'' || ''m'' || Extra field&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n''+''m'' || ''k'' || File comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The relative file offset can then be used to jump to the file in question. The file is then scanned as described in the previous section.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2172</id>
		<title>New PND format</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=New_PND_format&amp;diff=2172"/>
		<updated>2010-03-03T13:53:21Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: Created the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The current PND format has some shortcomings as listed below. This page should serve as a discussion page/white board for how the format could be improved.&lt;br /&gt;
&lt;br /&gt;
== Current situation ==&lt;br /&gt;
The current (ISO-based) PND format has the following shortcomings:&lt;br /&gt;
&lt;br /&gt;
* It uses the [http://en.wikipedia.org/wiki/ISO_9660 ISO file system] which is inefficient at storing data, because:&lt;br /&gt;
** It contains duplicate headers for each file entry (one version with big-endian integers, one version with little-endian integers[http://en.wikipedia.org/wiki/Endianness]) which leads to multiple kilobytes of wasted space.&lt;br /&gt;
** Its file tables are fixed-size, and there are therefore limitations on how many folders you can have, what names you can give your files, how big your files can be etc.&lt;br /&gt;
** It needs various file system extensions to behave correctly, like for example [http://en.wikipedia.org/wiki/Rock_Ridge Rock Ridge Interchange Protocol] and [http://en.wikipedia.org/wiki/Joliet_(file_system) Joliet]. Without them, it becomes pretty useless (only DOS-like filenames supported) and with them, it becomes difficult to read by a tool.&lt;br /&gt;
** It's very difficult to use since you need special ISO making tools to create the image.&lt;br /&gt;
** If you want to add or remove files from it, it's near impossible if you use a compact ISO file, since there's no way that you can &amp;quot;expand&amp;quot; an existing ISO file.&lt;br /&gt;
* The PND header data is at the end (or in the middle of the file if a screenshot is included) which makes it impossible for e.g. libmagic to recognize the PND file. It will instead recognize it as an ISO file. Having the header data at the end also makes it take a very long time to find the data, making tools and the libpnd library very inefficient.&lt;br /&gt;
* The PND file uses a custom XML format for its metadata. There's no reason to do this, especially since the established &amp;quot;.desktop&amp;quot; file format fills exactly the same function.&lt;br /&gt;
&lt;br /&gt;
== Proposed revisions ==&lt;br /&gt;
=== Step 1: File system ===&lt;br /&gt;
The file system for PNDs should be replaced by the ''uncompressed'' ZIP archive format. ZIP has the advantage that it's incredibly compact, and uncompressed ZIP makes it possible to read data from the file without having to do any decompression.&lt;br /&gt;
&lt;br /&gt;
ZIP files are mountable using various implementations of zipfs, and most of these implementations won't store files in memory when they are being read if the ZIP file is uncompressed.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Metadata ===&lt;br /&gt;
PND files should no longer require special tools for them to be created. Therefore, since ZIP files support random access on files, it shouldn't be necessary to append/prepend metadata to the file. The user simply includes the &amp;quot;PXML.xml&amp;quot; and &amp;quot;preview.png&amp;quot; files inside of the ZIP, and any tools that need information about the PND can simply go to the central directory of the ZIP file (or use a simple ZIP library to do it for them) and get the location of the file inside of the ZIP. This should also dramatically decrease loading times for PNDs.&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Metadata format ===&lt;br /&gt;
Current PND files include so-called &amp;quot;PXML.xml&amp;quot; files. These files have a custom XML format that has a strange structure.&lt;br /&gt;
&lt;br /&gt;
These files should be replaced by &amp;quot;.desktop&amp;quot; files. A PND can contain one or more &amp;quot;.desktop&amp;quot; files in its root directory that specify how an application should be launched. PND tools simply use all &amp;quot;.desktop&amp;quot; files they can find in the PND when creating launchers for the contents of the PND.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
* There don't have to be ''any'' special tools for reading PND files. The package can be run on any platform using any programming language that can read ZIP files.&lt;br /&gt;
* We can use existing facilities to manage the launching of applications. The &amp;quot;.desktop&amp;quot; files can basically be copied without modification into standard locations of the system, and all launchers will become aware of them.&lt;br /&gt;
* Reading PND files becomes easier (because of better tool support... sorry, but you can't link to libpnd in all programming languages) and quicker (becuase of the central directory for random file access).&lt;br /&gt;
&lt;br /&gt;
== Usage scenario ==&lt;br /&gt;
=== Repackaging of an application from another package format ===&lt;br /&gt;
* The user grabs the package for the application&lt;br /&gt;
* He dumps the executable and all required libraries into a folder&lt;br /&gt;
* He dumps a &amp;quot;screenshot.png&amp;quot; file into the folder that he's made&lt;br /&gt;
* He copies the &amp;quot;.desktop&amp;quot; file(s) for the application from the old package, opens them, replaces &amp;quot;Exec=/usr/bin/bla&amp;quot; with &amp;quot;Exec=./bla&amp;quot; and saves them in the directory&lt;br /&gt;
* He uses a ZIP archiver to make a ZIP out of the folder, making sure that he sets the &amp;quot;uncompressed&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
=== Creating PNDs as part of a build process ===&lt;br /&gt;
* The build tool creates a directory with all of the necessary information like above and invokes the &amp;quot;zip&amp;quot; utility to compress the folder.&lt;br /&gt;
&lt;br /&gt;
=== Accessing a PND's contents for the... ===&lt;br /&gt;
&lt;br /&gt;
==== ...lazy programmer ====&lt;br /&gt;
* The programmer extracts the PND into a folder via libzip and accesses its contents.&lt;br /&gt;
&lt;br /&gt;
==== ...pragmatic programmer ====&lt;br /&gt;
* The programmer uses zipfs to mount the ZIP and accesses the file's contents.&lt;br /&gt;
&lt;br /&gt;
==== ...smart performance-aware programmer ====&lt;br /&gt;
* The programmer fseek()'s the ZIP file until he finds 0x04034b50.&lt;br /&gt;
* He jumps 18 bytes forward and reads the int at that location, storing it in &amp;quot;length&amp;quot;.&lt;br /&gt;
* He jumps 4 bytes and checks if this int matches &amp;quot;length&amp;quot;. If it doesn't, it means that the file is compressed, and an error is reported.&lt;br /&gt;
* He then jumps forward 4 bytes and stores the short at that location in a variable &amp;quot;nameLength&amp;quot;.&lt;br /&gt;
* Another 2-byte jump gets the short &amp;quot;extensionsLength&amp;quot;.&lt;br /&gt;
* He then jumps 2 bytes and reads &amp;quot;nameLength&amp;quot; amount of bytes from the file.&lt;br /&gt;
* He then uses strcmp() to see if this string matches the sought-after file. If not, he continues the fseek().&lt;br /&gt;
* The programmer now skips &amp;quot;entensionsLength&amp;quot; amount of bytes.&lt;br /&gt;
* The programmer reads &amp;quot;length&amp;quot; amount of bytes from the file, and uses this as the sought-after file data.&lt;br /&gt;
&lt;br /&gt;
==== ...performance fascist/programmer who wants low seek times ====&lt;br /&gt;
* The programmer fseek()'s the file from the end until he finds 0x02014b50.&lt;br /&gt;
* He then uses the following table to get the information he needs:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ ZIP central directory file header&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Bytes !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 4 || Central directory file header signature = 0x02014b50&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 2 || Version made by&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 2 || Version needed to extract (minimum)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 2 || General purpose bit flag&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 2 || Compression method&lt;br /&gt;
|-&lt;br /&gt;
| 12 || 2 || File last modification time&lt;br /&gt;
|-&lt;br /&gt;
| 14 || 2 || File last modification date&lt;br /&gt;
|-&lt;br /&gt;
| 16 || 4 || CRC-32&lt;br /&gt;
|-&lt;br /&gt;
| 20 || 4 || Compressed size&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 4 || Uncompressed size&lt;br /&gt;
|-&lt;br /&gt;
| 28 || 2 || File name length (''n'')&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || Extra field length (''m'')&lt;br /&gt;
|-&lt;br /&gt;
| 32 || 2 || File comment length (''k'')&lt;br /&gt;
|-&lt;br /&gt;
| 34 || 2 || Disk number where file starts&lt;br /&gt;
|-&lt;br /&gt;
| 36 || 2 || Internal file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 38 || 4 || External file attributes&lt;br /&gt;
|-&lt;br /&gt;
| 42 || 4 || Relative offset of local file header&lt;br /&gt;
|-&lt;br /&gt;
| 46 || ''n'' || File name&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n'' || ''m'' || Extra field&lt;br /&gt;
|-&lt;br /&gt;
| 46+''n''+''m'' || ''k'' || File comment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The relative file offset can then be used to jump to the file in question. The file is then scanned as described in the previous section.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=Libpnd_hub&amp;diff=2139</id>
		<title>Libpnd hub</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=Libpnd_hub&amp;diff=2139"/>
		<updated>2010-02-23T16:25:16Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* libpnd - the Pandora Library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=libpnd - the Pandora Library=&lt;br /&gt;
&lt;br /&gt;
libpnd is a basic collection of functions and tools to make working Pandora-specific operations easier; to wit, it is hoped multiple applications will make use of this library rather than re-implement similar functionality and lead to problems down the road. (Instead we can run into problems together and thus clobberize them.) &lt;br /&gt;
&lt;br /&gt;
libpnd thus is a collection of ...&lt;br /&gt;
&lt;br /&gt;
* handy system code that hopefully is reusable - IO functions, CPU clock setting, etc.&lt;br /&gt;
* applications for supporting the Pandora unique features, such as pndnotifyd for auto-discovery of PXML and .pnd applicatons&lt;br /&gt;
* libraries for support of the .pnd and PXML systems; i.e.: for locating, executable, mounting and unmounting PXML-directory and .pnd applications, loading PXML and handling overrides&lt;br /&gt;
* hopefully reusable code for support of these things; i.e.: a rudimentary but useful config-file parser, rudimentary singly-linked-list container, etc.&lt;br /&gt;
&lt;br /&gt;
libpnd will/does also include utility functions for setting the CPU clock, reading GPIO inputs without depending on SDL, and other handy bits.&lt;br /&gt;
&lt;br /&gt;
'''You can, nay, are needed - contribute to libpnd!'''&lt;br /&gt;
&lt;br /&gt;
==Design considerations and philosophy==&lt;br /&gt;
&lt;br /&gt;
While much of libpnd is obvious, some decisions had to be made and it may help to know the guiding principle behind it; the Pandora device will be a handheld _computer_, but libpnd is designed to facilitate certain operations with goals towards..&lt;br /&gt;
&lt;br /&gt;
- simplicity - just work right, configuration not generally needed&lt;br /&gt;
&lt;br /&gt;
- obviousness - work as one would expect for this sort of device; i.e.: the user assumes something will work a certain way, and it does&lt;br /&gt;
&lt;br /&gt;
- like other guys - as an extension of the prior point, we have tried to follow UNIX spirit and provide reusable small tools to do the work those bits can be leveraged, but further tried to follow the spirit of other consoles. So while the device is a powerful little computer, it is probably going to be used by gaming and retro enthusiasts and so we color some of our decisions that way. (i.e.: consider that a PS2/xbox/PSP/etc will have save-game or data management as a separate application, for instance. If thats the best multi-million dollar companies can come up with over decades, well, its not so bad for us to fall back on!)&lt;br /&gt;
&lt;br /&gt;
- not over-defined; libpnd and PXML try to define a bunch of things, but we also do not _over define_; we try to lead by providing examples and styles, and while we have designed ahead for many things, we have also not nailed a lot of that down too early. It is better to be simple and shipped, then complex and a mess.. adaptable rather than scary.&lt;br /&gt;
&lt;br /&gt;
The library is of course broken into parts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
include     - include these files to make use of the lib&lt;br /&gt;
lib         - the code that produces the lib&lt;br /&gt;
test        - mini tools to test various pieces of the lib in isolation&lt;br /&gt;
bin         - test tools - tools for testing the lib as it is developed, not anticipated to be used by many&lt;br /&gt;
testdata/   - for testing /etc/pandora; will contain 'conf' dir, for example&lt;br /&gt;
apps/       - actual applications people may use, such as pndnotifyd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For now though, here are a couple notes about the design.&lt;br /&gt;
&lt;br /&gt;
- it is straight C code, to be maximumly re-usable (perhaps C++ and other language bindings will tie back to it). I have gone out of my way to limit external references so that bindings are easier to make. &lt;br /&gt;
&lt;br /&gt;
- contrary to the previous comment, we've used a bit of C++ for the tinyxml parser .. hopefully this is not an issue.&lt;br /&gt;
&lt;br /&gt;
- I have tried to keep the API relatively simple and am faking some OO like data hiding to try to keep dev noses out of structures that are subject to change. i.e.: functions for list management and node access are provided, don't dig into the void* cast structs, or you could get burnt.&lt;br /&gt;
&lt;br /&gt;
- the API should be pretty stable; so far very few user-code changes have ever been needed.. lib internal changes should be binary compatible.&lt;br /&gt;
&lt;br /&gt;
- As a result of that decision, 'handles' are used; a handle is a 'black box' type, something you cannot just use 'handle h; h -&amp;gt; foo = 5' type code for. Instead, internally the library will cast the handle to the actual useful type (which may involve pointer arith etc). This way the user can be returned a handle, and pass the handle to various access functions to get useful data/operations.. but the user is not encouraged to look inside the data objects himself&lt;br /&gt;
&lt;br /&gt;
- As another implication, access functions are available aplenty; it is a little unwieldy perhaps, but its all about keeping the API good without the user peeking inside and risking being broken down the road. (By example, consider.. you use ftell() on a FILE object; you don't go looking in FILE for the 'position' member, since it might be platform specific, etc.)&lt;br /&gt;
&lt;br /&gt;
- The lib works pretty well, but there is room for improvement internally; it won't hurt my feelings for you to suggest improvements, and I'm sure we would all be grateful for any patches you provide. We've _started_ this library, but by no means wish to carry it alone!&lt;br /&gt;
&lt;br /&gt;
==Opportunities for improvement==&lt;br /&gt;
&lt;br /&gt;
Certainly nothing is perfect, especially when chasing moving targets.  Some aspects of the library are less efficient, or missing, or buggy, and a few things are noted here should someone have time. The API was designed to be pretty stable so the internal code could be altered without breaking the API interface.&lt;br /&gt;
&lt;br /&gt;
- better ISO lang handling .. due to shift from original PXML spec to new PXML spec with better lang support I've not updated some of the internal code, API uses etc to handle it. (even .desktop files could include all iso-lang titles, and let the WM pick through as the spec suggests.)&lt;br /&gt;
&lt;br /&gt;
==License==&lt;br /&gt;
&lt;br /&gt;
libpnd (including all the apps etc) are released under the LGPL (ie: so there should be no encumbrances that prevent linking to commercial applications.)&lt;br /&gt;
&lt;br /&gt;
   1                   GNU LESSER GENERAL PUBLIC LICENSE&lt;br /&gt;
&lt;br /&gt;
   2                        Version 2.1, February 1999&lt;br /&gt;
&lt;br /&gt;
==Obtaining the library==&lt;br /&gt;
&lt;br /&gt;
libpnd is in the Official Pandora GIT repo: [http://git.openpandora.org/cgi-bin/gitweb.cgi]&lt;br /&gt;
&lt;br /&gt;
To obtain yourself a copy, use something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.openpandora.org/pandora-libraries.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thats all you normally need. For copy-paste from the private Wiki sake, heres what I had before:&lt;br /&gt;
&lt;br /&gt;
Without going into how to set up a GIT, the summary that I (as a registered dev in the repo) used was:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir libpnd&lt;br /&gt;
cd libpnd&lt;br /&gt;
git init&lt;br /&gt;
git remote add libpnd ssh://foo@git.openpandora.org/srv/git/pandora-libraries.git&lt;br /&gt;
git pull libpnd master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Building the library==&lt;br /&gt;
&lt;br /&gt;
Standard 'make' should be sufficient here; pull down the directory from the GIT, cd into it, and run make. Thats it.&lt;br /&gt;
&lt;br /&gt;
Note that the make default target is 'everything', which will emit:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
libpnd.a - the static linked version of the lib&lt;br /&gt;
libpnd.so.1.0.1 - the dynlinked version&lt;br /&gt;
libpnd.so.1 - the stub for the shared lib; i.e.: apps should link against libpnd.so.1 and not the 1.0.1 over-specific version&lt;br /&gt;
bin/* - the 'test' dir and the 'apps' dir builds will end up in bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a few additional make targets, however.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make clean - wipes out the object files, the bin files, and *~* (emacs backup files), empties some of the deploy stuff, etc. Do this before committing to GIT or we will beat you with sticks.&lt;br /&gt;
make deploy - populates the deploy/ directory, which is what is used inthe shipping images; i.e.: testdata/conf includes test configs, while deploy/etc/pandora/conf includes the configs we ship with. This make will copy over some of the libs and binaries and such.&lt;br /&gt;
make pnd - create a few sample pnd files for testing the lib on an x86 machine&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Included Applications==&lt;br /&gt;
&lt;br /&gt;
===pndnotifyd===&lt;br /&gt;
&lt;br /&gt;
Manages the auto-discovery mechanism and integrating PXML.xml dir-apps and .pnd files into the FreeDesktop standard system (.desktop files). A dedicated libpnd-aware menu could leverage libpnd directly and not need pndnotifyd, though pndnotifyd does offer some handy bits such as HUPping apps to suggest to them that applications may have been added/removed (libpnd includes all the necessary functions for this as well.)&lt;br /&gt;
&lt;br /&gt;
===pndvalidator===&lt;br /&gt;
&lt;br /&gt;
Is mostly a skeleton right now; in the future, it is hoped it will inspect a PXML.xml and then check to ensure the referenced assets are present; the goal to validate the PXML.xml is spec compliant, and the resulting application would be useful.&lt;br /&gt;
&lt;br /&gt;
===discotest===&lt;br /&gt;
&lt;br /&gt;
One of the test tools; it essentially runs an auto-discovery to list off the found apps (be they PXML.xml dir apps or .pnd files), and can dump various data or invoke one or other little tasks; used to test lots of&lt;br /&gt;
bits of libpnd as it was developed.&lt;br /&gt;
&lt;br /&gt;
===rawpxmltest===&lt;br /&gt;
&lt;br /&gt;
Reads a given PXML.xml and spits out some of the fields found within.&lt;br /&gt;
&lt;br /&gt;
===test tools===&lt;br /&gt;
&lt;br /&gt;
See the test/ dir in the libpnd source for assorted goofy little test apps used for testing bits of libpnd over time. They also may serve as source examples for using some of the APIs. They're old and shoddy probably too.&lt;br /&gt;
&lt;br /&gt;
==Distributed PXML.xml-directory and pnd applications, how does running them actually work?==&lt;br /&gt;
&lt;br /&gt;
This is just a quick summary to save you guessing by reading this whole document.&lt;br /&gt;
&lt;br /&gt;
In essence, libpnd includes lots of real code, but in many places it passes heavy lifting off to shellscripts. This is both handy because the scripts are easily modified without recompilation, and further extends our design goals of making the library bindable to any other language.&lt;br /&gt;
&lt;br /&gt;
Remember, PXML.xml directories are just as executable/mountable as .pnd apps.&lt;br /&gt;
&lt;br /&gt;
So while libpnd is mostly straight-C and so easily bound to python or perl or whatever, libpnd itself invokes many scripts. Those scripts can be directly used by other applications, including other shellscripts.. so libnd functionality can even have bindings in other scripts. This is very flexible and powerful, and handy during debugging or SSHing into the Pandora, etc.&lt;br /&gt;
&lt;br /&gt;
The application lifecycle goes like this:&lt;br /&gt;
&lt;br /&gt;
- device is turned on&lt;br /&gt;
&lt;br /&gt;
- during init, pndnotifyd is brought up and inhales the config giles&lt;br /&gt;
&lt;br /&gt;
- pndnotidyd will attempt to auto-discover what PXML.xml directory apps and .pnd-file apps are in the configured searchpaths&lt;br /&gt;
&lt;br /&gt;
- pndnotifyd will set up filesystem watches on the directories in the notify searchpath; if any of those directories are touched, pndnotifyd will wake up and re-auto-discover .. possibly removing .desktop entries or creating new ones. (i.e.: you drop a new app into the app searchpath, or remove one, or mount an SD card, etc. This is how appications immediately show up or vanish from the window manager desktops.)&lt;br /&gt;
&lt;br /&gt;
- a libpnd aware launcher can execute applications direct (using libpnd)&lt;br /&gt;
&lt;br /&gt;
- a libpnd unaware launcher can execute applications via the .desktop standard system; pndnotidyd will emit .desktop files as needed.&lt;br /&gt;
&lt;br /&gt;
- when libpnd or a .desktop file need to execute an application, they do it via pnd_run.sh (which may be leveraged by other applications, but they hould use libpnd if they can instead, for utmost compatiblity down the road.) pnd_run.sh does the mount of the ISO, runs the actual execable and so on, as directed by libpnd or the command-line args from the .desktop. pnd_run.sh will clean up after everything as well.&lt;br /&gt;
&lt;br /&gt;
So it all works like magic, but it is not that complex a system once you've got the hang of what all is going on.&lt;br /&gt;
&lt;br /&gt;
application -&amp;gt; libpnd -&amp;gt; shellscripts -&amp;gt; system&lt;br /&gt;
&lt;br /&gt;
==FAQ: IF you want to make files visible to the apps, do you have to modify the pnd?==&lt;br /&gt;
&lt;br /&gt;
No. When apps write back to themselves, the writes go to their /pandora/appdata on the SD that houses them. The next time the app reads a file in its directory, the OS will ensure they get the newer file, which is the one in the appdata.&lt;br /&gt;
&lt;br /&gt;
Likewise, you can just drop a file into the appdata and the app will see it.&lt;br /&gt;
&lt;br /&gt;
The app doesn't know about appdata and its pnd file.. the OS and libpnd take care of all the magic.. the app sees one directory, but the reality is there is magic merging going on behind the scenes.&lt;br /&gt;
&lt;br /&gt;
==Assumptions about the filesystem and Configuration==&lt;br /&gt;
&lt;br /&gt;
Note that for libpnd to work, it makes certain assumptions about the filesystem and config files. Since libpnd was developed with the images it should work for the Pandora .. but just dropping libpnd onto another Linux distribution and it won't likely 'work out of the box'. Certain config files will need to be set, and certain conventions followed.&lt;br /&gt;
&lt;br /&gt;
===Searchpaths===&lt;br /&gt;
&lt;br /&gt;
libpnd was designed so that most everything is configured in files, and that these files should be easily hackable and easily overriden, without compromising the machine. It should be feasible to add a config file to an SD card, have it take over if available when required, and then 'undo' those configs simply by removal of the SD card and rebooting.&lt;br /&gt;
&lt;br /&gt;
To facilitate this design goal, all config files are 'sought' using a search-path system.&lt;br /&gt;
&lt;br /&gt;
Developers should be mindful of using the libpnd APIs so this behaviour is inherited to interested applications; developers could also reuse the logic for searching for files, if they find it useful.&lt;br /&gt;
&lt;br /&gt;
Searchpaths are colon-delimited list of paths, searched left to right.&lt;br /&gt;
&lt;br /&gt;
ex: foo:bar:/my/baz means to look for a given file in 'foo', then in 'bar', then in '/my/baz'.&lt;br /&gt;
&lt;br /&gt;
The standard config files have a default searchpath, and those config files will define further searchpaths for scripts and such the system uses. This makes the system highly flexible -- default scripts are included, but can be overridden by dropping the right named script on an SD card, or by altering a config file.&lt;br /&gt;
&lt;br /&gt;
See the example config files below for example searchpaths -- i.e.: how pndnotifyd searches for pnd_run, etc.&lt;br /&gt;
&lt;br /&gt;
===Notification paths===&lt;br /&gt;
&lt;br /&gt;
The 'apps' config includes a searchpath that specifies the sub-paths to be 'watched'. Various watch mechanisms exist for various filesystem types, but over the course of Pandora development (various kernels, various k-modules, various DM and WM's, I found the included system most stable, though not most current. After a final device image is settled on, it might be time to alter the notification system, but it should not impact the libpnd API.)&lt;br /&gt;
&lt;br /&gt;
Anyway, watches are placed upon the paths defined, and if anything in those paths changes, the auto-discovery code is kicked off to seek our PXML.xml and .pnd type applications in the search paths.&lt;br /&gt;
&lt;br /&gt;
Note that searchpath and notifypaths are different (and usually very similar, but have the option to be very different.)&lt;br /&gt;
&lt;br /&gt;
===Config files===&lt;br /&gt;
&lt;br /&gt;
libpnd includes a generic simple config file parser and assumes the presence of a few config files. It also includes defaults&lt;br /&gt;
so if a config is missing or broken things should work.&lt;br /&gt;
&lt;br /&gt;
In general, Pandora specific config files should be located in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/pandora/conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The config files are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
conf -- this file is generally _not_ included with the Pandora and left to default; its job is to define the basic default searchpath for config files, so should you wish to override things entirely, you may need to alter this file. i.e.: If you wish to switch to test config files on SD or in /tmp, instead of using any other conf files .. you can create this guy. This provides a mechanism to short circuit the entire conf system.&lt;br /&gt;
&lt;br /&gt;
apps -- this config file defines auto-discovery and other application bundle parameters&lt;br /&gt;
&lt;br /&gt;
desktop -- this config defines &amp;quot;dotdesktop&amp;quot; .desktop and FreeDesktop integration paramters -- example is where to spit out icons or .desktop files from discovered PXML.xml or pnd applications&lt;br /&gt;
&lt;br /&gt;
categories -- this config maps PXML.xml spec based categories to FreeDesktop standard categories; in this way a PXML based applicatoin can show up in the appropriate categories of a WM that does not use libpnd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====conf File====&lt;br /&gt;
&lt;br /&gt;
No default is included with the distribution.&lt;br /&gt;
&lt;br /&gt;
The default search path is reasonable and assumes we want the official /etc/pandora/conf near the end, with checks to the SD cards for overrides first. (Likely most people will not override, so the canonical location will be used 99.9% of the time.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PND_CONF_SEARCHPATH &amp;quot;/media/mmcblk0p1/pandora/conf:/media/mmcblk1p1/pandora/conf:/etc/pandora/conf:./testdata/conf&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The key for override is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define PND_CONF_KEY        &amp;quot;conf.searchpath&amp;quot; /* if not found, use PND_CONF_SEARCHPATH */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which suggests using something like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[conf]&lt;br /&gt;
searchpath   /foo/bar:/baz/bing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====desktop File====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Desktop configuration&lt;br /&gt;
&lt;br /&gt;
[dotfiles]&lt;br /&gt;
#(~/Desktop for xfce, /usr/share/applications for WMs that actually follow spec)&lt;br /&gt;
dotdesktoppath  ~/Desktop/      # path for pndnotifyd to spit .desktop files into (run as root)&lt;br /&gt;
iconpath        /tmp    # path for pndnotifyd to drop icons into (can be same as .desktop if WM permits)&lt;br /&gt;
&lt;br /&gt;
[launcher]&lt;br /&gt;
# if hupscript is commented out entirely, pndnotifyd will not try to find/run the hup&lt;br /&gt;
# if it is uncommented, pndnotifyd will attempt to invoke the hupscript after emitting .desktop files&lt;br /&gt;
# (the hupscript exists to hup the WMs to redisplay .desktop apps)&lt;br /&gt;
#hupscript      pnd_hup.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====apps File====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# Application configuration&lt;br /&gt;
&lt;br /&gt;
[autodiscovery]&lt;br /&gt;
# searchpath is a list of paths (colon separated) in which to look for PXML.xml or .pnd-file applications&lt;br /&gt;
searchpath      /media/*/pandora/apps:/usr/pandora/apps&lt;br /&gt;
# notifypath is a list of paths to monitor; if anything in those paths changes, the searchpath is rescanned&lt;br /&gt;
# note that for each path chunk, all current subdirs of that path are also watched)&lt;br /&gt;
notifypath      /media:/media/*/pandora/apps:/usr/pandora/apps:./testdata/app?&lt;br /&gt;
&lt;br /&gt;
# PXMLs may be overridden .. i.e.: overrides are a subset of PXML, where the values are copied over the full PXML&lt;br /&gt;
[overrides]&lt;br /&gt;
# searchpath to look for PXML overrides (which are named by the unique-id)&lt;br /&gt;
searchpath      ~/pxml-overrides&lt;br /&gt;
&lt;br /&gt;
# [pnd] defines where to locate the pnd support scripts, so the user may override pnd_run.sh without clobbering built in&lt;br /&gt;
[pnd]&lt;br /&gt;
searchpath      /media/*/pandora/scripts:/usr/pandora/scripts&lt;br /&gt;
runscript       pnd_run.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====categories File====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Open Pandora&lt;br /&gt;
# dotdesktop configuration&lt;br /&gt;
&lt;br /&gt;
# this config file maps 'PXML' categories to free-desktop standard categories&lt;br /&gt;
# i.e.: category 'Foo' could map to more standard 'Utility', thus making .desktop file&lt;br /&gt;
# emitting a more useful thing&lt;br /&gt;
&lt;br /&gt;
# the standard listing of categories is:&lt;br /&gt;
# http://standards.freedesktop.org/menu-spec/latest/apa.html&lt;br /&gt;
&lt;br /&gt;
# note that 'map' section in the config is _required_ for a match to be found; this&lt;br /&gt;
# is done to separate categories from (future) top-level directives&lt;br /&gt;
&lt;br /&gt;
default Application;Utility;Network;&lt;br /&gt;
&lt;br /&gt;
[map]&lt;br /&gt;
Development     Development&lt;br /&gt;
Education       Education&lt;br /&gt;
Games   Game&lt;br /&gt;
Graphics        Graphics&lt;br /&gt;
Internet        Network&lt;br /&gt;
Multimedia      AudioVideo&lt;br /&gt;
Office  Office&lt;br /&gt;
Settings        Settings&lt;br /&gt;
System  System&lt;br /&gt;
Utilities       Utility&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SD card layout===&lt;br /&gt;
&lt;br /&gt;
libpnd concerns itself with things in the 'pandora' root folder on SD. We agonized over this decision, but settled on this to avoid cases where someone with a 16GB SDHC card puts 50-million files with &amp;quot;.pnd&amp;quot; on them, and expects reasonable performance. Instead, applications for instance would have to be in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/pandora/menu -&amp;gt; apps that will go to /usr/share/applications and should show up in xfce menu by category&lt;br /&gt;
/pandora/desktop -&amp;gt; apps that will go to ~/Desktop and show up on user desktop as icons&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following location is used by pmenu (and may get deprecated, but I've not discussed it with cpasjuste yet.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/pandora/apps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i.e.: the searchpath for autodiscovery includes /media/*/pandora/apps (and desktop and menu now)&lt;br /&gt;
&lt;br /&gt;
Also in the /pandora/ folder is a magic 'appdata' folder:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/pandora/appdata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a .pndfile or PXML.xml dir get mounted, any writes back to the mounted area are put into appdata, with a subdir by the unique-id. i.e.: With the hypothetical MAME.pnd, it might update its config files after a user changes something, or create new files, or store hiscores or whatever. If it doesn't write them to NAND, and doesn't want ot write them to /mame/some/dir, but instead record it to itself for whatever reason, it would go to /pandora/appdata/MAMEs-ID/ instead. The pnd or PXML.xml app area is never modified during a run, only the appdata. (But when an application reads its own path, it will pick up the appdata version of the file instead of the actual file. Then magic of union-type filesystems!)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
If Myapp with unique-id foo.123 is mounted, then any write-backs are directed to..&lt;br /&gt;
&lt;br /&gt;
/pandora/appdata/foo.123/&lt;br /&gt;
&lt;br /&gt;
On the SD that hosts the application.&lt;br /&gt;
&lt;br /&gt;
===NAND layout===&lt;br /&gt;
&lt;br /&gt;
In addition to seeking applications in SD cards, /usr/pandora/apps is included in the default searchpath, so that 'built in' apps can be listed, or users can drop them there.&lt;br /&gt;
&lt;br /&gt;
It might be a cool addition to put a user homedir into the searchpath as well, so NAND but user-homedir (for on-device browser downloads, say.)&lt;br /&gt;
&lt;br /&gt;
==Command line tools and testing==&lt;br /&gt;
&lt;br /&gt;
A number of scripts and tools are included or built with libpnd, to facilitate testing of the lib as its being developed and to assist in making .pnd files and PXML.xml files.&lt;br /&gt;
&lt;br /&gt;
==PXML.xml and .pnd files==&lt;br /&gt;
&lt;br /&gt;
On most platforms, applications are distributed as an executable and optional datafiles and likely an installer. The installers job is to integrate the application into the filesystem, as the transport mechanism itself is not executable and is considered temporary. In Windows an application might be installed into Program Files, while in Unix an application might be dropped into /usr/local/bin .. data files in various other places.&lt;br /&gt;
&lt;br /&gt;
For the Pandora platform we wanted a very easy to use workflow -- download and run -- and also have a very different operating environment. With multiple SD cards available for expansion (and that space being highly desirable due to a smaller internal store) it is desirable to install applications to SD, and yet SD cards are by definition something users will wish to carry multiple of. With two slots, it could be quite a chore to install an application to SD1, its data to SD2, and then say have only one of them plugged in at a time, or switch which slot they're in, or any number of scenarios. i.e.: Installing onto a medium which may be present or not at any time is very different to how most operating systems work. So we made something new and awesome.&lt;br /&gt;
&lt;br /&gt;
The PXML.xml and .pnd-file approach we came up with attempts to address these issues.&lt;br /&gt;
&lt;br /&gt;
The goals:&lt;br /&gt;
&lt;br /&gt;
- for the user, an application can be a single file download&lt;br /&gt;
&lt;br /&gt;
- furthermore, there is no installation whatsoever, beyond dropping that single file into the right place on the SD card&lt;br /&gt;
&lt;br /&gt;
- using the application should be easy -- stick in the SD card, and tap/launch on the icon.&lt;br /&gt;
&lt;br /&gt;
- for uninstallation, delete the single file. Thats it, no fuss.&lt;br /&gt;
&lt;br /&gt;
- for the developer, creating that single file should be easy to do&lt;br /&gt;
&lt;br /&gt;
- for the system, performance should be high&lt;br /&gt;
&lt;br /&gt;
Remember, an application can be a .pnd 'bundle' (single file containing all the sub-files), or a PXML.xml 'dir application' (an unpacked .pnd esentially.) '''BOTH PXML.xml-dirs and .pnd's ARE EXECUTABLE.'''&lt;br /&gt;
&lt;br /&gt;
pndnotifyd will auto-discover PXML.xml in a directory and consider that an application, emitting a .desktop file, just as well as a .pnd file. i.e.: This can be hand for development or users. Remember that a mounted PXML.xml dir still redirect write-backs to the /pandora/appdata directory, just like a full .pnd application. They are treated the same!&lt;br /&gt;
&lt;br /&gt;
===What are PXML.xml and .pnd files?===&lt;br /&gt;
&lt;br /&gt;
PXML.xml is a file describing an application&lt;br /&gt;
&lt;br /&gt;
A directory containing a PXML.xml _is executable_&lt;br /&gt;
&lt;br /&gt;
A .pnd file is the packaged up version of the directory that is executable.&lt;br /&gt;
&lt;br /&gt;
i.e.: a PXML.xml in a directory is just as executable as a .pnd representation of that directory.&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
mkdir OutcaST&lt;br /&gt;
cp outcast.bin OutcaST/&lt;br /&gt;
cp PXML.xml OutcaST/&lt;br /&gt;
# at this point, the OutcaST directory is now discoverable and executable&lt;br /&gt;
&lt;br /&gt;
pnd_make.sh -this -that OutcaST outcast.pnd&lt;br /&gt;
# at this point, outcast.pnd is executable (as is the OutcaST directory), so upload outcast.pnd to the Open Handhelds Archive and let people enjoy!&lt;br /&gt;
&lt;br /&gt;
===A note on including shared libs===&lt;br /&gt;
A philsophy for packaging that I am advocating is to 'just make applications work' -- avoid dependancy trees.&lt;br /&gt;
&lt;br /&gt;
Some guidelines:&lt;br /&gt;
&lt;br /&gt;
1) you can depend on shared libs included with the firmware to always be there&lt;br /&gt;
&lt;br /&gt;
2) you should include any shared libs you need for your app, that are not in the firmware (yes, this increases app size a little bit, and potentially makes for duplication among apps that use the same shared libs)&lt;br /&gt;
&lt;br /&gt;
3) if a shared lib becomes desirable in the firmware, it can be added there as a firmware patch easily (this has the advantage of gradulaly updating the entire user based, and apps easily saying 'we depend in firmware version X', rather than making for pnd-dependnacies and the equivilent of 'dll hell'&lt;br /&gt;
&lt;br /&gt;
4) You'll have to be careful in linking your application to ensure that the shared libs you are including in the pnd/PXML-dir are to be locatable by your binaries. ie: stick them in a 'lib/' dir in your bundle, and stamp your binary with a library-path './dir/' so they can be found, say. More later.&lt;br /&gt;
&lt;br /&gt;
===Future idea: pnd's for containing system-wide shared libs===&lt;br /&gt;
&lt;br /&gt;
This is something we've bounced around for quite awhile, but not committed to. As it keeps coming up I thought I'd put some notes here in public.&lt;br /&gt;
&lt;br /&gt;
It is possibly desirable to make a special searchpath that is discovered during machine boot, and any pnd's found there are automatically mounted (and left mounted) into a special path (say /usr/local/pandora/lib or somesuch.) This way, collections of handy utilities or shared libraries could be distributed as a pnd, and become available in consistent locations. If 10 applications need a shared lib, and don't want to duplciate it in each of their pnd files, this could be an approach.&lt;br /&gt;
&lt;br /&gt;
I tend to think it is best avoided, however, since it complicates the user experience -- we end up with pnd depandancies, and apps nolonger about to 'just work', and apps that did work and 'suddenly break' when other files are altered. The philosphy we're going for with pnd files is 'drag and drop' -- user downloads a pnd file, and it works.. a self contained application, nice and easy. We start complicating the dependancies, and it turns into 'dll hell' as seen on other platforms.&lt;br /&gt;
&lt;br /&gt;
That said, it is _not_ difficult to add into the existing system and design; we've been mulling it over, but it is best avoided for now. rather than complicate the system up front, let us try to get a functional and as lightweight-as-possible system on the uptake, gather some usage data points and then worry about upgrades :)&lt;br /&gt;
&lt;br /&gt;
===File format - PXML.xml===&lt;br /&gt;
See the [[PXML_specification|PXML specification]]&lt;br /&gt;
&lt;br /&gt;
Alternatively the spec is included in the docs/ directory of the libpnd distribution, though the wiki version linked above should be considered cannon.&lt;br /&gt;
&lt;br /&gt;
A note on history; the PXML spec was originally created by EvilDragon, and went through a number of revisions as suggestions came in; as these things are wont to do, the target was ever moving and the scope and meaning of PXML changed so at some point a more strategic approach was needed. dflemstr took it upon himself to help recode some of the parse and re-evaluate many of the PXML decisions and hence was born the PXML-version-2 spec.&lt;br /&gt;
&lt;br /&gt;
===File format - .pnd files===&lt;br /&gt;
The pnd file format is pretty straight forward, though most will interact with it through the included (or community supplied) tools.&lt;br /&gt;
&lt;br /&gt;
Basically its just an ISO file (or other filesystem type) with a PXML.xml and an optional PNG icon appended. (example: cat appfolder.iso app.pxml icon.png &amp;gt; app.pnd) For ease of discussion, I refer to ISO but in fact you coudl be using squashfs or other types.&lt;br /&gt;
&lt;br /&gt;
The ISO filesystem portion of the file can include anything the developer wishes, as long as it includes a PXML.xml in its root file and an executable somewhere in there. It can also include images, audio files, data files of any kind. It can be small or large.&lt;br /&gt;
&lt;br /&gt;
Yes, the PXML.xml is included in the ISO portion (in the root directory), and also appended to the end of the .pnd file (for _convenience_ .. it is very easy and fast to locate in this position; we can backseek into the ISO to find the PXML, but if its a 500MB ISO it could take awhile. Hence, we append it and can find it in one seek.)&lt;br /&gt;
&lt;br /&gt;
This simple format makes it possible to easily create .pnd files with the default utility's of most operating systems. Further, it is a fairly fail-safe system -- the PXML is appended, but is also included within the ISO image part of the file so if the appended-PXML is ever lost (unpack and repack poorly, say) the system will still work (the PXML inside the ISO can be found easily, even without mounting the ISO _as_ an ISO, since it is a plaintext uncompressed image format.) &lt;br /&gt;
&lt;br /&gt;
Manually creating a .pnd (or even a PXML) is a pain so there will be a few helper scripts or maybe even a gui app out when we launch.&lt;br /&gt;
&lt;br /&gt;
Included with libpnd are some scripts to create PXML and pndfiles, though it is expected people will create handier utilities. See the tool section of this wiki for some details.&lt;br /&gt;
&lt;br /&gt;
Question from the gp32x forum regarding confusion of PXML location -- remember that in general mot developers will keep a directory that represents the .pnd or PXML-dir application. Their makefile/build-process will drop the executable(s) into that directory, which inludes a PXML.xml description of the application, and possibly an icon (and whatever all else they wish.) To build the .pnd file, a script (say) is used which compresses all this into the pnd format (including appending the PXML.) So yes, the PXML is in two places in the .pnd file and one place in the source directory. You'll get used to it ;)&lt;br /&gt;
&lt;br /&gt;
Rationale --&lt;br /&gt;
&lt;br /&gt;
Several iterations of pnd files have been considered, from zipfiles to cramfs to other formats, to putting in a key/value set of information tags in the file, to table-of-contents indexes, to any number of options to help performance, and so on. In the end we went for a good overall and simple solution and dropped getting fancy -- PXML.xml can be extended to define the type of the file if it cannot be magic'd, so we could using other filesystem types in the future (and this is why people should use libpnd rather than rolling their own solution.) For now however, pnd files are ISO files with the PXML.xml appended and an optional icon. This keeps the PXML and icon easy to locate, and yet a easy file format.&lt;br /&gt;
&lt;br /&gt;
====What filesystem types can be contained within a pnd-file?====&lt;br /&gt;
&lt;br /&gt;
The pnd container can really contain a large variety of filesystem types; day-zero we're aiming for ISO since it is simple, easy build across every major OS, and fast to use. But it is not the only supported filesystem type, and more should be added all the time. (Possibly '-auto' can be added to pnd-run and it'll &amp;quot;just work&amp;quot; for dozens of types!)&lt;br /&gt;
&lt;br /&gt;
A compressed filesystem type has always been desirable for file sizing reasons, though it potentially impacts performance (depending on the application operation really.)&lt;br /&gt;
&lt;br /&gt;
Supported types (not an exhaustive list!):&lt;br /&gt;
&lt;br /&gt;
o ISO&lt;br /&gt;
&lt;br /&gt;
o squashfs&lt;br /&gt;
&lt;br /&gt;
====PND generation workflow====&lt;br /&gt;
&lt;br /&gt;
- create a directory to represent the application on SD card; i.e.: ./mame-app&lt;br /&gt;
&lt;br /&gt;
- create a PXML.xml fil and drop it into the dir (./mame-app/PXML.xml); genpxml script can be used, or do it by hand&lt;br /&gt;
&lt;br /&gt;
- drop the executable and data files into this dir (say, ./mame-app/mame.bin, and ./mame-app/artwork/foo, etc.)''' &amp;lt;- note, with a PXML.xml and executabe, it can now be discovered and run without even bundling into .pnd!'''&lt;br /&gt;
&lt;br /&gt;
- invoke pnd-make.sh to produce mame4all-pandora-1.0-arm.pnd or whatever you want to call it (foobearspanky.pnd, we don't care.)&lt;br /&gt;
&lt;br /&gt;
- you're done, distribute it as you see fit&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Windows / DOS commandline====&lt;br /&gt;
&lt;br /&gt;
There should be a basic GUI along very soon, and more advanced friendlier GUIs in due time. But for now, we thought it prudent to include some basic instructions on the command line for day-zero.&lt;br /&gt;
&lt;br /&gt;
For this command-line tutorial, I will assume you have already created a PXML.xml file; copy one of the templates and then edit it, using notepad or whatever _TEXT_ editor you see fit.&lt;br /&gt;
&lt;br /&gt;
Prepare in advance:&lt;br /&gt;
&lt;br /&gt;
1) Make a PXML.xml file (through whatever means; copy a template, or get a PXML.xml tool when they come available.) Ensure that you've got a reasonably unique-id in that field (ie: say, app-name, your name, and date/time all catenated together.) &lt;br /&gt;
&lt;br /&gt;
2) Get yourself mkisofs tools; for example, grab from here: http://www.student.tugraz.at/thomas.plank/ -- get cdrtools-2.01-win32-bin.zip and DLL version 1.5.25, and extract to somewhere. That lets you run 'mkisofs' to spit out .iso files&lt;br /&gt;
&lt;br /&gt;
2b) If you want to make a compressed image, use squashfs tools here: ftp://ftp.slax.org/useful-binaries/win32/squashfs-tools/&lt;br /&gt;
&lt;br /&gt;
3) Put your application and all needed files into a single directory .. say &amp;quot;myapp&amp;quot;; it doesn't matter what you call it. Might be cool as a Makefile step&lt;br /&gt;
&lt;br /&gt;
4) In your app-dir, put the PXML.xml file in the root&lt;br /&gt;
&lt;br /&gt;
5) Put the icon in the root of that dir as well (make it a .png file)&lt;br /&gt;
&lt;br /&gt;
6) Make sure the PXML.xml names the icon (just its filename.png), and specifies the executable (foo.bin or whatever.)&lt;br /&gt;
&lt;br /&gt;
Generate the actual PND-file, fully manual method:&lt;br /&gt;
&lt;br /&gt;
1) Make yourself the iso; this step produces the iso, but to turn the iso into a pnd you need a couple last steps. You could also use some fancy iso-building tool.&lt;br /&gt;
'''mkisofs -o foo.iso -R /path/to/folder/myapp'''&lt;br /&gt;
&lt;br /&gt;
2) Append PXML.xml to the .iso (yes, the PXML.xml is included in the iso, but we also want to append it for performance reasons.) &lt;br /&gt;
'''copy foo.iso+PXML.xml foo.step2'''&lt;br /&gt;
&lt;br /&gt;
3) Append the icon PNG file to the .iso (if you have an icon; if not, you can leave this step out.)&lt;br /&gt;
'''copy foo.step2+myicon.png foo.pnd'''&lt;br /&gt;
&lt;br /&gt;
4) Clean up: del''' foo.step2 foo.iso'''&lt;br /&gt;
&lt;br /&gt;
5) Profit!&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Linux/BSD/Unix (including on Pandora)====&lt;br /&gt;
&lt;br /&gt;
=====Command-line=====&lt;br /&gt;
&lt;br /&gt;
Tools are included in the libpnd distribution; see below for discussion, but suffice to say they are included int he GIT. Look in testdata/scripts for:&lt;br /&gt;
&lt;br /&gt;
o genpxml - spits out a template PXML.xml for you, and even includes a reasonably unique-id&lt;br /&gt;
o pnd-make.sh - given a directory and some arguments, will spit out a .pnd file; great for use in Makefiles&lt;br /&gt;
&lt;br /&gt;
We're working on others as well, so piece of cake under Unix and Unix-like OSes.&lt;br /&gt;
&lt;br /&gt;
=====GUI=====&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Windows GUI====&lt;br /&gt;
&lt;br /&gt;
====Making PND files - Mac OSX====&lt;br /&gt;
&lt;br /&gt;
===PXML overrides===&lt;br /&gt;
&lt;br /&gt;
PXML.xml files can have any number of their elements over-ridden by user preferences. &lt;br /&gt;
&lt;br /&gt;
The design goal here was to make it so user-preferences could alter the impact of the PXML.xml in any way, but without requiring the actual PXML.xml in the .pnd (and within the ISO therein) to be altered (could be a 500MB ISO after all!), and further, for these changes to persist. Consider than an SD card could be removed and inserted into the other slot, or the app could be removed entirely and come back another day, or other scenarios.&lt;br /&gt;
&lt;br /&gt;
As such, the PXML-overrides are kept in NAND in the user homedirectory (See the config files to find out where.)&lt;br /&gt;
&lt;br /&gt;
libpnd includes functions to pull in PXML, and also functions to then look for and merge in overrides. It is not always done since you may wish to inspect the PXML or the overrides, so the developers job is to do as they see fit -- pull the XML, and likely also pull in the overrides.&lt;br /&gt;
&lt;br /&gt;
At this time I'm not sure if people will ever use overrides, but the system has been built in should it be needed.&lt;br /&gt;
&lt;br /&gt;
===Included shellscripts to generate files and other sundry duties===&lt;br /&gt;
&lt;br /&gt;
====genpxml====&lt;br /&gt;
&lt;br /&gt;
This tool can spit out a basic but correct PXML.xml, faking up a halfway-useful unique-id in the process. It might be handy in saving you writing up a PXML.xml from scratch.&lt;br /&gt;
&lt;br /&gt;
====pnd_hup.sh====&lt;br /&gt;
&lt;br /&gt;
pndnotifyd will attempt to locate this script and invoke it after an auto-discovery run, if the pnd_hup entry is present (and uncommented) in the config files. It is expected to be commented out in release images, as xfce watches directories for .desktop files and does not need a HUP; some desktop managers need to be HUPped to rescan for .desktop files in a timely fashion, so the pnd_hup config entry can be uncommented and this script will attempt to figure out who to HUP.&lt;br /&gt;
&lt;br /&gt;
====pnd_make.sh====&lt;br /&gt;
&lt;br /&gt;
This is one of the great ones :)&lt;br /&gt;
&lt;br /&gt;
Given a directory with a PXML.xml (see genpxml above) and an executable and any other goo you want in there, this script will spit out a .pnd file you can execute or distribute as an application.&lt;br /&gt;
&lt;br /&gt;
====pnd_run.sh====&lt;br /&gt;
&lt;br /&gt;
This job does a lot of the heavy lifting for libpnd, including setting up the 'union filesystems', doing .pnd and PXML.xml-app-dir execution and mounting, and so on. Generally you will talk to it via libpnd or .desktop files, but you can invoke it dorectly from your apps if you wish to circumvent libpnd or mount .pnd files within a shellscript/perlscript/etc.&lt;br /&gt;
&lt;br /&gt;
==Auto-discovery of applications==&lt;br /&gt;
&lt;br /&gt;
TBD.&lt;br /&gt;
&lt;br /&gt;
==Integration with FreeDesktop .desktop systems==&lt;br /&gt;
&lt;br /&gt;
===dotdesktop (.desktop) files===&lt;br /&gt;
&lt;br /&gt;
===Icons===&lt;br /&gt;
&lt;br /&gt;
There are some rules for Icons in PXML.xml and pnd/directory bundles&lt;br /&gt;
&lt;br /&gt;
- An Icon should be in the root of the directory or .pnd bundle&lt;br /&gt;
&lt;br /&gt;
- An Icon must be specified in the PXML.xml if you expect it to work&lt;br /&gt;
&lt;br /&gt;
- As the PXML.xml is parsed, the icon is sought; if the icon is specified, but not found, it is assumed to be a system default icon and the filename will be placed into the .desktop Icon= line verbatim (ex: Icon=foo.png), and the window manager presumably will know how to locate it. If the icon is specified, and is found, then it will be copied into the configured IconPath, and the full path to it will be used for the Icon= line in the .desktop file ex: Icon=/tmp/myicon.png). If no icon is specified in the PXML file, then no Icon= line will be entered into the .desktop and the WM will presumably apply a default icon based on category or whatever.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==APIs==&lt;br /&gt;
&lt;br /&gt;
Feel free to just go read the .h files; I have tried to comment liberally :)&lt;br /&gt;
&lt;br /&gt;
===Setting and Getting the CPU clock speed===&lt;br /&gt;
&lt;br /&gt;
===Device paramaters - brightness, etc===&lt;br /&gt;
&lt;br /&gt;
===PND files, exec and mount===&lt;br /&gt;
&lt;br /&gt;
===Application discovery===&lt;br /&gt;
&lt;br /&gt;
===Config file parsing===&lt;br /&gt;
&lt;br /&gt;
===Boxing, the singly-linked list container===&lt;br /&gt;
&lt;br /&gt;
===Directory watching===&lt;br /&gt;
&lt;br /&gt;
===Logging api===&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=User_manual&amp;diff=1949</id>
		<title>User manual</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=User_manual&amp;diff=1949"/>
		<updated>2010-01-06T21:13:31Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Where Do .PNDs Go? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border-top:1px solid gray; border-bottom:1px solid gray; padding-top:5px; padding-bottom:5px; margin-bottom:20px&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;''This page is an unofficial community project, and OpenPandora Ltd. is not responsible for its content.''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PandoraFront.jpg|Right|thumb|360px|Pandora FTW!]]&lt;br /&gt;
So your Pandora just arrived after being in the post for two months. Jolly good! But now that it's actually here, what on earth do you do with it? '''Don't panic!''' Let's take a look at what's included in the box(so you don't miss anything!) and then hop on over to setting it up for that extended Ms. Pacman marathon I know you've been waiting for!&lt;br /&gt;
&lt;br /&gt;
Also, don't forget to hit up [http://www.gp32x.com/board/index.php?/forum/61-pandora/ GP32X] for questions/info/apps/fun/discussion!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Safety Information ==&lt;br /&gt;
Warning: Choking Hazard, do not let children under the age of 3 come close to your Pandora console.&lt;br /&gt;
The Pandora Contains small parts that can be eaten by those children.&lt;br /&gt;
&lt;br /&gt;
The battery of Pandora must be charged by the charger included with the Pandora(see package contents)&lt;br /&gt;
and we at OpenPandora Ltd. cannot be responsible for people using third party chargers. Please be aware that some third party chargers compatible with the Pandora have a fake CE logo and are highly dangerous (they will burst into flames).&lt;br /&gt;
&lt;br /&gt;
Keep the Pandora in normal temperatures under 140F/60C (Recommended temperatures are in the range between -10C and 40C){{Citation needed}}. The battery is standard Lithium Polymer battery. Do not keep near fire or water. Do not disassemble, destroy or damage the battery, or it may explode! Do not short circuit external contacts! Dispose of it properly, please. &lt;br /&gt;
&lt;br /&gt;
All third party modifications and hardware/software can damage your Pandora, OpenPandora Ltd cannot be responsible for damage caused by this. Trusted software can be recongised by a OP-member in the Pandora Appstore. See the “OP-Team Trusted” image in the app store to see if the software application can be trusted{{Citation needed}}.&lt;br /&gt;
&lt;br /&gt;
The Pandora has a 4.3-inch Touchscreen. You can touch the screen to trigger an action. Although this is a touch screen, you cannot punch it. Always touch the screen gently – this will be more then enough to trigger the action you want.&lt;br /&gt;
&lt;br /&gt;
The Pandora has an protective design, making it hard to break. Of course, you should never drop your Pandora, wash it, or try anything that can harm your Pandora. This will void your warranty.&lt;br /&gt;
&lt;br /&gt;
== Warranty Information ==&lt;br /&gt;
By law there is a one year warranty, and the device will be replaced/repaired if it is faulty. LCDs with noticeable dead pixels will also be replaced (Note: Pixels are small squares aligned in a grid to make up the image on your screen. A &amp;quot;Dead Pixel&amp;quot; is one that doesn't work anymore and remains black or any other static color).&lt;br /&gt;
&lt;br /&gt;
== Box Contents ==&lt;br /&gt;
When you first open Pandora's box, a slew of demons and raging emotions may forcibly leave the box. This is normal. After that, you may or may not be surprised to find a:&lt;br /&gt;
*Pandora console&lt;br /&gt;
*Stylus (located in stylus slot on the side of the Pandora)&lt;br /&gt;
*Battery&lt;br /&gt;
*DC Wall Charger&lt;br /&gt;
*TV-Out Cable (ONLY if you ordered it separately)&lt;br /&gt;
*Carrying Case (ONLY if you ordered it separately)&lt;br /&gt;
*Extra Battery (ONLY if you ordered it separately)&lt;br /&gt;
After you take those things out, you may find a sliver of Hope left over. It's best to keep it, as you never know when you could use some Hope.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
==== Highlights ====&lt;br /&gt;
{{citation needed}}&lt;br /&gt;
* ARM® Cortex™-A8 600Mhz+ CPU running Linux*&lt;br /&gt;
* 430-MHz TMS320C64x+™ DSP Core&lt;br /&gt;
* PowerVR SGX OpenGL 2.0 ES compliant 3D hardware&lt;br /&gt;
* 800x480 4.3&amp;quot; 16.7 million colours touchscreen LCD&lt;br /&gt;
* Wifi 802.11b/g, Bluetooth &amp;amp; High Speed USB 2.0 Host&lt;br /&gt;
* Dual SDHC card slots &amp;amp; SVideo TV output&lt;br /&gt;
* Dual Analogue and Digital gaming controls&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* Around 10+ Hours battery life**&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;The 600Mhz+ can be higher or lower. This can be controlled by software designed for the device.&amp;lt;/small&amp;gt;&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;Is affected by use. (example turn bluetooth on or off during play time)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Advanced Specifications ====&lt;br /&gt;
* Texas Instruments OMAP3530 processor at 600MHz (officially)&lt;br /&gt;
* 256MB DDR-333 SDRAM&lt;br /&gt;
* 512MB NAND FLASH memory&lt;br /&gt;
* IVA2+ audio and video processor using TI's DaVinci™ technology (430MHz C64x DSP)&lt;br /&gt;
* ARM® Cortex™-A8 superscalar microprocessor core&lt;br /&gt;
* PowerVR SGX530 (110MHz officially) OpenGL ES 2.0 compliant 3D hardware&lt;br /&gt;
* integrated Wifi 802.11b/g (up to 18dBm output)&lt;br /&gt;
* integrated Bluetooth 2.0 + EDR (3Mbps) (Class 2, + 4dBm)&lt;br /&gt;
* 800x480 resolution LTPS LCD with resistive touch screen, 4.3&amp;quot; widescreen, 16.7 million colors (300 cd/m2 brightness, 450:1 contrast ratio)&lt;br /&gt;
* Dual analog controllers&lt;br /&gt;
* Full gamepad controls plus shoulder buttons&lt;br /&gt;
* Dual SDHC card slots (up to 64GB of storage currently)&lt;br /&gt;
* headphone output up to 150mW/channel into 16 ohms, 99dB SNR (up to 24 bit/48KHz)&lt;br /&gt;
* TV output (composite and S-Video)&lt;br /&gt;
* Internal microphone plus ability to connect external microphone through headset&lt;br /&gt;
* Stereo line level inputs and outputs&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* USB 2.0 OTG port (1.5/12/480Mbps) with capability to charge device&lt;br /&gt;
* USB 2.0 HOST port (480Mbps) capable of providing the full 500mA to attached devices (examples include USB memory, keyboard, mouse, 3G modem, GPS)&lt;br /&gt;
* up to two externally accessible UARTs and/or four PWM signals for hardware hacking, robot control, debugging, etc.&lt;br /&gt;
* un-brickable design with integrated boot loader for safe code experimentation&lt;br /&gt;
* Power and hold switch useful for &amp;quot;instant on&amp;quot; and key lockout to aid in media player applications on the go&lt;br /&gt;
* Runs on the Linux operating system (2.6.x)&lt;br /&gt;
* Dimensions: 140x83.4x27.5mm&lt;br /&gt;
* Weight: 335g (with 4200mAh battery)&lt;br /&gt;
&lt;br /&gt;
==== Features ====&lt;br /&gt;
The Pandora is a mixture between a PC and a gaming console (similar to classic computers such as the Amiga). That's why it has gaming controls (Buttons, DPad and analogue nubs). It is fast enough to emulate many other systems, run a full desktop, access the internet via Firefox and play games such as Quake3. However, it is not as big as a netbook. Believe it or not, it will fit in your pocket. It's a bit bigger than the Nintendo DS. (See Applications section of this manual to see what applications your Pandora will come with.)&lt;br /&gt;
Remember that your Pandora console will get better with every application installed!&lt;br /&gt;
&lt;br /&gt;
== First Time Use ==&lt;br /&gt;
Now that you've opened the box, let's set this thing up! Place the battery inside the battery well on the back of the Pandora, making sure the contacts touch(the little silvery metal bits, it's easy). Snap on the battery cover and you're all set!&lt;br /&gt;
==== Charging ====&lt;br /&gt;
Charge your Pandora 8 hours before putting it off the wall charger. This will improve the lifetime of your battery. To charge the Pandora, insert the power cable end in the Pandora and the other end into your wall socket.&lt;br /&gt;
&lt;br /&gt;
The battery comes pre-charged at 40%, and that level might have decreased during shipping, so to be on the safe side, we recommend that you charge the Pandora before you use it. Simply plug in your wall charger into an outlet, or optionally use a mini-USB cable connected to a computer or wall adapter. For extreme silliness, plug your Pandora into an ''already charged Pandora,'' and charge it from that! But not really.&lt;br /&gt;
&lt;br /&gt;
==== First Boot ====&lt;br /&gt;
Once your Pandora is ready, turn it on. The OS will take some time to boot up for the first time (about 10 minutes, this is only for the first boot, this is normal). After it is booted, a series of settings dialogs will pop up in the shape of a &amp;quot;Boot Wizard&amp;quot; allowing you to alter your Pandora's settings to your liking.&lt;br /&gt;
&lt;br /&gt;
There are a total of 3 parts to the Boot Wizard guide:&lt;br /&gt;
===== System configuration =====&lt;br /&gt;
The first thing you will have to do is to calibrate the Pandora's touch screen. Only do this if the screen isn't calibrated already.&lt;br /&gt;
You will have the option for touchscreen calibration during the first time you will boot up your Pandora console.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;quot;Callibrating the touch screen&amp;quot; is a term used to describe the process of matching coodinates given by the touch layer with the underlying screen. A badly callibrated screen will register your push elsewhere on the screen, perhaps half a centimeter to one side. As there are sometimes slight variations in the production of the touch layer, you the user can improve the accuracy by matching the two layers manually.&lt;br /&gt;
&lt;br /&gt;
===== User setup =====&lt;br /&gt;
After that, you will have to enter your full name. This is what you will see in any user selection dialogs or when the system needs to address you, so enter whatever you are most comfortable with. Then follows your username. It is recommended to choose an all-lowercase, one-word username here, since you will have to enter this name every time you log in. Once you've entered your username, a password input dialog appears. You will have to enter the password you want to have twice here. If you don't want to have a password for your device, simply leave both fields empty. If you however decide to enter a password, something hard to guess and between 8 and 16 characters long is preferred.&lt;br /&gt;
&lt;br /&gt;
===== Network and security settings =====&lt;br /&gt;
You will now have to enter a name for your Pandora. This will be the Pandora's host name, so you have two options in this situation:&lt;br /&gt;
&lt;br /&gt;
# If you don't have a domain you want to connect to, simply enter any name here. It should not contain any spaces.&lt;br /&gt;
# If you ''do'' have a domain you want to connect to, enter a name in the form of &amp;quot;pandoraname.domainname.tld&amp;quot;. Note that you may never have a use for this.&lt;br /&gt;
&lt;br /&gt;
Then, you'll have to choose whether you want to automatically log in on your Pandora when it boots, or if you should be given the opportunity to log in as a different user, or enter your password. It is recommended to disable auto login if you want to protect your user data, but if you're often in a hurry, then you can enable auto login here.&lt;br /&gt;
&lt;br /&gt;
The final thing you will have to choose, is whether you want to use the full desktop Xfce environment or the gaming-oriented PMenu environment as your default environment in the Pandora. It is recommended to choose Xfce here if you want to gain access to the Pandora's full potential. This option can be changed later at any point.&lt;br /&gt;
&lt;br /&gt;
==== Calibrating The Touchscreen ====&lt;br /&gt;
The touchscreen in your new Pandora device isn't psychic! You have to tell it what to do, and in order to do that effectively, you need to calibrate it. Simply navigate to settings→screen→calibration wizard{{Verify credibility}} and follow the onscreen instructions. You may have to recalibrate the screen from time to time as well.&lt;br /&gt;
&lt;br /&gt;
During the first boot wizard, you will be offered the option to calibrate the touchscreen. By default it may well work okay, but the option is there. If calibration is far off, use the keyboard to selection the calibration option.&lt;br /&gt;
&lt;br /&gt;
== Basic Use ==&lt;br /&gt;
&lt;br /&gt;
===Pmenu===&lt;br /&gt;
&lt;br /&gt;
===Desktop style environment===&lt;br /&gt;
&lt;br /&gt;
====On the Desktop====&lt;br /&gt;
&lt;br /&gt;
The desktop will contain icons for numerous locations (such as each mounted SD card), as well as any auto-discovered pnd-applications located on SD cards or internal NAND.&lt;br /&gt;
&lt;br /&gt;
====In the menu====&lt;br /&gt;
On the bottom left you have your applications menu, similar to the Windows start menu. Clicking it brings up a list of all installed applications and pnd-applications in the appropriate location on your SD cards.&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
To the right may be some icons, these serve as shortcuts to commonly used applications. Next to that you have your taskbar, which as you might have guessed, lists all running applications in your current workspace. To the right of the taskbar you have your workspaces, think of these as multiple desktops. By default you have two to switch from. Applications running in one workspace will not be visible in the other, so you can effectively hide your Ms. Pacman game from your boss at work, because there's no way you're not going to go for the gold, even at work! Finally there are a few more icons that deal with TV-Out, network connectivity, etc. and some running applications may place an icon there as well. And to the right of THOSE, you have your time. Because time flies when you're using your Pandora! Badum tsh. Aaaaand to the right of that, you have a little icon that, when clicked, displays all running applications.&lt;br /&gt;
&lt;br /&gt;
Finally, I'd just like to reiterate this--EVERYTHING is customizable! We'll get to that section later, but for now, let's just check out the applications on your Pandora.&lt;br /&gt;
&lt;br /&gt;
===Buttons===&lt;br /&gt;
&lt;br /&gt;
====Xfce menu====&lt;br /&gt;
&lt;br /&gt;
The Pandora button will bring up the applications menu, letting you quickly enter a search to locate an application to run or perform operations against running applications.&lt;br /&gt;
&lt;br /&gt;
===Power Modes===&lt;br /&gt;
&lt;br /&gt;
Without switching the device entirely off, it may be placed into low power mode or regular power mode; simply pressing the power button will toggle modes.&lt;br /&gt;
&lt;br /&gt;
Consider low power mode to be akin to turning off a PDA or cellphone -- the screen is off, the CPU is clocked down and so on, but the device is still silently on, allowing for alarms to go off or it to be turned on again instantly. Regular power mode is for normal usage.&lt;br /&gt;
&lt;br /&gt;
Low power mode is probably going to be used as the normal &amp;quot;off&amp;quot; for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few weeks or longer. &lt;br /&gt;
&lt;br /&gt;
Closing the lid will turn off the display but otherwise leave the device operating - handy for audio playing; turning off the display lowers power use.&lt;br /&gt;
&lt;br /&gt;
The actual behaviour of buttons and events can be customized.&lt;br /&gt;
&lt;br /&gt;
== Basic Linux user guide ==&lt;br /&gt;
New to the wonderful world of Linux? No problem! You don't need mad terminal skills to open a web browser, but it can be nice to know what you're doing once in a while.&lt;br /&gt;
==== The structure of the file system ====&lt;br /&gt;
If you're used to the file system of e.g. MS Windows, you will find that a Linux file system is rather different from what you're used to. In this section, we will go through everything you have to know in order to feel comfortable with using the Pandora's file system.&lt;br /&gt;
===== Basic philosophy =====&lt;br /&gt;
In Windows, you have multiple file system roots, called &amp;quot;drives&amp;quot;, that are labeled with different letters, like &amp;quot;C:&amp;quot; or &amp;quot;D:&amp;quot;. In Linux, there aren't multiple root directories, but rather just one root directory, called &amp;quot;/&amp;quot;. All other directories are inside of this directory, including other drives.&lt;br /&gt;
&lt;br /&gt;
===== Common directories =====&lt;br /&gt;
Inside of the root directory (&amp;quot;/&amp;quot;) are quite a lot of other directories. Here are the most important ones:&lt;br /&gt;
* &amp;quot;/home&amp;quot; - This is where all of the files that are owned by all users are stored. Users do not generally have write-access to anything outside of this directory.&lt;br /&gt;
* &amp;quot;/home/username&amp;quot; - Here are the personal files of user &amp;quot;username&amp;quot;. In this directory, you will find a directory called &amp;quot;Documents&amp;quot;, &amp;quot;Pictures&amp;quot;, &amp;quot;Desktop&amp;quot; etc. that correspond to that users personal directories. This directory is also called &amp;quot;username&amp;quot;'s home directory, and can be abbreviated with &amp;quot;~/&amp;quot; (if you're currently logged in as username) or &amp;quot;~username/&amp;quot;.&lt;br /&gt;
* &amp;quot;/boot&amp;quot; - This is the directory where the Linux kernel is stored, and other files that are needed at boot time can be accessed. Do not touch this directory (You can't even do it if you wanted to)!&lt;br /&gt;
* &amp;quot;/bin&amp;quot;, &amp;quot;/lib&amp;quot; - System binaries and libraries are stored here. Most of the terminal commands mentioned below can be found inside of &amp;quot;/bin&amp;quot;. You should generally never have to touch this directory, either.&lt;br /&gt;
* &amp;quot;/usr&amp;quot; - Here is where you'll find programs and files installed by the user. Core applications such as the web browser, media player, and other applications that are available the first time you start your Pandora are stored here. If you decide to install anything via the &amp;quot;ipkg&amp;quot; command (covered later), this is where the files needed by those installations will end up.&lt;br /&gt;
* &amp;quot;/etc&amp;quot; - System-wide configuration. Should only be touched by power-users.&lt;br /&gt;
* &amp;quot;/media/*&amp;quot; - If you connect USB drives, SD cards or other external media, you will find that the contents of that media have been placed here.&lt;br /&gt;
&lt;br /&gt;
Don't worry if this doesn't make any sense; It was thought up by bearded engineers back in the seventies. They liked the idea that everything would be in a predictable place, but this is no longer completely the case.&lt;br /&gt;
&lt;br /&gt;
==== The File Manager ====&lt;br /&gt;
==== Killing Applications ====&lt;br /&gt;
==== Basic Terminal Commands ====&lt;br /&gt;
Note: Linux is case sensitive. This applies to filenames and directories too. &amp;quot;/home/me/stuff&amp;quot; is a different folder than &amp;quot;/home/me/STUFF&amp;quot;, you can actually have both. You can have &amp;quot;/home/me/Stuff&amp;quot; too if you like, and all three are seperately recognised directories.&lt;br /&gt;
&lt;br /&gt;
=====Navigation=====&lt;br /&gt;
In the terminal, you are always in some folder. Think of it like being in a file manager: you can see the contents of the directory you're in, you can do things with those files, or you may decide to go to some other folder and continue your work there.&lt;br /&gt;
&lt;br /&gt;
There are a few essential commands that are used to navigate around your system via the terminal:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;pwd&amp;quot; - Print the current working directory (will print e.g. &amp;quot;/home/user&amp;quot;)&lt;br /&gt;
* &amp;quot;ls&amp;quot; - List directory contents (similar to &amp;quot;Dir&amp;quot; in Dos, and the Linux command &amp;quot;dir&amp;quot; will actually emulate the DOS command if you want to!)&lt;br /&gt;
* &amp;quot;cd &amp;lt;directory name&amp;gt;&amp;quot; - Change to a different directory, eg. &amp;quot;cd music&amp;quot; or &amp;quot;cd /home/me/music&amp;quot;&lt;br /&gt;
* &amp;quot;cd ..&amp;quot; - Go up one directory level (similar to &amp;quot;cd..&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd&amp;quot; - Go back to your home directory (similar to My Documents in Windows)&lt;br /&gt;
* &amp;quot;cd -&amp;quot; - Go back to the previous directory you were in (handy if you forget)&lt;br /&gt;
&lt;br /&gt;
=====Controlling Running Apps=====&lt;br /&gt;
* &amp;quot;top&amp;quot; - View running proccesses (like the Task Manager in Windows) press &amp;quot;q&amp;quot; to quit&lt;br /&gt;
* &amp;quot;killall [program name] - Stops running process (use with care)&lt;br /&gt;
&lt;br /&gt;
=====File Manipulation=====&lt;br /&gt;
* &amp;quot;rm &amp;lt;filename&amp;gt;&amp;quot; - Remove a file, eg. &amp;quot;rm somefile.txt&amp;quot; or &amp;quot;rm /home/me/randomfiles/somefile.txt&amp;quot;&lt;br /&gt;
* &amp;quot;rmdir &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory, but **only** if it is empty!&lt;br /&gt;
* &amp;quot;rm -r &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory and its contents (&amp;quot;-r&amp;quot; means recursive)&lt;br /&gt;
* &amp;quot;rm -rf &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory, all of its contents, without asking you first. Use with extreme care. (&amp;quot;-f&amp;quot; means force)&lt;br /&gt;
* &amp;quot;mv &amp;lt;original filename&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Moves a file to a new place, also used for renaming, eg. &amp;quot;mv somefile.txt somefile_backup.txt&amp;quot; will rename it, but &amp;quot;mv somefile.txt /home/me/backup/somefile.txt&amp;quot; will move it. This will also work for directories.&lt;br /&gt;
* &amp;quot;cp &amp;lt;file to copy&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Copy a file, eg. &amp;quot;cp twoweeks.txt twomonths.txt&amp;quot; copies into current directory, while &amp;quot;cp twomonths.txt /home/me/ihaveadream/twoweeks.txt&amp;quot; copies to another directory.&lt;br /&gt;
* &amp;quot;cp -r &amp;lt;directory to copy&amp;gt; &amp;lt;new directory name&amp;gt;&amp;quot; - Copy a directory and all of its contents to another location.&lt;br /&gt;
* &amp;quot;touch &amp;lt;new file name&amp;gt;&amp;quot; - Makes a new (empty) file&lt;br /&gt;
* &amp;quot;mkdir &amp;lt;new directory name&amp;gt;&amp;quot; - Makes a directory&lt;br /&gt;
&lt;br /&gt;
=====Misc.=====&lt;br /&gt;
* &amp;quot;cat &amp;lt;filename&amp;gt;&amp;quot; - Prints the contents of a file, eg. &amp;quot;cat hellolo.txt&amp;quot;&lt;br /&gt;
* &amp;quot;clear&amp;quot; - Clears screen, terminal input begins at the top again&lt;br /&gt;
* &amp;quot;date&amp;quot; - Your friend, the terminal will tell you the date&lt;br /&gt;
* &amp;quot;cal [month] [year]&amp;quot; - Makes a pretty calendar, eg. &amp;quot;cal 12 2009&amp;quot; or &amp;quot;cal * 2010&amp;quot; or &amp;quot;cal 1 2010 &amp;gt; fingers_crossed.txt&amp;quot; sends output to file&lt;br /&gt;
* &amp;quot;history&amp;quot; - Gives a list of the recent commands you have run.  Running !number (e.g. !15) will rerun that numbered command in the history list&lt;br /&gt;
&lt;br /&gt;
History Search: Press CTRL-R.  As you type, BASH will try and find the command in your recent history that most closely matches what you are typing.  To get back to the prompt, press CTRL-C.&lt;br /&gt;
&lt;br /&gt;
Autocompletion: Press TAB. The terminal (also called the shell) will attempt to intelligently figure out what you're trying to type. It needs something to work with however, so try pressing TAB half way through a command or location.&lt;br /&gt;
&lt;br /&gt;
eg. &amp;quot;cd /home/me/pandora_suc&amp;quot; *TAB* will complete it as &amp;quot;cd /home/me/pandora_success&amp;quot; or with a filename &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fa&amp;quot; *TAB* will turn into &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fall_into_my_hands&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Directory aliases: There are some special directory names you can use to refer to a directory that would be too long to type otherwise, or that you simply don't know the name of.&lt;br /&gt;
* &amp;quot;~&amp;quot; - Refers to your home directory e.g. &amp;quot;/home/user&amp;quot;.&lt;br /&gt;
* &amp;quot;~seconduser&amp;quot; - Refers to someone else's home directory.&lt;br /&gt;
* &amp;quot;.&amp;quot; - Refers to the current directory, or the &amp;quot;same directory&amp;quot; in a path. What this means, is that if you type &amp;quot;cd .&amp;quot;, nothing will happen since you already are in &amp;quot;.&amp;quot;, and if you type &amp;quot;cd somedir/././././././.&amp;quot;, you will simply go to &amp;quot;somedir&amp;quot;, since the &amp;quot;.&amp;quot;-directories that come after it are the &amp;quot;same directory&amp;quot; as the one before them.&lt;br /&gt;
* &amp;quot;..&amp;quot; - Refers to the directory in which the current directory is, or the &amp;quot;parent directory&amp;quot; in a path. If you type &amp;quot;cd ..&amp;quot; you will come to the parent directory of your current directory, and if you type &amp;quot;cd s1/s2/s3/../../..&amp;quot;, nothing will happen, since the path you specified cancels itself out.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
Many applications will come preinstalled into the internal NAND; these will be regular Linux applications (not packaged into pnd files, since they do not need to be redistributed to anyone.)&lt;br /&gt;
&lt;br /&gt;
Additional applications may be found as pnd-files (see below, a packaged up single file representing an entire application) or as regular Linux files (an application likely being made up of many files and possibly needing installation.)&lt;br /&gt;
&lt;br /&gt;
==== What Is Included? ====&lt;br /&gt;
* Ångström Linux: Lightweight beautiful Linux-based operating system for the Pandora.&lt;br /&gt;
* Xfce: A full featured window manager for Linux.&lt;br /&gt;
* Midori: A full features web browser, designed to be lighter and faster than a full desktop style browser.&lt;br /&gt;
* OpenOffice: Full desktop document managing. Edit, create and manage your documents on the go. (really??)&lt;br /&gt;
{{Volume needed}}&lt;br /&gt;
&lt;br /&gt;
==== Where Can I Get More Apps? ====&lt;br /&gt;
There are many ways to get more applications onto your Pandora.&lt;br /&gt;
&lt;br /&gt;
*The easiest way is to browse the [http://doesnotexistyet.com Pandora App Store], where you can download a selection of free or commerical applications. To download, navigate to an app, pay for it if you must, and hit the 'download' button. Select where you want to save it, and you're done!&lt;br /&gt;
&lt;br /&gt;
*There is the good ol' [http://dl.openhandhelds.org/cgi-bin/pandora.cgi Pandora File Archive].&lt;br /&gt;
&lt;br /&gt;
*There are nice repositories, such as the [http://www.angstrom-distribution.org/repo Angstrom ARM Repository], or...&lt;br /&gt;
&lt;br /&gt;
*The Pandora includes the package manager [http://en.wikipedia.org/wiki/Ipkg ipkg].&lt;br /&gt;
&lt;br /&gt;
*Also, people may upload their apps to weird crevices in the net, so be on the lookout! (or use a search engine)&lt;br /&gt;
&lt;br /&gt;
== Introduction To .PNDs ==&lt;br /&gt;
==== What Are .PNDs? ====&lt;br /&gt;
&lt;br /&gt;
A .pnd (&amp;quot;pandora&amp;quot;) file is an application (game, word processor, emulator, whatever.) More accurately, it is a full application bundled up into a single file; think of it like a zip, with a relatively well defined internal structure.&lt;br /&gt;
&lt;br /&gt;
The pnd-file system was designed so you could use an application without the hassle of installation or uninstallation, or even having to organize it yourself if you don't want to. You just download or obtain the pnd-file, and use it. &lt;br /&gt;
&lt;br /&gt;
If you remember classic computers such as the Amiga - where you inserted a disk and then launched the applications read by Workbench (the Amiga's operating system) - then this is similar: when you insert an SD card into one of the two slots, the (Linux based) Pandora OS will scan it for your PND program files. Any program it finds will either turn up on the desktop or the application menu (just like in Windows).&lt;br /&gt;
&lt;br /&gt;
More details can be found in the &amp;quot;libpnd hub&amp;quot; part of the wiki, but that is more oriented to techies and developers.&lt;br /&gt;
&lt;br /&gt;
==== How do I run a PND-application? ====&lt;br /&gt;
&lt;br /&gt;
Put your pnd-files in your SD (see below for some suggestions where.)&lt;br /&gt;
&lt;br /&gt;
A pnd-file is usually invoked in one of the following ways&lt;br /&gt;
&lt;br /&gt;
* browse to the file using the directory browser, and click to run it. (.pnd files are file-associated to another program, pnd_run which knows how to run them.) This lets you organize pnd-files in directories of your choice on the device NAND or SD.&lt;br /&gt;
&lt;br /&gt;
* in PMenu, the applications will be shown by name; you can just select and run them from the menu&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/menu on SD, the application will be shown in the Start menu on the device; use your stylus or buttons to invoke it&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/desktop or /pandora/apps on SD, they will show up automatically on your desktop; invoke them with the stylus, your finger, or controls as you see fit&lt;br /&gt;
&lt;br /&gt;
==== Where Do .PNDs Go? ====&lt;br /&gt;
&lt;br /&gt;
Put .pnd-files into specific directories if you want them to show up in the Start menu or on your Pandora desktop, or in Pmenu. &lt;br /&gt;
&lt;br /&gt;
You can put them anywhere you like in internal NAND or SD, if you wish to organize them yourself and launch them with taps.&lt;br /&gt;
&lt;br /&gt;
/pandora/desktop -&amp;gt; pnd files show up on the desktop&lt;br /&gt;
&lt;br /&gt;
/pandora/menu -&amp;gt; show up in the Applications menu (by the developers suggested categories.)&lt;br /&gt;
&lt;br /&gt;
/pandora/apps -&amp;gt; show up in the desktop, and in Pmenu&lt;br /&gt;
&lt;br /&gt;
These locations are not written in stone. The &amp;quot;libpnd&amp;quot; config files are in /etc/pandora/conf in the NAND. Generally you will never need to alter these files, but you certainly can if you wish. In theory, obliterating the files will still leave the system working, and they are easily restored. One file, /etc/pandora/conf/desktop defines the &amp;quot;search paths&amp;quot; to look for .pnd files, and where to put &amp;quot;.desktop&amp;quot; files when they are found. The searchpaths says where to find them (such as /pandora/desktop), and where to put the application link - /usr/share/applications is where the menu items are pulled from. IF you wish to put pnd files somewhere not in the searchpath, just add the directory to the search-path and you're good to go.&lt;br /&gt;
&lt;br /&gt;
==== Where does my data go? How do I make files visible to the applications? ====&lt;br /&gt;
&lt;br /&gt;
An application normally will see what is contained within the pnd-file, or your personal data created with the tool; it can of course look anywhere on the SD or device internal memory. For example a Quake port might expect to see extra level files in /quake, or give you a way of selecting a path to put files in.. or it might just expect it to be in your personal data folders, or in the pnd-file itself. Its up to the application, with suggestions in the pnd-guidelines for developers.&lt;br /&gt;
&lt;br /&gt;
The first time a pnd-application is run, an &amp;quot;app data&amp;quot; directory is created for it; anything that app data folder contains will be visible to the application as if it was in the pnd-file (and in fact, this lets you override files in the pnd-file without modifying the .pnd itself, which could be handy.) If your app creates a file &amp;quot;foo&amp;quot;, it'll show up in /pandora/appdata/appname-id as &amp;quot;foo&amp;quot;. The actual appdata folder name depends on the name used by the developer, but should generally look like application-name and some funny number afterwards. It should be easy to spot.&lt;br /&gt;
&lt;br /&gt;
ex: Quake 1 will probably put score or save data in /pandora/appdata/quake1-123/ or somesuch.&lt;br /&gt;
&lt;br /&gt;
It will always be helpful to read the description or readme file included.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make ROMs available to an emulator? =====&lt;br /&gt;
&lt;br /&gt;
For something like ROMs, hopefully a developer consensus will lead either to a canonical location, or a convention of having a directory picker or browser present, so that ROMs can be stored in SD locations of your choice; doesn't strike me as something that should be in a pnd-file, or to be pretended to be in a pnd-file with appdata tricks.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make pak-files available to Quake? =====&lt;br /&gt;
&lt;br /&gt;
For some add-ons or data needed for a game, the developer may require it to be 'in the main application path'; as mentioned above, just drop it into the appdata folder and the app will just see it.&lt;br /&gt;
&lt;br /&gt;
==== How Do I Make .PNDs? ====&lt;br /&gt;
==== More Info About .PNDs ====&lt;br /&gt;
Visit [[libpnd_hub]] for more information!&lt;br /&gt;
== Configuration ==&lt;br /&gt;
==== Updating The Firmware ====&lt;br /&gt;
&lt;br /&gt;
Given a working firmware, you might wish to patch it with official Open Pandora patches; you might also wish to just grab an application from the Angstrom repository, say. &lt;br /&gt;
&lt;br /&gt;
In both of these cases, an ipk file will be made available. (In the future, an automated system may offer to patch up your device or auto-download patches. TBD.)&lt;br /&gt;
&lt;br /&gt;
An ipk file is a compressed installable package.&lt;br /&gt;
&lt;br /&gt;
It should be easily used, but from the Terminal if you wish to manually apply an ipk to patch the firmware, install or update an Angstrom application, it is simple: '''opkg install foo.ipk'''&lt;br /&gt;
&lt;br /&gt;
==== Replacing the Firmware ====&lt;br /&gt;
&lt;br /&gt;
Rather than patch the firmware, the firmware may be replaced wholesale with a freshly downloaded firmware.&lt;br /&gt;
&lt;br /&gt;
==== Booting a Firmware from SD ====&lt;br /&gt;
&lt;br /&gt;
The hardware is capable of booting entirely from SD; if the device is bricked or otherwise has a blank NAND, this could be an option. furthermore you're able to try out alternative operating systems without needing to reinstall your primary operating system.&lt;br /&gt;
&lt;br /&gt;
Steps include:&lt;br /&gt;
&lt;br /&gt;
* Preparing the SD card(s)&lt;br /&gt;
* Setting up the firmware on the SD card&lt;br /&gt;
&lt;br /&gt;
=====Preparing the SD card=====&lt;br /&gt;
&lt;br /&gt;
There are two main approaches:&lt;br /&gt;
&lt;br /&gt;
* Setting up the firmware on on SD card (meaning you need two partitions - a boot partition, and a firmware partition), and&lt;br /&gt;
* Setting things up across two SD cards - meaning you boot from one SD card, and have the firmware on the other.&lt;br /&gt;
&lt;br /&gt;
Operating from one SD card provides you the option of still being able to use the other; operating across two cards provides you he option to have a regular boot-SD, and flip between multiple other SDs for the actual firmware, should you wish to cycle between many operating systems (say.)&lt;br /&gt;
&lt;br /&gt;
The boot partition generally must be FAT32, and then the kernel, MLO and other files need to be unpacked upon it.&lt;br /&gt;
&lt;br /&gt;
The firmware partition must be either ext2fs or ext3fs; under Linux, such a partition can be easily created:&lt;br /&gt;
&lt;br /&gt;
'''mkfs.ext2 -L LABELNAME /dev/mmcblk0p2'''&lt;br /&gt;
- assuming LABELNAME for the partition&lt;br /&gt;
- assuming /dev/mmcblk0p2 for your SD device; you'd better check this carefully ;)&lt;br /&gt;
&lt;br /&gt;
==== Setting Up WiFi ====&lt;br /&gt;
==== Setting Up Blutooth ====&lt;br /&gt;
==== Adjusting Brightness/Contrast ====&lt;br /&gt;
==== Changing Your Theme ====&lt;br /&gt;
== Oops! I Borked My Pandora! ==&lt;br /&gt;
Fear not, young netizen! Your Pandora was designed to be unbrickable, so unless you used the ancient art of alchemy to physically turn your Pandora into a brick (or you just broke the hardware inside), you should be okay!&lt;br /&gt;
==== Restore The Original Firmware ====&lt;br /&gt;
==== Boot From SD or USB ====&lt;br /&gt;
== Pandora FAQ ==&lt;br /&gt;
Silly goose, go to the [[FAQ]] page for more detailed information.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=User_manual&amp;diff=1948</id>
		<title>User manual</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=User_manual&amp;diff=1948"/>
		<updated>2010-01-06T21:11:09Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Where Can I Get More Apps? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border-top:1px solid gray; border-bottom:1px solid gray; padding-top:5px; padding-bottom:5px; margin-bottom:20px&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;''This page is an unofficial community project, and OpenPandora Ltd. is not responsible for its content.''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PandoraFront.jpg|Right|thumb|360px|Pandora FTW!]]&lt;br /&gt;
So your Pandora just arrived after being in the post for two months. Jolly good! But now that it's actually here, what on earth do you do with it? '''Don't panic!''' Let's take a look at what's included in the box(so you don't miss anything!) and then hop on over to setting it up for that extended Ms. Pacman marathon I know you've been waiting for!&lt;br /&gt;
&lt;br /&gt;
Also, don't forget to hit up [http://www.gp32x.com/board/index.php?/forum/61-pandora/ GP32X] for questions/info/apps/fun/discussion!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Safety Information ==&lt;br /&gt;
Warning: Choking Hazard, do not let children under the age of 3 come close to your Pandora console.&lt;br /&gt;
The Pandora Contains small parts that can be eaten by those children.&lt;br /&gt;
&lt;br /&gt;
The battery of Pandora must be charged by the charger included with the Pandora(see package contents)&lt;br /&gt;
and we at OpenPandora Ltd. cannot be responsible for people using third party chargers. Please be aware that some third party chargers compatible with the Pandora have a fake CE logo and are highly dangerous (they will burst into flames).&lt;br /&gt;
&lt;br /&gt;
Keep the Pandora in normal temperatures under 140F/60C (Recommended temperatures are in the range between -10C and 40C){{Citation needed}}. The battery is standard Lithium Polymer battery. Do not keep near fire or water. Do not disassemble, destroy or damage the battery, or it may explode! Do not short circuit external contacts! Dispose of it properly, please. &lt;br /&gt;
&lt;br /&gt;
All third party modifications and hardware/software can damage your Pandora, OpenPandora Ltd cannot be responsible for damage caused by this. Trusted software can be recongised by a OP-member in the Pandora Appstore. See the “OP-Team Trusted” image in the app store to see if the software application can be trusted{{Citation needed}}.&lt;br /&gt;
&lt;br /&gt;
The Pandora has a 4.3-inch Touchscreen. You can touch the screen to trigger an action. Although this is a touch screen, you cannot punch it. Always touch the screen gently – this will be more then enough to trigger the action you want.&lt;br /&gt;
&lt;br /&gt;
The Pandora has an protective design, making it hard to break. Of course, you should never drop your Pandora, wash it, or try anything that can harm your Pandora. This will void your warranty.&lt;br /&gt;
&lt;br /&gt;
== Warranty Information ==&lt;br /&gt;
By law there is a one year warranty, and the device will be replaced/repaired if it is faulty. LCDs with noticeable dead pixels will also be replaced (Note: Pixels are small squares aligned in a grid to make up the image on your screen. A &amp;quot;Dead Pixel&amp;quot; is one that doesn't work anymore and remains black or any other static color).&lt;br /&gt;
&lt;br /&gt;
== Box Contents ==&lt;br /&gt;
When you first open Pandora's box, a slew of demons and raging emotions may forcibly leave the box. This is normal. After that, you may or may not be surprised to find a:&lt;br /&gt;
*Pandora console&lt;br /&gt;
*Stylus (located in stylus slot on the side of the Pandora)&lt;br /&gt;
*Battery&lt;br /&gt;
*DC Wall Charger&lt;br /&gt;
*TV-Out Cable (ONLY if you ordered it separately)&lt;br /&gt;
*Carrying Case (ONLY if you ordered it separately)&lt;br /&gt;
*Extra Battery (ONLY if you ordered it separately)&lt;br /&gt;
After you take those things out, you may find a sliver of Hope left over. It's best to keep it, as you never know when you could use some Hope.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
==== Highlights ====&lt;br /&gt;
{{citation needed}}&lt;br /&gt;
* ARM® Cortex™-A8 600Mhz+ CPU running Linux*&lt;br /&gt;
* 430-MHz TMS320C64x+™ DSP Core&lt;br /&gt;
* PowerVR SGX OpenGL 2.0 ES compliant 3D hardware&lt;br /&gt;
* 800x480 4.3&amp;quot; 16.7 million colours touchscreen LCD&lt;br /&gt;
* Wifi 802.11b/g, Bluetooth &amp;amp; High Speed USB 2.0 Host&lt;br /&gt;
* Dual SDHC card slots &amp;amp; SVideo TV output&lt;br /&gt;
* Dual Analogue and Digital gaming controls&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* Around 10+ Hours battery life**&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;The 600Mhz+ can be higher or lower. This can be controlled by software designed for the device.&amp;lt;/small&amp;gt;&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;Is affected by use. (example turn bluetooth on or off during play time)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Advanced Specifications ====&lt;br /&gt;
* Texas Instruments OMAP3530 processor at 600MHz (officially)&lt;br /&gt;
* 256MB DDR-333 SDRAM&lt;br /&gt;
* 512MB NAND FLASH memory&lt;br /&gt;
* IVA2+ audio and video processor using TI's DaVinci™ technology (430MHz C64x DSP)&lt;br /&gt;
* ARM® Cortex™-A8 superscalar microprocessor core&lt;br /&gt;
* PowerVR SGX530 (110MHz officially) OpenGL ES 2.0 compliant 3D hardware&lt;br /&gt;
* integrated Wifi 802.11b/g (up to 18dBm output)&lt;br /&gt;
* integrated Bluetooth 2.0 + EDR (3Mbps) (Class 2, + 4dBm)&lt;br /&gt;
* 800x480 resolution LTPS LCD with resistive touch screen, 4.3&amp;quot; widescreen, 16.7 million colors (300 cd/m2 brightness, 450:1 contrast ratio)&lt;br /&gt;
* Dual analog controllers&lt;br /&gt;
* Full gamepad controls plus shoulder buttons&lt;br /&gt;
* Dual SDHC card slots (up to 64GB of storage currently)&lt;br /&gt;
* headphone output up to 150mW/channel into 16 ohms, 99dB SNR (up to 24 bit/48KHz)&lt;br /&gt;
* TV output (composite and S-Video)&lt;br /&gt;
* Internal microphone plus ability to connect external microphone through headset&lt;br /&gt;
* Stereo line level inputs and outputs&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* USB 2.0 OTG port (1.5/12/480Mbps) with capability to charge device&lt;br /&gt;
* USB 2.0 HOST port (480Mbps) capable of providing the full 500mA to attached devices (examples include USB memory, keyboard, mouse, 3G modem, GPS)&lt;br /&gt;
* up to two externally accessible UARTs and/or four PWM signals for hardware hacking, robot control, debugging, etc.&lt;br /&gt;
* un-brickable design with integrated boot loader for safe code experimentation&lt;br /&gt;
* Power and hold switch useful for &amp;quot;instant on&amp;quot; and key lockout to aid in media player applications on the go&lt;br /&gt;
* Runs on the Linux operating system (2.6.x)&lt;br /&gt;
* Dimensions: 140x83.4x27.5mm&lt;br /&gt;
* Weight: 335g (with 4200mAh battery)&lt;br /&gt;
&lt;br /&gt;
==== Features ====&lt;br /&gt;
The Pandora is a mixture between a PC and a gaming console (similar to classic computers such as the Amiga). That's why it has gaming controls (Buttons, DPad and analogue nubs). It is fast enough to emulate many other systems, run a full desktop, access the internet via Firefox and play games such as Quake3. However, it is not as big as a netbook. Believe it or not, it will fit in your pocket. It's a bit bigger than the Nintendo DS. (See Applications section of this manual to see what applications your Pandora will come with.)&lt;br /&gt;
Remember that your Pandora console will get better with every application installed!&lt;br /&gt;
&lt;br /&gt;
== First Time Use ==&lt;br /&gt;
Now that you've opened the box, let's set this thing up! Place the battery inside the battery well on the back of the Pandora, making sure the contacts touch(the little silvery metal bits, it's easy). Snap on the battery cover and you're all set!&lt;br /&gt;
==== Charging ====&lt;br /&gt;
Charge your Pandora 8 hours before putting it off the wall charger. This will improve the lifetime of your battery. To charge the Pandora, insert the power cable end in the Pandora and the other end into your wall socket.&lt;br /&gt;
&lt;br /&gt;
The battery comes pre-charged at 40%, and that level might have decreased during shipping, so to be on the safe side, we recommend that you charge the Pandora before you use it. Simply plug in your wall charger into an outlet, or optionally use a mini-USB cable connected to a computer or wall adapter. For extreme silliness, plug your Pandora into an ''already charged Pandora,'' and charge it from that! But not really.&lt;br /&gt;
&lt;br /&gt;
==== First Boot ====&lt;br /&gt;
Once your Pandora is ready, turn it on. The OS will take some time to boot up for the first time (about 10 minutes, this is only for the first boot, this is normal). After it is booted, a series of settings dialogs will pop up in the shape of a &amp;quot;Boot Wizard&amp;quot; allowing you to alter your Pandora's settings to your liking.&lt;br /&gt;
&lt;br /&gt;
There are a total of 3 parts to the Boot Wizard guide:&lt;br /&gt;
===== System configuration =====&lt;br /&gt;
The first thing you will have to do is to calibrate the Pandora's touch screen. Only do this if the screen isn't calibrated already.&lt;br /&gt;
You will have the option for touchscreen calibration during the first time you will boot up your Pandora console.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;quot;Callibrating the touch screen&amp;quot; is a term used to describe the process of matching coodinates given by the touch layer with the underlying screen. A badly callibrated screen will register your push elsewhere on the screen, perhaps half a centimeter to one side. As there are sometimes slight variations in the production of the touch layer, you the user can improve the accuracy by matching the two layers manually.&lt;br /&gt;
&lt;br /&gt;
===== User setup =====&lt;br /&gt;
After that, you will have to enter your full name. This is what you will see in any user selection dialogs or when the system needs to address you, so enter whatever you are most comfortable with. Then follows your username. It is recommended to choose an all-lowercase, one-word username here, since you will have to enter this name every time you log in. Once you've entered your username, a password input dialog appears. You will have to enter the password you want to have twice here. If you don't want to have a password for your device, simply leave both fields empty. If you however decide to enter a password, something hard to guess and between 8 and 16 characters long is preferred.&lt;br /&gt;
&lt;br /&gt;
===== Network and security settings =====&lt;br /&gt;
You will now have to enter a name for your Pandora. This will be the Pandora's host name, so you have two options in this situation:&lt;br /&gt;
&lt;br /&gt;
# If you don't have a domain you want to connect to, simply enter any name here. It should not contain any spaces.&lt;br /&gt;
# If you ''do'' have a domain you want to connect to, enter a name in the form of &amp;quot;pandoraname.domainname.tld&amp;quot;. Note that you may never have a use for this.&lt;br /&gt;
&lt;br /&gt;
Then, you'll have to choose whether you want to automatically log in on your Pandora when it boots, or if you should be given the opportunity to log in as a different user, or enter your password. It is recommended to disable auto login if you want to protect your user data, but if you're often in a hurry, then you can enable auto login here.&lt;br /&gt;
&lt;br /&gt;
The final thing you will have to choose, is whether you want to use the full desktop Xfce environment or the gaming-oriented PMenu environment as your default environment in the Pandora. It is recommended to choose Xfce here if you want to gain access to the Pandora's full potential. This option can be changed later at any point.&lt;br /&gt;
&lt;br /&gt;
==== Calibrating The Touchscreen ====&lt;br /&gt;
The touchscreen in your new Pandora device isn't psychic! You have to tell it what to do, and in order to do that effectively, you need to calibrate it. Simply navigate to settings→screen→calibration wizard{{Verify credibility}} and follow the onscreen instructions. You may have to recalibrate the screen from time to time as well.&lt;br /&gt;
&lt;br /&gt;
During the first boot wizard, you will be offered the option to calibrate the touchscreen. By default it may well work okay, but the option is there. If calibration is far off, use the keyboard to selection the calibration option.&lt;br /&gt;
&lt;br /&gt;
== Basic Use ==&lt;br /&gt;
&lt;br /&gt;
===Pmenu===&lt;br /&gt;
&lt;br /&gt;
===Desktop style environment===&lt;br /&gt;
&lt;br /&gt;
====On the Desktop====&lt;br /&gt;
&lt;br /&gt;
The desktop will contain icons for numerous locations (such as each mounted SD card), as well as any auto-discovered pnd-applications located on SD cards or internal NAND.&lt;br /&gt;
&lt;br /&gt;
====In the menu====&lt;br /&gt;
On the bottom left you have your applications menu, similar to the Windows start menu. Clicking it brings up a list of all installed applications and pnd-applications in the appropriate location on your SD cards.&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
To the right may be some icons, these serve as shortcuts to commonly used applications. Next to that you have your taskbar, which as you might have guessed, lists all running applications in your current workspace. To the right of the taskbar you have your workspaces, think of these as multiple desktops. By default you have two to switch from. Applications running in one workspace will not be visible in the other, so you can effectively hide your Ms. Pacman game from your boss at work, because there's no way you're not going to go for the gold, even at work! Finally there are a few more icons that deal with TV-Out, network connectivity, etc. and some running applications may place an icon there as well. And to the right of THOSE, you have your time. Because time flies when you're using your Pandora! Badum tsh. Aaaaand to the right of that, you have a little icon that, when clicked, displays all running applications.&lt;br /&gt;
&lt;br /&gt;
Finally, I'd just like to reiterate this--EVERYTHING is customizable! We'll get to that section later, but for now, let's just check out the applications on your Pandora.&lt;br /&gt;
&lt;br /&gt;
===Buttons===&lt;br /&gt;
&lt;br /&gt;
====Xfce menu====&lt;br /&gt;
&lt;br /&gt;
The Pandora button will bring up the applications menu, letting you quickly enter a search to locate an application to run or perform operations against running applications.&lt;br /&gt;
&lt;br /&gt;
===Power Modes===&lt;br /&gt;
&lt;br /&gt;
Without switching the device entirely off, it may be placed into low power mode or regular power mode; simply pressing the power button will toggle modes.&lt;br /&gt;
&lt;br /&gt;
Consider low power mode to be akin to turning off a PDA or cellphone -- the screen is off, the CPU is clocked down and so on, but the device is still silently on, allowing for alarms to go off or it to be turned on again instantly. Regular power mode is for normal usage.&lt;br /&gt;
&lt;br /&gt;
Low power mode is probably going to be used as the normal &amp;quot;off&amp;quot; for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few weeks or longer. &lt;br /&gt;
&lt;br /&gt;
Closing the lid will turn off the display but otherwise leave the device operating - handy for audio playing; turning off the display lowers power use.&lt;br /&gt;
&lt;br /&gt;
The actual behaviour of buttons and events can be customized.&lt;br /&gt;
&lt;br /&gt;
== Basic Linux user guide ==&lt;br /&gt;
New to the wonderful world of Linux? No problem! You don't need mad terminal skills to open a web browser, but it can be nice to know what you're doing once in a while.&lt;br /&gt;
==== The structure of the file system ====&lt;br /&gt;
If you're used to the file system of e.g. MS Windows, you will find that a Linux file system is rather different from what you're used to. In this section, we will go through everything you have to know in order to feel comfortable with using the Pandora's file system.&lt;br /&gt;
===== Basic philosophy =====&lt;br /&gt;
In Windows, you have multiple file system roots, called &amp;quot;drives&amp;quot;, that are labeled with different letters, like &amp;quot;C:&amp;quot; or &amp;quot;D:&amp;quot;. In Linux, there aren't multiple root directories, but rather just one root directory, called &amp;quot;/&amp;quot;. All other directories are inside of this directory, including other drives.&lt;br /&gt;
&lt;br /&gt;
===== Common directories =====&lt;br /&gt;
Inside of the root directory (&amp;quot;/&amp;quot;) are quite a lot of other directories. Here are the most important ones:&lt;br /&gt;
* &amp;quot;/home&amp;quot; - This is where all of the files that are owned by all users are stored. Users do not generally have write-access to anything outside of this directory.&lt;br /&gt;
* &amp;quot;/home/username&amp;quot; - Here are the personal files of user &amp;quot;username&amp;quot;. In this directory, you will find a directory called &amp;quot;Documents&amp;quot;, &amp;quot;Pictures&amp;quot;, &amp;quot;Desktop&amp;quot; etc. that correspond to that users personal directories. This directory is also called &amp;quot;username&amp;quot;'s home directory, and can be abbreviated with &amp;quot;~/&amp;quot; (if you're currently logged in as username) or &amp;quot;~username/&amp;quot;.&lt;br /&gt;
* &amp;quot;/boot&amp;quot; - This is the directory where the Linux kernel is stored, and other files that are needed at boot time can be accessed. Do not touch this directory (You can't even do it if you wanted to)!&lt;br /&gt;
* &amp;quot;/bin&amp;quot;, &amp;quot;/lib&amp;quot; - System binaries and libraries are stored here. Most of the terminal commands mentioned below can be found inside of &amp;quot;/bin&amp;quot;. You should generally never have to touch this directory, either.&lt;br /&gt;
* &amp;quot;/usr&amp;quot; - Here is where you'll find programs and files installed by the user. Core applications such as the web browser, media player, and other applications that are available the first time you start your Pandora are stored here. If you decide to install anything via the &amp;quot;ipkg&amp;quot; command (covered later), this is where the files needed by those installations will end up.&lt;br /&gt;
* &amp;quot;/etc&amp;quot; - System-wide configuration. Should only be touched by power-users.&lt;br /&gt;
* &amp;quot;/media/*&amp;quot; - If you connect USB drives, SD cards or other external media, you will find that the contents of that media have been placed here.&lt;br /&gt;
&lt;br /&gt;
Don't worry if this doesn't make any sense; It was thought up by bearded engineers back in the seventies. They liked the idea that everything would be in a predictable place, but this is no longer completely the case.&lt;br /&gt;
&lt;br /&gt;
==== The File Manager ====&lt;br /&gt;
==== Killing Applications ====&lt;br /&gt;
==== Basic Terminal Commands ====&lt;br /&gt;
Note: Linux is case sensitive. This applies to filenames and directories too. &amp;quot;/home/me/stuff&amp;quot; is a different folder than &amp;quot;/home/me/STUFF&amp;quot;, you can actually have both. You can have &amp;quot;/home/me/Stuff&amp;quot; too if you like, and all three are seperately recognised directories.&lt;br /&gt;
&lt;br /&gt;
=====Navigation=====&lt;br /&gt;
In the terminal, you are always in some folder. Think of it like being in a file manager: you can see the contents of the directory you're in, you can do things with those files, or you may decide to go to some other folder and continue your work there.&lt;br /&gt;
&lt;br /&gt;
There are a few essential commands that are used to navigate around your system via the terminal:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;pwd&amp;quot; - Print the current working directory (will print e.g. &amp;quot;/home/user&amp;quot;)&lt;br /&gt;
* &amp;quot;ls&amp;quot; - List directory contents (similar to &amp;quot;Dir&amp;quot; in Dos, and the Linux command &amp;quot;dir&amp;quot; will actually emulate the DOS command if you want to!)&lt;br /&gt;
* &amp;quot;cd &amp;lt;directory name&amp;gt;&amp;quot; - Change to a different directory, eg. &amp;quot;cd music&amp;quot; or &amp;quot;cd /home/me/music&amp;quot;&lt;br /&gt;
* &amp;quot;cd ..&amp;quot; - Go up one directory level (similar to &amp;quot;cd..&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd&amp;quot; - Go back to your home directory (similar to My Documents in Windows)&lt;br /&gt;
* &amp;quot;cd -&amp;quot; - Go back to the previous directory you were in (handy if you forget)&lt;br /&gt;
&lt;br /&gt;
=====Controlling Running Apps=====&lt;br /&gt;
* &amp;quot;top&amp;quot; - View running proccesses (like the Task Manager in Windows) press &amp;quot;q&amp;quot; to quit&lt;br /&gt;
* &amp;quot;killall [program name] - Stops running process (use with care)&lt;br /&gt;
&lt;br /&gt;
=====File Manipulation=====&lt;br /&gt;
* &amp;quot;rm &amp;lt;filename&amp;gt;&amp;quot; - Remove a file, eg. &amp;quot;rm somefile.txt&amp;quot; or &amp;quot;rm /home/me/randomfiles/somefile.txt&amp;quot;&lt;br /&gt;
* &amp;quot;rmdir &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory, but **only** if it is empty!&lt;br /&gt;
* &amp;quot;rm -r &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory and its contents (&amp;quot;-r&amp;quot; means recursive)&lt;br /&gt;
* &amp;quot;rm -rf &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory, all of its contents, without asking you first. Use with extreme care. (&amp;quot;-f&amp;quot; means force)&lt;br /&gt;
* &amp;quot;mv &amp;lt;original filename&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Moves a file to a new place, also used for renaming, eg. &amp;quot;mv somefile.txt somefile_backup.txt&amp;quot; will rename it, but &amp;quot;mv somefile.txt /home/me/backup/somefile.txt&amp;quot; will move it. This will also work for directories.&lt;br /&gt;
* &amp;quot;cp &amp;lt;file to copy&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Copy a file, eg. &amp;quot;cp twoweeks.txt twomonths.txt&amp;quot; copies into current directory, while &amp;quot;cp twomonths.txt /home/me/ihaveadream/twoweeks.txt&amp;quot; copies to another directory.&lt;br /&gt;
* &amp;quot;cp -r &amp;lt;directory to copy&amp;gt; &amp;lt;new directory name&amp;gt;&amp;quot; - Copy a directory and all of its contents to another location.&lt;br /&gt;
* &amp;quot;touch &amp;lt;new file name&amp;gt;&amp;quot; - Makes a new (empty) file&lt;br /&gt;
* &amp;quot;mkdir &amp;lt;new directory name&amp;gt;&amp;quot; - Makes a directory&lt;br /&gt;
&lt;br /&gt;
=====Misc.=====&lt;br /&gt;
* &amp;quot;cat &amp;lt;filename&amp;gt;&amp;quot; - Prints the contents of a file, eg. &amp;quot;cat hellolo.txt&amp;quot;&lt;br /&gt;
* &amp;quot;clear&amp;quot; - Clears screen, terminal input begins at the top again&lt;br /&gt;
* &amp;quot;date&amp;quot; - Your friend, the terminal will tell you the date&lt;br /&gt;
* &amp;quot;cal [month] [year]&amp;quot; - Makes a pretty calendar, eg. &amp;quot;cal 12 2009&amp;quot; or &amp;quot;cal * 2010&amp;quot; or &amp;quot;cal 1 2010 &amp;gt; fingers_crossed.txt&amp;quot; sends output to file&lt;br /&gt;
* &amp;quot;history&amp;quot; - Gives a list of the recent commands you have run.  Running !number (e.g. !15) will rerun that numbered command in the history list&lt;br /&gt;
&lt;br /&gt;
History Search: Press CTRL-R.  As you type, BASH will try and find the command in your recent history that most closely matches what you are typing.  To get back to the prompt, press CTRL-C.&lt;br /&gt;
&lt;br /&gt;
Autocompletion: Press TAB. The terminal (also called the shell) will attempt to intelligently figure out what you're trying to type. It needs something to work with however, so try pressing TAB half way through a command or location.&lt;br /&gt;
&lt;br /&gt;
eg. &amp;quot;cd /home/me/pandora_suc&amp;quot; *TAB* will complete it as &amp;quot;cd /home/me/pandora_success&amp;quot; or with a filename &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fa&amp;quot; *TAB* will turn into &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fall_into_my_hands&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Directory aliases: There are some special directory names you can use to refer to a directory that would be too long to type otherwise, or that you simply don't know the name of.&lt;br /&gt;
* &amp;quot;~&amp;quot; - Refers to your home directory e.g. &amp;quot;/home/user&amp;quot;.&lt;br /&gt;
* &amp;quot;~seconduser&amp;quot; - Refers to someone else's home directory.&lt;br /&gt;
* &amp;quot;.&amp;quot; - Refers to the current directory, or the &amp;quot;same directory&amp;quot; in a path. What this means, is that if you type &amp;quot;cd .&amp;quot;, nothing will happen since you already are in &amp;quot;.&amp;quot;, and if you type &amp;quot;cd somedir/././././././.&amp;quot;, you will simply go to &amp;quot;somedir&amp;quot;, since the &amp;quot;.&amp;quot;-directories that come after it are the &amp;quot;same directory&amp;quot; as the one before them.&lt;br /&gt;
* &amp;quot;..&amp;quot; - Refers to the directory in which the current directory is, or the &amp;quot;parent directory&amp;quot; in a path. If you type &amp;quot;cd ..&amp;quot; you will come to the parent directory of your current directory, and if you type &amp;quot;cd s1/s2/s3/../../..&amp;quot;, nothing will happen, since the path you specified cancels itself out.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
Many applications will come preinstalled into the internal NAND; these will be regular Linux applications (not packaged into pnd files, since they do not need to be redistributed to anyone.)&lt;br /&gt;
&lt;br /&gt;
Additional applications may be found as pnd-files (see below, a packaged up single file representing an entire application) or as regular Linux files (an application likely being made up of many files and possibly needing installation.)&lt;br /&gt;
&lt;br /&gt;
==== What Is Included? ====&lt;br /&gt;
* Ångström Linux: Lightweight beautiful Linux-based operating system for the Pandora.&lt;br /&gt;
* Xfce: A full featured window manager for Linux.&lt;br /&gt;
* Midori: A full features web browser, designed to be lighter and faster than a full desktop style browser.&lt;br /&gt;
* OpenOffice: Full desktop document managing. Edit, create and manage your documents on the go. (really??)&lt;br /&gt;
{{Volume needed}}&lt;br /&gt;
&lt;br /&gt;
==== Where Can I Get More Apps? ====&lt;br /&gt;
There are many ways to get more applications onto your Pandora.&lt;br /&gt;
&lt;br /&gt;
*The easiest way is to browse the [http://doesnotexistyet.com Pandora App Store], where you can download a selection of free or commerical applications. To download, navigate to an app, pay for it if you must, and hit the 'download' button. Select where you want to save it, and you're done!&lt;br /&gt;
&lt;br /&gt;
*There is the good ol' [http://dl.openhandhelds.org/cgi-bin/pandora.cgi Pandora File Archive].&lt;br /&gt;
&lt;br /&gt;
*There are nice repositories, such as the [http://www.angstrom-distribution.org/repo Angstrom ARM Repository], or...&lt;br /&gt;
&lt;br /&gt;
*The Pandora includes the package manager [http://en.wikipedia.org/wiki/Ipkg ipkg].&lt;br /&gt;
&lt;br /&gt;
*Also, people may upload their apps to weird crevices in the net, so be on the lookout! (or use a search engine)&lt;br /&gt;
&lt;br /&gt;
== Introduction To .PNDs ==&lt;br /&gt;
==== What Are .PNDs? ====&lt;br /&gt;
&lt;br /&gt;
A .pnd (&amp;quot;pandora&amp;quot;) file is an application (game, word processor, emulator, whatever.) More accurately, it is a full application bundled up into a single file; think of it like a zip, with a relatively well defined internal structure.&lt;br /&gt;
&lt;br /&gt;
The pnd-file system was designed so you could use an application without the hassle of installation or uninstallation, or even having to organize it yourself if you don't want to. You just download or obtain the pnd-file, and use it. &lt;br /&gt;
&lt;br /&gt;
If you remember classic computers such as the Amiga - where you inserted a disk and then launched the applications read by Workbench (the Amiga's operating system) - then this is similar: when you insert an SD card into one of the two slots, the (Linux based) Pandora OS will scan it for your PND program files. Any program it finds will either turn up on the desktop or the application menu (just like in Windows).&lt;br /&gt;
&lt;br /&gt;
More details can be found in the &amp;quot;libpnd hub&amp;quot; part of the wiki, but that is more oriented to techies and developers.&lt;br /&gt;
&lt;br /&gt;
==== How do I run a PND-application? ====&lt;br /&gt;
&lt;br /&gt;
Put your pnd-files in your SD (see below for some suggestions where.)&lt;br /&gt;
&lt;br /&gt;
A pnd-file is usually invoked in one of the following ways&lt;br /&gt;
&lt;br /&gt;
* browse to the file using the directory browser, and click to run it. (.pnd files are file-associated to another program, pnd_run which knows how to run them.) This lets you organize pnd-files in directories of your choice on the device NAND or SD.&lt;br /&gt;
&lt;br /&gt;
* in PMenu, the applications will be shown by name; you can just select and run them from the menu&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/menu on SD, the application will be shown in the Start menu on the device; use your stylus or buttons to invoke it&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/desktop or /pandora/apps on SD, they will show up automatically on your desktop; invoke them with the stylus, your finger, or controls as you see fit&lt;br /&gt;
&lt;br /&gt;
==== Where Do .PNDs Go? ====&lt;br /&gt;
&lt;br /&gt;
Put .pnd-files into specific directories if you want them to show up in the Start menu or on your Pandora desktop, or in Pmenu. &lt;br /&gt;
&lt;br /&gt;
You can put them anywhere you like in internal NAND or SD, if you wish to organize them yourself and launch them with taps.&lt;br /&gt;
&lt;br /&gt;
/pandora/desktop -&amp;gt; pnd files show up on the desktop&lt;br /&gt;
&lt;br /&gt;
/pandora/menu -&amp;gt; show up in the Start menu (by the developers suggested categories.)&lt;br /&gt;
&lt;br /&gt;
/pandora/apps -&amp;gt; show up in the desktop, and in Pmenu&lt;br /&gt;
&lt;br /&gt;
These locations are not written in stone. The &amp;quot;libpnd&amp;quot; config files are in /etc/pandora/conf in the NAND. Generally you will never need to alter these files, but you certainly can if you wish. In theory, obliterating the files will still leave the system working, and they are easily restored. One file, /etc/pandora/conf/desktop defines the &amp;quot;search paths&amp;quot; to look for .pnd files, and where to put &amp;quot;.desktop&amp;quot; files when they are found. The searchpaths says where to find them (such as /pandora/desktop), and where to put the application link - /usr/share/applications is where the menu items are pulled from. IF you wish to put pnd files somewhere not in the searchpath, just add the directory to the search-path and you're good to go.&lt;br /&gt;
&lt;br /&gt;
==== Where does my data go? How do I make files visible to the applications? ====&lt;br /&gt;
&lt;br /&gt;
An application normally will see what is contained within the pnd-file, or your personal data created with the tool; it can of course look anywhere on the SD or device internal memory. For example a Quake port might expect to see extra level files in /quake, or give you a way of selecting a path to put files in.. or it might just expect it to be in your personal data folders, or in the pnd-file itself. Its up to the application, with suggestions in the pnd-guidelines for developers.&lt;br /&gt;
&lt;br /&gt;
The first time a pnd-application is run, an &amp;quot;app data&amp;quot; directory is created for it; anything that app data folder contains will be visible to the application as if it was in the pnd-file (and in fact, this lets you override files in the pnd-file without modifying the .pnd itself, which could be handy.) If your app creates a file &amp;quot;foo&amp;quot;, it'll show up in /pandora/appdata/appname-id as &amp;quot;foo&amp;quot;. The actual appdata folder name depends on the name used by the developer, but should generally look like application-name and some funny number afterwards. It should be easy to spot.&lt;br /&gt;
&lt;br /&gt;
ex: Quake 1 will probably put score or save data in /pandora/appdata/quake1-123/ or somesuch.&lt;br /&gt;
&lt;br /&gt;
It will always be helpful to read the description or readme file included.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make ROMs available to an emulator? =====&lt;br /&gt;
&lt;br /&gt;
For something like ROMs, hopefully a developer consensus will lead either to a canonical location, or a convention of having a directory picker or browser present, so that ROMs can be stored in SD locations of your choice; doesn't strike me as something that should be in a pnd-file, or to be pretended to be in a pnd-file with appdata tricks.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make pak-files available to Quake? =====&lt;br /&gt;
&lt;br /&gt;
For some add-ons or data needed for a game, the developer may require it to be 'in the main application path'; as mentioned above, just drop it into the appdata folder and the app will just see it.&lt;br /&gt;
&lt;br /&gt;
==== How Do I Make .PNDs? ====&lt;br /&gt;
==== More Info About .PNDs ====&lt;br /&gt;
Visit [[libpnd_hub]] for more information!&lt;br /&gt;
== Configuration ==&lt;br /&gt;
==== Updating The Firmware ====&lt;br /&gt;
&lt;br /&gt;
Given a working firmware, you might wish to patch it with official Open Pandora patches; you might also wish to just grab an application from the Angstrom repository, say. &lt;br /&gt;
&lt;br /&gt;
In both of these cases, an ipk file will be made available. (In the future, an automated system may offer to patch up your device or auto-download patches. TBD.)&lt;br /&gt;
&lt;br /&gt;
An ipk file is a compressed installable package.&lt;br /&gt;
&lt;br /&gt;
It should be easily used, but from the Terminal if you wish to manually apply an ipk to patch the firmware, install or update an Angstrom application, it is simple: '''opkg install foo.ipk'''&lt;br /&gt;
&lt;br /&gt;
==== Replacing the Firmware ====&lt;br /&gt;
&lt;br /&gt;
Rather than patch the firmware, the firmware may be replaced wholesale with a freshly downloaded firmware.&lt;br /&gt;
&lt;br /&gt;
==== Booting a Firmware from SD ====&lt;br /&gt;
&lt;br /&gt;
The hardware is capable of booting entirely from SD; if the device is bricked or otherwise has a blank NAND, this could be an option. furthermore you're able to try out alternative operating systems without needing to reinstall your primary operating system.&lt;br /&gt;
&lt;br /&gt;
Steps include:&lt;br /&gt;
&lt;br /&gt;
* Preparing the SD card(s)&lt;br /&gt;
* Setting up the firmware on the SD card&lt;br /&gt;
&lt;br /&gt;
=====Preparing the SD card=====&lt;br /&gt;
&lt;br /&gt;
There are two main approaches:&lt;br /&gt;
&lt;br /&gt;
* Setting up the firmware on on SD card (meaning you need two partitions - a boot partition, and a firmware partition), and&lt;br /&gt;
* Setting things up across two SD cards - meaning you boot from one SD card, and have the firmware on the other.&lt;br /&gt;
&lt;br /&gt;
Operating from one SD card provides you the option of still being able to use the other; operating across two cards provides you he option to have a regular boot-SD, and flip between multiple other SDs for the actual firmware, should you wish to cycle between many operating systems (say.)&lt;br /&gt;
&lt;br /&gt;
The boot partition generally must be FAT32, and then the kernel, MLO and other files need to be unpacked upon it.&lt;br /&gt;
&lt;br /&gt;
The firmware partition must be either ext2fs or ext3fs; under Linux, such a partition can be easily created:&lt;br /&gt;
&lt;br /&gt;
'''mkfs.ext2 -L LABELNAME /dev/mmcblk0p2'''&lt;br /&gt;
- assuming LABELNAME for the partition&lt;br /&gt;
- assuming /dev/mmcblk0p2 for your SD device; you'd better check this carefully ;)&lt;br /&gt;
&lt;br /&gt;
==== Setting Up WiFi ====&lt;br /&gt;
==== Setting Up Blutooth ====&lt;br /&gt;
==== Adjusting Brightness/Contrast ====&lt;br /&gt;
==== Changing Your Theme ====&lt;br /&gt;
== Oops! I Borked My Pandora! ==&lt;br /&gt;
Fear not, young netizen! Your Pandora was designed to be unbrickable, so unless you used the ancient art of alchemy to physically turn your Pandora into a brick (or you just broke the hardware inside), you should be okay!&lt;br /&gt;
==== Restore The Original Firmware ====&lt;br /&gt;
==== Boot From SD or USB ====&lt;br /&gt;
== Pandora FAQ ==&lt;br /&gt;
Silly goose, go to the [[FAQ]] page for more detailed information.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=User_manual&amp;diff=1947</id>
		<title>User manual</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=User_manual&amp;diff=1947"/>
		<updated>2010-01-06T21:10:17Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border-top:1px solid gray; border-bottom:1px solid gray; padding-top:5px; padding-bottom:5px; margin-bottom:20px&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;''This page is an unofficial community project, and OpenPandora Ltd. is not responsible for its content.''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PandoraFront.jpg|Right|thumb|360px|Pandora FTW!]]&lt;br /&gt;
So your Pandora just arrived after being in the post for two months. Jolly good! But now that it's actually here, what on earth do you do with it? '''Don't panic!''' Let's take a look at what's included in the box(so you don't miss anything!) and then hop on over to setting it up for that extended Ms. Pacman marathon I know you've been waiting for!&lt;br /&gt;
&lt;br /&gt;
Also, don't forget to hit up [http://www.gp32x.com/board/index.php?/forum/61-pandora/ GP32X] for questions/info/apps/fun/discussion!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Safety Information ==&lt;br /&gt;
Warning: Choking Hazard, do not let children under the age of 3 come close to your Pandora console.&lt;br /&gt;
The Pandora Contains small parts that can be eaten by those children.&lt;br /&gt;
&lt;br /&gt;
The battery of Pandora must be charged by the charger included with the Pandora(see package contents)&lt;br /&gt;
and we at OpenPandora Ltd. cannot be responsible for people using third party chargers. Please be aware that some third party chargers compatible with the Pandora have a fake CE logo and are highly dangerous (they will burst into flames).&lt;br /&gt;
&lt;br /&gt;
Keep the Pandora in normal temperatures under 140F/60C (Recommended temperatures are in the range between -10C and 40C){{Citation needed}}. The battery is standard Lithium Polymer battery. Do not keep near fire or water. Do not disassemble, destroy or damage the battery, or it may explode! Do not short circuit external contacts! Dispose of it properly, please. &lt;br /&gt;
&lt;br /&gt;
All third party modifications and hardware/software can damage your Pandora, OpenPandora Ltd cannot be responsible for damage caused by this. Trusted software can be recongised by a OP-member in the Pandora Appstore. See the “OP-Team Trusted” image in the app store to see if the software application can be trusted{{Citation needed}}.&lt;br /&gt;
&lt;br /&gt;
The Pandora has a 4.3-inch Touchscreen. You can touch the screen to trigger an action. Although this is a touch screen, you cannot punch it. Always touch the screen gently – this will be more then enough to trigger the action you want.&lt;br /&gt;
&lt;br /&gt;
The Pandora has an protective design, making it hard to break. Of course, you should never drop your Pandora, wash it, or try anything that can harm your Pandora. This will void your warranty.&lt;br /&gt;
&lt;br /&gt;
== Warranty Information ==&lt;br /&gt;
By law there is a one year warranty, and the device will be replaced/repaired if it is faulty. LCDs with noticeable dead pixels will also be replaced (Note: Pixels are small squares aligned in a grid to make up the image on your screen. A &amp;quot;Dead Pixel&amp;quot; is one that doesn't work anymore and remains black or any other static color).&lt;br /&gt;
&lt;br /&gt;
== Box Contents ==&lt;br /&gt;
When you first open Pandora's box, a slew of demons and raging emotions may forcibly leave the box. This is normal. After that, you may or may not be surprised to find a:&lt;br /&gt;
*Pandora console&lt;br /&gt;
*Stylus (located in stylus slot on the side of the Pandora)&lt;br /&gt;
*Battery&lt;br /&gt;
*DC Wall Charger&lt;br /&gt;
*TV-Out Cable (ONLY if you ordered it separately)&lt;br /&gt;
*Carrying Case (ONLY if you ordered it separately)&lt;br /&gt;
*Extra Battery (ONLY if you ordered it separately)&lt;br /&gt;
After you take those things out, you may find a sliver of Hope left over. It's best to keep it, as you never know when you could use some Hope.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
==== Highlights ====&lt;br /&gt;
{{citation needed}}&lt;br /&gt;
* ARM® Cortex™-A8 600Mhz+ CPU running Linux*&lt;br /&gt;
* 430-MHz TMS320C64x+™ DSP Core&lt;br /&gt;
* PowerVR SGX OpenGL 2.0 ES compliant 3D hardware&lt;br /&gt;
* 800x480 4.3&amp;quot; 16.7 million colours touchscreen LCD&lt;br /&gt;
* Wifi 802.11b/g, Bluetooth &amp;amp; High Speed USB 2.0 Host&lt;br /&gt;
* Dual SDHC card slots &amp;amp; SVideo TV output&lt;br /&gt;
* Dual Analogue and Digital gaming controls&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* Around 10+ Hours battery life**&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;The 600Mhz+ can be higher or lower. This can be controlled by software designed for the device.&amp;lt;/small&amp;gt;&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;Is affected by use. (example turn bluetooth on or off during play time)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Advanced Specifications ====&lt;br /&gt;
* Texas Instruments OMAP3530 processor at 600MHz (officially)&lt;br /&gt;
* 256MB DDR-333 SDRAM&lt;br /&gt;
* 512MB NAND FLASH memory&lt;br /&gt;
* IVA2+ audio and video processor using TI's DaVinci™ technology (430MHz C64x DSP)&lt;br /&gt;
* ARM® Cortex™-A8 superscalar microprocessor core&lt;br /&gt;
* PowerVR SGX530 (110MHz officially) OpenGL ES 2.0 compliant 3D hardware&lt;br /&gt;
* integrated Wifi 802.11b/g (up to 18dBm output)&lt;br /&gt;
* integrated Bluetooth 2.0 + EDR (3Mbps) (Class 2, + 4dBm)&lt;br /&gt;
* 800x480 resolution LTPS LCD with resistive touch screen, 4.3&amp;quot; widescreen, 16.7 million colors (300 cd/m2 brightness, 450:1 contrast ratio)&lt;br /&gt;
* Dual analog controllers&lt;br /&gt;
* Full gamepad controls plus shoulder buttons&lt;br /&gt;
* Dual SDHC card slots (up to 64GB of storage currently)&lt;br /&gt;
* headphone output up to 150mW/channel into 16 ohms, 99dB SNR (up to 24 bit/48KHz)&lt;br /&gt;
* TV output (composite and S-Video)&lt;br /&gt;
* Internal microphone plus ability to connect external microphone through headset&lt;br /&gt;
* Stereo line level inputs and outputs&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* USB 2.0 OTG port (1.5/12/480Mbps) with capability to charge device&lt;br /&gt;
* USB 2.0 HOST port (480Mbps) capable of providing the full 500mA to attached devices (examples include USB memory, keyboard, mouse, 3G modem, GPS)&lt;br /&gt;
* up to two externally accessible UARTs and/or four PWM signals for hardware hacking, robot control, debugging, etc.&lt;br /&gt;
* un-brickable design with integrated boot loader for safe code experimentation&lt;br /&gt;
* Power and hold switch useful for &amp;quot;instant on&amp;quot; and key lockout to aid in media player applications on the go&lt;br /&gt;
* Runs on the Linux operating system (2.6.x)&lt;br /&gt;
* Dimensions: 140x83.4x27.5mm&lt;br /&gt;
* Weight: 335g (with 4200mAh battery)&lt;br /&gt;
&lt;br /&gt;
==== Features ====&lt;br /&gt;
The Pandora is a mixture between a PC and a gaming console (similar to classic computers such as the Amiga). That's why it has gaming controls (Buttons, DPad and analogue nubs). It is fast enough to emulate many other systems, run a full desktop, access the internet via Firefox and play games such as Quake3. However, it is not as big as a netbook. Believe it or not, it will fit in your pocket. It's a bit bigger than the Nintendo DS. (See Applications section of this manual to see what applications your Pandora will come with.)&lt;br /&gt;
Remember that your Pandora console will get better with every application installed!&lt;br /&gt;
&lt;br /&gt;
== First Time Use ==&lt;br /&gt;
Now that you've opened the box, let's set this thing up! Place the battery inside the battery well on the back of the Pandora, making sure the contacts touch(the little silvery metal bits, it's easy). Snap on the battery cover and you're all set!&lt;br /&gt;
==== Charging ====&lt;br /&gt;
Charge your Pandora 8 hours before putting it off the wall charger. This will improve the lifetime of your battery. To charge the Pandora, insert the power cable end in the Pandora and the other end into your wall socket.&lt;br /&gt;
&lt;br /&gt;
The battery comes pre-charged at 40%, and that level might have decreased during shipping, so to be on the safe side, we recommend that you charge the Pandora before you use it. Simply plug in your wall charger into an outlet, or optionally use a mini-USB cable connected to a computer or wall adapter. For extreme silliness, plug your Pandora into an ''already charged Pandora,'' and charge it from that! But not really.&lt;br /&gt;
&lt;br /&gt;
==== First Boot ====&lt;br /&gt;
Once your Pandora is ready, turn it on. The OS will take some time to boot up for the first time (about 10 minutes, this is only for the first boot, this is normal). After it is booted, a series of settings dialogs will pop up in the shape of a &amp;quot;Boot Wizard&amp;quot; allowing you to alter your Pandora's settings to your liking.&lt;br /&gt;
&lt;br /&gt;
There are a total of 3 parts to the Boot Wizard guide:&lt;br /&gt;
===== System configuration =====&lt;br /&gt;
The first thing you will have to do is to calibrate the Pandora's touch screen. Only do this if the screen isn't calibrated already.&lt;br /&gt;
You will have the option for touchscreen calibration during the first time you will boot up your Pandora console.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;quot;Callibrating the touch screen&amp;quot; is a term used to describe the process of matching coodinates given by the touch layer with the underlying screen. A badly callibrated screen will register your push elsewhere on the screen, perhaps half a centimeter to one side. As there are sometimes slight variations in the production of the touch layer, you the user can improve the accuracy by matching the two layers manually.&lt;br /&gt;
&lt;br /&gt;
===== User setup =====&lt;br /&gt;
After that, you will have to enter your full name. This is what you will see in any user selection dialogs or when the system needs to address you, so enter whatever you are most comfortable with. Then follows your username. It is recommended to choose an all-lowercase, one-word username here, since you will have to enter this name every time you log in. Once you've entered your username, a password input dialog appears. You will have to enter the password you want to have twice here. If you don't want to have a password for your device, simply leave both fields empty. If you however decide to enter a password, something hard to guess and between 8 and 16 characters long is preferred.&lt;br /&gt;
&lt;br /&gt;
===== Network and security settings =====&lt;br /&gt;
You will now have to enter a name for your Pandora. This will be the Pandora's host name, so you have two options in this situation:&lt;br /&gt;
&lt;br /&gt;
# If you don't have a domain you want to connect to, simply enter any name here. It should not contain any spaces.&lt;br /&gt;
# If you ''do'' have a domain you want to connect to, enter a name in the form of &amp;quot;pandoraname.domainname.tld&amp;quot;. Note that you may never have a use for this.&lt;br /&gt;
&lt;br /&gt;
Then, you'll have to choose whether you want to automatically log in on your Pandora when it boots, or if you should be given the opportunity to log in as a different user, or enter your password. It is recommended to disable auto login if you want to protect your user data, but if you're often in a hurry, then you can enable auto login here.&lt;br /&gt;
&lt;br /&gt;
The final thing you will have to choose, is whether you want to use the full desktop Xfce environment or the gaming-oriented PMenu environment as your default environment in the Pandora. It is recommended to choose Xfce here if you want to gain access to the Pandora's full potential. This option can be changed later at any point.&lt;br /&gt;
&lt;br /&gt;
==== Calibrating The Touchscreen ====&lt;br /&gt;
The touchscreen in your new Pandora device isn't psychic! You have to tell it what to do, and in order to do that effectively, you need to calibrate it. Simply navigate to settings→screen→calibration wizard{{Verify credibility}} and follow the onscreen instructions. You may have to recalibrate the screen from time to time as well.&lt;br /&gt;
&lt;br /&gt;
During the first boot wizard, you will be offered the option to calibrate the touchscreen. By default it may well work okay, but the option is there. If calibration is far off, use the keyboard to selection the calibration option.&lt;br /&gt;
&lt;br /&gt;
== Basic Use ==&lt;br /&gt;
&lt;br /&gt;
===Pmenu===&lt;br /&gt;
&lt;br /&gt;
===Desktop style environment===&lt;br /&gt;
&lt;br /&gt;
====On the Desktop====&lt;br /&gt;
&lt;br /&gt;
The desktop will contain icons for numerous locations (such as each mounted SD card), as well as any auto-discovered pnd-applications located on SD cards or internal NAND.&lt;br /&gt;
&lt;br /&gt;
====In the menu====&lt;br /&gt;
On the bottom left you have your applications menu, similar to the Windows start menu. Clicking it brings up a list of all installed applications and pnd-applications in the appropriate location on your SD cards.&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
To the right may be some icons, these serve as shortcuts to commonly used applications. Next to that you have your taskbar, which as you might have guessed, lists all running applications in your current workspace. To the right of the taskbar you have your workspaces, think of these as multiple desktops. By default you have two to switch from. Applications running in one workspace will not be visible in the other, so you can effectively hide your Ms. Pacman game from your boss at work, because there's no way you're not going to go for the gold, even at work! Finally there are a few more icons that deal with TV-Out, network connectivity, etc. and some running applications may place an icon there as well. And to the right of THOSE, you have your time. Because time flies when you're using your Pandora! Badum tsh. Aaaaand to the right of that, you have a little icon that, when clicked, displays all running applications.&lt;br /&gt;
&lt;br /&gt;
Finally, I'd just like to reiterate this--EVERYTHING is customizable! We'll get to that section later, but for now, let's just check out the applications on your Pandora.&lt;br /&gt;
&lt;br /&gt;
===Buttons===&lt;br /&gt;
&lt;br /&gt;
====Xfce menu====&lt;br /&gt;
&lt;br /&gt;
The Pandora button will bring up the applications menu, letting you quickly enter a search to locate an application to run or perform operations against running applications.&lt;br /&gt;
&lt;br /&gt;
===Power Modes===&lt;br /&gt;
&lt;br /&gt;
Without switching the device entirely off, it may be placed into low power mode or regular power mode; simply pressing the power button will toggle modes.&lt;br /&gt;
&lt;br /&gt;
Consider low power mode to be akin to turning off a PDA or cellphone -- the screen is off, the CPU is clocked down and so on, but the device is still silently on, allowing for alarms to go off or it to be turned on again instantly. Regular power mode is for normal usage.&lt;br /&gt;
&lt;br /&gt;
Low power mode is probably going to be used as the normal &amp;quot;off&amp;quot; for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few weeks or longer. &lt;br /&gt;
&lt;br /&gt;
Closing the lid will turn off the display but otherwise leave the device operating - handy for audio playing; turning off the display lowers power use.&lt;br /&gt;
&lt;br /&gt;
The actual behaviour of buttons and events can be customized.&lt;br /&gt;
&lt;br /&gt;
== Basic Linux user guide ==&lt;br /&gt;
New to the wonderful world of Linux? No problem! You don't need mad terminal skills to open a web browser, but it can be nice to know what you're doing once in a while.&lt;br /&gt;
==== The structure of the file system ====&lt;br /&gt;
If you're used to the file system of e.g. MS Windows, you will find that a Linux file system is rather different from what you're used to. In this section, we will go through everything you have to know in order to feel comfortable with using the Pandora's file system.&lt;br /&gt;
===== Basic philosophy =====&lt;br /&gt;
In Windows, you have multiple file system roots, called &amp;quot;drives&amp;quot;, that are labeled with different letters, like &amp;quot;C:&amp;quot; or &amp;quot;D:&amp;quot;. In Linux, there aren't multiple root directories, but rather just one root directory, called &amp;quot;/&amp;quot;. All other directories are inside of this directory, including other drives.&lt;br /&gt;
&lt;br /&gt;
===== Common directories =====&lt;br /&gt;
Inside of the root directory (&amp;quot;/&amp;quot;) are quite a lot of other directories. Here are the most important ones:&lt;br /&gt;
* &amp;quot;/home&amp;quot; - This is where all of the files that are owned by all users are stored. Users do not generally have write-access to anything outside of this directory.&lt;br /&gt;
* &amp;quot;/home/username&amp;quot; - Here are the personal files of user &amp;quot;username&amp;quot;. In this directory, you will find a directory called &amp;quot;Documents&amp;quot;, &amp;quot;Pictures&amp;quot;, &amp;quot;Desktop&amp;quot; etc. that correspond to that users personal directories. This directory is also called &amp;quot;username&amp;quot;'s home directory, and can be abbreviated with &amp;quot;~/&amp;quot; (if you're currently logged in as username) or &amp;quot;~username/&amp;quot;.&lt;br /&gt;
* &amp;quot;/boot&amp;quot; - This is the directory where the Linux kernel is stored, and other files that are needed at boot time can be accessed. Do not touch this directory (You can't even do it if you wanted to)!&lt;br /&gt;
* &amp;quot;/bin&amp;quot;, &amp;quot;/lib&amp;quot; - System binaries and libraries are stored here. Most of the terminal commands mentioned below can be found inside of &amp;quot;/bin&amp;quot;. You should generally never have to touch this directory, either.&lt;br /&gt;
* &amp;quot;/usr&amp;quot; - Here is where you'll find programs and files installed by the user. Core applications such as the web browser, media player, and other applications that are available the first time you start your Pandora are stored here. If you decide to install anything via the &amp;quot;ipkg&amp;quot; command (covered later), this is where the files needed by those installations will end up.&lt;br /&gt;
* &amp;quot;/etc&amp;quot; - System-wide configuration. Should only be touched by power-users.&lt;br /&gt;
* &amp;quot;/media/*&amp;quot; - If you connect USB drives, SD cards or other external media, you will find that the contents of that media have been placed here.&lt;br /&gt;
&lt;br /&gt;
Don't worry if this doesn't make any sense; It was thought up by bearded engineers back in the seventies. They liked the idea that everything would be in a predictable place, but this is no longer completely the case.&lt;br /&gt;
&lt;br /&gt;
==== The File Manager ====&lt;br /&gt;
==== Killing Applications ====&lt;br /&gt;
==== Basic Terminal Commands ====&lt;br /&gt;
Note: Linux is case sensitive. This applies to filenames and directories too. &amp;quot;/home/me/stuff&amp;quot; is a different folder than &amp;quot;/home/me/STUFF&amp;quot;, you can actually have both. You can have &amp;quot;/home/me/Stuff&amp;quot; too if you like, and all three are seperately recognised directories.&lt;br /&gt;
&lt;br /&gt;
=====Navigation=====&lt;br /&gt;
In the terminal, you are always in some folder. Think of it like being in a file manager: you can see the contents of the directory you're in, you can do things with those files, or you may decide to go to some other folder and continue your work there.&lt;br /&gt;
&lt;br /&gt;
There are a few essential commands that are used to navigate around your system via the terminal:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;pwd&amp;quot; - Print the current working directory (will print e.g. &amp;quot;/home/user&amp;quot;)&lt;br /&gt;
* &amp;quot;ls&amp;quot; - List directory contents (similar to &amp;quot;Dir&amp;quot; in Dos, and the Linux command &amp;quot;dir&amp;quot; will actually emulate the DOS command if you want to!)&lt;br /&gt;
* &amp;quot;cd &amp;lt;directory name&amp;gt;&amp;quot; - Change to a different directory, eg. &amp;quot;cd music&amp;quot; or &amp;quot;cd /home/me/music&amp;quot;&lt;br /&gt;
* &amp;quot;cd ..&amp;quot; - Go up one directory level (similar to &amp;quot;cd..&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd&amp;quot; - Go back to your home directory (similar to My Documents in Windows)&lt;br /&gt;
* &amp;quot;cd -&amp;quot; - Go back to the previous directory you were in (handy if you forget)&lt;br /&gt;
&lt;br /&gt;
=====Controlling Running Apps=====&lt;br /&gt;
* &amp;quot;top&amp;quot; - View running proccesses (like the Task Manager in Windows) press &amp;quot;q&amp;quot; to quit&lt;br /&gt;
* &amp;quot;killall [program name] - Stops running process (use with care)&lt;br /&gt;
&lt;br /&gt;
=====File Manipulation=====&lt;br /&gt;
* &amp;quot;rm &amp;lt;filename&amp;gt;&amp;quot; - Remove a file, eg. &amp;quot;rm somefile.txt&amp;quot; or &amp;quot;rm /home/me/randomfiles/somefile.txt&amp;quot;&lt;br /&gt;
* &amp;quot;rmdir &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory, but **only** if it is empty!&lt;br /&gt;
* &amp;quot;rm -r &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory and its contents (&amp;quot;-r&amp;quot; means recursive)&lt;br /&gt;
* &amp;quot;rm -rf &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory, all of its contents, without asking you first. Use with extreme care. (&amp;quot;-f&amp;quot; means force)&lt;br /&gt;
* &amp;quot;mv &amp;lt;original filename&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Moves a file to a new place, also used for renaming, eg. &amp;quot;mv somefile.txt somefile_backup.txt&amp;quot; will rename it, but &amp;quot;mv somefile.txt /home/me/backup/somefile.txt&amp;quot; will move it. This will also work for directories.&lt;br /&gt;
* &amp;quot;cp &amp;lt;file to copy&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Copy a file, eg. &amp;quot;cp twoweeks.txt twomonths.txt&amp;quot; copies into current directory, while &amp;quot;cp twomonths.txt /home/me/ihaveadream/twoweeks.txt&amp;quot; copies to another directory.&lt;br /&gt;
* &amp;quot;cp -r &amp;lt;directory to copy&amp;gt; &amp;lt;new directory name&amp;gt;&amp;quot; - Copy a directory and all of its contents to another location.&lt;br /&gt;
* &amp;quot;touch &amp;lt;new file name&amp;gt;&amp;quot; - Makes a new (empty) file&lt;br /&gt;
* &amp;quot;mkdir &amp;lt;new directory name&amp;gt;&amp;quot; - Makes a directory&lt;br /&gt;
&lt;br /&gt;
=====Misc.=====&lt;br /&gt;
* &amp;quot;cat &amp;lt;filename&amp;gt;&amp;quot; - Prints the contents of a file, eg. &amp;quot;cat hellolo.txt&amp;quot;&lt;br /&gt;
* &amp;quot;clear&amp;quot; - Clears screen, terminal input begins at the top again&lt;br /&gt;
* &amp;quot;date&amp;quot; - Your friend, the terminal will tell you the date&lt;br /&gt;
* &amp;quot;cal [month] [year]&amp;quot; - Makes a pretty calendar, eg. &amp;quot;cal 12 2009&amp;quot; or &amp;quot;cal * 2010&amp;quot; or &amp;quot;cal 1 2010 &amp;gt; fingers_crossed.txt&amp;quot; sends output to file&lt;br /&gt;
* &amp;quot;history&amp;quot; - Gives a list of the recent commands you have run.  Running !number (e.g. !15) will rerun that numbered command in the history list&lt;br /&gt;
&lt;br /&gt;
History Search: Press CTRL-R.  As you type, BASH will try and find the command in your recent history that most closely matches what you are typing.  To get back to the prompt, press CTRL-C.&lt;br /&gt;
&lt;br /&gt;
Autocompletion: Press TAB. The terminal (also called the shell) will attempt to intelligently figure out what you're trying to type. It needs something to work with however, so try pressing TAB half way through a command or location.&lt;br /&gt;
&lt;br /&gt;
eg. &amp;quot;cd /home/me/pandora_suc&amp;quot; *TAB* will complete it as &amp;quot;cd /home/me/pandora_success&amp;quot; or with a filename &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fa&amp;quot; *TAB* will turn into &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fall_into_my_hands&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Directory aliases: There are some special directory names you can use to refer to a directory that would be too long to type otherwise, or that you simply don't know the name of.&lt;br /&gt;
* &amp;quot;~&amp;quot; - Refers to your home directory e.g. &amp;quot;/home/user&amp;quot;.&lt;br /&gt;
* &amp;quot;~seconduser&amp;quot; - Refers to someone else's home directory.&lt;br /&gt;
* &amp;quot;.&amp;quot; - Refers to the current directory, or the &amp;quot;same directory&amp;quot; in a path. What this means, is that if you type &amp;quot;cd .&amp;quot;, nothing will happen since you already are in &amp;quot;.&amp;quot;, and if you type &amp;quot;cd somedir/././././././.&amp;quot;, you will simply go to &amp;quot;somedir&amp;quot;, since the &amp;quot;.&amp;quot;-directories that come after it are the &amp;quot;same directory&amp;quot; as the one before them.&lt;br /&gt;
* &amp;quot;..&amp;quot; - Refers to the directory in which the current directory is, or the &amp;quot;parent directory&amp;quot; in a path. If you type &amp;quot;cd ..&amp;quot; you will come to the parent directory of your current directory, and if you type &amp;quot;cd s1/s2/s3/../../..&amp;quot;, nothing will happen, since the path you specified cancels itself out.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
Many applications will come preinstalled into the internal NAND; these will be regular Linux applications (not packaged into pnd files, since they do not need to be redistributed to anyone.)&lt;br /&gt;
&lt;br /&gt;
Additional applications may be found as pnd-files (see below, a packaged up single file representing an entire application) or as regular Linux files (an application likely being made up of many files and possibly needing installation.)&lt;br /&gt;
&lt;br /&gt;
==== What Is Included? ====&lt;br /&gt;
* Ångström Linux: Lightweight beautiful Linux-based operating system for the Pandora.&lt;br /&gt;
* Xfce: A full featured window manager for Linux.&lt;br /&gt;
* Midori: A full features web browser, designed to be lighter and faster than a full desktop style browser.&lt;br /&gt;
* OpenOffice: Full desktop document managing. Edit, create and manage your documents on the go. (really??)&lt;br /&gt;
{{Volume needed}}&lt;br /&gt;
&lt;br /&gt;
==== Where Can I Get More Apps? ====&lt;br /&gt;
There are many ways to get more applications onto your Pandora.&lt;br /&gt;
&lt;br /&gt;
*The easiest way is to browse the [http://doesnotexistyet.com Pandora App Store], where you can download a selection of free or commerical applications. To download, navigate to an app, pay for it if you must, and hit the 'download' button. Select where you want to save it, and you're done! Because I assume it will be in .pnd format.&lt;br /&gt;
&lt;br /&gt;
*There is the good ol' [http://dl.openhandhelds.org/cgi-bin/pandora.cgi Pandora File Archive].&lt;br /&gt;
&lt;br /&gt;
*There are nice repositories, such as the [http://www.angstrom-distribution.org/repo Angstrom ARM Repository], or...&lt;br /&gt;
&lt;br /&gt;
*The Pandora includes the package manager [http://en.wikipedia.org/wiki/Ipkg ipkg].&lt;br /&gt;
&lt;br /&gt;
*Also, people may upload their apps to weird crevices in the net, so be on the lookout! (or use a search engine)&lt;br /&gt;
&lt;br /&gt;
== Introduction To .PNDs ==&lt;br /&gt;
==== What Are .PNDs? ====&lt;br /&gt;
&lt;br /&gt;
A .pnd (&amp;quot;pandora&amp;quot;) file is an application (game, word processor, emulator, whatever.) More accurately, it is a full application bundled up into a single file; think of it like a zip, with a relatively well defined internal structure.&lt;br /&gt;
&lt;br /&gt;
The pnd-file system was designed so you could use an application without the hassle of installation or uninstallation, or even having to organize it yourself if you don't want to. You just download or obtain the pnd-file, and use it. &lt;br /&gt;
&lt;br /&gt;
If you remember classic computers such as the Amiga - where you inserted a disk and then launched the applications read by Workbench (the Amiga's operating system) - then this is similar: when you insert an SD card into one of the two slots, the (Linux based) Pandora OS will scan it for your PND program files. Any program it finds will either turn up on the desktop or the application menu (just like in Windows).&lt;br /&gt;
&lt;br /&gt;
More details can be found in the &amp;quot;libpnd hub&amp;quot; part of the wiki, but that is more oriented to techies and developers.&lt;br /&gt;
&lt;br /&gt;
==== How do I run a PND-application? ====&lt;br /&gt;
&lt;br /&gt;
Put your pnd-files in your SD (see below for some suggestions where.)&lt;br /&gt;
&lt;br /&gt;
A pnd-file is usually invoked in one of the following ways&lt;br /&gt;
&lt;br /&gt;
* browse to the file using the directory browser, and click to run it. (.pnd files are file-associated to another program, pnd_run which knows how to run them.) This lets you organize pnd-files in directories of your choice on the device NAND or SD.&lt;br /&gt;
&lt;br /&gt;
* in PMenu, the applications will be shown by name; you can just select and run them from the menu&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/menu on SD, the application will be shown in the Start menu on the device; use your stylus or buttons to invoke it&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/desktop or /pandora/apps on SD, they will show up automatically on your desktop; invoke them with the stylus, your finger, or controls as you see fit&lt;br /&gt;
&lt;br /&gt;
==== Where Do .PNDs Go? ====&lt;br /&gt;
&lt;br /&gt;
Put .pnd-files into specific directories if you want them to show up in the Start menu or on your Pandora desktop, or in Pmenu. &lt;br /&gt;
&lt;br /&gt;
You can put them anywhere you like in internal NAND or SD, if you wish to organize them yourself and launch them with taps.&lt;br /&gt;
&lt;br /&gt;
/pandora/desktop -&amp;gt; pnd files show up on the desktop&lt;br /&gt;
&lt;br /&gt;
/pandora/menu -&amp;gt; show up in the Start menu (by the developers suggested categories.)&lt;br /&gt;
&lt;br /&gt;
/pandora/apps -&amp;gt; show up in the desktop, and in Pmenu&lt;br /&gt;
&lt;br /&gt;
These locations are not written in stone. The &amp;quot;libpnd&amp;quot; config files are in /etc/pandora/conf in the NAND. Generally you will never need to alter these files, but you certainly can if you wish. In theory, obliterating the files will still leave the system working, and they are easily restored. One file, /etc/pandora/conf/desktop defines the &amp;quot;search paths&amp;quot; to look for .pnd files, and where to put &amp;quot;.desktop&amp;quot; files when they are found. The searchpaths says where to find them (such as /pandora/desktop), and where to put the application link - /usr/share/applications is where the menu items are pulled from. IF you wish to put pnd files somewhere not in the searchpath, just add the directory to the search-path and you're good to go.&lt;br /&gt;
&lt;br /&gt;
==== Where does my data go? How do I make files visible to the applications? ====&lt;br /&gt;
&lt;br /&gt;
An application normally will see what is contained within the pnd-file, or your personal data created with the tool; it can of course look anywhere on the SD or device internal memory. For example a Quake port might expect to see extra level files in /quake, or give you a way of selecting a path to put files in.. or it might just expect it to be in your personal data folders, or in the pnd-file itself. Its up to the application, with suggestions in the pnd-guidelines for developers.&lt;br /&gt;
&lt;br /&gt;
The first time a pnd-application is run, an &amp;quot;app data&amp;quot; directory is created for it; anything that app data folder contains will be visible to the application as if it was in the pnd-file (and in fact, this lets you override files in the pnd-file without modifying the .pnd itself, which could be handy.) If your app creates a file &amp;quot;foo&amp;quot;, it'll show up in /pandora/appdata/appname-id as &amp;quot;foo&amp;quot;. The actual appdata folder name depends on the name used by the developer, but should generally look like application-name and some funny number afterwards. It should be easy to spot.&lt;br /&gt;
&lt;br /&gt;
ex: Quake 1 will probably put score or save data in /pandora/appdata/quake1-123/ or somesuch.&lt;br /&gt;
&lt;br /&gt;
It will always be helpful to read the description or readme file included.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make ROMs available to an emulator? =====&lt;br /&gt;
&lt;br /&gt;
For something like ROMs, hopefully a developer consensus will lead either to a canonical location, or a convention of having a directory picker or browser present, so that ROMs can be stored in SD locations of your choice; doesn't strike me as something that should be in a pnd-file, or to be pretended to be in a pnd-file with appdata tricks.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make pak-files available to Quake? =====&lt;br /&gt;
&lt;br /&gt;
For some add-ons or data needed for a game, the developer may require it to be 'in the main application path'; as mentioned above, just drop it into the appdata folder and the app will just see it.&lt;br /&gt;
&lt;br /&gt;
==== How Do I Make .PNDs? ====&lt;br /&gt;
==== More Info About .PNDs ====&lt;br /&gt;
Visit [[libpnd_hub]] for more information!&lt;br /&gt;
== Configuration ==&lt;br /&gt;
==== Updating The Firmware ====&lt;br /&gt;
&lt;br /&gt;
Given a working firmware, you might wish to patch it with official Open Pandora patches; you might also wish to just grab an application from the Angstrom repository, say. &lt;br /&gt;
&lt;br /&gt;
In both of these cases, an ipk file will be made available. (In the future, an automated system may offer to patch up your device or auto-download patches. TBD.)&lt;br /&gt;
&lt;br /&gt;
An ipk file is a compressed installable package.&lt;br /&gt;
&lt;br /&gt;
It should be easily used, but from the Terminal if you wish to manually apply an ipk to patch the firmware, install or update an Angstrom application, it is simple: '''opkg install foo.ipk'''&lt;br /&gt;
&lt;br /&gt;
==== Replacing the Firmware ====&lt;br /&gt;
&lt;br /&gt;
Rather than patch the firmware, the firmware may be replaced wholesale with a freshly downloaded firmware.&lt;br /&gt;
&lt;br /&gt;
==== Booting a Firmware from SD ====&lt;br /&gt;
&lt;br /&gt;
The hardware is capable of booting entirely from SD; if the device is bricked or otherwise has a blank NAND, this could be an option. furthermore you're able to try out alternative operating systems without needing to reinstall your primary operating system.&lt;br /&gt;
&lt;br /&gt;
Steps include:&lt;br /&gt;
&lt;br /&gt;
* Preparing the SD card(s)&lt;br /&gt;
* Setting up the firmware on the SD card&lt;br /&gt;
&lt;br /&gt;
=====Preparing the SD card=====&lt;br /&gt;
&lt;br /&gt;
There are two main approaches:&lt;br /&gt;
&lt;br /&gt;
* Setting up the firmware on on SD card (meaning you need two partitions - a boot partition, and a firmware partition), and&lt;br /&gt;
* Setting things up across two SD cards - meaning you boot from one SD card, and have the firmware on the other.&lt;br /&gt;
&lt;br /&gt;
Operating from one SD card provides you the option of still being able to use the other; operating across two cards provides you he option to have a regular boot-SD, and flip between multiple other SDs for the actual firmware, should you wish to cycle between many operating systems (say.)&lt;br /&gt;
&lt;br /&gt;
The boot partition generally must be FAT32, and then the kernel, MLO and other files need to be unpacked upon it.&lt;br /&gt;
&lt;br /&gt;
The firmware partition must be either ext2fs or ext3fs; under Linux, such a partition can be easily created:&lt;br /&gt;
&lt;br /&gt;
'''mkfs.ext2 -L LABELNAME /dev/mmcblk0p2'''&lt;br /&gt;
- assuming LABELNAME for the partition&lt;br /&gt;
- assuming /dev/mmcblk0p2 for your SD device; you'd better check this carefully ;)&lt;br /&gt;
&lt;br /&gt;
==== Setting Up WiFi ====&lt;br /&gt;
==== Setting Up Blutooth ====&lt;br /&gt;
==== Adjusting Brightness/Contrast ====&lt;br /&gt;
==== Changing Your Theme ====&lt;br /&gt;
== Oops! I Borked My Pandora! ==&lt;br /&gt;
Fear not, young netizen! Your Pandora was designed to be unbrickable, so unless you used the ancient art of alchemy to physically turn your Pandora into a brick (or you just broke the hardware inside), you should be okay!&lt;br /&gt;
==== Restore The Original Firmware ====&lt;br /&gt;
==== Boot From SD or USB ====&lt;br /&gt;
== Pandora FAQ ==&lt;br /&gt;
Silly goose, go to the [[FAQ]] page for more detailed information.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=User_manual&amp;diff=1946</id>
		<title>User manual</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=User_manual&amp;diff=1946"/>
		<updated>2010-01-06T21:09:38Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Misc. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border-top:1px solid gray; border-bottom:1px solid gray; padding-top:5px; padding-bottom:5px; margin-bottom:20px&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;''This page is an unofficial community project, and OpenPandora Ltd. is not responsible for its content.''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PandoraFront.jpg|Right|thumb|360px|Pandora FTW!]]&lt;br /&gt;
So your Pandora just arrived after being in the post for two months. Jolly good! But now that it's actually here, what on earth do you do with it? '''Don't panic!''' Let's take a look at what's included in the box(so you don't miss anything!) and then hop on over to setting it up for that extended Ms. Pacman marathon I know you've been waiting for!&lt;br /&gt;
&lt;br /&gt;
Also, don't forget to hit up [http://www.gp32x.com/board/index.php?/forum/61-pandora/ GP32X] for questions/info/apps/fun/discussion!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Safety Information ==&lt;br /&gt;
Warning: Choking Hazard, do not let children under the age of 3 come close to your Pandora console.&lt;br /&gt;
The Pandora Contains small parts that can be eaten by those children.&lt;br /&gt;
&lt;br /&gt;
The battery of Pandora must be charged by the charger included with the Pandora(see package contents)&lt;br /&gt;
and we at OpenPandora Ltd. cannot be responsible for people using third party chargers. Please be aware that some third party chargers compatible with the Pandora have a fake CE logo and are highly dangerous (they will burst into flames).&lt;br /&gt;
&lt;br /&gt;
Keep the Pandora in normal temperatures under 140F/60C (Recommended temperatures are in the range between -10C and 40C){{Citation needed}}. The battery is standard Lithium Polymer battery. Do not keep near fire or water. Do not disassemble, destroy or damage the battery, or it may explode! Do not short circuit external contacts! Dispose of it properly, please. &lt;br /&gt;
&lt;br /&gt;
All third party modifications and hardware/software can damage your Pandora, OpenPandora Ltd cannot be responsible for damage caused by this. Trusted software can be recongised by a OP-member in the Pandora Appstore. See the “OP-Team Trusted” image in the app store to see if the software application can be trusted{{Citation needed}}.&lt;br /&gt;
&lt;br /&gt;
The Pandora has a 4.3-inch Touchscreen. You can touch the screen to trigger an action. Although this is a touch screen, you cannot punch it. Always touch the screen gently – this will be more then enough to trigger the action you want.&lt;br /&gt;
&lt;br /&gt;
The Pandora has an protective design, making it hard to break. Of course, you should never drop your Pandora, wash it, or try anything that can harm your Pandora. This will void your warranty.&lt;br /&gt;
&lt;br /&gt;
== Warranty Information ==&lt;br /&gt;
By law there is a one year warranty, and the device will be replaced/repaired if it is faulty. LCDs with noticeable dead pixels will also be replaced (Note: Pixels are small squares aligned in a grid to make up the image on your screen. A &amp;quot;Dead Pixel&amp;quot; is one that doesn't work anymore and remains black or any other static color).&lt;br /&gt;
&lt;br /&gt;
== Box Contents ==&lt;br /&gt;
When you first open Pandora's box, a slew of demons and raging emotions may forcibly leave the box. This is normal. After that, you may or may not be surprised to find a:&lt;br /&gt;
*Pandora console&lt;br /&gt;
*Stylus (located in stylus slot on the side of the Pandora)&lt;br /&gt;
*Battery&lt;br /&gt;
*DC Wall Charger&lt;br /&gt;
*TV-Out Cable (ONLY if you ordered it separately)&lt;br /&gt;
*Carrying Case (ONLY if you ordered it separately)&lt;br /&gt;
*Extra Battery (ONLY if you ordered it separately)&lt;br /&gt;
After you take those things out, you may find a sliver of Hope left over. It's best to keep it, as you never know when you could use some Hope.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
==== Highlights ====&lt;br /&gt;
{{citation needed}}&lt;br /&gt;
* ARM® Cortex™-A8 600Mhz+ CPU running Linux*&lt;br /&gt;
* 430-MHz TMS320C64x+™ DSP Core&lt;br /&gt;
* PowerVR SGX OpenGL 2.0 ES compliant 3D hardware&lt;br /&gt;
* 800x480 4.3&amp;quot; 16.7 million colours touchscreen LCD&lt;br /&gt;
* Wifi 802.11b/g, Bluetooth &amp;amp; High Speed USB 2.0 Host&lt;br /&gt;
* Dual SDHC card slots &amp;amp; SVideo TV output&lt;br /&gt;
* Dual Analogue and Digital gaming controls&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* Around 10+ Hours battery life**&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;The 600Mhz+ can be higher or lower. This can be controlled by software designed for the device.&amp;lt;/small&amp;gt;&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;Is affected by use. (example turn bluetooth on or off during play time)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Advanced Specifications ====&lt;br /&gt;
* Texas Instruments OMAP3530 processor at 600MHz (officially)&lt;br /&gt;
* 256MB DDR-333 SDRAM&lt;br /&gt;
* 512MB NAND FLASH memory&lt;br /&gt;
* IVA2+ audio and video processor using TI's DaVinci™ technology (430MHz C64x DSP)&lt;br /&gt;
* ARM® Cortex™-A8 superscalar microprocessor core&lt;br /&gt;
* PowerVR SGX530 (110MHz officially) OpenGL ES 2.0 compliant 3D hardware&lt;br /&gt;
* integrated Wifi 802.11b/g (up to 18dBm output)&lt;br /&gt;
* integrated Bluetooth 2.0 + EDR (3Mbps) (Class 2, + 4dBm)&lt;br /&gt;
* 800x480 resolution LTPS LCD with resistive touch screen, 4.3&amp;quot; widescreen, 16.7 million colors (300 cd/m2 brightness, 450:1 contrast ratio)&lt;br /&gt;
* Dual analog controllers&lt;br /&gt;
* Full gamepad controls plus shoulder buttons&lt;br /&gt;
* Dual SDHC card slots (up to 64GB of storage currently)&lt;br /&gt;
* headphone output up to 150mW/channel into 16 ohms, 99dB SNR (up to 24 bit/48KHz)&lt;br /&gt;
* TV output (composite and S-Video)&lt;br /&gt;
* Internal microphone plus ability to connect external microphone through headset&lt;br /&gt;
* Stereo line level inputs and outputs&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* USB 2.0 OTG port (1.5/12/480Mbps) with capability to charge device&lt;br /&gt;
* USB 2.0 HOST port (480Mbps) capable of providing the full 500mA to attached devices (examples include USB memory, keyboard, mouse, 3G modem, GPS)&lt;br /&gt;
* up to two externally accessible UARTs and/or four PWM signals for hardware hacking, robot control, debugging, etc.&lt;br /&gt;
* un-brickable design with integrated boot loader for safe code experimentation&lt;br /&gt;
* Power and hold switch useful for &amp;quot;instant on&amp;quot; and key lockout to aid in media player applications on the go&lt;br /&gt;
* Runs on the Linux operating system (2.6.x)&lt;br /&gt;
* Dimensions: 140x83.4x27.5mm&lt;br /&gt;
* Weight: 335g (with 4200mAh battery)&lt;br /&gt;
&lt;br /&gt;
==== Features ====&lt;br /&gt;
The Pandora is a mixture between a PC and a gaming console (similar to classic computers such as the Amiga). That's why it has gaming controls (Buttons, DPad and analogue nubs). It is fast enough to emulate many other systems, run a full desktop, access the internet via Firefox and play games such as Quake3. However, it is not as big as a netbook. Believe it or not, it will fit in your pocket. It's a bit bigger than the Nintendo DS. (See Applications section of this manual to see what applications your Pandora will come with.)&lt;br /&gt;
Remember that your Pandora console will get better with every application installed!&lt;br /&gt;
&lt;br /&gt;
== First Time Use ==&lt;br /&gt;
Now that you've opened the box, let's set this thing up! Place the battery inside the battery well on the back of the Pandora, making sure the contacts touch(the little silvery metal bits, it's easy). Snap on the battery cover and you're all set!&lt;br /&gt;
==== Charging ====&lt;br /&gt;
Charge your Pandora 8 hours before putting it off the wall charger. This will improve the lifetime of your battery. To charge the Pandora, insert the power cable end in the Pandora and the other end into your wall socket.&lt;br /&gt;
&lt;br /&gt;
The battery comes pre-charged at 40%, and that level might have decreased during shipping, so to be on the safe side, we recommend that you charge the Pandora before you use it. Simply plug in your wall charger into an outlet, or optionally use a mini-USB cable connected to a computer or wall adapter. For extreme silliness, plug your Pandora into an ''already charged Pandora,'' and charge it from that! But not really.&lt;br /&gt;
&lt;br /&gt;
==== First Boot ====&lt;br /&gt;
Once your Pandora is ready, turn it on. The OS will take some time to boot up for the first time (about 10 minutes, this is only for the first boot, this is normal). After it is booted, a series of settings dialogs will pop up in the shape of a &amp;quot;Boot Wizard&amp;quot; allowing you to alter your Pandora's settings to your liking.&lt;br /&gt;
&lt;br /&gt;
There are a total of 3 parts to the Boot Wizard guide:&lt;br /&gt;
===== System configuration =====&lt;br /&gt;
The first thing you will have to do is to calibrate the Pandora's touch screen. Only do this if the screen isn't calibrated already.&lt;br /&gt;
You will have the option for touchscreen calibration during the first time you will boot up your Pandora console.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;quot;Callibrating the touch screen&amp;quot; is a term used to describe the process of matching coodinates given by the touch layer with the underlying screen. A badly callibrated screen will register your push elsewhere on the screen, perhaps half a centimeter to one side. As there are sometimes slight variations in the production of the touch layer, you the user can improve the accuracy by matching the two layers manually.&lt;br /&gt;
&lt;br /&gt;
===== User setup =====&lt;br /&gt;
After that, you will have to enter your full name. This is what you will see in any user selection dialogs or when the system needs to address you, so enter whatever you are most comfortable with. Then follows your username. It is recommended to choose an all-lowercase, one-word username here, since you will have to enter this name every time you log in. Once you've entered your username, a password input dialog appears. You will have to enter the password you want to have twice here. If you don't want to have a password for your device, simply leave both fields empty. If you however decide to enter a password, something hard to guess and between 8 and 16 characters long is preferred.&lt;br /&gt;
&lt;br /&gt;
===== Network and security settings =====&lt;br /&gt;
You will now have to enter a name for your Pandora. This will be the Pandora's host name, so you have two options in this situation:&lt;br /&gt;
&lt;br /&gt;
# If you don't have a domain you want to connect to, simply enter any name here. It should not contain any spaces.&lt;br /&gt;
# If you ''do'' have a domain you want to connect to, enter a name in the form of &amp;quot;pandoraname.domainname.tld&amp;quot;. Note that you may never have a use for this.&lt;br /&gt;
&lt;br /&gt;
Then, you'll have to choose whether you want to automatically log in on your Pandora when it boots, or if you should be given the opportunity to log in as a different user, or enter your password. It is recommended to disable auto login if you want to protect your user data, but if you're often in a hurry, then you can enable auto login here.&lt;br /&gt;
&lt;br /&gt;
The final thing you will have to choose, is whether you want to use the full desktop Xfce environment or the gaming-oriented PMenu environment as your default environment in the Pandora. It is recommended to choose Xfce here if you want to gain access to the Pandora's full potential. This option can be changed later at any point.&lt;br /&gt;
&lt;br /&gt;
==== Calibrating The Touchscreen ====&lt;br /&gt;
The touchscreen in your new Pandora device isn't psychic! You have to tell it what to do, and in order to do that effectively, you need to calibrate it. Simply navigate to settings→screen→calibration wizard{{Verify credibility}} and follow the onscreen instructions. You may have to recalibrate the screen from time to time as well.&lt;br /&gt;
&lt;br /&gt;
During the first boot wizard, you will be offered the option to calibrate the touchscreen. By default it may well work okay, but the option is there. If calibration is far off, use the keyboard to selection the calibration option.&lt;br /&gt;
&lt;br /&gt;
== Basic Use ==&lt;br /&gt;
&lt;br /&gt;
===Pmenu===&lt;br /&gt;
&lt;br /&gt;
===Desktop style environment===&lt;br /&gt;
&lt;br /&gt;
====On the Desktop====&lt;br /&gt;
&lt;br /&gt;
The desktop will contain icons for numerous locations (such as each mounted SD card), as well as any auto-discovered pnd-applications located on SD cards or internal NAND.&lt;br /&gt;
&lt;br /&gt;
====In the menu====&lt;br /&gt;
On the bottom left you have your applications menu, similar to the Windows start menu. Clicking it brings up a list of all installed applications and pnd-applications in the appropriate location on your SD cards.&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
To the right may be some icons, these serve as shortcuts to commonly used applications. Next to that you have your taskbar, which as you might have guessed, lists all running applications in your current workspace. To the right of the taskbar you have your workspaces, think of these as multiple desktops. By default you have two to switch from. Applications running in one workspace will not be visible in the other, so you can effectively hide your Ms. Pacman game from your boss at work, because there's no way you're not going to go for the gold, even at work! Finally there are a few more icons that deal with TV-Out, network connectivity, etc. and some running applications may place an icon there as well. And to the right of THOSE, you have your time. Because time flies when you're using your Pandora! Badum tsh. Aaaaand to the right of that, you have a little icon that, when clicked, displays all running applications.&lt;br /&gt;
&lt;br /&gt;
Finally, I'd just like to reiterate this--EVERYTHING is customizable! We'll get to that section later, but for now, let's just check out the applications on your Pandora.&lt;br /&gt;
&lt;br /&gt;
===Buttons===&lt;br /&gt;
&lt;br /&gt;
====Xfce menu====&lt;br /&gt;
&lt;br /&gt;
The Pandora button will bring up the applications menu, letting you quickly enter a search to locate an application to run or perform operations against running applications.&lt;br /&gt;
&lt;br /&gt;
===Power Modes===&lt;br /&gt;
&lt;br /&gt;
Without switching the device entirely off, it may be placed into low power mode or regular power mode; simply pressing the power button will toggle modes.&lt;br /&gt;
&lt;br /&gt;
Consider low power mode to be akin to turning off a PDA or cellphone -- the screen is off, the CPU is clocked down and so on, but the device is still silently on, allowing for alarms to go off or it to be turned on again instantly. Regular power mode is for normal usage.&lt;br /&gt;
&lt;br /&gt;
Low power mode is probably going to be used as the normal &amp;quot;off&amp;quot; for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few weeks or longer. &lt;br /&gt;
&lt;br /&gt;
Closing the lid will turn off the display but otherwise leave the device operating - handy for audio playing; turning off the display lowers power use.&lt;br /&gt;
&lt;br /&gt;
The actual behaviour of buttons and events can be customized.&lt;br /&gt;
&lt;br /&gt;
== Basic Linux user guide ==&lt;br /&gt;
New to the wonderful world of Linux? No problem! You don't need mad terminal skills to open a web browser, but it can be nice to know what you're doing once in a while.&lt;br /&gt;
==== The structure of the file system ====&lt;br /&gt;
If you're used to the file system of e.g. MS Windows, you will find that a Linux file system is rather different from what you're used to. In this section, we will go through everything you have to know in order to feel comfortable with using the Pandora's file system.&lt;br /&gt;
===== Basic philosophy =====&lt;br /&gt;
In Windows, you have multiple file system roots, called &amp;quot;drives&amp;quot;, that are labeled with different letters, like &amp;quot;C:&amp;quot; or &amp;quot;D:&amp;quot;. In Linux, there aren't multiple root directories, but rather just one root directory, called &amp;quot;/&amp;quot;. All other directories are inside of this directory, including other drives.&lt;br /&gt;
&lt;br /&gt;
===== Common directories =====&lt;br /&gt;
Inside of the root directory (&amp;quot;/&amp;quot;) are quite a lot of other directories. Here are the most important ones:&lt;br /&gt;
* &amp;quot;/home&amp;quot; - This is where all of the files that are owned by all users are stored. Users do not generally have write-access to anything outside of this directory.&lt;br /&gt;
* &amp;quot;/home/username&amp;quot; - Here are the personal files of user &amp;quot;username&amp;quot;. In this directory, you will find a directory called &amp;quot;Documents&amp;quot;, &amp;quot;Pictures&amp;quot;, &amp;quot;Desktop&amp;quot; etc. that correspond to that users personal directories. This directory is also called &amp;quot;username&amp;quot;'s home directory, and can be abbreviated with &amp;quot;~/&amp;quot; (if you're currently logged in as username) or &amp;quot;~username/&amp;quot;.&lt;br /&gt;
* &amp;quot;/boot&amp;quot; - This is the directory where the Linux kernel is stored, and other files that are needed at boot time can be accessed. Do not touch this directory (You can't even do it if you wanted to)!&lt;br /&gt;
* &amp;quot;/bin&amp;quot;, &amp;quot;/lib&amp;quot; - System binaries and libraries are stored here. Most of the terminal commands mentioned below can be found inside of &amp;quot;/bin&amp;quot;. You should generally never have to touch this directory, either.&lt;br /&gt;
* &amp;quot;/usr&amp;quot; - Here is where you'll find programs and files installed by the user. Core applications such as the web browser, media player, and other applications that are available the first time you start your Pandora are stored here. If you decide to install anything via the &amp;quot;ipkg&amp;quot; command (covered later), this is where the files needed by those installations will end up.&lt;br /&gt;
* &amp;quot;/etc&amp;quot; - System-wide configuration. Should only be touched by power-users.&lt;br /&gt;
* &amp;quot;/media/*&amp;quot; - If you connect USB drives, SD cards or other external media, you will find that the contents of that media have been placed here.&lt;br /&gt;
&lt;br /&gt;
Don't worry if this doesn't make any sense; It was thought up by bearded engineers back in the seventies. They liked the idea that everything would be in a predictable place, but this is no longer completely the case.&lt;br /&gt;
&lt;br /&gt;
==== The File Manager ====&lt;br /&gt;
==== Killing Applications ====&lt;br /&gt;
==== Basic Terminal Commands ====&lt;br /&gt;
Note: Linux is case sensitive. This applies to filenames and directories too. &amp;quot;/home/me/stuff&amp;quot; is a different folder than &amp;quot;/home/me/STUFF&amp;quot;, you can actually have both. You can have &amp;quot;/home/me/Stuff&amp;quot; too if you like, and all three are seperately recognised directories.&lt;br /&gt;
&lt;br /&gt;
=====Navigation=====&lt;br /&gt;
In the terminal, you are always in some folder. Think of it like being in a file manager: you can see the contents of the directory you're in, you can do things with those files, or you may decide to go to some other folder and continue your work there.&lt;br /&gt;
&lt;br /&gt;
There are a few essential commands that are used to navigate around your system via the terminal:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;pwd&amp;quot; - Print the current working directory (will print e.g. &amp;quot;/home/user&amp;quot;)&lt;br /&gt;
* &amp;quot;ls&amp;quot; - List directory contents (similar to &amp;quot;Dir&amp;quot; in Dos, and the Linux command &amp;quot;dir&amp;quot; will actually emulate the DOS command if you want to!)&lt;br /&gt;
* &amp;quot;cd &amp;lt;directory name&amp;gt;&amp;quot; - Change to a different directory, eg. &amp;quot;cd music&amp;quot; or &amp;quot;cd /home/me/music&amp;quot;&lt;br /&gt;
* &amp;quot;cd ..&amp;quot; - Go up one directory level (similar to &amp;quot;cd..&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd&amp;quot; - Go back to your home directory (similar to My Documents in Windows)&lt;br /&gt;
* &amp;quot;cd -&amp;quot; - Go back to the previous directory you were in (handy if you forget)&lt;br /&gt;
&lt;br /&gt;
=====Controlling Running Apps=====&lt;br /&gt;
* &amp;quot;top&amp;quot; - View running proccesses (like the Task Manager in Windows) press &amp;quot;q&amp;quot; to quit&lt;br /&gt;
* &amp;quot;killall [program name] - Stops running process (use with care)&lt;br /&gt;
&lt;br /&gt;
=====File Manipulation=====&lt;br /&gt;
* &amp;quot;rm &amp;lt;filename&amp;gt;&amp;quot; - Remove a file, eg. &amp;quot;rm somefile.txt&amp;quot; or &amp;quot;rm /home/me/randomfiles/somefile.txt&amp;quot;&lt;br /&gt;
* &amp;quot;rmdir &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory, but **only** if it is empty!&lt;br /&gt;
* &amp;quot;rm -r &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory and its contents (&amp;quot;-r&amp;quot; means recursive)&lt;br /&gt;
* &amp;quot;rm -rf &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory, all of its contents, without asking you first. Use with extreme care. (&amp;quot;-f&amp;quot; means force)&lt;br /&gt;
* &amp;quot;mv &amp;lt;original filename&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Moves a file to a new place, also used for renaming, eg. &amp;quot;mv somefile.txt somefile_backup.txt&amp;quot; will rename it, but &amp;quot;mv somefile.txt /home/me/backup/somefile.txt&amp;quot; will move it. This will also work for directories.&lt;br /&gt;
* &amp;quot;cp &amp;lt;file to copy&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Copy a file, eg. &amp;quot;cp twoweeks.txt twomonths.txt&amp;quot; copies into current directory, while &amp;quot;cp twomonths.txt /home/me/ihaveadream/twoweeks.txt&amp;quot; copies to another directory.&lt;br /&gt;
* &amp;quot;cp -r &amp;lt;directory to copy&amp;gt; &amp;lt;new directory name&amp;gt;&amp;quot; - Copy a directory and all of its contents to another location.&lt;br /&gt;
* &amp;quot;touch &amp;lt;new file name&amp;gt;&amp;quot; - Makes a new (empty) file&lt;br /&gt;
* &amp;quot;mkdir &amp;lt;new directory name&amp;gt;&amp;quot; - Makes a directory&lt;br /&gt;
&lt;br /&gt;
=====Misc.=====&lt;br /&gt;
* &amp;quot;cat &amp;lt;filename&amp;gt;&amp;quot; - Prints the contents of a file, eg. &amp;quot;cat hellolo.txt&amp;quot;&lt;br /&gt;
* &amp;quot;clear&amp;quot; - Clears screen, terminal input begins at the top again&lt;br /&gt;
* &amp;quot;date&amp;quot; - Your friend, the terminal will tell you the date&lt;br /&gt;
* &amp;quot;cal [month] [year]&amp;quot; - Makes a pretty calendar, eg. &amp;quot;cal 12 2009&amp;quot; or &amp;quot;cal * 2010&amp;quot; or &amp;quot;cal 1 2010 &amp;gt; fingers_crossed.txt&amp;quot; sends output to file&lt;br /&gt;
* &amp;quot;history&amp;quot; - Gives a list of the recent commands you have run.  Running !number (e.g. !15) will rerun that numbered command in the history list&lt;br /&gt;
&lt;br /&gt;
History Search: Press CTRL-R.  As you type, BASH will try and find the command in your recent history that most closely matches what you are typing.  To get back to the prompt, press CTRL-C.&lt;br /&gt;
&lt;br /&gt;
Autocompletion: Press TAB. The terminal (also called the shell) will attempt to intelligently figure out what you're trying to type. It needs something to work with however, so try pressing TAB half way through a command or location.&lt;br /&gt;
&lt;br /&gt;
eg. &amp;quot;cd /home/me/pandora_suc&amp;quot; *TAB* will complete it as &amp;quot;cd /home/me/pandora_success&amp;quot; or with a filename &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fa&amp;quot; *TAB* will turn into &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fall_into_my_hands&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Directory aliases: There are some special directory names you can use to refer to a directory that would be too long to type otherwise, or that you simply don't know the name of.&lt;br /&gt;
* &amp;quot;~&amp;quot; - Refers to your home directory e.g. &amp;quot;/home/user&amp;quot;.&lt;br /&gt;
* &amp;quot;~seconduser&amp;quot; - Refers to someone else's home directory.&lt;br /&gt;
* &amp;quot;.&amp;quot; - Refers to the current directory, or the &amp;quot;same directory&amp;quot; in a path. What this means, is that if you type &amp;quot;cd .&amp;quot;, nothing will happen since you already are in &amp;quot;.&amp;quot;, and if you type &amp;quot;cd somedir/././././././.&amp;quot;, you will simply go to &amp;quot;somedir&amp;quot;, since the &amp;quot;.&amp;quot;-directories that come after it are the &amp;quot;same directory&amp;quot; as the one before them.&lt;br /&gt;
* &amp;quot;..&amp;quot; - Refers to the directory in which the current directory is, or the &amp;quot;parent directory&amp;quot; in a path. If you type &amp;quot;cd ..&amp;quot; you will come to the parent directory of your current directory, and if you type &amp;quot;cd s1/s2/s3/../../..&amp;quot;, nothing will happen, since the path you specified cancels itself out.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
Many applications will come preinstalled into the internal memory; these will be regular Linux applications (not packaged into pnd files, since they do not need to be redistributed to anyone.)&lt;br /&gt;
&lt;br /&gt;
Additional applications may be found as pnd-files (see below, a packaged up single file representing an entire application) or as regular Linux files (an application likely being made up of many files and possibly needing installation.)&lt;br /&gt;
&lt;br /&gt;
==== What Is Included? ====&lt;br /&gt;
* Ångström Linux: Lightweight beautiful Linux-based operating system for the Pandora.&lt;br /&gt;
* Xfce: A full featured window manager for Linux.&lt;br /&gt;
* Midori: A full features web browser, designed to be lighter and faster than a full desktop style browser.&lt;br /&gt;
* OpenOffice: Full desktop document managing. Edit, create and manage your documents on the go. (really??)&lt;br /&gt;
{{Volume needed}}&lt;br /&gt;
&lt;br /&gt;
==== Where Can I Get More Apps? ====&lt;br /&gt;
There are many ways to get more applications onto your Pandora.&lt;br /&gt;
&lt;br /&gt;
*The easiest way is to browse the [http://doesnotexistyet.com Pandora App Store], where you can download a selection of free or commerical applications. To download, navigate to an app, pay for it if you must, and hit the 'download' button. Select where you want to save it, and you're done! Because I assume it will be in .pnd format.&lt;br /&gt;
&lt;br /&gt;
*There is the good ol' [http://dl.openhandhelds.org/cgi-bin/pandora.cgi Pandora File Archive].&lt;br /&gt;
&lt;br /&gt;
*There are nice repositories, such as the [http://www.angstrom-distribution.org/repo Angstrom ARM Repository], or...&lt;br /&gt;
&lt;br /&gt;
*The Pandora includes the package manager [http://en.wikipedia.org/wiki/Ipkg ipkg].&lt;br /&gt;
&lt;br /&gt;
*Also, people may upload their apps to weird crevices in the net, so be on the lookout! (or use a search engine)&lt;br /&gt;
&lt;br /&gt;
== Introduction To .PNDs ==&lt;br /&gt;
==== What Are .PNDs? ====&lt;br /&gt;
&lt;br /&gt;
A .pnd (&amp;quot;pandora&amp;quot;) file is an application (game, word processor, emulator, whatever.) More accurately, it is a full application bundled up into a single file; think of it like a zip, with a relatively well defined internal structure.&lt;br /&gt;
&lt;br /&gt;
The pnd-file system was designed so you could use an application without the hassle of installation or uninstallation, or even having to organize it yourself if you don't want to. You just download or obtain the pnd-file, and use it. &lt;br /&gt;
&lt;br /&gt;
If you remember classic computers such as the Amiga - where you inserted a disk and then launched the applications read by Workbench (the Amiga's operating system) - then this is similar: when you insert an SD card into one of the two slots, the (Linux based) Pandora OS will scan it for your PND program files. Any program it finds will either turn up on the desktop or the application menu (just like in Windows).&lt;br /&gt;
&lt;br /&gt;
More details can be found in the &amp;quot;libpnd hub&amp;quot; part of the wiki, but that is more oriented to techies and developers.&lt;br /&gt;
&lt;br /&gt;
==== How do I run a PND-application? ====&lt;br /&gt;
&lt;br /&gt;
Put your pnd-files in your SD (see below for some suggestions where.)&lt;br /&gt;
&lt;br /&gt;
A pnd-file is usually invoked in one of the following ways&lt;br /&gt;
&lt;br /&gt;
* browse to the file using the directory browser, and click to run it. (.pnd files are file-associated to another program, pnd_run which knows how to run them.) This lets you organize pnd-files in directories of your choice on the device NAND or SD.&lt;br /&gt;
&lt;br /&gt;
* in PMenu, the applications will be shown by name; you can just select and run them from the menu&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/menu on SD, the application will be shown in the Start menu on the device; use your stylus or buttons to invoke it&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/desktop or /pandora/apps on SD, they will show up automatically on your desktop; invoke them with the stylus, your finger, or controls as you see fit&lt;br /&gt;
&lt;br /&gt;
==== Where Do .PNDs Go? ====&lt;br /&gt;
&lt;br /&gt;
Put .pnd-files into specific directories if you want them to show up in the Start menu or on your Pandora desktop, or in Pmenu. &lt;br /&gt;
&lt;br /&gt;
You can put them anywhere you like in internal NAND or SD, if you wish to organize them yourself and launch them with taps.&lt;br /&gt;
&lt;br /&gt;
/pandora/desktop -&amp;gt; pnd files show up on the desktop&lt;br /&gt;
&lt;br /&gt;
/pandora/menu -&amp;gt; show up in the Start menu (by the developers suggested categories.)&lt;br /&gt;
&lt;br /&gt;
/pandora/apps -&amp;gt; show up in the desktop, and in Pmenu&lt;br /&gt;
&lt;br /&gt;
These locations are not written in stone. The &amp;quot;libpnd&amp;quot; config files are in /etc/pandora/conf in the NAND. Generally you will never need to alter these files, but you certainly can if you wish. In theory, obliterating the files will still leave the system working, and they are easily restored. One file, /etc/pandora/conf/desktop defines the &amp;quot;search paths&amp;quot; to look for .pnd files, and where to put &amp;quot;.desktop&amp;quot; files when they are found. The searchpaths says where to find them (such as /pandora/desktop), and where to put the application link - /usr/share/applications is where the menu items are pulled from. IF you wish to put pnd files somewhere not in the searchpath, just add the directory to the search-path and you're good to go.&lt;br /&gt;
&lt;br /&gt;
==== Where does my data go? How do I make files visible to the applications? ====&lt;br /&gt;
&lt;br /&gt;
An application normally will see what is contained within the pnd-file, or your personal data created with the tool; it can of course look anywhere on the SD or device internal memory. For example a Quake port might expect to see extra level files in /quake, or give you a way of selecting a path to put files in.. or it might just expect it to be in your personal data folders, or in the pnd-file itself. Its up to the application, with suggestions in the pnd-guidelines for developers.&lt;br /&gt;
&lt;br /&gt;
The first time a pnd-application is run, an &amp;quot;app data&amp;quot; directory is created for it; anything that app data folder contains will be visible to the application as if it was in the pnd-file (and in fact, this lets you override files in the pnd-file without modifying the .pnd itself, which could be handy.) If your app creates a file &amp;quot;foo&amp;quot;, it'll show up in /pandora/appdata/appname-id as &amp;quot;foo&amp;quot;. The actual appdata folder name depends on the name used by the developer, but should generally look like application-name and some funny number afterwards. It should be easy to spot.&lt;br /&gt;
&lt;br /&gt;
ex: Quake 1 will probably put score or save data in /pandora/appdata/quake1-123/ or somesuch.&lt;br /&gt;
&lt;br /&gt;
It will always be helpful to read the description or readme file included.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make ROMs available to an emulator? =====&lt;br /&gt;
&lt;br /&gt;
For something like ROMs, hopefully a developer consensus will lead either to a canonical location, or a convention of having a directory picker or browser present, so that ROMs can be stored in SD locations of your choice; doesn't strike me as something that should be in a pnd-file, or to be pretended to be in a pnd-file with appdata tricks.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make pak-files available to Quake? =====&lt;br /&gt;
&lt;br /&gt;
For some add-ons or data needed for a game, the developer may require it to be 'in the main application path'; as mentioned above, just drop it into the appdata folder and the app will just see it.&lt;br /&gt;
&lt;br /&gt;
==== How Do I Make .PNDs? ====&lt;br /&gt;
==== More Info About .PNDs ====&lt;br /&gt;
Visit [[libpnd_hub]] for more information!&lt;br /&gt;
== Configuration ==&lt;br /&gt;
==== Updating The Firmware ====&lt;br /&gt;
&lt;br /&gt;
Given a working firmware, you might wish to patch it with official Open Pandora patches; you might also wish to just grab an application from the Angstrom repository, say. &lt;br /&gt;
&lt;br /&gt;
In both of these cases, an ipk file will be made available. (In the future, an automated system may offer to patch up your device or auto-download patches. TBD.)&lt;br /&gt;
&lt;br /&gt;
An ipk file is a compressed installable package.&lt;br /&gt;
&lt;br /&gt;
It should be easily used, but from the Terminal if you wish to manually apply an ipk to patch the firmware, install or update an Angstrom application, it is simple: '''opkg install foo.ipk'''&lt;br /&gt;
&lt;br /&gt;
==== Replacing the Firmware ====&lt;br /&gt;
&lt;br /&gt;
Rather than patch the firmware, the firmware may be replaced wholesale with a freshly downloaded firmware.&lt;br /&gt;
&lt;br /&gt;
==== Booting a Firmware from SD ====&lt;br /&gt;
&lt;br /&gt;
The hardware is capable of booting entirely from SD; if the device is bricked or otherwise has a blank NAND, this could be an option. furthermore you're able to try out alternative operating systems without needing to reinstall your primary operating system.&lt;br /&gt;
&lt;br /&gt;
Steps include:&lt;br /&gt;
&lt;br /&gt;
* Preparing the SD card(s)&lt;br /&gt;
* Setting up the firmware on the SD card&lt;br /&gt;
&lt;br /&gt;
=====Preparing the SD card=====&lt;br /&gt;
&lt;br /&gt;
There are two main approaches:&lt;br /&gt;
&lt;br /&gt;
* Setting up the firmware on on SD card (meaning you need two partitions - a boot partition, and a firmware partition), and&lt;br /&gt;
* Setting things up across two SD cards - meaning you boot from one SD card, and have the firmware on the other.&lt;br /&gt;
&lt;br /&gt;
Operating from one SD card provides you the option of still being able to use the other; operating across two cards provides you he option to have a regular boot-SD, and flip between multiple other SDs for the actual firmware, should you wish to cycle between many operating systems (say.)&lt;br /&gt;
&lt;br /&gt;
The boot partition generally must be FAT32, and then the kernel, MLO and other files need to be unpacked upon it.&lt;br /&gt;
&lt;br /&gt;
The firmware partition must be either ext2fs or ext3fs; under Linux, such a partition can be easily created:&lt;br /&gt;
&lt;br /&gt;
'''mkfs.ext2 -L LABELNAME /dev/mmcblk0p2'''&lt;br /&gt;
- assuming LABELNAME for the partition&lt;br /&gt;
- assuming /dev/mmcblk0p2 for your SD device; you'd better check this carefully ;)&lt;br /&gt;
&lt;br /&gt;
==== Setting Up WiFi ====&lt;br /&gt;
==== Setting Up Blutooth ====&lt;br /&gt;
==== Adjusting Brightness/Contrast ====&lt;br /&gt;
==== Changing Your Theme ====&lt;br /&gt;
== Oops! I Borked My Pandora! ==&lt;br /&gt;
Fear not, young netizen! Your Pandora was designed to be unbrickable, so unless you used the ancient art of alchemy to physically turn your Pandora into a brick (or you just broke the hardware inside), you should be okay!&lt;br /&gt;
==== Restore The Original Firmware ====&lt;br /&gt;
==== Boot From SD or USB ====&lt;br /&gt;
== Pandora FAQ ==&lt;br /&gt;
Silly goose, go to the [[FAQ]] page for more detailed information.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=User_manual&amp;diff=1945</id>
		<title>User manual</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=User_manual&amp;diff=1945"/>
		<updated>2010-01-06T20:59:20Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* File Manipulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border-top:1px solid gray; border-bottom:1px solid gray; padding-top:5px; padding-bottom:5px; margin-bottom:20px&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;''This page is an unofficial community project, and OpenPandora Ltd. is not responsible for its content.''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PandoraFront.jpg|Right|thumb|360px|Pandora FTW!]]&lt;br /&gt;
So your Pandora just arrived after being in the post for two months. Jolly good! But now that it's actually here, what on earth do you do with it? '''Don't panic!''' Let's take a look at what's included in the box(so you don't miss anything!) and then hop on over to setting it up for that extended Ms. Pacman marathon I know you've been waiting for!&lt;br /&gt;
&lt;br /&gt;
Also, don't forget to hit up [http://www.gp32x.com/board/index.php?/forum/61-pandora/ GP32X] for questions/info/apps/fun/discussion!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Safety Information ==&lt;br /&gt;
Warning: Choking Hazard, do not let children under the age of 3 come close to your Pandora console.&lt;br /&gt;
The Pandora Contains small parts that can be eaten by those children.&lt;br /&gt;
&lt;br /&gt;
The battery of Pandora must be charged by the charger included with the Pandora(see package contents)&lt;br /&gt;
and we at OpenPandora Ltd. cannot be responsible for people using third party chargers. Please be aware that some third party chargers compatible with the Pandora have a fake CE logo and are highly dangerous (they will burst into flames).&lt;br /&gt;
&lt;br /&gt;
Keep the Pandora in normal temperatures under 140F/60C (Recommended temperatures are in the range between -10C and 40C){{Citation needed}}. The battery is standard Lithium Polymer battery. Do not keep near fire or water. Do not disassemble, destroy or damage the battery, or it may explode! Do not short circuit external contacts! Dispose of it properly, please. &lt;br /&gt;
&lt;br /&gt;
All third party modifications and hardware/software can damage your Pandora, OpenPandora Ltd cannot be responsible for damage caused by this. Trusted software can be recongised by a OP-member in the Pandora Appstore. See the “OP-Team Trusted” image in the app store to see if the software application can be trusted{{Citation needed}}.&lt;br /&gt;
&lt;br /&gt;
The Pandora has a 4.3-inch Touchscreen. You can touch the screen to trigger an action. Although this is a touch screen, you cannot punch it. Always touch the screen gently – this will be more then enough to trigger the action you want.&lt;br /&gt;
&lt;br /&gt;
The Pandora has an protective design, making it hard to break. Of course, you should never drop your Pandora, wash it, or try anything that can harm your Pandora. This will void your warranty.&lt;br /&gt;
&lt;br /&gt;
== Warranty Information ==&lt;br /&gt;
By law there is a one year warranty, and the device will be replaced/repaired if it is faulty. LCDs with noticeable dead pixels will also be replaced (Note: Pixels are small squares aligned in a grid to make up the image on your screen. A &amp;quot;Dead Pixel&amp;quot; is one that doesn't work anymore and remains black or any other static color).&lt;br /&gt;
&lt;br /&gt;
== Box Contents ==&lt;br /&gt;
When you first open Pandora's box, a slew of demons and raging emotions may forcibly leave the box. This is normal. After that, you may or may not be surprised to find a:&lt;br /&gt;
*Pandora console&lt;br /&gt;
*Stylus (located in stylus slot on the side of the Pandora)&lt;br /&gt;
*Battery&lt;br /&gt;
*DC Wall Charger&lt;br /&gt;
*TV-Out Cable (ONLY if you ordered it separately)&lt;br /&gt;
*Carrying Case (ONLY if you ordered it separately)&lt;br /&gt;
*Extra Battery (ONLY if you ordered it separately)&lt;br /&gt;
After you take those things out, you may find a sliver of Hope left over. It's best to keep it, as you never know when you could use some Hope.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
==== Highlights ====&lt;br /&gt;
{{citation needed}}&lt;br /&gt;
* ARM® Cortex™-A8 600Mhz+ CPU running Linux*&lt;br /&gt;
* 430-MHz TMS320C64x+™ DSP Core&lt;br /&gt;
* PowerVR SGX OpenGL 2.0 ES compliant 3D hardware&lt;br /&gt;
* 800x480 4.3&amp;quot; 16.7 million colours touchscreen LCD&lt;br /&gt;
* Wifi 802.11b/g, Bluetooth &amp;amp; High Speed USB 2.0 Host&lt;br /&gt;
* Dual SDHC card slots &amp;amp; SVideo TV output&lt;br /&gt;
* Dual Analogue and Digital gaming controls&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* Around 10+ Hours battery life**&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;The 600Mhz+ can be higher or lower. This can be controlled by software designed for the device.&amp;lt;/small&amp;gt;&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;Is affected by use. (example turn bluetooth on or off during play time)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Advanced Specifications ====&lt;br /&gt;
* Texas Instruments OMAP3530 processor at 600MHz (officially)&lt;br /&gt;
* 256MB DDR-333 SDRAM&lt;br /&gt;
* 512MB NAND FLASH memory&lt;br /&gt;
* IVA2+ audio and video processor using TI's DaVinci™ technology (430MHz C64x DSP)&lt;br /&gt;
* ARM® Cortex™-A8 superscalar microprocessor core&lt;br /&gt;
* PowerVR SGX530 (110MHz officially) OpenGL ES 2.0 compliant 3D hardware&lt;br /&gt;
* integrated Wifi 802.11b/g (up to 18dBm output)&lt;br /&gt;
* integrated Bluetooth 2.0 + EDR (3Mbps) (Class 2, + 4dBm)&lt;br /&gt;
* 800x480 resolution LTPS LCD with resistive touch screen, 4.3&amp;quot; widescreen, 16.7 million colors (300 cd/m2 brightness, 450:1 contrast ratio)&lt;br /&gt;
* Dual analog controllers&lt;br /&gt;
* Full gamepad controls plus shoulder buttons&lt;br /&gt;
* Dual SDHC card slots (up to 64GB of storage currently)&lt;br /&gt;
* headphone output up to 150mW/channel into 16 ohms, 99dB SNR (up to 24 bit/48KHz)&lt;br /&gt;
* TV output (composite and S-Video)&lt;br /&gt;
* Internal microphone plus ability to connect external microphone through headset&lt;br /&gt;
* Stereo line level inputs and outputs&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* USB 2.0 OTG port (1.5/12/480Mbps) with capability to charge device&lt;br /&gt;
* USB 2.0 HOST port (480Mbps) capable of providing the full 500mA to attached devices (examples include USB memory, keyboard, mouse, 3G modem, GPS)&lt;br /&gt;
* up to two externally accessible UARTs and/or four PWM signals for hardware hacking, robot control, debugging, etc.&lt;br /&gt;
* un-brickable design with integrated boot loader for safe code experimentation&lt;br /&gt;
* Power and hold switch useful for &amp;quot;instant on&amp;quot; and key lockout to aid in media player applications on the go&lt;br /&gt;
* Runs on the Linux operating system (2.6.x)&lt;br /&gt;
* Dimensions: 140x83.4x27.5mm&lt;br /&gt;
* Weight: 335g (with 4200mAh battery)&lt;br /&gt;
&lt;br /&gt;
==== Features ====&lt;br /&gt;
The Pandora is a mixture between a PC and a gaming console (similar to classic computers such as the Amiga). That's why it has gaming controls (Buttons, DPad and analogue nubs). It is fast enough to emulate many other systems, run a full desktop, access the internet via Firefox and play games such as Quake3. However, it is not as big as a netbook. Believe it or not, it will fit in your pocket. It's a bit bigger than the Nintendo DS. (See Applications section of this manual to see what applications your Pandora will come with.)&lt;br /&gt;
Remember that your Pandora console will get better with every application installed!&lt;br /&gt;
&lt;br /&gt;
== First Time Use ==&lt;br /&gt;
Now that you've opened the box, let's set this thing up! Place the battery inside the battery well on the back of the Pandora, making sure the contacts touch(the little silvery metal bits, it's easy). Snap on the battery cover and you're all set!&lt;br /&gt;
==== Charging ====&lt;br /&gt;
Charge your Pandora 8 hours before putting it off the wall charger. This will improve the lifetime of your battery. To charge the Pandora, insert the power cable end in the Pandora and the other end into your wall socket.&lt;br /&gt;
&lt;br /&gt;
The battery comes pre-charged at 40%, and that level might have decreased during shipping, so to be on the safe side, we recommend that you charge the Pandora before you use it. Simply plug in your wall charger into an outlet, or optionally use a mini-USB cable connected to a computer or wall adapter. For extreme silliness, plug your Pandora into an ''already charged Pandora,'' and charge it from that! But not really.&lt;br /&gt;
&lt;br /&gt;
==== First Boot ====&lt;br /&gt;
Once your Pandora is ready, turn it on. The OS will take some time to boot up for the first time (about 10 minutes, this is only for the first boot, this is normal). After it is booted, a series of settings dialogs will pop up in the shape of a &amp;quot;Boot Wizard&amp;quot; allowing you to alter your Pandora's settings to your liking.&lt;br /&gt;
&lt;br /&gt;
There are a total of 3 parts to the Boot Wizard guide:&lt;br /&gt;
===== System configuration =====&lt;br /&gt;
The first thing you will have to do is to calibrate the Pandora's touch screen. Only do this if the screen isn't calibrated already.&lt;br /&gt;
You will have the option for touchscreen calibration during the first time you will boot up your Pandora console.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;quot;Callibrating the touch screen&amp;quot; is a term used to describe the process of matching coodinates given by the touch layer with the underlying screen. A badly callibrated screen will register your push elsewhere on the screen, perhaps half a centimeter to one side. As there are sometimes slight variations in the production of the touch layer, you the user can improve the accuracy by matching the two layers manually.&lt;br /&gt;
&lt;br /&gt;
===== User setup =====&lt;br /&gt;
After that, you will have to enter your full name. This is what you will see in any user selection dialogs or when the system needs to address you, so enter whatever you are most comfortable with. Then follows your username. It is recommended to choose an all-lowercase, one-word username here, since you will have to enter this name every time you log in. Once you've entered your username, a password input dialog appears. You will have to enter the password you want to have twice here. If you don't want to have a password for your device, simply leave both fields empty. If you however decide to enter a password, something hard to guess and between 8 and 16 characters long is preferred.&lt;br /&gt;
&lt;br /&gt;
===== Network and security settings =====&lt;br /&gt;
You will now have to enter a name for your Pandora. This will be the Pandora's host name, so you have two options in this situation:&lt;br /&gt;
&lt;br /&gt;
# If you don't have a domain you want to connect to, simply enter any name here. It should not contain any spaces.&lt;br /&gt;
# If you ''do'' have a domain you want to connect to, enter a name in the form of &amp;quot;pandoraname.domainname.tld&amp;quot;. Note that you may never have a use for this.&lt;br /&gt;
&lt;br /&gt;
Then, you'll have to choose whether you want to automatically log in on your Pandora when it boots, or if you should be given the opportunity to log in as a different user, or enter your password. It is recommended to disable auto login if you want to protect your user data, but if you're often in a hurry, then you can enable auto login here.&lt;br /&gt;
&lt;br /&gt;
The final thing you will have to choose, is whether you want to use the full desktop Xfce environment or the gaming-oriented PMenu environment as your default environment in the Pandora. It is recommended to choose Xfce here if you want to gain access to the Pandora's full potential. This option can be changed later at any point.&lt;br /&gt;
&lt;br /&gt;
==== Calibrating The Touchscreen ====&lt;br /&gt;
The touchscreen in your new Pandora device isn't psychic! You have to tell it what to do, and in order to do that effectively, you need to calibrate it. Simply navigate to settings→screen→calibration wizard{{Verify credibility}} and follow the onscreen instructions. You may have to recalibrate the screen from time to time as well.&lt;br /&gt;
&lt;br /&gt;
During the first boot wizard, you will be offered the option to calibrate the touchscreen. By default it may well work okay, but the option is there. If calibration is far off, use the keyboard to selection the calibration option.&lt;br /&gt;
&lt;br /&gt;
== Basic Use ==&lt;br /&gt;
&lt;br /&gt;
===Pmenu===&lt;br /&gt;
&lt;br /&gt;
===Desktop style environment===&lt;br /&gt;
&lt;br /&gt;
====On the Desktop====&lt;br /&gt;
&lt;br /&gt;
The desktop will contain icons for numerous locations (such as each mounted SD card), as well as any auto-discovered pnd-applications located on SD cards or internal NAND.&lt;br /&gt;
&lt;br /&gt;
====In the menu====&lt;br /&gt;
On the bottom left you have your applications menu, similar to the Windows start menu. Clicking it brings up a list of all installed applications and pnd-applications in the appropriate location on your SD cards.&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
To the right may be some icons, these serve as shortcuts to commonly used applications. Next to that you have your taskbar, which as you might have guessed, lists all running applications in your current workspace. To the right of the taskbar you have your workspaces, think of these as multiple desktops. By default you have two to switch from. Applications running in one workspace will not be visible in the other, so you can effectively hide your Ms. Pacman game from your boss at work, because there's no way you're not going to go for the gold, even at work! Finally there are a few more icons that deal with TV-Out, network connectivity, etc. and some running applications may place an icon there as well. And to the right of THOSE, you have your time. Because time flies when you're using your Pandora! Badum tsh. Aaaaand to the right of that, you have a little icon that, when clicked, displays all running applications.&lt;br /&gt;
&lt;br /&gt;
Finally, I'd just like to reiterate this--EVERYTHING is customizable! We'll get to that section later, but for now, let's just check out the applications on your Pandora.&lt;br /&gt;
&lt;br /&gt;
===Buttons===&lt;br /&gt;
&lt;br /&gt;
====Xfce menu====&lt;br /&gt;
&lt;br /&gt;
The Pandora button will bring up the applications menu, letting you quickly enter a search to locate an application to run or perform operations against running applications.&lt;br /&gt;
&lt;br /&gt;
===Power Modes===&lt;br /&gt;
&lt;br /&gt;
Without switching the device entirely off, it may be placed into low power mode or regular power mode; simply pressing the power button will toggle modes.&lt;br /&gt;
&lt;br /&gt;
Consider low power mode to be akin to turning off a PDA or cellphone -- the screen is off, the CPU is clocked down and so on, but the device is still silently on, allowing for alarms to go off or it to be turned on again instantly. Regular power mode is for normal usage.&lt;br /&gt;
&lt;br /&gt;
Low power mode is probably going to be used as the normal &amp;quot;off&amp;quot; for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few weeks or longer. &lt;br /&gt;
&lt;br /&gt;
Closing the lid will turn off the display but otherwise leave the device operating - handy for audio playing; turning off the display lowers power use.&lt;br /&gt;
&lt;br /&gt;
The actual behaviour of buttons and events can be customized.&lt;br /&gt;
&lt;br /&gt;
== Basic Linux user guide ==&lt;br /&gt;
New to the wonderful world of Linux? No problem! You don't need mad terminal skills to open a web browser, but it can be nice to know what you're doing once in a while.&lt;br /&gt;
==== The structure of the file system ====&lt;br /&gt;
If you're used to the file system of e.g. MS Windows, you will find that a Linux file system is rather different from what you're used to. In this section, we will go through everything you have to know in order to feel comfortable with using the Pandora's file system.&lt;br /&gt;
===== Basic philosophy =====&lt;br /&gt;
In Windows, you have multiple file system roots, called &amp;quot;drives&amp;quot;, that are labeled with different letters, like &amp;quot;C:&amp;quot; or &amp;quot;D:&amp;quot;. In Linux, there aren't multiple root directories, but rather just one root directory, called &amp;quot;/&amp;quot;. All other directories are inside of this directory, including other drives.&lt;br /&gt;
&lt;br /&gt;
===== Common directories =====&lt;br /&gt;
Inside of the root directory (&amp;quot;/&amp;quot;) are quite a lot of other directories. Here are the most important ones:&lt;br /&gt;
* &amp;quot;/home&amp;quot; - This is where all of the files that are owned by all users are stored. Users do not generally have write-access to anything outside of this directory.&lt;br /&gt;
* &amp;quot;/home/username&amp;quot; - Here are the personal files of user &amp;quot;username&amp;quot;. In this directory, you will find a directory called &amp;quot;Documents&amp;quot;, &amp;quot;Pictures&amp;quot;, &amp;quot;Desktop&amp;quot; etc. that correspond to that users personal directories. This directory is also called &amp;quot;username&amp;quot;'s home directory, and can be abbreviated with &amp;quot;~/&amp;quot; (if you're currently logged in as username) or &amp;quot;~username/&amp;quot;.&lt;br /&gt;
* &amp;quot;/boot&amp;quot; - This is the directory where the Linux kernel is stored, and other files that are needed at boot time can be accessed. Do not touch this directory (You can't even do it if you wanted to)!&lt;br /&gt;
* &amp;quot;/bin&amp;quot;, &amp;quot;/lib&amp;quot; - System binaries and libraries are stored here. Most of the terminal commands mentioned below can be found inside of &amp;quot;/bin&amp;quot;. You should generally never have to touch this directory, either.&lt;br /&gt;
* &amp;quot;/usr&amp;quot; - Here is where you'll find programs and files installed by the user. Core applications such as the web browser, media player, and other applications that are available the first time you start your Pandora are stored here. If you decide to install anything via the &amp;quot;ipkg&amp;quot; command (covered later), this is where the files needed by those installations will end up.&lt;br /&gt;
* &amp;quot;/etc&amp;quot; - System-wide configuration. Should only be touched by power-users.&lt;br /&gt;
* &amp;quot;/media/*&amp;quot; - If you connect USB drives, SD cards or other external media, you will find that the contents of that media have been placed here.&lt;br /&gt;
&lt;br /&gt;
Don't worry if this doesn't make any sense; It was thought up by bearded engineers back in the seventies. They liked the idea that everything would be in a predictable place, but this is no longer completely the case.&lt;br /&gt;
&lt;br /&gt;
==== The File Manager ====&lt;br /&gt;
==== Killing Applications ====&lt;br /&gt;
==== Basic Terminal Commands ====&lt;br /&gt;
Note: Linux is case sensitive. This applies to filenames and directories too. &amp;quot;/home/me/stuff&amp;quot; is a different folder than &amp;quot;/home/me/STUFF&amp;quot;, you can actually have both. You can have &amp;quot;/home/me/Stuff&amp;quot; too if you like, and all three are seperately recognised directories.&lt;br /&gt;
&lt;br /&gt;
=====Navigation=====&lt;br /&gt;
In the terminal, you are always in some folder. Think of it like being in a file manager: you can see the contents of the directory you're in, you can do things with those files, or you may decide to go to some other folder and continue your work there.&lt;br /&gt;
&lt;br /&gt;
There are a few essential commands that are used to navigate around your system via the terminal:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;pwd&amp;quot; - Print the current working directory (will print e.g. &amp;quot;/home/user&amp;quot;)&lt;br /&gt;
* &amp;quot;ls&amp;quot; - List directory contents (similar to &amp;quot;Dir&amp;quot; in Dos, and the Linux command &amp;quot;dir&amp;quot; will actually emulate the DOS command if you want to!)&lt;br /&gt;
* &amp;quot;cd &amp;lt;directory name&amp;gt;&amp;quot; - Change to a different directory, eg. &amp;quot;cd music&amp;quot; or &amp;quot;cd /home/me/music&amp;quot;&lt;br /&gt;
* &amp;quot;cd ..&amp;quot; - Go up one directory level (similar to &amp;quot;cd..&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd&amp;quot; - Go back to your home directory (similar to My Documents in Windows)&lt;br /&gt;
* &amp;quot;cd -&amp;quot; - Go back to the previous directory you were in (handy if you forget)&lt;br /&gt;
&lt;br /&gt;
=====Controlling Running Apps=====&lt;br /&gt;
* &amp;quot;top&amp;quot; - View running proccesses (like the Task Manager in Windows) press &amp;quot;q&amp;quot; to quit&lt;br /&gt;
* &amp;quot;killall [program name] - Stops running process (use with care)&lt;br /&gt;
&lt;br /&gt;
=====File Manipulation=====&lt;br /&gt;
* &amp;quot;rm &amp;lt;filename&amp;gt;&amp;quot; - Remove a file, eg. &amp;quot;rm somefile.txt&amp;quot; or &amp;quot;rm /home/me/randomfiles/somefile.txt&amp;quot;&lt;br /&gt;
* &amp;quot;rmdir &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory, but **only** if it is empty!&lt;br /&gt;
* &amp;quot;rm -r &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory and its contents (&amp;quot;-r&amp;quot; means recursive)&lt;br /&gt;
* &amp;quot;rm -rf &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory, all of its contents, without asking you first. Use with extreme care. (&amp;quot;-f&amp;quot; means force)&lt;br /&gt;
* &amp;quot;mv &amp;lt;original filename&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Moves a file to a new place, also used for renaming, eg. &amp;quot;mv somefile.txt somefile_backup.txt&amp;quot; will rename it, but &amp;quot;mv somefile.txt /home/me/backup/somefile.txt&amp;quot; will move it. This will also work for directories.&lt;br /&gt;
* &amp;quot;cp &amp;lt;file to copy&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Copy a file, eg. &amp;quot;cp twoweeks.txt twomonths.txt&amp;quot; copies into current directory, while &amp;quot;cp twomonths.txt /home/me/ihaveadream/twoweeks.txt&amp;quot; copies to another directory.&lt;br /&gt;
* &amp;quot;cp -r &amp;lt;directory to copy&amp;gt; &amp;lt;new directory name&amp;gt;&amp;quot; - Copy a directory and all of its contents to another location.&lt;br /&gt;
* &amp;quot;touch &amp;lt;new file name&amp;gt;&amp;quot; - Makes a new (empty) file&lt;br /&gt;
* &amp;quot;mkdir &amp;lt;new directory name&amp;gt;&amp;quot; - Makes a directory&lt;br /&gt;
&lt;br /&gt;
=====Misc.=====&lt;br /&gt;
* &amp;quot;cat &amp;lt;filename&amp;gt;&amp;quot; - Prints the contents of a file, eg. &amp;quot;cat hellolo.txt&amp;quot;&lt;br /&gt;
* &amp;quot;clear&amp;quot; - Clears screen, terminal input begins at the top again&lt;br /&gt;
* &amp;quot;date&amp;quot; - Your friend, the terminal will tell you the date&lt;br /&gt;
* &amp;quot;cal [month] [year]&amp;quot; - Makes a pretty calendar, eg. &amp;quot;cal 12 2009&amp;quot; or &amp;quot;cal * 2010&amp;quot; or &amp;quot;cal 1 2010 &amp;gt; fingers_crossed.txt&amp;quot; sends output to file&lt;br /&gt;
* &amp;quot;history&amp;quot; - Gives a list of the recent commands you have run.  Running !number (e.g. !15) will rerun that numbered command in the history list&lt;br /&gt;
&lt;br /&gt;
History Search: Press CTRL-R.  As you type, BASH will try and find the command in your recent history that most closely matches what you are typing.  To get back to the prompt, press CTRL-C.&lt;br /&gt;
&lt;br /&gt;
Autocompletion: Press TAB. The terminal (also called the shell) will attempt to intelligently figure out what you're trying to type. It needs something to work with however, so try pressing TAB half way through a command or location.&lt;br /&gt;
&lt;br /&gt;
eg. &amp;quot;cd /home/me/pandora_suc&amp;quot; *TAB* will complete it as &amp;quot;cd /home/me/pandora_success&amp;quot; or with a filename &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fa&amp;quot; *TAB* will turn into &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fall_into_my_hands&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
Many applications will come preinstalled into the internal memory; these will be regular Linux applications (not packaged into pnd files, since they do not need to be redistributed to anyone.)&lt;br /&gt;
&lt;br /&gt;
Additional applications may be found as pnd-files (see below, a packaged up single file representing an entire application) or as regular Linux files (an application likely being made up of many files and possibly needing installation.)&lt;br /&gt;
&lt;br /&gt;
==== What Is Included? ====&lt;br /&gt;
* Ångström Linux: Lightweight beautiful Linux-based operating system for the Pandora.&lt;br /&gt;
* Xfce: A full featured window manager for Linux.&lt;br /&gt;
* Midori: A full features web browser, designed to be lighter and faster than a full desktop style browser.&lt;br /&gt;
* OpenOffice: Full desktop document managing. Edit, create and manage your documents on the go. (really??)&lt;br /&gt;
{{Volume needed}}&lt;br /&gt;
&lt;br /&gt;
==== Where Can I Get More Apps? ====&lt;br /&gt;
There are many ways to get more applications onto your Pandora.&lt;br /&gt;
&lt;br /&gt;
*The easiest way is to browse the [http://doesnotexistyet.com Pandora App Store], where you can download a selection of free or commerical applications. To download, navigate to an app, pay for it if you must, and hit the 'download' button. Select where you want to save it, and you're done! Because I assume it will be in .pnd format.&lt;br /&gt;
&lt;br /&gt;
*There is the good ol' [http://dl.openhandhelds.org/cgi-bin/pandora.cgi Pandora File Archive].&lt;br /&gt;
&lt;br /&gt;
*There are nice repositories, such as the [http://www.angstrom-distribution.org/repo Angstrom ARM Repository], or...&lt;br /&gt;
&lt;br /&gt;
*The Pandora includes the package manager [http://en.wikipedia.org/wiki/Ipkg ipkg].&lt;br /&gt;
&lt;br /&gt;
*Also, people may upload their apps to weird crevices in the net, so be on the lookout! (or use a search engine)&lt;br /&gt;
&lt;br /&gt;
== Introduction To .PNDs ==&lt;br /&gt;
==== What Are .PNDs? ====&lt;br /&gt;
&lt;br /&gt;
A .pnd (&amp;quot;pandora&amp;quot;) file is an application (game, word processor, emulator, whatever.) More accurately, it is a full application bundled up into a single file; think of it like a zip, with a relatively well defined internal structure.&lt;br /&gt;
&lt;br /&gt;
The pnd-file system was designed so you could use an application without the hassle of installation or uninstallation, or even having to organize it yourself if you don't want to. You just download or obtain the pnd-file, and use it. &lt;br /&gt;
&lt;br /&gt;
If you remember classic computers such as the Amiga - where you inserted a disk and then launched the applications read by Workbench (the Amiga's operating system) - then this is similar: when you insert an SD card into one of the two slots, the (Linux based) Pandora OS will scan it for your PND program files. Any program it finds will either turn up on the desktop or the application menu (just like in Windows).&lt;br /&gt;
&lt;br /&gt;
More details can be found in the &amp;quot;libpnd hub&amp;quot; part of the wiki, but that is more oriented to techies and developers.&lt;br /&gt;
&lt;br /&gt;
==== How do I run a PND-application? ====&lt;br /&gt;
&lt;br /&gt;
Put your pnd-files in your SD (see below for some suggestions where.)&lt;br /&gt;
&lt;br /&gt;
A pnd-file is usually invoked in one of the following ways&lt;br /&gt;
&lt;br /&gt;
* browse to the file using the directory browser, and click to run it. (.pnd files are file-associated to another program, pnd_run which knows how to run them.) This lets you organize pnd-files in directories of your choice on the device NAND or SD.&lt;br /&gt;
&lt;br /&gt;
* in PMenu, the applications will be shown by name; you can just select and run them from the menu&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/menu on SD, the application will be shown in the Start menu on the device; use your stylus or buttons to invoke it&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/desktop or /pandora/apps on SD, they will show up automatically on your desktop; invoke them with the stylus, your finger, or controls as you see fit&lt;br /&gt;
&lt;br /&gt;
==== Where Do .PNDs Go? ====&lt;br /&gt;
&lt;br /&gt;
Put .pnd-files into specific directories if you want them to show up in the Start menu or on your Pandora desktop, or in Pmenu. &lt;br /&gt;
&lt;br /&gt;
You can put them anywhere you like in internal NAND or SD, if you wish to organize them yourself and launch them with taps.&lt;br /&gt;
&lt;br /&gt;
/pandora/desktop -&amp;gt; pnd files show up on the desktop&lt;br /&gt;
&lt;br /&gt;
/pandora/menu -&amp;gt; show up in the Start menu (by the developers suggested categories.)&lt;br /&gt;
&lt;br /&gt;
/pandora/apps -&amp;gt; show up in the desktop, and in Pmenu&lt;br /&gt;
&lt;br /&gt;
These locations are not written in stone. The &amp;quot;libpnd&amp;quot; config files are in /etc/pandora/conf in the NAND. Generally you will never need to alter these files, but you certainly can if you wish. In theory, obliterating the files will still leave the system working, and they are easily restored. One file, /etc/pandora/conf/desktop defines the &amp;quot;search paths&amp;quot; to look for .pnd files, and where to put &amp;quot;.desktop&amp;quot; files when they are found. The searchpaths says where to find them (such as /pandora/desktop), and where to put the application link - /usr/share/applications is where the menu items are pulled from. IF you wish to put pnd files somewhere not in the searchpath, just add the directory to the search-path and you're good to go.&lt;br /&gt;
&lt;br /&gt;
==== Where does my data go? How do I make files visible to the applications? ====&lt;br /&gt;
&lt;br /&gt;
An application normally will see what is contained within the pnd-file, or your personal data created with the tool; it can of course look anywhere on the SD or device internal memory. For example a Quake port might expect to see extra level files in /quake, or give you a way of selecting a path to put files in.. or it might just expect it to be in your personal data folders, or in the pnd-file itself. Its up to the application, with suggestions in the pnd-guidelines for developers.&lt;br /&gt;
&lt;br /&gt;
The first time a pnd-application is run, an &amp;quot;app data&amp;quot; directory is created for it; anything that app data folder contains will be visible to the application as if it was in the pnd-file (and in fact, this lets you override files in the pnd-file without modifying the .pnd itself, which could be handy.) If your app creates a file &amp;quot;foo&amp;quot;, it'll show up in /pandora/appdata/appname-id as &amp;quot;foo&amp;quot;. The actual appdata folder name depends on the name used by the developer, but should generally look like application-name and some funny number afterwards. It should be easy to spot.&lt;br /&gt;
&lt;br /&gt;
ex: Quake 1 will probably put score or save data in /pandora/appdata/quake1-123/ or somesuch.&lt;br /&gt;
&lt;br /&gt;
It will always be helpful to read the description or readme file included.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make ROMs available to an emulator? =====&lt;br /&gt;
&lt;br /&gt;
For something like ROMs, hopefully a developer consensus will lead either to a canonical location, or a convention of having a directory picker or browser present, so that ROMs can be stored in SD locations of your choice; doesn't strike me as something that should be in a pnd-file, or to be pretended to be in a pnd-file with appdata tricks.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make pak-files available to Quake? =====&lt;br /&gt;
&lt;br /&gt;
For some add-ons or data needed for a game, the developer may require it to be 'in the main application path'; as mentioned above, just drop it into the appdata folder and the app will just see it.&lt;br /&gt;
&lt;br /&gt;
==== How Do I Make .PNDs? ====&lt;br /&gt;
==== More Info About .PNDs ====&lt;br /&gt;
Visit [[libpnd_hub]] for more information!&lt;br /&gt;
== Configuration ==&lt;br /&gt;
==== Updating The Firmware ====&lt;br /&gt;
&lt;br /&gt;
Given a working firmware, you might wish to patch it with official Open Pandora patches; you might also wish to just grab an application from the Angstrom repository, say. &lt;br /&gt;
&lt;br /&gt;
In both of these cases, an ipk file will be made available. (In the future, an automated system may offer to patch up your device or auto-download patches. TBD.)&lt;br /&gt;
&lt;br /&gt;
An ipk file is a compressed installable package.&lt;br /&gt;
&lt;br /&gt;
It should be easily used, but from the Terminal if you wish to manually apply an ipk to patch the firmware, install or update an Angstrom application, it is simple: '''opkg install foo.ipk'''&lt;br /&gt;
&lt;br /&gt;
==== Replacing the Firmware ====&lt;br /&gt;
&lt;br /&gt;
Rather than patch the firmware, the firmware may be replaced wholesale with a freshly downloaded firmware.&lt;br /&gt;
&lt;br /&gt;
==== Booting a Firmware from SD ====&lt;br /&gt;
&lt;br /&gt;
The hardware is capable of booting entirely from SD; if the device is bricked or otherwise has a blank NAND, this could be an option. furthermore you're able to try out alternative operating systems without needing to reinstall your primary operating system.&lt;br /&gt;
&lt;br /&gt;
Steps include:&lt;br /&gt;
&lt;br /&gt;
* Preparing the SD card(s)&lt;br /&gt;
* Setting up the firmware on the SD card&lt;br /&gt;
&lt;br /&gt;
=====Preparing the SD card=====&lt;br /&gt;
&lt;br /&gt;
There are two main approaches:&lt;br /&gt;
&lt;br /&gt;
* Setting up the firmware on on SD card (meaning you need two partitions - a boot partition, and a firmware partition), and&lt;br /&gt;
* Setting things up across two SD cards - meaning you boot from one SD card, and have the firmware on the other.&lt;br /&gt;
&lt;br /&gt;
Operating from one SD card provides you the option of still being able to use the other; operating across two cards provides you he option to have a regular boot-SD, and flip between multiple other SDs for the actual firmware, should you wish to cycle between many operating systems (say.)&lt;br /&gt;
&lt;br /&gt;
The boot partition generally must be FAT32, and then the kernel, MLO and other files need to be unpacked upon it.&lt;br /&gt;
&lt;br /&gt;
The firmware partition must be either ext2fs or ext3fs; under Linux, such a partition can be easily created:&lt;br /&gt;
&lt;br /&gt;
'''mkfs.ext2 -L LABELNAME /dev/mmcblk0p2'''&lt;br /&gt;
- assuming LABELNAME for the partition&lt;br /&gt;
- assuming /dev/mmcblk0p2 for your SD device; you'd better check this carefully ;)&lt;br /&gt;
&lt;br /&gt;
==== Setting Up WiFi ====&lt;br /&gt;
==== Setting Up Blutooth ====&lt;br /&gt;
==== Adjusting Brightness/Contrast ====&lt;br /&gt;
==== Changing Your Theme ====&lt;br /&gt;
== Oops! I Borked My Pandora! ==&lt;br /&gt;
Fear not, young netizen! Your Pandora was designed to be unbrickable, so unless you used the ancient art of alchemy to physically turn your Pandora into a brick (or you just broke the hardware inside), you should be okay!&lt;br /&gt;
==== Restore The Original Firmware ====&lt;br /&gt;
==== Boot From SD or USB ====&lt;br /&gt;
== Pandora FAQ ==&lt;br /&gt;
Silly goose, go to the [[FAQ]] page for more detailed information.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=User_manual&amp;diff=1944</id>
		<title>User manual</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=User_manual&amp;diff=1944"/>
		<updated>2010-01-06T20:58:31Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* File Manipulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border-top:1px solid gray; border-bottom:1px solid gray; padding-top:5px; padding-bottom:5px; margin-bottom:20px&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;''This page is an unofficial community project, and OpenPandora Ltd. is not responsible for its content.''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PandoraFront.jpg|Right|thumb|360px|Pandora FTW!]]&lt;br /&gt;
So your Pandora just arrived after being in the post for two months. Jolly good! But now that it's actually here, what on earth do you do with it? '''Don't panic!''' Let's take a look at what's included in the box(so you don't miss anything!) and then hop on over to setting it up for that extended Ms. Pacman marathon I know you've been waiting for!&lt;br /&gt;
&lt;br /&gt;
Also, don't forget to hit up [http://www.gp32x.com/board/index.php?/forum/61-pandora/ GP32X] for questions/info/apps/fun/discussion!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Safety Information ==&lt;br /&gt;
Warning: Choking Hazard, do not let children under the age of 3 come close to your Pandora console.&lt;br /&gt;
The Pandora Contains small parts that can be eaten by those children.&lt;br /&gt;
&lt;br /&gt;
The battery of Pandora must be charged by the charger included with the Pandora(see package contents)&lt;br /&gt;
and we at OpenPandora Ltd. cannot be responsible for people using third party chargers. Please be aware that some third party chargers compatible with the Pandora have a fake CE logo and are highly dangerous (they will burst into flames).&lt;br /&gt;
&lt;br /&gt;
Keep the Pandora in normal temperatures under 140F/60C (Recommended temperatures are in the range between -10C and 40C){{Citation needed}}. The battery is standard Lithium Polymer battery. Do not keep near fire or water. Do not disassemble, destroy or damage the battery, or it may explode! Do not short circuit external contacts! Dispose of it properly, please. &lt;br /&gt;
&lt;br /&gt;
All third party modifications and hardware/software can damage your Pandora, OpenPandora Ltd cannot be responsible for damage caused by this. Trusted software can be recongised by a OP-member in the Pandora Appstore. See the “OP-Team Trusted” image in the app store to see if the software application can be trusted{{Citation needed}}.&lt;br /&gt;
&lt;br /&gt;
The Pandora has a 4.3-inch Touchscreen. You can touch the screen to trigger an action. Although this is a touch screen, you cannot punch it. Always touch the screen gently – this will be more then enough to trigger the action you want.&lt;br /&gt;
&lt;br /&gt;
The Pandora has an protective design, making it hard to break. Of course, you should never drop your Pandora, wash it, or try anything that can harm your Pandora. This will void your warranty.&lt;br /&gt;
&lt;br /&gt;
== Warranty Information ==&lt;br /&gt;
By law there is a one year warranty, and the device will be replaced/repaired if it is faulty. LCDs with noticeable dead pixels will also be replaced (Note: Pixels are small squares aligned in a grid to make up the image on your screen. A &amp;quot;Dead Pixel&amp;quot; is one that doesn't work anymore and remains black or any other static color).&lt;br /&gt;
&lt;br /&gt;
== Box Contents ==&lt;br /&gt;
When you first open Pandora's box, a slew of demons and raging emotions may forcibly leave the box. This is normal. After that, you may or may not be surprised to find a:&lt;br /&gt;
*Pandora console&lt;br /&gt;
*Stylus (located in stylus slot on the side of the Pandora)&lt;br /&gt;
*Battery&lt;br /&gt;
*DC Wall Charger&lt;br /&gt;
*TV-Out Cable (ONLY if you ordered it separately)&lt;br /&gt;
*Carrying Case (ONLY if you ordered it separately)&lt;br /&gt;
*Extra Battery (ONLY if you ordered it separately)&lt;br /&gt;
After you take those things out, you may find a sliver of Hope left over. It's best to keep it, as you never know when you could use some Hope.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
==== Highlights ====&lt;br /&gt;
{{citation needed}}&lt;br /&gt;
* ARM® Cortex™-A8 600Mhz+ CPU running Linux*&lt;br /&gt;
* 430-MHz TMS320C64x+™ DSP Core&lt;br /&gt;
* PowerVR SGX OpenGL 2.0 ES compliant 3D hardware&lt;br /&gt;
* 800x480 4.3&amp;quot; 16.7 million colours touchscreen LCD&lt;br /&gt;
* Wifi 802.11b/g, Bluetooth &amp;amp; High Speed USB 2.0 Host&lt;br /&gt;
* Dual SDHC card slots &amp;amp; SVideo TV output&lt;br /&gt;
* Dual Analogue and Digital gaming controls&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* Around 10+ Hours battery life**&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;The 600Mhz+ can be higher or lower. This can be controlled by software designed for the device.&amp;lt;/small&amp;gt;&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;Is affected by use. (example turn bluetooth on or off during play time)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Advanced Specifications ====&lt;br /&gt;
* Texas Instruments OMAP3530 processor at 600MHz (officially)&lt;br /&gt;
* 256MB DDR-333 SDRAM&lt;br /&gt;
* 512MB NAND FLASH memory&lt;br /&gt;
* IVA2+ audio and video processor using TI's DaVinci™ technology (430MHz C64x DSP)&lt;br /&gt;
* ARM® Cortex™-A8 superscalar microprocessor core&lt;br /&gt;
* PowerVR SGX530 (110MHz officially) OpenGL ES 2.0 compliant 3D hardware&lt;br /&gt;
* integrated Wifi 802.11b/g (up to 18dBm output)&lt;br /&gt;
* integrated Bluetooth 2.0 + EDR (3Mbps) (Class 2, + 4dBm)&lt;br /&gt;
* 800x480 resolution LTPS LCD with resistive touch screen, 4.3&amp;quot; widescreen, 16.7 million colors (300 cd/m2 brightness, 450:1 contrast ratio)&lt;br /&gt;
* Dual analog controllers&lt;br /&gt;
* Full gamepad controls plus shoulder buttons&lt;br /&gt;
* Dual SDHC card slots (up to 64GB of storage currently)&lt;br /&gt;
* headphone output up to 150mW/channel into 16 ohms, 99dB SNR (up to 24 bit/48KHz)&lt;br /&gt;
* TV output (composite and S-Video)&lt;br /&gt;
* Internal microphone plus ability to connect external microphone through headset&lt;br /&gt;
* Stereo line level inputs and outputs&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* USB 2.0 OTG port (1.5/12/480Mbps) with capability to charge device&lt;br /&gt;
* USB 2.0 HOST port (480Mbps) capable of providing the full 500mA to attached devices (examples include USB memory, keyboard, mouse, 3G modem, GPS)&lt;br /&gt;
* up to two externally accessible UARTs and/or four PWM signals for hardware hacking, robot control, debugging, etc.&lt;br /&gt;
* un-brickable design with integrated boot loader for safe code experimentation&lt;br /&gt;
* Power and hold switch useful for &amp;quot;instant on&amp;quot; and key lockout to aid in media player applications on the go&lt;br /&gt;
* Runs on the Linux operating system (2.6.x)&lt;br /&gt;
* Dimensions: 140x83.4x27.5mm&lt;br /&gt;
* Weight: 335g (with 4200mAh battery)&lt;br /&gt;
&lt;br /&gt;
==== Features ====&lt;br /&gt;
The Pandora is a mixture between a PC and a gaming console (similar to classic computers such as the Amiga). That's why it has gaming controls (Buttons, DPad and analogue nubs). It is fast enough to emulate many other systems, run a full desktop, access the internet via Firefox and play games such as Quake3. However, it is not as big as a netbook. Believe it or not, it will fit in your pocket. It's a bit bigger than the Nintendo DS. (See Applications section of this manual to see what applications your Pandora will come with.)&lt;br /&gt;
Remember that your Pandora console will get better with every application installed!&lt;br /&gt;
&lt;br /&gt;
== First Time Use ==&lt;br /&gt;
Now that you've opened the box, let's set this thing up! Place the battery inside the battery well on the back of the Pandora, making sure the contacts touch(the little silvery metal bits, it's easy). Snap on the battery cover and you're all set!&lt;br /&gt;
==== Charging ====&lt;br /&gt;
Charge your Pandora 8 hours before putting it off the wall charger. This will improve the lifetime of your battery. To charge the Pandora, insert the power cable end in the Pandora and the other end into your wall socket.&lt;br /&gt;
&lt;br /&gt;
The battery comes pre-charged at 40%, and that level might have decreased during shipping, so to be on the safe side, we recommend that you charge the Pandora before you use it. Simply plug in your wall charger into an outlet, or optionally use a mini-USB cable connected to a computer or wall adapter. For extreme silliness, plug your Pandora into an ''already charged Pandora,'' and charge it from that! But not really.&lt;br /&gt;
&lt;br /&gt;
==== First Boot ====&lt;br /&gt;
Once your Pandora is ready, turn it on. The OS will take some time to boot up for the first time (about 10 minutes, this is only for the first boot, this is normal). After it is booted, a series of settings dialogs will pop up in the shape of a &amp;quot;Boot Wizard&amp;quot; allowing you to alter your Pandora's settings to your liking.&lt;br /&gt;
&lt;br /&gt;
There are a total of 3 parts to the Boot Wizard guide:&lt;br /&gt;
===== System configuration =====&lt;br /&gt;
The first thing you will have to do is to calibrate the Pandora's touch screen. Only do this if the screen isn't calibrated already.&lt;br /&gt;
You will have the option for touchscreen calibration during the first time you will boot up your Pandora console.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;quot;Callibrating the touch screen&amp;quot; is a term used to describe the process of matching coodinates given by the touch layer with the underlying screen. A badly callibrated screen will register your push elsewhere on the screen, perhaps half a centimeter to one side. As there are sometimes slight variations in the production of the touch layer, you the user can improve the accuracy by matching the two layers manually.&lt;br /&gt;
&lt;br /&gt;
===== User setup =====&lt;br /&gt;
After that, you will have to enter your full name. This is what you will see in any user selection dialogs or when the system needs to address you, so enter whatever you are most comfortable with. Then follows your username. It is recommended to choose an all-lowercase, one-word username here, since you will have to enter this name every time you log in. Once you've entered your username, a password input dialog appears. You will have to enter the password you want to have twice here. If you don't want to have a password for your device, simply leave both fields empty. If you however decide to enter a password, something hard to guess and between 8 and 16 characters long is preferred.&lt;br /&gt;
&lt;br /&gt;
===== Network and security settings =====&lt;br /&gt;
You will now have to enter a name for your Pandora. This will be the Pandora's host name, so you have two options in this situation:&lt;br /&gt;
&lt;br /&gt;
# If you don't have a domain you want to connect to, simply enter any name here. It should not contain any spaces.&lt;br /&gt;
# If you ''do'' have a domain you want to connect to, enter a name in the form of &amp;quot;pandoraname.domainname.tld&amp;quot;. Note that you may never have a use for this.&lt;br /&gt;
&lt;br /&gt;
Then, you'll have to choose whether you want to automatically log in on your Pandora when it boots, or if you should be given the opportunity to log in as a different user, or enter your password. It is recommended to disable auto login if you want to protect your user data, but if you're often in a hurry, then you can enable auto login here.&lt;br /&gt;
&lt;br /&gt;
The final thing you will have to choose, is whether you want to use the full desktop Xfce environment or the gaming-oriented PMenu environment as your default environment in the Pandora. It is recommended to choose Xfce here if you want to gain access to the Pandora's full potential. This option can be changed later at any point.&lt;br /&gt;
&lt;br /&gt;
==== Calibrating The Touchscreen ====&lt;br /&gt;
The touchscreen in your new Pandora device isn't psychic! You have to tell it what to do, and in order to do that effectively, you need to calibrate it. Simply navigate to settings→screen→calibration wizard{{Verify credibility}} and follow the onscreen instructions. You may have to recalibrate the screen from time to time as well.&lt;br /&gt;
&lt;br /&gt;
During the first boot wizard, you will be offered the option to calibrate the touchscreen. By default it may well work okay, but the option is there. If calibration is far off, use the keyboard to selection the calibration option.&lt;br /&gt;
&lt;br /&gt;
== Basic Use ==&lt;br /&gt;
&lt;br /&gt;
===Pmenu===&lt;br /&gt;
&lt;br /&gt;
===Desktop style environment===&lt;br /&gt;
&lt;br /&gt;
====On the Desktop====&lt;br /&gt;
&lt;br /&gt;
The desktop will contain icons for numerous locations (such as each mounted SD card), as well as any auto-discovered pnd-applications located on SD cards or internal NAND.&lt;br /&gt;
&lt;br /&gt;
====In the menu====&lt;br /&gt;
On the bottom left you have your applications menu, similar to the Windows start menu. Clicking it brings up a list of all installed applications and pnd-applications in the appropriate location on your SD cards.&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
To the right may be some icons, these serve as shortcuts to commonly used applications. Next to that you have your taskbar, which as you might have guessed, lists all running applications in your current workspace. To the right of the taskbar you have your workspaces, think of these as multiple desktops. By default you have two to switch from. Applications running in one workspace will not be visible in the other, so you can effectively hide your Ms. Pacman game from your boss at work, because there's no way you're not going to go for the gold, even at work! Finally there are a few more icons that deal with TV-Out, network connectivity, etc. and some running applications may place an icon there as well. And to the right of THOSE, you have your time. Because time flies when you're using your Pandora! Badum tsh. Aaaaand to the right of that, you have a little icon that, when clicked, displays all running applications.&lt;br /&gt;
&lt;br /&gt;
Finally, I'd just like to reiterate this--EVERYTHING is customizable! We'll get to that section later, but for now, let's just check out the applications on your Pandora.&lt;br /&gt;
&lt;br /&gt;
===Buttons===&lt;br /&gt;
&lt;br /&gt;
====Xfce menu====&lt;br /&gt;
&lt;br /&gt;
The Pandora button will bring up the applications menu, letting you quickly enter a search to locate an application to run or perform operations against running applications.&lt;br /&gt;
&lt;br /&gt;
===Power Modes===&lt;br /&gt;
&lt;br /&gt;
Without switching the device entirely off, it may be placed into low power mode or regular power mode; simply pressing the power button will toggle modes.&lt;br /&gt;
&lt;br /&gt;
Consider low power mode to be akin to turning off a PDA or cellphone -- the screen is off, the CPU is clocked down and so on, but the device is still silently on, allowing for alarms to go off or it to be turned on again instantly. Regular power mode is for normal usage.&lt;br /&gt;
&lt;br /&gt;
Low power mode is probably going to be used as the normal &amp;quot;off&amp;quot; for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few weeks or longer. &lt;br /&gt;
&lt;br /&gt;
Closing the lid will turn off the display but otherwise leave the device operating - handy for audio playing; turning off the display lowers power use.&lt;br /&gt;
&lt;br /&gt;
The actual behaviour of buttons and events can be customized.&lt;br /&gt;
&lt;br /&gt;
== Basic Linux user guide ==&lt;br /&gt;
New to the wonderful world of Linux? No problem! You don't need mad terminal skills to open a web browser, but it can be nice to know what you're doing once in a while.&lt;br /&gt;
==== The structure of the file system ====&lt;br /&gt;
If you're used to the file system of e.g. MS Windows, you will find that a Linux file system is rather different from what you're used to. In this section, we will go through everything you have to know in order to feel comfortable with using the Pandora's file system.&lt;br /&gt;
===== Basic philosophy =====&lt;br /&gt;
In Windows, you have multiple file system roots, called &amp;quot;drives&amp;quot;, that are labeled with different letters, like &amp;quot;C:&amp;quot; or &amp;quot;D:&amp;quot;. In Linux, there aren't multiple root directories, but rather just one root directory, called &amp;quot;/&amp;quot;. All other directories are inside of this directory, including other drives.&lt;br /&gt;
&lt;br /&gt;
===== Common directories =====&lt;br /&gt;
Inside of the root directory (&amp;quot;/&amp;quot;) are quite a lot of other directories. Here are the most important ones:&lt;br /&gt;
* &amp;quot;/home&amp;quot; - This is where all of the files that are owned by all users are stored. Users do not generally have write-access to anything outside of this directory.&lt;br /&gt;
* &amp;quot;/home/username&amp;quot; - Here are the personal files of user &amp;quot;username&amp;quot;. In this directory, you will find a directory called &amp;quot;Documents&amp;quot;, &amp;quot;Pictures&amp;quot;, &amp;quot;Desktop&amp;quot; etc. that correspond to that users personal directories. This directory is also called &amp;quot;username&amp;quot;'s home directory, and can be abbreviated with &amp;quot;~/&amp;quot; (if you're currently logged in as username) or &amp;quot;~username/&amp;quot;.&lt;br /&gt;
* &amp;quot;/boot&amp;quot; - This is the directory where the Linux kernel is stored, and other files that are needed at boot time can be accessed. Do not touch this directory (You can't even do it if you wanted to)!&lt;br /&gt;
* &amp;quot;/bin&amp;quot;, &amp;quot;/lib&amp;quot; - System binaries and libraries are stored here. Most of the terminal commands mentioned below can be found inside of &amp;quot;/bin&amp;quot;. You should generally never have to touch this directory, either.&lt;br /&gt;
* &amp;quot;/usr&amp;quot; - Here is where you'll find programs and files installed by the user. Core applications such as the web browser, media player, and other applications that are available the first time you start your Pandora are stored here. If you decide to install anything via the &amp;quot;ipkg&amp;quot; command (covered later), this is where the files needed by those installations will end up.&lt;br /&gt;
* &amp;quot;/etc&amp;quot; - System-wide configuration. Should only be touched by power-users.&lt;br /&gt;
* &amp;quot;/media/*&amp;quot; - If you connect USB drives, SD cards or other external media, you will find that the contents of that media have been placed here.&lt;br /&gt;
&lt;br /&gt;
Don't worry if this doesn't make any sense; It was thought up by bearded engineers back in the seventies. They liked the idea that everything would be in a predictable place, but this is no longer completely the case.&lt;br /&gt;
&lt;br /&gt;
==== The File Manager ====&lt;br /&gt;
==== Killing Applications ====&lt;br /&gt;
==== Basic Terminal Commands ====&lt;br /&gt;
Note: Linux is case sensitive. This applies to filenames and directories too. &amp;quot;/home/me/stuff&amp;quot; is a different folder than &amp;quot;/home/me/STUFF&amp;quot;, you can actually have both. You can have &amp;quot;/home/me/Stuff&amp;quot; too if you like, and all three are seperately recognised directories.&lt;br /&gt;
&lt;br /&gt;
=====Navigation=====&lt;br /&gt;
In the terminal, you are always in some folder. Think of it like being in a file manager: you can see the contents of the directory you're in, you can do things with those files, or you may decide to go to some other folder and continue your work there.&lt;br /&gt;
&lt;br /&gt;
There are a few essential commands that are used to navigate around your system via the terminal:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;pwd&amp;quot; - Print the current working directory (will print e.g. &amp;quot;/home/user&amp;quot;)&lt;br /&gt;
* &amp;quot;ls&amp;quot; - List directory contents (similar to &amp;quot;Dir&amp;quot; in Dos, and the Linux command &amp;quot;dir&amp;quot; will actually emulate the DOS command if you want to!)&lt;br /&gt;
* &amp;quot;cd &amp;lt;directory name&amp;gt;&amp;quot; - Change to a different directory, eg. &amp;quot;cd music&amp;quot; or &amp;quot;cd /home/me/music&amp;quot;&lt;br /&gt;
* &amp;quot;cd ..&amp;quot; - Go up one directory level (similar to &amp;quot;cd..&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd&amp;quot; - Go back to your home directory (similar to My Documents in Windows)&lt;br /&gt;
* &amp;quot;cd -&amp;quot; - Go back to the previous directory you were in (handy if you forget)&lt;br /&gt;
&lt;br /&gt;
=====Controlling Running Apps=====&lt;br /&gt;
* &amp;quot;top&amp;quot; - View running proccesses (like the Task Manager in Windows) press &amp;quot;q&amp;quot; to quit&lt;br /&gt;
* &amp;quot;killall [program name] - Stops running process (use with care)&lt;br /&gt;
&lt;br /&gt;
=====File Manipulation=====&lt;br /&gt;
* &amp;quot;rm &amp;lt;filename&amp;gt;&amp;quot; - Remove a file, eg. &amp;quot;rm somefile.txt&amp;quot; or &amp;quot;rm /home/me/randomfiles/somefile.txt&amp;quot;&lt;br /&gt;
* &amp;quot;rmdir &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory, but **only** if it is empty!&lt;br /&gt;
* &amp;quot;rm -r &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory and its contents (&amp;quot;-r&amp;quot; means recursive)&lt;br /&gt;
* &amp;quot;rm -rf &amp;lt;directory&amp;gt;&amp;quot; - Will remove a directory, all of its contents, without asking you first. Use with extreme care. (&amp;quot;-f&amp;quot; means force)&lt;br /&gt;
* &amp;quot;mv &amp;lt;original filename&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Moves a file to a new place, also used for renaming, eg. &amp;quot;mv somefile.txt somefile_backup.txt&amp;quot; will rename it, but &amp;quot;mv somefile.txt /home/me/backup/somefile.txt&amp;quot; will move it&lt;br /&gt;
* &amp;quot;cp &amp;lt;file to copy&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Copy a file, eg. &amp;quot;cp twoweeks.txt twomonths.txt&amp;quot; copies into current directory, while &amp;quot;cp twomonths.txt /home/me/ihaveadream/twoweeks.txt&amp;quot; copies to another directory.&lt;br /&gt;
* &amp;quot;cp -r &amp;lt;directory to copy&amp;gt; &amp;lt;new directory name&amp;gt;&amp;quot; - Copy a directory and all of its contents to another location.&lt;br /&gt;
* &amp;quot;mkdir &amp;lt;new directory name&amp;gt;&amp;quot; - Makes a directory&lt;br /&gt;
&lt;br /&gt;
=====Misc.=====&lt;br /&gt;
* &amp;quot;cat &amp;lt;filename&amp;gt;&amp;quot; - Prints the contents of a file, eg. &amp;quot;cat hellolo.txt&amp;quot;&lt;br /&gt;
* &amp;quot;clear&amp;quot; - Clears screen, terminal input begins at the top again&lt;br /&gt;
* &amp;quot;date&amp;quot; - Your friend, the terminal will tell you the date&lt;br /&gt;
* &amp;quot;cal [month] [year]&amp;quot; - Makes a pretty calendar, eg. &amp;quot;cal 12 2009&amp;quot; or &amp;quot;cal * 2010&amp;quot; or &amp;quot;cal 1 2010 &amp;gt; fingers_crossed.txt&amp;quot; sends output to file&lt;br /&gt;
* &amp;quot;history&amp;quot; - Gives a list of the recent commands you have run.  Running !number (e.g. !15) will rerun that numbered command in the history list&lt;br /&gt;
&lt;br /&gt;
History Search: Press CTRL-R.  As you type, BASH will try and find the command in your recent history that most closely matches what you are typing.  To get back to the prompt, press CTRL-C.&lt;br /&gt;
&lt;br /&gt;
Autocompletion: Press TAB. The terminal (also called the shell) will attempt to intelligently figure out what you're trying to type. It needs something to work with however, so try pressing TAB half way through a command or location.&lt;br /&gt;
&lt;br /&gt;
eg. &amp;quot;cd /home/me/pandora_suc&amp;quot; *TAB* will complete it as &amp;quot;cd /home/me/pandora_success&amp;quot; or with a filename &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fa&amp;quot; *TAB* will turn into &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fall_into_my_hands&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
Many applications will come preinstalled into the internal memory; these will be regular Linux applications (not packaged into pnd files, since they do not need to be redistributed to anyone.)&lt;br /&gt;
&lt;br /&gt;
Additional applications may be found as pnd-files (see below, a packaged up single file representing an entire application) or as regular Linux files (an application likely being made up of many files and possibly needing installation.)&lt;br /&gt;
&lt;br /&gt;
==== What Is Included? ====&lt;br /&gt;
* Ångström Linux: Lightweight beautiful Linux-based operating system for the Pandora.&lt;br /&gt;
* Xfce: A full featured window manager for Linux.&lt;br /&gt;
* Midori: A full features web browser, designed to be lighter and faster than a full desktop style browser.&lt;br /&gt;
* OpenOffice: Full desktop document managing. Edit, create and manage your documents on the go. (really??)&lt;br /&gt;
{{Volume needed}}&lt;br /&gt;
&lt;br /&gt;
==== Where Can I Get More Apps? ====&lt;br /&gt;
There are many ways to get more applications onto your Pandora.&lt;br /&gt;
&lt;br /&gt;
*The easiest way is to browse the [http://doesnotexistyet.com Pandora App Store], where you can download a selection of free or commerical applications. To download, navigate to an app, pay for it if you must, and hit the 'download' button. Select where you want to save it, and you're done! Because I assume it will be in .pnd format.&lt;br /&gt;
&lt;br /&gt;
*There is the good ol' [http://dl.openhandhelds.org/cgi-bin/pandora.cgi Pandora File Archive].&lt;br /&gt;
&lt;br /&gt;
*There are nice repositories, such as the [http://www.angstrom-distribution.org/repo Angstrom ARM Repository], or...&lt;br /&gt;
&lt;br /&gt;
*The Pandora includes the package manager [http://en.wikipedia.org/wiki/Ipkg ipkg].&lt;br /&gt;
&lt;br /&gt;
*Also, people may upload their apps to weird crevices in the net, so be on the lookout! (or use a search engine)&lt;br /&gt;
&lt;br /&gt;
== Introduction To .PNDs ==&lt;br /&gt;
==== What Are .PNDs? ====&lt;br /&gt;
&lt;br /&gt;
A .pnd (&amp;quot;pandora&amp;quot;) file is an application (game, word processor, emulator, whatever.) More accurately, it is a full application bundled up into a single file; think of it like a zip, with a relatively well defined internal structure.&lt;br /&gt;
&lt;br /&gt;
The pnd-file system was designed so you could use an application without the hassle of installation or uninstallation, or even having to organize it yourself if you don't want to. You just download or obtain the pnd-file, and use it. &lt;br /&gt;
&lt;br /&gt;
If you remember classic computers such as the Amiga - where you inserted a disk and then launched the applications read by Workbench (the Amiga's operating system) - then this is similar: when you insert an SD card into one of the two slots, the (Linux based) Pandora OS will scan it for your PND program files. Any program it finds will either turn up on the desktop or the application menu (just like in Windows).&lt;br /&gt;
&lt;br /&gt;
More details can be found in the &amp;quot;libpnd hub&amp;quot; part of the wiki, but that is more oriented to techies and developers.&lt;br /&gt;
&lt;br /&gt;
==== How do I run a PND-application? ====&lt;br /&gt;
&lt;br /&gt;
Put your pnd-files in your SD (see below for some suggestions where.)&lt;br /&gt;
&lt;br /&gt;
A pnd-file is usually invoked in one of the following ways&lt;br /&gt;
&lt;br /&gt;
* browse to the file using the directory browser, and click to run it. (.pnd files are file-associated to another program, pnd_run which knows how to run them.) This lets you organize pnd-files in directories of your choice on the device NAND or SD.&lt;br /&gt;
&lt;br /&gt;
* in PMenu, the applications will be shown by name; you can just select and run them from the menu&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/menu on SD, the application will be shown in the Start menu on the device; use your stylus or buttons to invoke it&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/desktop or /pandora/apps on SD, they will show up automatically on your desktop; invoke them with the stylus, your finger, or controls as you see fit&lt;br /&gt;
&lt;br /&gt;
==== Where Do .PNDs Go? ====&lt;br /&gt;
&lt;br /&gt;
Put .pnd-files into specific directories if you want them to show up in the Start menu or on your Pandora desktop, or in Pmenu. &lt;br /&gt;
&lt;br /&gt;
You can put them anywhere you like in internal NAND or SD, if you wish to organize them yourself and launch them with taps.&lt;br /&gt;
&lt;br /&gt;
/pandora/desktop -&amp;gt; pnd files show up on the desktop&lt;br /&gt;
&lt;br /&gt;
/pandora/menu -&amp;gt; show up in the Start menu (by the developers suggested categories.)&lt;br /&gt;
&lt;br /&gt;
/pandora/apps -&amp;gt; show up in the desktop, and in Pmenu&lt;br /&gt;
&lt;br /&gt;
These locations are not written in stone. The &amp;quot;libpnd&amp;quot; config files are in /etc/pandora/conf in the NAND. Generally you will never need to alter these files, but you certainly can if you wish. In theory, obliterating the files will still leave the system working, and they are easily restored. One file, /etc/pandora/conf/desktop defines the &amp;quot;search paths&amp;quot; to look for .pnd files, and where to put &amp;quot;.desktop&amp;quot; files when they are found. The searchpaths says where to find them (such as /pandora/desktop), and where to put the application link - /usr/share/applications is where the menu items are pulled from. IF you wish to put pnd files somewhere not in the searchpath, just add the directory to the search-path and you're good to go.&lt;br /&gt;
&lt;br /&gt;
==== Where does my data go? How do I make files visible to the applications? ====&lt;br /&gt;
&lt;br /&gt;
An application normally will see what is contained within the pnd-file, or your personal data created with the tool; it can of course look anywhere on the SD or device internal memory. For example a Quake port might expect to see extra level files in /quake, or give you a way of selecting a path to put files in.. or it might just expect it to be in your personal data folders, or in the pnd-file itself. Its up to the application, with suggestions in the pnd-guidelines for developers.&lt;br /&gt;
&lt;br /&gt;
The first time a pnd-application is run, an &amp;quot;app data&amp;quot; directory is created for it; anything that app data folder contains will be visible to the application as if it was in the pnd-file (and in fact, this lets you override files in the pnd-file without modifying the .pnd itself, which could be handy.) If your app creates a file &amp;quot;foo&amp;quot;, it'll show up in /pandora/appdata/appname-id as &amp;quot;foo&amp;quot;. The actual appdata folder name depends on the name used by the developer, but should generally look like application-name and some funny number afterwards. It should be easy to spot.&lt;br /&gt;
&lt;br /&gt;
ex: Quake 1 will probably put score or save data in /pandora/appdata/quake1-123/ or somesuch.&lt;br /&gt;
&lt;br /&gt;
It will always be helpful to read the description or readme file included.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make ROMs available to an emulator? =====&lt;br /&gt;
&lt;br /&gt;
For something like ROMs, hopefully a developer consensus will lead either to a canonical location, or a convention of having a directory picker or browser present, so that ROMs can be stored in SD locations of your choice; doesn't strike me as something that should be in a pnd-file, or to be pretended to be in a pnd-file with appdata tricks.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make pak-files available to Quake? =====&lt;br /&gt;
&lt;br /&gt;
For some add-ons or data needed for a game, the developer may require it to be 'in the main application path'; as mentioned above, just drop it into the appdata folder and the app will just see it.&lt;br /&gt;
&lt;br /&gt;
==== How Do I Make .PNDs? ====&lt;br /&gt;
==== More Info About .PNDs ====&lt;br /&gt;
Visit [[libpnd_hub]] for more information!&lt;br /&gt;
== Configuration ==&lt;br /&gt;
==== Updating The Firmware ====&lt;br /&gt;
&lt;br /&gt;
Given a working firmware, you might wish to patch it with official Open Pandora patches; you might also wish to just grab an application from the Angstrom repository, say. &lt;br /&gt;
&lt;br /&gt;
In both of these cases, an ipk file will be made available. (In the future, an automated system may offer to patch up your device or auto-download patches. TBD.)&lt;br /&gt;
&lt;br /&gt;
An ipk file is a compressed installable package.&lt;br /&gt;
&lt;br /&gt;
It should be easily used, but from the Terminal if you wish to manually apply an ipk to patch the firmware, install or update an Angstrom application, it is simple: '''opkg install foo.ipk'''&lt;br /&gt;
&lt;br /&gt;
==== Replacing the Firmware ====&lt;br /&gt;
&lt;br /&gt;
Rather than patch the firmware, the firmware may be replaced wholesale with a freshly downloaded firmware.&lt;br /&gt;
&lt;br /&gt;
==== Booting a Firmware from SD ====&lt;br /&gt;
&lt;br /&gt;
The hardware is capable of booting entirely from SD; if the device is bricked or otherwise has a blank NAND, this could be an option. furthermore you're able to try out alternative operating systems without needing to reinstall your primary operating system.&lt;br /&gt;
&lt;br /&gt;
Steps include:&lt;br /&gt;
&lt;br /&gt;
* Preparing the SD card(s)&lt;br /&gt;
* Setting up the firmware on the SD card&lt;br /&gt;
&lt;br /&gt;
=====Preparing the SD card=====&lt;br /&gt;
&lt;br /&gt;
There are two main approaches:&lt;br /&gt;
&lt;br /&gt;
* Setting up the firmware on on SD card (meaning you need two partitions - a boot partition, and a firmware partition), and&lt;br /&gt;
* Setting things up across two SD cards - meaning you boot from one SD card, and have the firmware on the other.&lt;br /&gt;
&lt;br /&gt;
Operating from one SD card provides you the option of still being able to use the other; operating across two cards provides you he option to have a regular boot-SD, and flip between multiple other SDs for the actual firmware, should you wish to cycle between many operating systems (say.)&lt;br /&gt;
&lt;br /&gt;
The boot partition generally must be FAT32, and then the kernel, MLO and other files need to be unpacked upon it.&lt;br /&gt;
&lt;br /&gt;
The firmware partition must be either ext2fs or ext3fs; under Linux, such a partition can be easily created:&lt;br /&gt;
&lt;br /&gt;
'''mkfs.ext2 -L LABELNAME /dev/mmcblk0p2'''&lt;br /&gt;
- assuming LABELNAME for the partition&lt;br /&gt;
- assuming /dev/mmcblk0p2 for your SD device; you'd better check this carefully ;)&lt;br /&gt;
&lt;br /&gt;
==== Setting Up WiFi ====&lt;br /&gt;
==== Setting Up Blutooth ====&lt;br /&gt;
==== Adjusting Brightness/Contrast ====&lt;br /&gt;
==== Changing Your Theme ====&lt;br /&gt;
== Oops! I Borked My Pandora! ==&lt;br /&gt;
Fear not, young netizen! Your Pandora was designed to be unbrickable, so unless you used the ancient art of alchemy to physically turn your Pandora into a brick (or you just broke the hardware inside), you should be okay!&lt;br /&gt;
==== Restore The Original Firmware ====&lt;br /&gt;
==== Boot From SD or USB ====&lt;br /&gt;
== Pandora FAQ ==&lt;br /&gt;
Silly goose, go to the [[FAQ]] page for more detailed information.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=User_manual&amp;diff=1943</id>
		<title>User manual</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=User_manual&amp;diff=1943"/>
		<updated>2010-01-06T20:53:53Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Navigation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border-top:1px solid gray; border-bottom:1px solid gray; padding-top:5px; padding-bottom:5px; margin-bottom:20px&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;''This page is an unofficial community project, and OpenPandora Ltd. is not responsible for its content.''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PandoraFront.jpg|Right|thumb|360px|Pandora FTW!]]&lt;br /&gt;
So your Pandora just arrived after being in the post for two months. Jolly good! But now that it's actually here, what on earth do you do with it? '''Don't panic!''' Let's take a look at what's included in the box(so you don't miss anything!) and then hop on over to setting it up for that extended Ms. Pacman marathon I know you've been waiting for!&lt;br /&gt;
&lt;br /&gt;
Also, don't forget to hit up [http://www.gp32x.com/board/index.php?/forum/61-pandora/ GP32X] for questions/info/apps/fun/discussion!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Safety Information ==&lt;br /&gt;
Warning: Choking Hazard, do not let children under the age of 3 come close to your Pandora console.&lt;br /&gt;
The Pandora Contains small parts that can be eaten by those children.&lt;br /&gt;
&lt;br /&gt;
The battery of Pandora must be charged by the charger included with the Pandora(see package contents)&lt;br /&gt;
and we at OpenPandora Ltd. cannot be responsible for people using third party chargers. Please be aware that some third party chargers compatible with the Pandora have a fake CE logo and are highly dangerous (they will burst into flames).&lt;br /&gt;
&lt;br /&gt;
Keep the Pandora in normal temperatures under 140F/60C (Recommended temperatures are in the range between -10C and 40C){{Citation needed}}. The battery is standard Lithium Polymer battery. Do not keep near fire or water. Do not disassemble, destroy or damage the battery, or it may explode! Do not short circuit external contacts! Dispose of it properly, please. &lt;br /&gt;
&lt;br /&gt;
All third party modifications and hardware/software can damage your Pandora, OpenPandora Ltd cannot be responsible for damage caused by this. Trusted software can be recongised by a OP-member in the Pandora Appstore. See the “OP-Team Trusted” image in the app store to see if the software application can be trusted{{Citation needed}}.&lt;br /&gt;
&lt;br /&gt;
The Pandora has a 4.3-inch Touchscreen. You can touch the screen to trigger an action. Although this is a touch screen, you cannot punch it. Always touch the screen gently – this will be more then enough to trigger the action you want.&lt;br /&gt;
&lt;br /&gt;
The Pandora has an protective design, making it hard to break. Of course, you should never drop your Pandora, wash it, or try anything that can harm your Pandora. This will void your warranty.&lt;br /&gt;
&lt;br /&gt;
== Warranty Information ==&lt;br /&gt;
By law there is a one year warranty, and the device will be replaced/repaired if it is faulty. LCDs with noticeable dead pixels will also be replaced (Note: Pixels are small squares aligned in a grid to make up the image on your screen. A &amp;quot;Dead Pixel&amp;quot; is one that doesn't work anymore and remains black or any other static color).&lt;br /&gt;
&lt;br /&gt;
== Box Contents ==&lt;br /&gt;
When you first open Pandora's box, a slew of demons and raging emotions may forcibly leave the box. This is normal. After that, you may or may not be surprised to find a:&lt;br /&gt;
*Pandora console&lt;br /&gt;
*Stylus (located in stylus slot on the side of the Pandora)&lt;br /&gt;
*Battery&lt;br /&gt;
*DC Wall Charger&lt;br /&gt;
*TV-Out Cable (ONLY if you ordered it separately)&lt;br /&gt;
*Carrying Case (ONLY if you ordered it separately)&lt;br /&gt;
*Extra Battery (ONLY if you ordered it separately)&lt;br /&gt;
After you take those things out, you may find a sliver of Hope left over. It's best to keep it, as you never know when you could use some Hope.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
==== Highlights ====&lt;br /&gt;
{{citation needed}}&lt;br /&gt;
* ARM® Cortex™-A8 600Mhz+ CPU running Linux*&lt;br /&gt;
* 430-MHz TMS320C64x+™ DSP Core&lt;br /&gt;
* PowerVR SGX OpenGL 2.0 ES compliant 3D hardware&lt;br /&gt;
* 800x480 4.3&amp;quot; 16.7 million colours touchscreen LCD&lt;br /&gt;
* Wifi 802.11b/g, Bluetooth &amp;amp; High Speed USB 2.0 Host&lt;br /&gt;
* Dual SDHC card slots &amp;amp; SVideo TV output&lt;br /&gt;
* Dual Analogue and Digital gaming controls&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* Around 10+ Hours battery life**&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;The 600Mhz+ can be higher or lower. This can be controlled by software designed for the device.&amp;lt;/small&amp;gt;&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;Is affected by use. (example turn bluetooth on or off during play time)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Advanced Specifications ====&lt;br /&gt;
* Texas Instruments OMAP3530 processor at 600MHz (officially)&lt;br /&gt;
* 256MB DDR-333 SDRAM&lt;br /&gt;
* 512MB NAND FLASH memory&lt;br /&gt;
* IVA2+ audio and video processor using TI's DaVinci™ technology (430MHz C64x DSP)&lt;br /&gt;
* ARM® Cortex™-A8 superscalar microprocessor core&lt;br /&gt;
* PowerVR SGX530 (110MHz officially) OpenGL ES 2.0 compliant 3D hardware&lt;br /&gt;
* integrated Wifi 802.11b/g (up to 18dBm output)&lt;br /&gt;
* integrated Bluetooth 2.0 + EDR (3Mbps) (Class 2, + 4dBm)&lt;br /&gt;
* 800x480 resolution LTPS LCD with resistive touch screen, 4.3&amp;quot; widescreen, 16.7 million colors (300 cd/m2 brightness, 450:1 contrast ratio)&lt;br /&gt;
* Dual analog controllers&lt;br /&gt;
* Full gamepad controls plus shoulder buttons&lt;br /&gt;
* Dual SDHC card slots (up to 64GB of storage currently)&lt;br /&gt;
* headphone output up to 150mW/channel into 16 ohms, 99dB SNR (up to 24 bit/48KHz)&lt;br /&gt;
* TV output (composite and S-Video)&lt;br /&gt;
* Internal microphone plus ability to connect external microphone through headset&lt;br /&gt;
* Stereo line level inputs and outputs&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* USB 2.0 OTG port (1.5/12/480Mbps) with capability to charge device&lt;br /&gt;
* USB 2.0 HOST port (480Mbps) capable of providing the full 500mA to attached devices (examples include USB memory, keyboard, mouse, 3G modem, GPS)&lt;br /&gt;
* up to two externally accessible UARTs and/or four PWM signals for hardware hacking, robot control, debugging, etc.&lt;br /&gt;
* un-brickable design with integrated boot loader for safe code experimentation&lt;br /&gt;
* Power and hold switch useful for &amp;quot;instant on&amp;quot; and key lockout to aid in media player applications on the go&lt;br /&gt;
* Runs on the Linux operating system (2.6.x)&lt;br /&gt;
* Dimensions: 140x83.4x27.5mm&lt;br /&gt;
* Weight: 335g (with 4200mAh battery)&lt;br /&gt;
&lt;br /&gt;
==== Features ====&lt;br /&gt;
The Pandora is a mixture between a PC and a gaming console (similar to classic computers such as the Amiga). That's why it has gaming controls (Buttons, DPad and analogue nubs). It is fast enough to emulate many other systems, run a full desktop, access the internet via Firefox and play games such as Quake3. However, it is not as big as a netbook. Believe it or not, it will fit in your pocket. It's a bit bigger than the Nintendo DS. (See Applications section of this manual to see what applications your Pandora will come with.)&lt;br /&gt;
Remember that your Pandora console will get better with every application installed!&lt;br /&gt;
&lt;br /&gt;
== First Time Use ==&lt;br /&gt;
Now that you've opened the box, let's set this thing up! Place the battery inside the battery well on the back of the Pandora, making sure the contacts touch(the little silvery metal bits, it's easy). Snap on the battery cover and you're all set!&lt;br /&gt;
==== Charging ====&lt;br /&gt;
Charge your Pandora 8 hours before putting it off the wall charger. This will improve the lifetime of your battery. To charge the Pandora, insert the power cable end in the Pandora and the other end into your wall socket.&lt;br /&gt;
&lt;br /&gt;
The battery comes pre-charged at 40%, and that level might have decreased during shipping, so to be on the safe side, we recommend that you charge the Pandora before you use it. Simply plug in your wall charger into an outlet, or optionally use a mini-USB cable connected to a computer or wall adapter. For extreme silliness, plug your Pandora into an ''already charged Pandora,'' and charge it from that! But not really.&lt;br /&gt;
&lt;br /&gt;
==== First Boot ====&lt;br /&gt;
Once your Pandora is ready, turn it on. The OS will take some time to boot up for the first time (about 10 minutes, this is only for the first boot, this is normal). After it is booted, a series of settings dialogs will pop up in the shape of a &amp;quot;Boot Wizard&amp;quot; allowing you to alter your Pandora's settings to your liking.&lt;br /&gt;
&lt;br /&gt;
There are a total of 3 parts to the Boot Wizard guide:&lt;br /&gt;
===== System configuration =====&lt;br /&gt;
The first thing you will have to do is to calibrate the Pandora's touch screen. Only do this if the screen isn't calibrated already.&lt;br /&gt;
You will have the option for touchscreen calibration during the first time you will boot up your Pandora console.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;quot;Callibrating the touch screen&amp;quot; is a term used to describe the process of matching coodinates given by the touch layer with the underlying screen. A badly callibrated screen will register your push elsewhere on the screen, perhaps half a centimeter to one side. As there are sometimes slight variations in the production of the touch layer, you the user can improve the accuracy by matching the two layers manually.&lt;br /&gt;
&lt;br /&gt;
===== User setup =====&lt;br /&gt;
After that, you will have to enter your full name. This is what you will see in any user selection dialogs or when the system needs to address you, so enter whatever you are most comfortable with. Then follows your username. It is recommended to choose an all-lowercase, one-word username here, since you will have to enter this name every time you log in. Once you've entered your username, a password input dialog appears. You will have to enter the password you want to have twice here. If you don't want to have a password for your device, simply leave both fields empty. If you however decide to enter a password, something hard to guess and between 8 and 16 characters long is preferred.&lt;br /&gt;
&lt;br /&gt;
===== Network and security settings =====&lt;br /&gt;
You will now have to enter a name for your Pandora. This will be the Pandora's host name, so you have two options in this situation:&lt;br /&gt;
&lt;br /&gt;
# If you don't have a domain you want to connect to, simply enter any name here. It should not contain any spaces.&lt;br /&gt;
# If you ''do'' have a domain you want to connect to, enter a name in the form of &amp;quot;pandoraname.domainname.tld&amp;quot;. Note that you may never have a use for this.&lt;br /&gt;
&lt;br /&gt;
Then, you'll have to choose whether you want to automatically log in on your Pandora when it boots, or if you should be given the opportunity to log in as a different user, or enter your password. It is recommended to disable auto login if you want to protect your user data, but if you're often in a hurry, then you can enable auto login here.&lt;br /&gt;
&lt;br /&gt;
The final thing you will have to choose, is whether you want to use the full desktop Xfce environment or the gaming-oriented PMenu environment as your default environment in the Pandora. It is recommended to choose Xfce here if you want to gain access to the Pandora's full potential. This option can be changed later at any point.&lt;br /&gt;
&lt;br /&gt;
==== Calibrating The Touchscreen ====&lt;br /&gt;
The touchscreen in your new Pandora device isn't psychic! You have to tell it what to do, and in order to do that effectively, you need to calibrate it. Simply navigate to settings→screen→calibration wizard{{Verify credibility}} and follow the onscreen instructions. You may have to recalibrate the screen from time to time as well.&lt;br /&gt;
&lt;br /&gt;
During the first boot wizard, you will be offered the option to calibrate the touchscreen. By default it may well work okay, but the option is there. If calibration is far off, use the keyboard to selection the calibration option.&lt;br /&gt;
&lt;br /&gt;
== Basic Use ==&lt;br /&gt;
&lt;br /&gt;
===Pmenu===&lt;br /&gt;
&lt;br /&gt;
===Desktop style environment===&lt;br /&gt;
&lt;br /&gt;
====On the Desktop====&lt;br /&gt;
&lt;br /&gt;
The desktop will contain icons for numerous locations (such as each mounted SD card), as well as any auto-discovered pnd-applications located on SD cards or internal NAND.&lt;br /&gt;
&lt;br /&gt;
====In the menu====&lt;br /&gt;
On the bottom left you have your applications menu, similar to the Windows start menu. Clicking it brings up a list of all installed applications and pnd-applications in the appropriate location on your SD cards.&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
To the right may be some icons, these serve as shortcuts to commonly used applications. Next to that you have your taskbar, which as you might have guessed, lists all running applications in your current workspace. To the right of the taskbar you have your workspaces, think of these as multiple desktops. By default you have two to switch from. Applications running in one workspace will not be visible in the other, so you can effectively hide your Ms. Pacman game from your boss at work, because there's no way you're not going to go for the gold, even at work! Finally there are a few more icons that deal with TV-Out, network connectivity, etc. and some running applications may place an icon there as well. And to the right of THOSE, you have your time. Because time flies when you're using your Pandora! Badum tsh. Aaaaand to the right of that, you have a little icon that, when clicked, displays all running applications.&lt;br /&gt;
&lt;br /&gt;
Finally, I'd just like to reiterate this--EVERYTHING is customizable! We'll get to that section later, but for now, let's just check out the applications on your Pandora.&lt;br /&gt;
&lt;br /&gt;
===Buttons===&lt;br /&gt;
&lt;br /&gt;
====Xfce menu====&lt;br /&gt;
&lt;br /&gt;
The Pandora button will bring up the applications menu, letting you quickly enter a search to locate an application to run or perform operations against running applications.&lt;br /&gt;
&lt;br /&gt;
===Power Modes===&lt;br /&gt;
&lt;br /&gt;
Without switching the device entirely off, it may be placed into low power mode or regular power mode; simply pressing the power button will toggle modes.&lt;br /&gt;
&lt;br /&gt;
Consider low power mode to be akin to turning off a PDA or cellphone -- the screen is off, the CPU is clocked down and so on, but the device is still silently on, allowing for alarms to go off or it to be turned on again instantly. Regular power mode is for normal usage.&lt;br /&gt;
&lt;br /&gt;
Low power mode is probably going to be used as the normal &amp;quot;off&amp;quot; for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few weeks or longer. &lt;br /&gt;
&lt;br /&gt;
Closing the lid will turn off the display but otherwise leave the device operating - handy for audio playing; turning off the display lowers power use.&lt;br /&gt;
&lt;br /&gt;
The actual behaviour of buttons and events can be customized.&lt;br /&gt;
&lt;br /&gt;
== Basic Linux user guide ==&lt;br /&gt;
New to the wonderful world of Linux? No problem! You don't need mad terminal skills to open a web browser, but it can be nice to know what you're doing once in a while.&lt;br /&gt;
==== The structure of the file system ====&lt;br /&gt;
If you're used to the file system of e.g. MS Windows, you will find that a Linux file system is rather different from what you're used to. In this section, we will go through everything you have to know in order to feel comfortable with using the Pandora's file system.&lt;br /&gt;
===== Basic philosophy =====&lt;br /&gt;
In Windows, you have multiple file system roots, called &amp;quot;drives&amp;quot;, that are labeled with different letters, like &amp;quot;C:&amp;quot; or &amp;quot;D:&amp;quot;. In Linux, there aren't multiple root directories, but rather just one root directory, called &amp;quot;/&amp;quot;. All other directories are inside of this directory, including other drives.&lt;br /&gt;
&lt;br /&gt;
===== Common directories =====&lt;br /&gt;
Inside of the root directory (&amp;quot;/&amp;quot;) are quite a lot of other directories. Here are the most important ones:&lt;br /&gt;
* &amp;quot;/home&amp;quot; - This is where all of the files that are owned by all users are stored. Users do not generally have write-access to anything outside of this directory.&lt;br /&gt;
* &amp;quot;/home/username&amp;quot; - Here are the personal files of user &amp;quot;username&amp;quot;. In this directory, you will find a directory called &amp;quot;Documents&amp;quot;, &amp;quot;Pictures&amp;quot;, &amp;quot;Desktop&amp;quot; etc. that correspond to that users personal directories. This directory is also called &amp;quot;username&amp;quot;'s home directory, and can be abbreviated with &amp;quot;~/&amp;quot; (if you're currently logged in as username) or &amp;quot;~username/&amp;quot;.&lt;br /&gt;
* &amp;quot;/boot&amp;quot; - This is the directory where the Linux kernel is stored, and other files that are needed at boot time can be accessed. Do not touch this directory (You can't even do it if you wanted to)!&lt;br /&gt;
* &amp;quot;/bin&amp;quot;, &amp;quot;/lib&amp;quot; - System binaries and libraries are stored here. Most of the terminal commands mentioned below can be found inside of &amp;quot;/bin&amp;quot;. You should generally never have to touch this directory, either.&lt;br /&gt;
* &amp;quot;/usr&amp;quot; - Here is where you'll find programs and files installed by the user. Core applications such as the web browser, media player, and other applications that are available the first time you start your Pandora are stored here. If you decide to install anything via the &amp;quot;ipkg&amp;quot; command (covered later), this is where the files needed by those installations will end up.&lt;br /&gt;
* &amp;quot;/etc&amp;quot; - System-wide configuration. Should only be touched by power-users.&lt;br /&gt;
* &amp;quot;/media/*&amp;quot; - If you connect USB drives, SD cards or other external media, you will find that the contents of that media have been placed here.&lt;br /&gt;
&lt;br /&gt;
Don't worry if this doesn't make any sense; It was thought up by bearded engineers back in the seventies. They liked the idea that everything would be in a predictable place, but this is no longer completely the case.&lt;br /&gt;
&lt;br /&gt;
==== The File Manager ====&lt;br /&gt;
==== Killing Applications ====&lt;br /&gt;
==== Basic Terminal Commands ====&lt;br /&gt;
Note: Linux is case sensitive. This applies to filenames and directories too. &amp;quot;/home/me/stuff&amp;quot; is a different folder than &amp;quot;/home/me/STUFF&amp;quot;, you can actually have both. You can have &amp;quot;/home/me/Stuff&amp;quot; too if you like, and all three are seperately recognised directories.&lt;br /&gt;
&lt;br /&gt;
=====Navigation=====&lt;br /&gt;
In the terminal, you are always in some folder. Think of it like being in a file manager: you can see the contents of the directory you're in, you can do things with those files, or you may decide to go to some other folder and continue your work there.&lt;br /&gt;
&lt;br /&gt;
There are a few essential commands that are used to navigate around your system via the terminal:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;pwd&amp;quot; - Print the current working directory (will print e.g. &amp;quot;/home/user&amp;quot;)&lt;br /&gt;
* &amp;quot;ls&amp;quot; - List directory contents (similar to &amp;quot;Dir&amp;quot; in Dos, and the Linux command &amp;quot;dir&amp;quot; will actually emulate the DOS command if you want to!)&lt;br /&gt;
* &amp;quot;cd &amp;lt;directory name&amp;gt;&amp;quot; - Change to a different directory, eg. &amp;quot;cd music&amp;quot; or &amp;quot;cd /home/me/music&amp;quot;&lt;br /&gt;
* &amp;quot;cd ..&amp;quot; - Go up one directory level (similar to &amp;quot;cd..&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd&amp;quot; - Go back to your home directory (similar to My Documents in Windows)&lt;br /&gt;
* &amp;quot;cd -&amp;quot; - Go back to the previous directory you were in (handy if you forget)&lt;br /&gt;
&lt;br /&gt;
=====Controlling Running Apps=====&lt;br /&gt;
* &amp;quot;top&amp;quot; - View running proccesses (like the Task Manager in Windows) press &amp;quot;q&amp;quot; to quit&lt;br /&gt;
* &amp;quot;killall [program name] - Stops running process (use with care)&lt;br /&gt;
&lt;br /&gt;
=====File Manipulation=====&lt;br /&gt;
* &amp;quot;rm &amp;lt;filename&amp;gt;&amp;quot; - Delete a file, eg. &amp;quot;rm somefile.txt&amp;quot; or &amp;quot;rm /home/me/randomfiles/somefile.txt&amp;quot;&lt;br /&gt;
* &amp;quot;mv &amp;lt;original filename&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Moves a file to a new place, also used for renaming, eg. &amp;quot;mv somefile.txt somefile_backup.txt&amp;quot; will rename it, but &amp;quot;mv somefile.txt /home/me/backup/somefile.txt&amp;quot; will move it&lt;br /&gt;
* &amp;quot;cp &amp;lt;file to copy&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Copy a file, eg. &amp;quot;cp twoweeks.txt twomonths.txt&amp;quot; copies into current directory, while &amp;quot;cp twomonths.txt /home/me/ihaveadream/twoweeks.txt&amp;quot; copies to another directory.&lt;br /&gt;
* &amp;quot;mkdir &amp;lt;new directory name&amp;gt;&amp;quot; - Makes a directory&lt;br /&gt;
&lt;br /&gt;
=====Misc.=====&lt;br /&gt;
* &amp;quot;cat &amp;lt;filename&amp;gt;&amp;quot; - Prints the contents of a file, eg. &amp;quot;cat hellolo.txt&amp;quot;&lt;br /&gt;
* &amp;quot;clear&amp;quot; - Clears screen, terminal input begins at the top again&lt;br /&gt;
* &amp;quot;date&amp;quot; - Your friend, the terminal will tell you the date&lt;br /&gt;
* &amp;quot;cal [month] [year]&amp;quot; - Makes a pretty calendar, eg. &amp;quot;cal 12 2009&amp;quot; or &amp;quot;cal * 2010&amp;quot; or &amp;quot;cal 1 2010 &amp;gt; fingers_crossed.txt&amp;quot; sends output to file&lt;br /&gt;
* &amp;quot;history&amp;quot; - Gives a list of the recent commands you have run.  Running !number (e.g. !15) will rerun that numbered command in the history list&lt;br /&gt;
&lt;br /&gt;
History Search: Press CTRL-R.  As you type, BASH will try and find the command in your recent history that most closely matches what you are typing.  To get back to the prompt, press CTRL-C.&lt;br /&gt;
&lt;br /&gt;
Autocompletion: Press TAB. The terminal (also called the shell) will attempt to intelligently figure out what you're trying to type. It needs something to work with however, so try pressing TAB half way through a command or location.&lt;br /&gt;
&lt;br /&gt;
eg. &amp;quot;cd /home/me/pandora_suc&amp;quot; *TAB* will complete it as &amp;quot;cd /home/me/pandora_success&amp;quot; or with a filename &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fa&amp;quot; *TAB* will turn into &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fall_into_my_hands&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
Many applications will come preinstalled into the internal memory; these will be regular Linux applications (not packaged into pnd files, since they do not need to be redistributed to anyone.)&lt;br /&gt;
&lt;br /&gt;
Additional applications may be found as pnd-files (see below, a packaged up single file representing an entire application) or as regular Linux files (an application likely being made up of many files and possibly needing installation.)&lt;br /&gt;
&lt;br /&gt;
==== What Is Included? ====&lt;br /&gt;
* Ångström Linux: Lightweight beautiful Linux-based operating system for the Pandora.&lt;br /&gt;
* Xfce: A full featured window manager for Linux.&lt;br /&gt;
* Midori: A full features web browser, designed to be lighter and faster than a full desktop style browser.&lt;br /&gt;
* OpenOffice: Full desktop document managing. Edit, create and manage your documents on the go. (really??)&lt;br /&gt;
{{Volume needed}}&lt;br /&gt;
&lt;br /&gt;
==== Where Can I Get More Apps? ====&lt;br /&gt;
There are many ways to get more applications onto your Pandora.&lt;br /&gt;
&lt;br /&gt;
*The easiest way is to browse the [http://doesnotexistyet.com Pandora App Store], where you can download a selection of free or commerical applications. To download, navigate to an app, pay for it if you must, and hit the 'download' button. Select where you want to save it, and you're done! Because I assume it will be in .pnd format.&lt;br /&gt;
&lt;br /&gt;
*There is the good ol' [http://dl.openhandhelds.org/cgi-bin/pandora.cgi Pandora File Archive].&lt;br /&gt;
&lt;br /&gt;
*There are nice repositories, such as the [http://www.angstrom-distribution.org/repo Angstrom ARM Repository], or...&lt;br /&gt;
&lt;br /&gt;
*The Pandora includes the package manager [http://en.wikipedia.org/wiki/Ipkg ipkg].&lt;br /&gt;
&lt;br /&gt;
*Also, people may upload their apps to weird crevices in the net, so be on the lookout! (or use a search engine)&lt;br /&gt;
&lt;br /&gt;
== Introduction To .PNDs ==&lt;br /&gt;
==== What Are .PNDs? ====&lt;br /&gt;
&lt;br /&gt;
A .pnd (&amp;quot;pandora&amp;quot;) file is an application (game, word processor, emulator, whatever.) More accurately, it is a full application bundled up into a single file; think of it like a zip, with a relatively well defined internal structure.&lt;br /&gt;
&lt;br /&gt;
The pnd-file system was designed so you could use an application without the hassle of installation or uninstallation, or even having to organize it yourself if you don't want to. You just download or obtain the pnd-file, and use it. &lt;br /&gt;
&lt;br /&gt;
If you remember classic computers such as the Amiga - where you inserted a disk and then launched the applications read by Workbench (the Amiga's operating system) - then this is similar: when you insert an SD card into one of the two slots, the (Linux based) Pandora OS will scan it for your PND program files. Any program it finds will either turn up on the desktop or the application menu (just like in Windows).&lt;br /&gt;
&lt;br /&gt;
More details can be found in the &amp;quot;libpnd hub&amp;quot; part of the wiki, but that is more oriented to techies and developers.&lt;br /&gt;
&lt;br /&gt;
==== How do I run a PND-application? ====&lt;br /&gt;
&lt;br /&gt;
Put your pnd-files in your SD (see below for some suggestions where.)&lt;br /&gt;
&lt;br /&gt;
A pnd-file is usually invoked in one of the following ways&lt;br /&gt;
&lt;br /&gt;
* browse to the file using the directory browser, and click to run it. (.pnd files are file-associated to another program, pnd_run which knows how to run them.) This lets you organize pnd-files in directories of your choice on the device NAND or SD.&lt;br /&gt;
&lt;br /&gt;
* in PMenu, the applications will be shown by name; you can just select and run them from the menu&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/menu on SD, the application will be shown in the Start menu on the device; use your stylus or buttons to invoke it&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/desktop or /pandora/apps on SD, they will show up automatically on your desktop; invoke them with the stylus, your finger, or controls as you see fit&lt;br /&gt;
&lt;br /&gt;
==== Where Do .PNDs Go? ====&lt;br /&gt;
&lt;br /&gt;
Put .pnd-files into specific directories if you want them to show up in the Start menu or on your Pandora desktop, or in Pmenu. &lt;br /&gt;
&lt;br /&gt;
You can put them anywhere you like in internal NAND or SD, if you wish to organize them yourself and launch them with taps.&lt;br /&gt;
&lt;br /&gt;
/pandora/desktop -&amp;gt; pnd files show up on the desktop&lt;br /&gt;
&lt;br /&gt;
/pandora/menu -&amp;gt; show up in the Start menu (by the developers suggested categories.)&lt;br /&gt;
&lt;br /&gt;
/pandora/apps -&amp;gt; show up in the desktop, and in Pmenu&lt;br /&gt;
&lt;br /&gt;
These locations are not written in stone. The &amp;quot;libpnd&amp;quot; config files are in /etc/pandora/conf in the NAND. Generally you will never need to alter these files, but you certainly can if you wish. In theory, obliterating the files will still leave the system working, and they are easily restored. One file, /etc/pandora/conf/desktop defines the &amp;quot;search paths&amp;quot; to look for .pnd files, and where to put &amp;quot;.desktop&amp;quot; files when they are found. The searchpaths says where to find them (such as /pandora/desktop), and where to put the application link - /usr/share/applications is where the menu items are pulled from. IF you wish to put pnd files somewhere not in the searchpath, just add the directory to the search-path and you're good to go.&lt;br /&gt;
&lt;br /&gt;
==== Where does my data go? How do I make files visible to the applications? ====&lt;br /&gt;
&lt;br /&gt;
An application normally will see what is contained within the pnd-file, or your personal data created with the tool; it can of course look anywhere on the SD or device internal memory. For example a Quake port might expect to see extra level files in /quake, or give you a way of selecting a path to put files in.. or it might just expect it to be in your personal data folders, or in the pnd-file itself. Its up to the application, with suggestions in the pnd-guidelines for developers.&lt;br /&gt;
&lt;br /&gt;
The first time a pnd-application is run, an &amp;quot;app data&amp;quot; directory is created for it; anything that app data folder contains will be visible to the application as if it was in the pnd-file (and in fact, this lets you override files in the pnd-file without modifying the .pnd itself, which could be handy.) If your app creates a file &amp;quot;foo&amp;quot;, it'll show up in /pandora/appdata/appname-id as &amp;quot;foo&amp;quot;. The actual appdata folder name depends on the name used by the developer, but should generally look like application-name and some funny number afterwards. It should be easy to spot.&lt;br /&gt;
&lt;br /&gt;
ex: Quake 1 will probably put score or save data in /pandora/appdata/quake1-123/ or somesuch.&lt;br /&gt;
&lt;br /&gt;
It will always be helpful to read the description or readme file included.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make ROMs available to an emulator? =====&lt;br /&gt;
&lt;br /&gt;
For something like ROMs, hopefully a developer consensus will lead either to a canonical location, or a convention of having a directory picker or browser present, so that ROMs can be stored in SD locations of your choice; doesn't strike me as something that should be in a pnd-file, or to be pretended to be in a pnd-file with appdata tricks.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make pak-files available to Quake? =====&lt;br /&gt;
&lt;br /&gt;
For some add-ons or data needed for a game, the developer may require it to be 'in the main application path'; as mentioned above, just drop it into the appdata folder and the app will just see it.&lt;br /&gt;
&lt;br /&gt;
==== How Do I Make .PNDs? ====&lt;br /&gt;
==== More Info About .PNDs ====&lt;br /&gt;
Visit [[libpnd_hub]] for more information!&lt;br /&gt;
== Configuration ==&lt;br /&gt;
==== Updating The Firmware ====&lt;br /&gt;
&lt;br /&gt;
Given a working firmware, you might wish to patch it with official Open Pandora patches; you might also wish to just grab an application from the Angstrom repository, say. &lt;br /&gt;
&lt;br /&gt;
In both of these cases, an ipk file will be made available. (In the future, an automated system may offer to patch up your device or auto-download patches. TBD.)&lt;br /&gt;
&lt;br /&gt;
An ipk file is a compressed installable package.&lt;br /&gt;
&lt;br /&gt;
It should be easily used, but from the Terminal if you wish to manually apply an ipk to patch the firmware, install or update an Angstrom application, it is simple: '''opkg install foo.ipk'''&lt;br /&gt;
&lt;br /&gt;
==== Replacing the Firmware ====&lt;br /&gt;
&lt;br /&gt;
Rather than patch the firmware, the firmware may be replaced wholesale with a freshly downloaded firmware.&lt;br /&gt;
&lt;br /&gt;
==== Booting a Firmware from SD ====&lt;br /&gt;
&lt;br /&gt;
The hardware is capable of booting entirely from SD; if the device is bricked or otherwise has a blank NAND, this could be an option. furthermore you're able to try out alternative operating systems without needing to reinstall your primary operating system.&lt;br /&gt;
&lt;br /&gt;
Steps include:&lt;br /&gt;
&lt;br /&gt;
* Preparing the SD card(s)&lt;br /&gt;
* Setting up the firmware on the SD card&lt;br /&gt;
&lt;br /&gt;
=====Preparing the SD card=====&lt;br /&gt;
&lt;br /&gt;
There are two main approaches:&lt;br /&gt;
&lt;br /&gt;
* Setting up the firmware on on SD card (meaning you need two partitions - a boot partition, and a firmware partition), and&lt;br /&gt;
* Setting things up across two SD cards - meaning you boot from one SD card, and have the firmware on the other.&lt;br /&gt;
&lt;br /&gt;
Operating from one SD card provides you the option of still being able to use the other; operating across two cards provides you he option to have a regular boot-SD, and flip between multiple other SDs for the actual firmware, should you wish to cycle between many operating systems (say.)&lt;br /&gt;
&lt;br /&gt;
The boot partition generally must be FAT32, and then the kernel, MLO and other files need to be unpacked upon it.&lt;br /&gt;
&lt;br /&gt;
The firmware partition must be either ext2fs or ext3fs; under Linux, such a partition can be easily created:&lt;br /&gt;
&lt;br /&gt;
'''mkfs.ext2 -L LABELNAME /dev/mmcblk0p2'''&lt;br /&gt;
- assuming LABELNAME for the partition&lt;br /&gt;
- assuming /dev/mmcblk0p2 for your SD device; you'd better check this carefully ;)&lt;br /&gt;
&lt;br /&gt;
==== Setting Up WiFi ====&lt;br /&gt;
==== Setting Up Blutooth ====&lt;br /&gt;
==== Adjusting Brightness/Contrast ====&lt;br /&gt;
==== Changing Your Theme ====&lt;br /&gt;
== Oops! I Borked My Pandora! ==&lt;br /&gt;
Fear not, young netizen! Your Pandora was designed to be unbrickable, so unless you used the ancient art of alchemy to physically turn your Pandora into a brick (or you just broke the hardware inside), you should be okay!&lt;br /&gt;
==== Restore The Original Firmware ====&lt;br /&gt;
==== Boot From SD or USB ====&lt;br /&gt;
== Pandora FAQ ==&lt;br /&gt;
Silly goose, go to the [[FAQ]] page for more detailed information.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=User_manual&amp;diff=1942</id>
		<title>User manual</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=User_manual&amp;diff=1942"/>
		<updated>2010-01-06T20:49:25Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Common directories */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border-top:1px solid gray; border-bottom:1px solid gray; padding-top:5px; padding-bottom:5px; margin-bottom:20px&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;''This page is an unofficial community project, and OpenPandora Ltd. is not responsible for its content.''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PandoraFront.jpg|Right|thumb|360px|Pandora FTW!]]&lt;br /&gt;
So your Pandora just arrived after being in the post for two months. Jolly good! But now that it's actually here, what on earth do you do with it? '''Don't panic!''' Let's take a look at what's included in the box(so you don't miss anything!) and then hop on over to setting it up for that extended Ms. Pacman marathon I know you've been waiting for!&lt;br /&gt;
&lt;br /&gt;
Also, don't forget to hit up [http://www.gp32x.com/board/index.php?/forum/61-pandora/ GP32X] for questions/info/apps/fun/discussion!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Safety Information ==&lt;br /&gt;
Warning: Choking Hazard, do not let children under the age of 3 come close to your Pandora console.&lt;br /&gt;
The Pandora Contains small parts that can be eaten by those children.&lt;br /&gt;
&lt;br /&gt;
The battery of Pandora must be charged by the charger included with the Pandora(see package contents)&lt;br /&gt;
and we at OpenPandora Ltd. cannot be responsible for people using third party chargers. Please be aware that some third party chargers compatible with the Pandora have a fake CE logo and are highly dangerous (they will burst into flames).&lt;br /&gt;
&lt;br /&gt;
Keep the Pandora in normal temperatures under 140F/60C (Recommended temperatures are in the range between -10C and 40C){{Citation needed}}. The battery is standard Lithium Polymer battery. Do not keep near fire or water. Do not disassemble, destroy or damage the battery, or it may explode! Do not short circuit external contacts! Dispose of it properly, please. &lt;br /&gt;
&lt;br /&gt;
All third party modifications and hardware/software can damage your Pandora, OpenPandora Ltd cannot be responsible for damage caused by this. Trusted software can be recongised by a OP-member in the Pandora Appstore. See the “OP-Team Trusted” image in the app store to see if the software application can be trusted{{Citation needed}}.&lt;br /&gt;
&lt;br /&gt;
The Pandora has a 4.3-inch Touchscreen. You can touch the screen to trigger an action. Although this is a touch screen, you cannot punch it. Always touch the screen gently – this will be more then enough to trigger the action you want.&lt;br /&gt;
&lt;br /&gt;
The Pandora has an protective design, making it hard to break. Of course, you should never drop your Pandora, wash it, or try anything that can harm your Pandora. This will void your warranty.&lt;br /&gt;
&lt;br /&gt;
== Warranty Information ==&lt;br /&gt;
By law there is a one year warranty, and the device will be replaced/repaired if it is faulty. LCDs with noticeable dead pixels will also be replaced (Note: Pixels are small squares aligned in a grid to make up the image on your screen. A &amp;quot;Dead Pixel&amp;quot; is one that doesn't work anymore and remains black or any other static color).&lt;br /&gt;
&lt;br /&gt;
== Box Contents ==&lt;br /&gt;
When you first open Pandora's box, a slew of demons and raging emotions may forcibly leave the box. This is normal. After that, you may or may not be surprised to find a:&lt;br /&gt;
*Pandora console&lt;br /&gt;
*Stylus (located in stylus slot on the side of the Pandora)&lt;br /&gt;
*Battery&lt;br /&gt;
*DC Wall Charger&lt;br /&gt;
*TV-Out Cable (ONLY if you ordered it separately)&lt;br /&gt;
*Carrying Case (ONLY if you ordered it separately)&lt;br /&gt;
*Extra Battery (ONLY if you ordered it separately)&lt;br /&gt;
After you take those things out, you may find a sliver of Hope left over. It's best to keep it, as you never know when you could use some Hope.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
==== Highlights ====&lt;br /&gt;
{{citation needed}}&lt;br /&gt;
* ARM® Cortex™-A8 600Mhz+ CPU running Linux*&lt;br /&gt;
* 430-MHz TMS320C64x+™ DSP Core&lt;br /&gt;
* PowerVR SGX OpenGL 2.0 ES compliant 3D hardware&lt;br /&gt;
* 800x480 4.3&amp;quot; 16.7 million colours touchscreen LCD&lt;br /&gt;
* Wifi 802.11b/g, Bluetooth &amp;amp; High Speed USB 2.0 Host&lt;br /&gt;
* Dual SDHC card slots &amp;amp; SVideo TV output&lt;br /&gt;
* Dual Analogue and Digital gaming controls&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* Around 10+ Hours battery life**&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;The 600Mhz+ can be higher or lower. This can be controlled by software designed for the device.&amp;lt;/small&amp;gt;&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;Is affected by use. (example turn bluetooth on or off during play time)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Advanced Specifications ====&lt;br /&gt;
* Texas Instruments OMAP3530 processor at 600MHz (officially)&lt;br /&gt;
* 256MB DDR-333 SDRAM&lt;br /&gt;
* 512MB NAND FLASH memory&lt;br /&gt;
* IVA2+ audio and video processor using TI's DaVinci™ technology (430MHz C64x DSP)&lt;br /&gt;
* ARM® Cortex™-A8 superscalar microprocessor core&lt;br /&gt;
* PowerVR SGX530 (110MHz officially) OpenGL ES 2.0 compliant 3D hardware&lt;br /&gt;
* integrated Wifi 802.11b/g (up to 18dBm output)&lt;br /&gt;
* integrated Bluetooth 2.0 + EDR (3Mbps) (Class 2, + 4dBm)&lt;br /&gt;
* 800x480 resolution LTPS LCD with resistive touch screen, 4.3&amp;quot; widescreen, 16.7 million colors (300 cd/m2 brightness, 450:1 contrast ratio)&lt;br /&gt;
* Dual analog controllers&lt;br /&gt;
* Full gamepad controls plus shoulder buttons&lt;br /&gt;
* Dual SDHC card slots (up to 64GB of storage currently)&lt;br /&gt;
* headphone output up to 150mW/channel into 16 ohms, 99dB SNR (up to 24 bit/48KHz)&lt;br /&gt;
* TV output (composite and S-Video)&lt;br /&gt;
* Internal microphone plus ability to connect external microphone through headset&lt;br /&gt;
* Stereo line level inputs and outputs&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* USB 2.0 OTG port (1.5/12/480Mbps) with capability to charge device&lt;br /&gt;
* USB 2.0 HOST port (480Mbps) capable of providing the full 500mA to attached devices (examples include USB memory, keyboard, mouse, 3G modem, GPS)&lt;br /&gt;
* up to two externally accessible UARTs and/or four PWM signals for hardware hacking, robot control, debugging, etc.&lt;br /&gt;
* un-brickable design with integrated boot loader for safe code experimentation&lt;br /&gt;
* Power and hold switch useful for &amp;quot;instant on&amp;quot; and key lockout to aid in media player applications on the go&lt;br /&gt;
* Runs on the Linux operating system (2.6.x)&lt;br /&gt;
* Dimensions: 140x83.4x27.5mm&lt;br /&gt;
* Weight: 335g (with 4200mAh battery)&lt;br /&gt;
&lt;br /&gt;
==== Features ====&lt;br /&gt;
The Pandora is a mixture between a PC and a gaming console (similar to classic computers such as the Amiga). That's why it has gaming controls (Buttons, DPad and analogue nubs). It is fast enough to emulate many other systems, run a full desktop, access the internet via Firefox and play games such as Quake3. However, it is not as big as a netbook. Believe it or not, it will fit in your pocket. It's a bit bigger than the Nintendo DS. (See Applications section of this manual to see what applications your Pandora will come with.)&lt;br /&gt;
Remember that your Pandora console will get better with every application installed!&lt;br /&gt;
&lt;br /&gt;
== First Time Use ==&lt;br /&gt;
Now that you've opened the box, let's set this thing up! Place the battery inside the battery well on the back of the Pandora, making sure the contacts touch(the little silvery metal bits, it's easy). Snap on the battery cover and you're all set!&lt;br /&gt;
==== Charging ====&lt;br /&gt;
Charge your Pandora 8 hours before putting it off the wall charger. This will improve the lifetime of your battery. To charge the Pandora, insert the power cable end in the Pandora and the other end into your wall socket.&lt;br /&gt;
&lt;br /&gt;
The battery comes pre-charged at 40%, and that level might have decreased during shipping, so to be on the safe side, we recommend that you charge the Pandora before you use it. Simply plug in your wall charger into an outlet, or optionally use a mini-USB cable connected to a computer or wall adapter. For extreme silliness, plug your Pandora into an ''already charged Pandora,'' and charge it from that! But not really.&lt;br /&gt;
&lt;br /&gt;
==== First Boot ====&lt;br /&gt;
Once your Pandora is ready, turn it on. The OS will take some time to boot up for the first time (about 10 minutes, this is only for the first boot, this is normal). After it is booted, a series of settings dialogs will pop up in the shape of a &amp;quot;Boot Wizard&amp;quot; allowing you to alter your Pandora's settings to your liking.&lt;br /&gt;
&lt;br /&gt;
There are a total of 3 parts to the Boot Wizard guide:&lt;br /&gt;
===== System configuration =====&lt;br /&gt;
The first thing you will have to do is to calibrate the Pandora's touch screen. Only do this if the screen isn't calibrated already.&lt;br /&gt;
You will have the option for touchscreen calibration during the first time you will boot up your Pandora console.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;quot;Callibrating the touch screen&amp;quot; is a term used to describe the process of matching coodinates given by the touch layer with the underlying screen. A badly callibrated screen will register your push elsewhere on the screen, perhaps half a centimeter to one side. As there are sometimes slight variations in the production of the touch layer, you the user can improve the accuracy by matching the two layers manually.&lt;br /&gt;
&lt;br /&gt;
===== User setup =====&lt;br /&gt;
After that, you will have to enter your full name. This is what you will see in any user selection dialogs or when the system needs to address you, so enter whatever you are most comfortable with. Then follows your username. It is recommended to choose an all-lowercase, one-word username here, since you will have to enter this name every time you log in. Once you've entered your username, a password input dialog appears. You will have to enter the password you want to have twice here. If you don't want to have a password for your device, simply leave both fields empty. If you however decide to enter a password, something hard to guess and between 8 and 16 characters long is preferred.&lt;br /&gt;
&lt;br /&gt;
===== Network and security settings =====&lt;br /&gt;
You will now have to enter a name for your Pandora. This will be the Pandora's host name, so you have two options in this situation:&lt;br /&gt;
&lt;br /&gt;
# If you don't have a domain you want to connect to, simply enter any name here. It should not contain any spaces.&lt;br /&gt;
# If you ''do'' have a domain you want to connect to, enter a name in the form of &amp;quot;pandoraname.domainname.tld&amp;quot;. Note that you may never have a use for this.&lt;br /&gt;
&lt;br /&gt;
Then, you'll have to choose whether you want to automatically log in on your Pandora when it boots, or if you should be given the opportunity to log in as a different user, or enter your password. It is recommended to disable auto login if you want to protect your user data, but if you're often in a hurry, then you can enable auto login here.&lt;br /&gt;
&lt;br /&gt;
The final thing you will have to choose, is whether you want to use the full desktop Xfce environment or the gaming-oriented PMenu environment as your default environment in the Pandora. It is recommended to choose Xfce here if you want to gain access to the Pandora's full potential. This option can be changed later at any point.&lt;br /&gt;
&lt;br /&gt;
==== Calibrating The Touchscreen ====&lt;br /&gt;
The touchscreen in your new Pandora device isn't psychic! You have to tell it what to do, and in order to do that effectively, you need to calibrate it. Simply navigate to settings→screen→calibration wizard{{Verify credibility}} and follow the onscreen instructions. You may have to recalibrate the screen from time to time as well.&lt;br /&gt;
&lt;br /&gt;
During the first boot wizard, you will be offered the option to calibrate the touchscreen. By default it may well work okay, but the option is there. If calibration is far off, use the keyboard to selection the calibration option.&lt;br /&gt;
&lt;br /&gt;
== Basic Use ==&lt;br /&gt;
&lt;br /&gt;
===Pmenu===&lt;br /&gt;
&lt;br /&gt;
===Desktop style environment===&lt;br /&gt;
&lt;br /&gt;
====On the Desktop====&lt;br /&gt;
&lt;br /&gt;
The desktop will contain icons for numerous locations (such as each mounted SD card), as well as any auto-discovered pnd-applications located on SD cards or internal NAND.&lt;br /&gt;
&lt;br /&gt;
====In the menu====&lt;br /&gt;
On the bottom left you have your applications menu, similar to the Windows start menu. Clicking it brings up a list of all installed applications and pnd-applications in the appropriate location on your SD cards.&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
To the right may be some icons, these serve as shortcuts to commonly used applications. Next to that you have your taskbar, which as you might have guessed, lists all running applications in your current workspace. To the right of the taskbar you have your workspaces, think of these as multiple desktops. By default you have two to switch from. Applications running in one workspace will not be visible in the other, so you can effectively hide your Ms. Pacman game from your boss at work, because there's no way you're not going to go for the gold, even at work! Finally there are a few more icons that deal with TV-Out, network connectivity, etc. and some running applications may place an icon there as well. And to the right of THOSE, you have your time. Because time flies when you're using your Pandora! Badum tsh. Aaaaand to the right of that, you have a little icon that, when clicked, displays all running applications.&lt;br /&gt;
&lt;br /&gt;
Finally, I'd just like to reiterate this--EVERYTHING is customizable! We'll get to that section later, but for now, let's just check out the applications on your Pandora.&lt;br /&gt;
&lt;br /&gt;
===Buttons===&lt;br /&gt;
&lt;br /&gt;
====Xfce menu====&lt;br /&gt;
&lt;br /&gt;
The Pandora button will bring up the applications menu, letting you quickly enter a search to locate an application to run or perform operations against running applications.&lt;br /&gt;
&lt;br /&gt;
===Power Modes===&lt;br /&gt;
&lt;br /&gt;
Without switching the device entirely off, it may be placed into low power mode or regular power mode; simply pressing the power button will toggle modes.&lt;br /&gt;
&lt;br /&gt;
Consider low power mode to be akin to turning off a PDA or cellphone -- the screen is off, the CPU is clocked down and so on, but the device is still silently on, allowing for alarms to go off or it to be turned on again instantly. Regular power mode is for normal usage.&lt;br /&gt;
&lt;br /&gt;
Low power mode is probably going to be used as the normal &amp;quot;off&amp;quot; for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few weeks or longer. &lt;br /&gt;
&lt;br /&gt;
Closing the lid will turn off the display but otherwise leave the device operating - handy for audio playing; turning off the display lowers power use.&lt;br /&gt;
&lt;br /&gt;
The actual behaviour of buttons and events can be customized.&lt;br /&gt;
&lt;br /&gt;
== Basic Linux user guide ==&lt;br /&gt;
New to the wonderful world of Linux? No problem! You don't need mad terminal skills to open a web browser, but it can be nice to know what you're doing once in a while.&lt;br /&gt;
==== The structure of the file system ====&lt;br /&gt;
If you're used to the file system of e.g. MS Windows, you will find that a Linux file system is rather different from what you're used to. In this section, we will go through everything you have to know in order to feel comfortable with using the Pandora's file system.&lt;br /&gt;
===== Basic philosophy =====&lt;br /&gt;
In Windows, you have multiple file system roots, called &amp;quot;drives&amp;quot;, that are labeled with different letters, like &amp;quot;C:&amp;quot; or &amp;quot;D:&amp;quot;. In Linux, there aren't multiple root directories, but rather just one root directory, called &amp;quot;/&amp;quot;. All other directories are inside of this directory, including other drives.&lt;br /&gt;
&lt;br /&gt;
===== Common directories =====&lt;br /&gt;
Inside of the root directory (&amp;quot;/&amp;quot;) are quite a lot of other directories. Here are the most important ones:&lt;br /&gt;
* &amp;quot;/home&amp;quot; - This is where all of the files that are owned by all users are stored. Users do not generally have write-access to anything outside of this directory.&lt;br /&gt;
* &amp;quot;/home/username&amp;quot; - Here are the personal files of user &amp;quot;username&amp;quot;. In this directory, you will find a directory called &amp;quot;Documents&amp;quot;, &amp;quot;Pictures&amp;quot;, &amp;quot;Desktop&amp;quot; etc. that correspond to that users personal directories. This directory is also called &amp;quot;username&amp;quot;'s home directory, and can be abbreviated with &amp;quot;~/&amp;quot; (if you're currently logged in as username) or &amp;quot;~username/&amp;quot;.&lt;br /&gt;
* &amp;quot;/boot&amp;quot; - This is the directory where the Linux kernel is stored, and other files that are needed at boot time can be accessed. Do not touch this directory (You can't even do it if you wanted to)!&lt;br /&gt;
* &amp;quot;/bin&amp;quot;, &amp;quot;/lib&amp;quot; - System binaries and libraries are stored here. Most of the terminal commands mentioned below can be found inside of &amp;quot;/bin&amp;quot;. You should generally never have to touch this directory, either.&lt;br /&gt;
* &amp;quot;/usr&amp;quot; - Here is where you'll find programs and files installed by the user. Core applications such as the web browser, media player, and other applications that are available the first time you start your Pandora are stored here. If you decide to install anything via the &amp;quot;ipkg&amp;quot; command (covered later), this is where the files needed by those installations will end up.&lt;br /&gt;
* &amp;quot;/etc&amp;quot; - System-wide configuration. Should only be touched by power-users.&lt;br /&gt;
* &amp;quot;/media/*&amp;quot; - If you connect USB drives, SD cards or other external media, you will find that the contents of that media have been placed here.&lt;br /&gt;
&lt;br /&gt;
Don't worry if this doesn't make any sense; It was thought up by bearded engineers back in the seventies. They liked the idea that everything would be in a predictable place, but this is no longer completely the case.&lt;br /&gt;
&lt;br /&gt;
==== The File Manager ====&lt;br /&gt;
==== Killing Applications ====&lt;br /&gt;
==== Basic Terminal Commands ====&lt;br /&gt;
Note: Linux is case sensitive. This applies to filenames and directories too. &amp;quot;/home/me/stuff&amp;quot; is a different folder than &amp;quot;/home/me/STUFF&amp;quot;, you can actually have both. You can have &amp;quot;/home/me/Stuff&amp;quot; too if you like, and all three are seperately recognised directories.&lt;br /&gt;
&lt;br /&gt;
=====Navigation=====&lt;br /&gt;
* &amp;quot;ls&amp;quot; - List directory contents (similar to &amp;quot;Dir&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd &amp;lt;directory name&amp;gt;&amp;quot; - Change to a different directory, eg. &amp;quot;cd music&amp;quot; or &amp;quot;cd /home/me/music&amp;quot;&lt;br /&gt;
* &amp;quot;cd ..&amp;quot; - Go up one directory level (similar to &amp;quot;cd..&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd&amp;quot; - Go back to your home directory (similar to My Documents in Windows)&lt;br /&gt;
* &amp;quot;cd -&amp;quot; - Go back to the previous directory you were in (handy if you forget)&lt;br /&gt;
&lt;br /&gt;
=====Controlling Running Apps=====&lt;br /&gt;
* &amp;quot;top&amp;quot; - View running proccesses (like the Task Manager in Windows) press &amp;quot;q&amp;quot; to quit&lt;br /&gt;
* &amp;quot;killall [program name] - Stops running process (use with care)&lt;br /&gt;
&lt;br /&gt;
=====File Manipulation=====&lt;br /&gt;
* &amp;quot;rm &amp;lt;filename&amp;gt;&amp;quot; - Delete a file, eg. &amp;quot;rm somefile.txt&amp;quot; or &amp;quot;rm /home/me/randomfiles/somefile.txt&amp;quot;&lt;br /&gt;
* &amp;quot;mv &amp;lt;original filename&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Moves a file to a new place, also used for renaming, eg. &amp;quot;mv somefile.txt somefile_backup.txt&amp;quot; will rename it, but &amp;quot;mv somefile.txt /home/me/backup/somefile.txt&amp;quot; will move it&lt;br /&gt;
* &amp;quot;cp &amp;lt;file to copy&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Copy a file, eg. &amp;quot;cp twoweeks.txt twomonths.txt&amp;quot; copies into current directory, while &amp;quot;cp twomonths.txt /home/me/ihaveadream/twoweeks.txt&amp;quot; copies to another directory.&lt;br /&gt;
* &amp;quot;mkdir &amp;lt;new directory name&amp;gt;&amp;quot; - Makes a directory&lt;br /&gt;
&lt;br /&gt;
=====Misc.=====&lt;br /&gt;
* &amp;quot;cat &amp;lt;filename&amp;gt;&amp;quot; - Prints the contents of a file, eg. &amp;quot;cat hellolo.txt&amp;quot;&lt;br /&gt;
* &amp;quot;clear&amp;quot; - Clears screen, terminal input begins at the top again&lt;br /&gt;
* &amp;quot;date&amp;quot; - Your friend, the terminal will tell you the date&lt;br /&gt;
* &amp;quot;cal [month] [year]&amp;quot; - Makes a pretty calendar, eg. &amp;quot;cal 12 2009&amp;quot; or &amp;quot;cal * 2010&amp;quot; or &amp;quot;cal 1 2010 &amp;gt; fingers_crossed.txt&amp;quot; sends output to file&lt;br /&gt;
* &amp;quot;history&amp;quot; - Gives a list of the recent commands you have run.  Running !number (e.g. !15) will rerun that numbered command in the history list&lt;br /&gt;
&lt;br /&gt;
History Search: Press CTRL-R.  As you type, BASH will try and find the command in your recent history that most closely matches what you are typing.  To get back to the prompt, press CTRL-C.&lt;br /&gt;
&lt;br /&gt;
Autocompletion: Press TAB. The terminal (also called the shell) will attempt to intelligently figure out what you're trying to type. It needs something to work with however, so try pressing TAB half way through a command or location.&lt;br /&gt;
&lt;br /&gt;
eg. &amp;quot;cd /home/me/pandora_suc&amp;quot; *TAB* will complete it as &amp;quot;cd /home/me/pandora_success&amp;quot; or with a filename &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fa&amp;quot; *TAB* will turn into &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fall_into_my_hands&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
Many applications will come preinstalled into the internal memory; these will be regular Linux applications (not packaged into pnd files, since they do not need to be redistributed to anyone.)&lt;br /&gt;
&lt;br /&gt;
Additional applications may be found as pnd-files (see below, a packaged up single file representing an entire application) or as regular Linux files (an application likely being made up of many files and possibly needing installation.)&lt;br /&gt;
&lt;br /&gt;
==== What Is Included? ====&lt;br /&gt;
* Ångström Linux: Lightweight beautiful Linux-based operating system for the Pandora.&lt;br /&gt;
* Xfce: A full featured window manager for Linux.&lt;br /&gt;
* Midori: A full features web browser, designed to be lighter and faster than a full desktop style browser.&lt;br /&gt;
* OpenOffice: Full desktop document managing. Edit, create and manage your documents on the go. (really??)&lt;br /&gt;
{{Volume needed}}&lt;br /&gt;
&lt;br /&gt;
==== Where Can I Get More Apps? ====&lt;br /&gt;
There are many ways to get more applications onto your Pandora.&lt;br /&gt;
&lt;br /&gt;
*The easiest way is to browse the [http://doesnotexistyet.com Pandora App Store], where you can download a selection of free or commerical applications. To download, navigate to an app, pay for it if you must, and hit the 'download' button. Select where you want to save it, and you're done! Because I assume it will be in .pnd format.&lt;br /&gt;
&lt;br /&gt;
*There is the good ol' [http://dl.openhandhelds.org/cgi-bin/pandora.cgi Pandora File Archive].&lt;br /&gt;
&lt;br /&gt;
*There are nice repositories, such as the [http://www.angstrom-distribution.org/repo Angstrom ARM Repository], or...&lt;br /&gt;
&lt;br /&gt;
*The Pandora includes the package manager [http://en.wikipedia.org/wiki/Ipkg ipkg].&lt;br /&gt;
&lt;br /&gt;
*Also, people may upload their apps to weird crevices in the net, so be on the lookout! (or use a search engine)&lt;br /&gt;
&lt;br /&gt;
== Introduction To .PNDs ==&lt;br /&gt;
==== What Are .PNDs? ====&lt;br /&gt;
&lt;br /&gt;
A .pnd (&amp;quot;pandora&amp;quot;) file is an application (game, word processor, emulator, whatever.) More accurately, it is a full application bundled up into a single file; think of it like a zip, with a relatively well defined internal structure.&lt;br /&gt;
&lt;br /&gt;
The pnd-file system was designed so you could use an application without the hassle of installation or uninstallation, or even having to organize it yourself if you don't want to. You just download or obtain the pnd-file, and use it. &lt;br /&gt;
&lt;br /&gt;
If you remember classic computers such as the Amiga - where you inserted a disk and then launched the applications read by Workbench (the Amiga's operating system) - then this is similar: when you insert an SD card into one of the two slots, the (Linux based) Pandora OS will scan it for your PND program files. Any program it finds will either turn up on the desktop or the application menu (just like in Windows).&lt;br /&gt;
&lt;br /&gt;
More details can be found in the &amp;quot;libpnd hub&amp;quot; part of the wiki, but that is more oriented to techies and developers.&lt;br /&gt;
&lt;br /&gt;
==== How do I run a PND-application? ====&lt;br /&gt;
&lt;br /&gt;
Put your pnd-files in your SD (see below for some suggestions where.)&lt;br /&gt;
&lt;br /&gt;
A pnd-file is usually invoked in one of the following ways&lt;br /&gt;
&lt;br /&gt;
* browse to the file using the directory browser, and click to run it. (.pnd files are file-associated to another program, pnd_run which knows how to run them.) This lets you organize pnd-files in directories of your choice on the device NAND or SD.&lt;br /&gt;
&lt;br /&gt;
* in PMenu, the applications will be shown by name; you can just select and run them from the menu&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/menu on SD, the application will be shown in the Start menu on the device; use your stylus or buttons to invoke it&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/desktop or /pandora/apps on SD, they will show up automatically on your desktop; invoke them with the stylus, your finger, or controls as you see fit&lt;br /&gt;
&lt;br /&gt;
==== Where Do .PNDs Go? ====&lt;br /&gt;
&lt;br /&gt;
Put .pnd-files into specific directories if you want them to show up in the Start menu or on your Pandora desktop, or in Pmenu. &lt;br /&gt;
&lt;br /&gt;
You can put them anywhere you like in internal NAND or SD, if you wish to organize them yourself and launch them with taps.&lt;br /&gt;
&lt;br /&gt;
/pandora/desktop -&amp;gt; pnd files show up on the desktop&lt;br /&gt;
&lt;br /&gt;
/pandora/menu -&amp;gt; show up in the Start menu (by the developers suggested categories.)&lt;br /&gt;
&lt;br /&gt;
/pandora/apps -&amp;gt; show up in the desktop, and in Pmenu&lt;br /&gt;
&lt;br /&gt;
These locations are not written in stone. The &amp;quot;libpnd&amp;quot; config files are in /etc/pandora/conf in the NAND. Generally you will never need to alter these files, but you certainly can if you wish. In theory, obliterating the files will still leave the system working, and they are easily restored. One file, /etc/pandora/conf/desktop defines the &amp;quot;search paths&amp;quot; to look for .pnd files, and where to put &amp;quot;.desktop&amp;quot; files when they are found. The searchpaths says where to find them (such as /pandora/desktop), and where to put the application link - /usr/share/applications is where the menu items are pulled from. IF you wish to put pnd files somewhere not in the searchpath, just add the directory to the search-path and you're good to go.&lt;br /&gt;
&lt;br /&gt;
==== Where does my data go? How do I make files visible to the applications? ====&lt;br /&gt;
&lt;br /&gt;
An application normally will see what is contained within the pnd-file, or your personal data created with the tool; it can of course look anywhere on the SD or device internal memory. For example a Quake port might expect to see extra level files in /quake, or give you a way of selecting a path to put files in.. or it might just expect it to be in your personal data folders, or in the pnd-file itself. Its up to the application, with suggestions in the pnd-guidelines for developers.&lt;br /&gt;
&lt;br /&gt;
The first time a pnd-application is run, an &amp;quot;app data&amp;quot; directory is created for it; anything that app data folder contains will be visible to the application as if it was in the pnd-file (and in fact, this lets you override files in the pnd-file without modifying the .pnd itself, which could be handy.) If your app creates a file &amp;quot;foo&amp;quot;, it'll show up in /pandora/appdata/appname-id as &amp;quot;foo&amp;quot;. The actual appdata folder name depends on the name used by the developer, but should generally look like application-name and some funny number afterwards. It should be easy to spot.&lt;br /&gt;
&lt;br /&gt;
ex: Quake 1 will probably put score or save data in /pandora/appdata/quake1-123/ or somesuch.&lt;br /&gt;
&lt;br /&gt;
It will always be helpful to read the description or readme file included.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make ROMs available to an emulator? =====&lt;br /&gt;
&lt;br /&gt;
For something like ROMs, hopefully a developer consensus will lead either to a canonical location, or a convention of having a directory picker or browser present, so that ROMs can be stored in SD locations of your choice; doesn't strike me as something that should be in a pnd-file, or to be pretended to be in a pnd-file with appdata tricks.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make pak-files available to Quake? =====&lt;br /&gt;
&lt;br /&gt;
For some add-ons or data needed for a game, the developer may require it to be 'in the main application path'; as mentioned above, just drop it into the appdata folder and the app will just see it.&lt;br /&gt;
&lt;br /&gt;
==== How Do I Make .PNDs? ====&lt;br /&gt;
==== More Info About .PNDs ====&lt;br /&gt;
Visit [[libpnd_hub]] for more information!&lt;br /&gt;
== Configuration ==&lt;br /&gt;
==== Updating The Firmware ====&lt;br /&gt;
&lt;br /&gt;
Given a working firmware, you might wish to patch it with official Open Pandora patches; you might also wish to just grab an application from the Angstrom repository, say. &lt;br /&gt;
&lt;br /&gt;
In both of these cases, an ipk file will be made available. (In the future, an automated system may offer to patch up your device or auto-download patches. TBD.)&lt;br /&gt;
&lt;br /&gt;
An ipk file is a compressed installable package.&lt;br /&gt;
&lt;br /&gt;
It should be easily used, but from the Terminal if you wish to manually apply an ipk to patch the firmware, install or update an Angstrom application, it is simple: '''opkg install foo.ipk'''&lt;br /&gt;
&lt;br /&gt;
==== Replacing the Firmware ====&lt;br /&gt;
&lt;br /&gt;
Rather than patch the firmware, the firmware may be replaced wholesale with a freshly downloaded firmware.&lt;br /&gt;
&lt;br /&gt;
==== Booting a Firmware from SD ====&lt;br /&gt;
&lt;br /&gt;
The hardware is capable of booting entirely from SD; if the device is bricked or otherwise has a blank NAND, this could be an option. furthermore you're able to try out alternative operating systems without needing to reinstall your primary operating system.&lt;br /&gt;
&lt;br /&gt;
Steps include:&lt;br /&gt;
&lt;br /&gt;
* Preparing the SD card(s)&lt;br /&gt;
* Setting up the firmware on the SD card&lt;br /&gt;
&lt;br /&gt;
=====Preparing the SD card=====&lt;br /&gt;
&lt;br /&gt;
There are two main approaches:&lt;br /&gt;
&lt;br /&gt;
* Setting up the firmware on on SD card (meaning you need two partitions - a boot partition, and a firmware partition), and&lt;br /&gt;
* Setting things up across two SD cards - meaning you boot from one SD card, and have the firmware on the other.&lt;br /&gt;
&lt;br /&gt;
Operating from one SD card provides you the option of still being able to use the other; operating across two cards provides you he option to have a regular boot-SD, and flip between multiple other SDs for the actual firmware, should you wish to cycle between many operating systems (say.)&lt;br /&gt;
&lt;br /&gt;
The boot partition generally must be FAT32, and then the kernel, MLO and other files need to be unpacked upon it.&lt;br /&gt;
&lt;br /&gt;
The firmware partition must be either ext2fs or ext3fs; under Linux, such a partition can be easily created:&lt;br /&gt;
&lt;br /&gt;
'''mkfs.ext2 -L LABELNAME /dev/mmcblk0p2'''&lt;br /&gt;
- assuming LABELNAME for the partition&lt;br /&gt;
- assuming /dev/mmcblk0p2 for your SD device; you'd better check this carefully ;)&lt;br /&gt;
&lt;br /&gt;
==== Setting Up WiFi ====&lt;br /&gt;
==== Setting Up Blutooth ====&lt;br /&gt;
==== Adjusting Brightness/Contrast ====&lt;br /&gt;
==== Changing Your Theme ====&lt;br /&gt;
== Oops! I Borked My Pandora! ==&lt;br /&gt;
Fear not, young netizen! Your Pandora was designed to be unbrickable, so unless you used the ancient art of alchemy to physically turn your Pandora into a brick (or you just broke the hardware inside), you should be okay!&lt;br /&gt;
==== Restore The Original Firmware ====&lt;br /&gt;
==== Boot From SD or USB ====&lt;br /&gt;
== Pandora FAQ ==&lt;br /&gt;
Silly goose, go to the [[FAQ]] page for more detailed information.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=User_manual&amp;diff=1941</id>
		<title>User manual</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=User_manual&amp;diff=1941"/>
		<updated>2010-01-06T20:39:02Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Warranty Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border-top:1px solid gray; border-bottom:1px solid gray; padding-top:5px; padding-bottom:5px; margin-bottom:20px&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;''This page is an unofficial community project, and OpenPandora Ltd. is not responsible for its content.''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PandoraFront.jpg|Right|thumb|360px|Pandora FTW!]]&lt;br /&gt;
So your Pandora just arrived after being in the post for two months. Jolly good! But now that it's actually here, what on earth do you do with it? '''Don't panic!''' Let's take a look at what's included in the box(so you don't miss anything!) and then hop on over to setting it up for that extended Ms. Pacman marathon I know you've been waiting for!&lt;br /&gt;
&lt;br /&gt;
Also, don't forget to hit up [http://www.gp32x.com/board/index.php?/forum/61-pandora/ GP32X] for questions/info/apps/fun/discussion!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Safety Information ==&lt;br /&gt;
Warning: Choking Hazard, do not let children under the age of 3 come close to your Pandora console.&lt;br /&gt;
The Pandora Contains small parts that can be eaten by those children.&lt;br /&gt;
&lt;br /&gt;
The battery of Pandora must be charged by the charger included with the Pandora(see package contents)&lt;br /&gt;
and we at OpenPandora Ltd. cannot be responsible for people using third party chargers. Please be aware that some third party chargers compatible with the Pandora have a fake CE logo and are highly dangerous (they will burst into flames).&lt;br /&gt;
&lt;br /&gt;
Keep the Pandora in normal temperatures under 140F/60C (Recommended temperatures are in the range between -10C and 40C){{Citation needed}}. The battery is standard Lithium Polymer battery. Do not keep near fire or water. Do not disassemble, destroy or damage the battery, or it may explode! Do not short circuit external contacts! Dispose of it properly, please. &lt;br /&gt;
&lt;br /&gt;
All third party modifications and hardware/software can damage your Pandora, OpenPandora Ltd cannot be responsible for damage caused by this. Trusted software can be recongised by a OP-member in the Pandora Appstore. See the “OP-Team Trusted” image in the app store to see if the software application can be trusted{{Citation needed}}.&lt;br /&gt;
&lt;br /&gt;
The Pandora has a 4.3-inch Touchscreen. You can touch the screen to trigger an action. Although this is a touch screen, you cannot punch it. Always touch the screen gently – this will be more then enough to trigger the action you want.&lt;br /&gt;
&lt;br /&gt;
The Pandora has an protective design, making it hard to break. Of course, you should never drop your Pandora, wash it, or try anything that can harm your Pandora. This will void your warranty.&lt;br /&gt;
&lt;br /&gt;
== Warranty Information ==&lt;br /&gt;
By law there is a one year warranty, and the device will be replaced/repaired if it is faulty. LCDs with noticeable dead pixels will also be replaced (Note: Pixels are small squares aligned in a grid to make up the image on your screen. A &amp;quot;Dead Pixel&amp;quot; is one that doesn't work anymore and remains black or any other static color).&lt;br /&gt;
&lt;br /&gt;
== Box Contents ==&lt;br /&gt;
When you first open Pandora's box, a slew of demons and raging emotions may forcibly leave the box. This is normal. After that, you may or may not be surprised to find a:&lt;br /&gt;
*Pandora console&lt;br /&gt;
*Stylus (located in stylus slot on the side of the Pandora)&lt;br /&gt;
*Battery&lt;br /&gt;
*DC Wall Charger&lt;br /&gt;
*TV-Out Cable (ONLY if you ordered it separately)&lt;br /&gt;
*Carrying Case (ONLY if you ordered it separately)&lt;br /&gt;
*Extra Battery (ONLY if you ordered it separately)&lt;br /&gt;
After you take those things out, you may find a sliver of Hope left over. It's best to keep it, as you never know when you could use some Hope.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
==== Highlights ====&lt;br /&gt;
{{citation needed}}&lt;br /&gt;
* ARM® Cortex™-A8 600Mhz+ CPU running Linux*&lt;br /&gt;
* 430-MHz TMS320C64x+™ DSP Core&lt;br /&gt;
* PowerVR SGX OpenGL 2.0 ES compliant 3D hardware&lt;br /&gt;
* 800x480 4.3&amp;quot; 16.7 million colours touchscreen LCD&lt;br /&gt;
* Wifi 802.11b/g, Bluetooth &amp;amp; High Speed USB 2.0 Host&lt;br /&gt;
* Dual SDHC card slots &amp;amp; SVideo TV output&lt;br /&gt;
* Dual Analogue and Digital gaming controls&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* Around 10+ Hours battery life**&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;The 600Mhz+ can be higher or lower. This can be controlled by software designed for the device.&amp;lt;/small&amp;gt;&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;Is affected by use. (example turn bluetooth on or off during play time)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Advanced Specifications ====&lt;br /&gt;
* Texas Instruments OMAP3530 processor at 600MHz (officially)&lt;br /&gt;
* 256MB DDR-333 SDRAM&lt;br /&gt;
* 512MB NAND FLASH memory&lt;br /&gt;
* IVA2+ audio and video processor using TI's DaVinci™ technology (430MHz C64x DSP)&lt;br /&gt;
* ARM® Cortex™-A8 superscalar microprocessor core&lt;br /&gt;
* PowerVR SGX530 (110MHz officially) OpenGL ES 2.0 compliant 3D hardware&lt;br /&gt;
* integrated Wifi 802.11b/g (up to 18dBm output)&lt;br /&gt;
* integrated Bluetooth 2.0 + EDR (3Mbps) (Class 2, + 4dBm)&lt;br /&gt;
* 800x480 resolution LTPS LCD with resistive touch screen, 4.3&amp;quot; widescreen, 16.7 million colors (300 cd/m2 brightness, 450:1 contrast ratio)&lt;br /&gt;
* Dual analog controllers&lt;br /&gt;
* Full gamepad controls plus shoulder buttons&lt;br /&gt;
* Dual SDHC card slots (up to 64GB of storage currently)&lt;br /&gt;
* headphone output up to 150mW/channel into 16 ohms, 99dB SNR (up to 24 bit/48KHz)&lt;br /&gt;
* TV output (composite and S-Video)&lt;br /&gt;
* Internal microphone plus ability to connect external microphone through headset&lt;br /&gt;
* Stereo line level inputs and outputs&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* USB 2.0 OTG port (1.5/12/480Mbps) with capability to charge device&lt;br /&gt;
* USB 2.0 HOST port (480Mbps) capable of providing the full 500mA to attached devices (examples include USB memory, keyboard, mouse, 3G modem, GPS)&lt;br /&gt;
* up to two externally accessible UARTs and/or four PWM signals for hardware hacking, robot control, debugging, etc.&lt;br /&gt;
* un-brickable design with integrated boot loader for safe code experimentation&lt;br /&gt;
* Power and hold switch useful for &amp;quot;instant on&amp;quot; and key lockout to aid in media player applications on the go&lt;br /&gt;
* Runs on the Linux operating system (2.6.x)&lt;br /&gt;
* Dimensions: 140x83.4x27.5mm&lt;br /&gt;
* Weight: 335g (with 4200mAh battery)&lt;br /&gt;
&lt;br /&gt;
==== Features ====&lt;br /&gt;
The Pandora is a mixture between a PC and a gaming console (similar to classic computers such as the Amiga). That's why it has gaming controls (Buttons, DPad and analogue nubs). It is fast enough to emulate many other systems, run a full desktop, access the internet via Firefox and play games such as Quake3. However, it is not as big as a netbook. Believe it or not, it will fit in your pocket. It's a bit bigger than the Nintendo DS. (See Applications section of this manual to see what applications your Pandora will come with.)&lt;br /&gt;
Remember that your Pandora console will get better with every application installed!&lt;br /&gt;
&lt;br /&gt;
== First Time Use ==&lt;br /&gt;
Now that you've opened the box, let's set this thing up! Place the battery inside the battery well on the back of the Pandora, making sure the contacts touch(the little silvery metal bits, it's easy). Snap on the battery cover and you're all set!&lt;br /&gt;
==== Charging ====&lt;br /&gt;
Charge your Pandora 8 hours before putting it off the wall charger. This will improve the lifetime of your battery. To charge the Pandora, insert the power cable end in the Pandora and the other end into your wall socket.&lt;br /&gt;
&lt;br /&gt;
The battery comes pre-charged at 40%, and that level might have decreased during shipping, so to be on the safe side, we recommend that you charge the Pandora before you use it. Simply plug in your wall charger into an outlet, or optionally use a mini-USB cable connected to a computer or wall adapter. For extreme silliness, plug your Pandora into an ''already charged Pandora,'' and charge it from that! But not really.&lt;br /&gt;
&lt;br /&gt;
==== First Boot ====&lt;br /&gt;
Once your Pandora is ready, turn it on. The OS will take some time to boot up for the first time (about 10 minutes, this is only for the first boot, this is normal). After it is booted, a series of settings dialogs will pop up in the shape of a &amp;quot;Boot Wizard&amp;quot; allowing you to alter your Pandora's settings to your liking.&lt;br /&gt;
&lt;br /&gt;
There are a total of 3 parts to the Boot Wizard guide:&lt;br /&gt;
===== System configuration =====&lt;br /&gt;
The first thing you will have to do is to calibrate the Pandora's touch screen. Only do this if the screen isn't calibrated already.&lt;br /&gt;
You will have the option for touchscreen calibration during the first time you will boot up your Pandora console.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;quot;Callibrating the touch screen&amp;quot; is a term used to describe the process of matching coodinates given by the touch layer with the underlying screen. A badly callibrated screen will register your push elsewhere on the screen, perhaps half a centimeter to one side. As there are sometimes slight variations in the production of the touch layer, you the user can improve the accuracy by matching the two layers manually.&lt;br /&gt;
&lt;br /&gt;
===== User setup =====&lt;br /&gt;
After that, you will have to enter your full name. This is what you will see in any user selection dialogs or when the system needs to address you, so enter whatever you are most comfortable with. Then follows your username. It is recommended to choose an all-lowercase, one-word username here, since you will have to enter this name every time you log in. Once you've entered your username, a password input dialog appears. You will have to enter the password you want to have twice here. If you don't want to have a password for your device, simply leave both fields empty. If you however decide to enter a password, something hard to guess and between 8 and 16 characters long is preferred.&lt;br /&gt;
&lt;br /&gt;
===== Network and security settings =====&lt;br /&gt;
You will now have to enter a name for your Pandora. This will be the Pandora's host name, so you have two options in this situation:&lt;br /&gt;
&lt;br /&gt;
# If you don't have a domain you want to connect to, simply enter any name here. It should not contain any spaces.&lt;br /&gt;
# If you ''do'' have a domain you want to connect to, enter a name in the form of &amp;quot;pandoraname.domainname.tld&amp;quot;. Note that you may never have a use for this.&lt;br /&gt;
&lt;br /&gt;
Then, you'll have to choose whether you want to automatically log in on your Pandora when it boots, or if you should be given the opportunity to log in as a different user, or enter your password. It is recommended to disable auto login if you want to protect your user data, but if you're often in a hurry, then you can enable auto login here.&lt;br /&gt;
&lt;br /&gt;
The final thing you will have to choose, is whether you want to use the full desktop Xfce environment or the gaming-oriented PMenu environment as your default environment in the Pandora. It is recommended to choose Xfce here if you want to gain access to the Pandora's full potential. This option can be changed later at any point.&lt;br /&gt;
&lt;br /&gt;
==== Calibrating The Touchscreen ====&lt;br /&gt;
The touchscreen in your new Pandora device isn't psychic! You have to tell it what to do, and in order to do that effectively, you need to calibrate it. Simply navigate to settings→screen→calibration wizard{{Verify credibility}} and follow the onscreen instructions. You may have to recalibrate the screen from time to time as well.&lt;br /&gt;
&lt;br /&gt;
During the first boot wizard, you will be offered the option to calibrate the touchscreen. By default it may well work okay, but the option is there. If calibration is far off, use the keyboard to selection the calibration option.&lt;br /&gt;
&lt;br /&gt;
== Basic Use ==&lt;br /&gt;
&lt;br /&gt;
===Pmenu===&lt;br /&gt;
&lt;br /&gt;
===Desktop style environment===&lt;br /&gt;
&lt;br /&gt;
====On the Desktop====&lt;br /&gt;
&lt;br /&gt;
The desktop will contain icons for numerous locations (such as each mounted SD card), as well as any auto-discovered pnd-applications located on SD cards or internal NAND.&lt;br /&gt;
&lt;br /&gt;
====In the menu====&lt;br /&gt;
On the bottom left you have your applications menu, similar to the Windows start menu. Clicking it brings up a list of all installed applications and pnd-applications in the appropriate location on your SD cards.&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
To the right may be some icons, these serve as shortcuts to commonly used applications. Next to that you have your taskbar, which as you might have guessed, lists all running applications in your current workspace. To the right of the taskbar you have your workspaces, think of these as multiple desktops. By default you have two to switch from. Applications running in one workspace will not be visible in the other, so you can effectively hide your Ms. Pacman game from your boss at work, because there's no way you're not going to go for the gold, even at work! Finally there are a few more icons that deal with TV-Out, network connectivity, etc. and some running applications may place an icon there as well. And to the right of THOSE, you have your time. Because time flies when you're using your Pandora! Badum tsh. Aaaaand to the right of that, you have a little icon that, when clicked, displays all running applications.&lt;br /&gt;
&lt;br /&gt;
Finally, I'd just like to reiterate this--EVERYTHING is customizable! We'll get to that section later, but for now, let's just check out the applications on your Pandora.&lt;br /&gt;
&lt;br /&gt;
===Buttons===&lt;br /&gt;
&lt;br /&gt;
====Xfce menu====&lt;br /&gt;
&lt;br /&gt;
The Pandora button will bring up the applications menu, letting you quickly enter a search to locate an application to run or perform operations against running applications.&lt;br /&gt;
&lt;br /&gt;
===Power Modes===&lt;br /&gt;
&lt;br /&gt;
Without switching the device entirely off, it may be placed into low power mode or regular power mode; simply pressing the power button will toggle modes.&lt;br /&gt;
&lt;br /&gt;
Consider low power mode to be akin to turning off a PDA or cellphone -- the screen is off, the CPU is clocked down and so on, but the device is still silently on, allowing for alarms to go off or it to be turned on again instantly. Regular power mode is for normal usage.&lt;br /&gt;
&lt;br /&gt;
Low power mode is probably going to be used as the normal &amp;quot;off&amp;quot; for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few weeks or longer. &lt;br /&gt;
&lt;br /&gt;
Closing the lid will turn off the display but otherwise leave the device operating - handy for audio playing; turning off the display lowers power use.&lt;br /&gt;
&lt;br /&gt;
The actual behaviour of buttons and events can be customized.&lt;br /&gt;
&lt;br /&gt;
== Basic Linux user guide ==&lt;br /&gt;
New to the wonderful world of Linux? No problem! You don't need mad terminal skills to open a web browser, but it can be nice to know what you're doing once in a while.&lt;br /&gt;
==== The structure of the file system ====&lt;br /&gt;
If you're used to the file system of e.g. MS Windows, you will find that a Linux file system is rather different from what you're used to. In this section, we will go through everything you have to know in order to feel comfortable with using the Pandora's file system.&lt;br /&gt;
===== Basic philosophy =====&lt;br /&gt;
In Windows, you have multiple file system roots, called &amp;quot;drives&amp;quot;, that are labeled with different letters, like &amp;quot;C:&amp;quot; or &amp;quot;D:&amp;quot;. In Linux, there aren't multiple root directories, but rather just one root directory, called &amp;quot;/&amp;quot;. All other directories are inside of this directory, including other drives.&lt;br /&gt;
&lt;br /&gt;
===== Common directories =====&lt;br /&gt;
Inside of the root directory (&amp;quot;/&amp;quot;) are quite a lot of other directories. Here are the most important ones:&lt;br /&gt;
* &amp;quot;/home&amp;quot; - This is where all of the files that are owned by all users are stored. Users do not generally have write-access to anything outside of this directory.&lt;br /&gt;
* &amp;quot;/home/username&amp;quot; - Here are the personal files of user &amp;quot;username&amp;quot;. In this directory, you will find a directory called &amp;quot;Documents&amp;quot;, &amp;quot;Pictures&amp;quot;, &amp;quot;Desktop&amp;quot; etc. that correspond to that users personal directories. This directory is also called &amp;quot;username&amp;quot;'s home directory, and can be abbreviated with &amp;quot;~/&amp;quot; (if you're currently logged in as username) or &amp;quot;~username/&amp;quot;.&lt;br /&gt;
* &amp;quot;/boot&amp;quot; - This is the directory where the Linux kernel is stored, and other files that are needed at boot time can be accessed. Do not touch this directory (You can't even do it if you wanted to)!&lt;br /&gt;
* &amp;quot;/bin&amp;quot;, &amp;quot;/lib&amp;quot; - System binaries and libraries are stored here. Most of the terminal commands mentioned below can be found inside of &amp;quot;/bin&amp;quot;. You should generally never have to touch this directory, either.&lt;br /&gt;
* &amp;quot;/usr&amp;quot; - Here is where you'll find programs and files installed by the user. Core applications such as the web browser, media player, and other applications that are available the first time you start your Pandora are stored here. If you decide to install anything via the &amp;quot;ipkg&amp;quot; command (covered later), this is where the files needed by those installations will end up.&lt;br /&gt;
* &amp;quot;/etc&amp;quot; - System-wide configuration. Should only be touched by power-users.&lt;br /&gt;
* &amp;quot;/mnt/sd1&amp;quot;, &amp;quot;/mnt/sd2&amp;quot; - If you insert SD-cards into the device, this is where you will find their contents.&lt;br /&gt;
* &amp;quot;/media/*&amp;quot; - If you connect USB drives or other external media, you will find that the contents of that media have been placed here.&lt;br /&gt;
&lt;br /&gt;
Don't worry if this doesn't make any sense; It was thought up by bearded engineers back in the seventies. They liked the idea that everything would be in a predictable place, but this is no longer completely the case.&lt;br /&gt;
&lt;br /&gt;
==== The File Manager ====&lt;br /&gt;
==== Killing Applications ====&lt;br /&gt;
==== Basic Terminal Commands ====&lt;br /&gt;
Note: Linux is case sensitive. This applies to filenames and directories too. &amp;quot;/home/me/stuff&amp;quot; is a different folder than &amp;quot;/home/me/STUFF&amp;quot;, you can actually have both. You can have &amp;quot;/home/me/Stuff&amp;quot; too if you like, and all three are seperately recognised directories.&lt;br /&gt;
&lt;br /&gt;
=====Navigation=====&lt;br /&gt;
* &amp;quot;ls&amp;quot; - List directory contents (similar to &amp;quot;Dir&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd &amp;lt;directory name&amp;gt;&amp;quot; - Change to a different directory, eg. &amp;quot;cd music&amp;quot; or &amp;quot;cd /home/me/music&amp;quot;&lt;br /&gt;
* &amp;quot;cd ..&amp;quot; - Go up one directory level (similar to &amp;quot;cd..&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd&amp;quot; - Go back to your home directory (similar to My Documents in Windows)&lt;br /&gt;
* &amp;quot;cd -&amp;quot; - Go back to the previous directory you were in (handy if you forget)&lt;br /&gt;
&lt;br /&gt;
=====Controlling Running Apps=====&lt;br /&gt;
* &amp;quot;top&amp;quot; - View running proccesses (like the Task Manager in Windows) press &amp;quot;q&amp;quot; to quit&lt;br /&gt;
* &amp;quot;killall [program name] - Stops running process (use with care)&lt;br /&gt;
&lt;br /&gt;
=====File Manipulation=====&lt;br /&gt;
* &amp;quot;rm &amp;lt;filename&amp;gt;&amp;quot; - Delete a file, eg. &amp;quot;rm somefile.txt&amp;quot; or &amp;quot;rm /home/me/randomfiles/somefile.txt&amp;quot;&lt;br /&gt;
* &amp;quot;mv &amp;lt;original filename&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Moves a file to a new place, also used for renaming, eg. &amp;quot;mv somefile.txt somefile_backup.txt&amp;quot; will rename it, but &amp;quot;mv somefile.txt /home/me/backup/somefile.txt&amp;quot; will move it&lt;br /&gt;
* &amp;quot;cp &amp;lt;file to copy&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Copy a file, eg. &amp;quot;cp twoweeks.txt twomonths.txt&amp;quot; copies into current directory, while &amp;quot;cp twomonths.txt /home/me/ihaveadream/twoweeks.txt&amp;quot; copies to another directory.&lt;br /&gt;
* &amp;quot;mkdir &amp;lt;new directory name&amp;gt;&amp;quot; - Makes a directory&lt;br /&gt;
&lt;br /&gt;
=====Misc.=====&lt;br /&gt;
* &amp;quot;cat &amp;lt;filename&amp;gt;&amp;quot; - Prints the contents of a file, eg. &amp;quot;cat hellolo.txt&amp;quot;&lt;br /&gt;
* &amp;quot;clear&amp;quot; - Clears screen, terminal input begins at the top again&lt;br /&gt;
* &amp;quot;date&amp;quot; - Your friend, the terminal will tell you the date&lt;br /&gt;
* &amp;quot;cal [month] [year]&amp;quot; - Makes a pretty calendar, eg. &amp;quot;cal 12 2009&amp;quot; or &amp;quot;cal * 2010&amp;quot; or &amp;quot;cal 1 2010 &amp;gt; fingers_crossed.txt&amp;quot; sends output to file&lt;br /&gt;
* &amp;quot;history&amp;quot; - Gives a list of the recent commands you have run.  Running !number (e.g. !15) will rerun that numbered command in the history list&lt;br /&gt;
&lt;br /&gt;
History Search: Press CTRL-R.  As you type, BASH will try and find the command in your recent history that most closely matches what you are typing.  To get back to the prompt, press CTRL-C.&lt;br /&gt;
&lt;br /&gt;
Autocompletion: Press TAB. The terminal (also called the shell) will attempt to intelligently figure out what you're trying to type. It needs something to work with however, so try pressing TAB half way through a command or location.&lt;br /&gt;
&lt;br /&gt;
eg. &amp;quot;cd /home/me/pandora_suc&amp;quot; *TAB* will complete it as &amp;quot;cd /home/me/pandora_success&amp;quot; or with a filename &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fa&amp;quot; *TAB* will turn into &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fall_into_my_hands&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
Many applications will come preinstalled into the internal memory; these will be regular Linux applications (not packaged into pnd files, since they do not need to be redistributed to anyone.)&lt;br /&gt;
&lt;br /&gt;
Additional applications may be found as pnd-files (see below, a packaged up single file representing an entire application) or as regular Linux files (an application likely being made up of many files and possibly needing installation.)&lt;br /&gt;
&lt;br /&gt;
==== What Is Included? ====&lt;br /&gt;
* Ångström Linux: Lightweight beautiful Linux-based operating system for the Pandora.&lt;br /&gt;
* Xfce: A full featured window manager for Linux.&lt;br /&gt;
* Midori: A full features web browser, designed to be lighter and faster than a full desktop style browser.&lt;br /&gt;
* OpenOffice: Full desktop document managing. Edit, create and manage your documents on the go. (really??)&lt;br /&gt;
{{Volume needed}}&lt;br /&gt;
&lt;br /&gt;
==== Where Can I Get More Apps? ====&lt;br /&gt;
There are many ways to get more applications onto your Pandora.&lt;br /&gt;
&lt;br /&gt;
*The easiest way is to browse the [http://doesnotexistyet.com Pandora App Store], where you can download a selection of free or commerical applications. To download, navigate to an app, pay for it if you must, and hit the 'download' button. Select where you want to save it, and you're done! Because I assume it will be in .pnd format.&lt;br /&gt;
&lt;br /&gt;
*There is the good ol' [http://dl.openhandhelds.org/cgi-bin/pandora.cgi Pandora File Archive].&lt;br /&gt;
&lt;br /&gt;
*There are nice repositories, such as the [http://www.angstrom-distribution.org/repo Angstrom ARM Repository], or...&lt;br /&gt;
&lt;br /&gt;
*The Pandora includes the package manager [http://en.wikipedia.org/wiki/Ipkg ipkg].&lt;br /&gt;
&lt;br /&gt;
*Also, people may upload their apps to weird crevices in the net, so be on the lookout! (or use a search engine)&lt;br /&gt;
&lt;br /&gt;
== Introduction To .PNDs ==&lt;br /&gt;
==== What Are .PNDs? ====&lt;br /&gt;
&lt;br /&gt;
A .pnd (&amp;quot;pandora&amp;quot;) file is an application (game, word processor, emulator, whatever.) More accurately, it is a full application bundled up into a single file; think of it like a zip, with a relatively well defined internal structure.&lt;br /&gt;
&lt;br /&gt;
The pnd-file system was designed so you could use an application without the hassle of installation or uninstallation, or even having to organize it yourself if you don't want to. You just download or obtain the pnd-file, and use it. &lt;br /&gt;
&lt;br /&gt;
If you remember classic computers such as the Amiga - where you inserted a disk and then launched the applications read by Workbench (the Amiga's operating system) - then this is similar: when you insert an SD card into one of the two slots, the (Linux based) Pandora OS will scan it for your PND program files. Any program it finds will either turn up on the desktop or the application menu (just like in Windows).&lt;br /&gt;
&lt;br /&gt;
More details can be found in the &amp;quot;libpnd hub&amp;quot; part of the wiki, but that is more oriented to techies and developers.&lt;br /&gt;
&lt;br /&gt;
==== How do I run a PND-application? ====&lt;br /&gt;
&lt;br /&gt;
Put your pnd-files in your SD (see below for some suggestions where.)&lt;br /&gt;
&lt;br /&gt;
A pnd-file is usually invoked in one of the following ways&lt;br /&gt;
&lt;br /&gt;
* browse to the file using the directory browser, and click to run it. (.pnd files are file-associated to another program, pnd_run which knows how to run them.) This lets you organize pnd-files in directories of your choice on the device NAND or SD.&lt;br /&gt;
&lt;br /&gt;
* in PMenu, the applications will be shown by name; you can just select and run them from the menu&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/menu on SD, the application will be shown in the Start menu on the device; use your stylus or buttons to invoke it&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/desktop or /pandora/apps on SD, they will show up automatically on your desktop; invoke them with the stylus, your finger, or controls as you see fit&lt;br /&gt;
&lt;br /&gt;
==== Where Do .PNDs Go? ====&lt;br /&gt;
&lt;br /&gt;
Put .pnd-files into specific directories if you want them to show up in the Start menu or on your Pandora desktop, or in Pmenu. &lt;br /&gt;
&lt;br /&gt;
You can put them anywhere you like in internal NAND or SD, if you wish to organize them yourself and launch them with taps.&lt;br /&gt;
&lt;br /&gt;
/pandora/desktop -&amp;gt; pnd files show up on the desktop&lt;br /&gt;
&lt;br /&gt;
/pandora/menu -&amp;gt; show up in the Start menu (by the developers suggested categories.)&lt;br /&gt;
&lt;br /&gt;
/pandora/apps -&amp;gt; show up in the desktop, and in Pmenu&lt;br /&gt;
&lt;br /&gt;
These locations are not written in stone. The &amp;quot;libpnd&amp;quot; config files are in /etc/pandora/conf in the NAND. Generally you will never need to alter these files, but you certainly can if you wish. In theory, obliterating the files will still leave the system working, and they are easily restored. One file, /etc/pandora/conf/desktop defines the &amp;quot;search paths&amp;quot; to look for .pnd files, and where to put &amp;quot;.desktop&amp;quot; files when they are found. The searchpaths says where to find them (such as /pandora/desktop), and where to put the application link - /usr/share/applications is where the menu items are pulled from. IF you wish to put pnd files somewhere not in the searchpath, just add the directory to the search-path and you're good to go.&lt;br /&gt;
&lt;br /&gt;
==== Where does my data go? How do I make files visible to the applications? ====&lt;br /&gt;
&lt;br /&gt;
An application normally will see what is contained within the pnd-file, or your personal data created with the tool; it can of course look anywhere on the SD or device internal memory. For example a Quake port might expect to see extra level files in /quake, or give you a way of selecting a path to put files in.. or it might just expect it to be in your personal data folders, or in the pnd-file itself. Its up to the application, with suggestions in the pnd-guidelines for developers.&lt;br /&gt;
&lt;br /&gt;
The first time a pnd-application is run, an &amp;quot;app data&amp;quot; directory is created for it; anything that app data folder contains will be visible to the application as if it was in the pnd-file (and in fact, this lets you override files in the pnd-file without modifying the .pnd itself, which could be handy.) If your app creates a file &amp;quot;foo&amp;quot;, it'll show up in /pandora/appdata/appname-id as &amp;quot;foo&amp;quot;. The actual appdata folder name depends on the name used by the developer, but should generally look like application-name and some funny number afterwards. It should be easy to spot.&lt;br /&gt;
&lt;br /&gt;
ex: Quake 1 will probably put score or save data in /pandora/appdata/quake1-123/ or somesuch.&lt;br /&gt;
&lt;br /&gt;
It will always be helpful to read the description or readme file included.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make ROMs available to an emulator? =====&lt;br /&gt;
&lt;br /&gt;
For something like ROMs, hopefully a developer consensus will lead either to a canonical location, or a convention of having a directory picker or browser present, so that ROMs can be stored in SD locations of your choice; doesn't strike me as something that should be in a pnd-file, or to be pretended to be in a pnd-file with appdata tricks.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make pak-files available to Quake? =====&lt;br /&gt;
&lt;br /&gt;
For some add-ons or data needed for a game, the developer may require it to be 'in the main application path'; as mentioned above, just drop it into the appdata folder and the app will just see it.&lt;br /&gt;
&lt;br /&gt;
==== How Do I Make .PNDs? ====&lt;br /&gt;
==== More Info About .PNDs ====&lt;br /&gt;
Visit [[libpnd_hub]] for more information!&lt;br /&gt;
== Configuration ==&lt;br /&gt;
==== Updating The Firmware ====&lt;br /&gt;
&lt;br /&gt;
Given a working firmware, you might wish to patch it with official Open Pandora patches; you might also wish to just grab an application from the Angstrom repository, say. &lt;br /&gt;
&lt;br /&gt;
In both of these cases, an ipk file will be made available. (In the future, an automated system may offer to patch up your device or auto-download patches. TBD.)&lt;br /&gt;
&lt;br /&gt;
An ipk file is a compressed installable package.&lt;br /&gt;
&lt;br /&gt;
It should be easily used, but from the Terminal if you wish to manually apply an ipk to patch the firmware, install or update an Angstrom application, it is simple: '''opkg install foo.ipk'''&lt;br /&gt;
&lt;br /&gt;
==== Replacing the Firmware ====&lt;br /&gt;
&lt;br /&gt;
Rather than patch the firmware, the firmware may be replaced wholesale with a freshly downloaded firmware.&lt;br /&gt;
&lt;br /&gt;
==== Booting a Firmware from SD ====&lt;br /&gt;
&lt;br /&gt;
The hardware is capable of booting entirely from SD; if the device is bricked or otherwise has a blank NAND, this could be an option. furthermore you're able to try out alternative operating systems without needing to reinstall your primary operating system.&lt;br /&gt;
&lt;br /&gt;
Steps include:&lt;br /&gt;
&lt;br /&gt;
* Preparing the SD card(s)&lt;br /&gt;
* Setting up the firmware on the SD card&lt;br /&gt;
&lt;br /&gt;
=====Preparing the SD card=====&lt;br /&gt;
&lt;br /&gt;
There are two main approaches:&lt;br /&gt;
&lt;br /&gt;
* Setting up the firmware on on SD card (meaning you need two partitions - a boot partition, and a firmware partition), and&lt;br /&gt;
* Setting things up across two SD cards - meaning you boot from one SD card, and have the firmware on the other.&lt;br /&gt;
&lt;br /&gt;
Operating from one SD card provides you the option of still being able to use the other; operating across two cards provides you he option to have a regular boot-SD, and flip between multiple other SDs for the actual firmware, should you wish to cycle between many operating systems (say.)&lt;br /&gt;
&lt;br /&gt;
The boot partition generally must be FAT32, and then the kernel, MLO and other files need to be unpacked upon it.&lt;br /&gt;
&lt;br /&gt;
The firmware partition must be either ext2fs or ext3fs; under Linux, such a partition can be easily created:&lt;br /&gt;
&lt;br /&gt;
'''mkfs.ext2 -L LABELNAME /dev/mmcblk0p2'''&lt;br /&gt;
- assuming LABELNAME for the partition&lt;br /&gt;
- assuming /dev/mmcblk0p2 for your SD device; you'd better check this carefully ;)&lt;br /&gt;
&lt;br /&gt;
==== Setting Up WiFi ====&lt;br /&gt;
==== Setting Up Blutooth ====&lt;br /&gt;
==== Adjusting Brightness/Contrast ====&lt;br /&gt;
==== Changing Your Theme ====&lt;br /&gt;
== Oops! I Borked My Pandora! ==&lt;br /&gt;
Fear not, young netizen! Your Pandora was designed to be unbrickable, so unless you used the ancient art of alchemy to physically turn your Pandora into a brick (or you just broke the hardware inside), you should be okay!&lt;br /&gt;
==== Restore The Original Firmware ====&lt;br /&gt;
==== Boot From SD or USB ====&lt;br /&gt;
== Pandora FAQ ==&lt;br /&gt;
Silly goose, go to the [[FAQ]] page for more detailed information.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
	<entry>
		<id>https://pandorawiki.org/index.php?title=User_manual&amp;diff=1940</id>
		<title>User manual</title>
		<link rel="alternate" type="text/html" href="https://pandorawiki.org/index.php?title=User_manual&amp;diff=1940"/>
		<updated>2010-01-06T20:37:54Z</updated>

		<summary type="html">&lt;p&gt;Dflemstr: /* Safety Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border-top:1px solid gray; border-bottom:1px solid gray; padding-top:5px; padding-bottom:5px; margin-bottom:20px&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;''This page is an unofficial community project, and OpenPandora Ltd. is not responsible for its content.''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PandoraFront.jpg|Right|thumb|360px|Pandora FTW!]]&lt;br /&gt;
So your Pandora just arrived after being in the post for two months. Jolly good! But now that it's actually here, what on earth do you do with it? '''Don't panic!''' Let's take a look at what's included in the box(so you don't miss anything!) and then hop on over to setting it up for that extended Ms. Pacman marathon I know you've been waiting for!&lt;br /&gt;
&lt;br /&gt;
Also, don't forget to hit up [http://www.gp32x.com/board/index.php?/forum/61-pandora/ GP32X] for questions/info/apps/fun/discussion!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Safety Information ==&lt;br /&gt;
Warning: Choking Hazard, do not let children under the age of 3 come close to your Pandora console.&lt;br /&gt;
The Pandora Contains small parts that can be eaten by those children.&lt;br /&gt;
&lt;br /&gt;
The battery of Pandora must be charged by the charger included with the Pandora(see package contents)&lt;br /&gt;
and we at OpenPandora Ltd. cannot be responsible for people using third party chargers. Please be aware that some third party chargers compatible with the Pandora have a fake CE logo and are highly dangerous (they will burst into flames).&lt;br /&gt;
&lt;br /&gt;
Keep the Pandora in normal temperatures under 140F/60C (Recommended temperatures are in the range between -10C and 40C){{Citation needed}}. The battery is standard Lithium Polymer battery. Do not keep near fire or water. Do not disassemble, destroy or damage the battery, or it may explode! Do not short circuit external contacts! Dispose of it properly, please. &lt;br /&gt;
&lt;br /&gt;
All third party modifications and hardware/software can damage your Pandora, OpenPandora Ltd cannot be responsible for damage caused by this. Trusted software can be recongised by a OP-member in the Pandora Appstore. See the “OP-Team Trusted” image in the app store to see if the software application can be trusted{{Citation needed}}.&lt;br /&gt;
&lt;br /&gt;
The Pandora has a 4.3-inch Touchscreen. You can touch the screen to trigger an action. Although this is a touch screen, you cannot punch it. Always touch the screen gently – this will be more then enough to trigger the action you want.&lt;br /&gt;
&lt;br /&gt;
The Pandora has an protective design, making it hard to break. Of course, you should never drop your Pandora, wash it, or try anything that can harm your Pandora. This will void your warranty.&lt;br /&gt;
&lt;br /&gt;
== Warranty Information ==&lt;br /&gt;
By law there is a one year warranty, and we will replace/repair your device if it is faulty. LCDs with noticeable dead pixels will also be replaced (note: pixels are small squares aligned in a grid to make up the image on your screen. A &amp;quot;Dead Pixel&amp;quot; is one that doesn't work anymore and remains black).&lt;br /&gt;
&lt;br /&gt;
OpenPandora Ltd. will replace/repair your Pandora console if you are not responsible for causing the damage yourself.&lt;br /&gt;
They cannot be responsible for third party modifications causing damage, or third party hardware attached to Pandora causing damage.&lt;br /&gt;
&lt;br /&gt;
== Box Contents ==&lt;br /&gt;
When you first open Pandora's box, a slew of demons and raging emotions may forcibly leave the box. This is normal. After that, you may or may not be surprised to find a:&lt;br /&gt;
*Pandora console&lt;br /&gt;
*Stylus (located in stylus slot on the side of the Pandora)&lt;br /&gt;
*Battery&lt;br /&gt;
*DC Wall Charger&lt;br /&gt;
*TV-Out Cable (ONLY if you ordered it separately)&lt;br /&gt;
*Carrying Case (ONLY if you ordered it separately)&lt;br /&gt;
*Extra Battery (ONLY if you ordered it separately)&lt;br /&gt;
After you take those things out, you may find a sliver of Hope left over. It's best to keep it, as you never know when you could use some Hope.&lt;br /&gt;
&lt;br /&gt;
== Specifications ==&lt;br /&gt;
==== Highlights ====&lt;br /&gt;
{{citation needed}}&lt;br /&gt;
* ARM® Cortex™-A8 600Mhz+ CPU running Linux*&lt;br /&gt;
* 430-MHz TMS320C64x+™ DSP Core&lt;br /&gt;
* PowerVR SGX OpenGL 2.0 ES compliant 3D hardware&lt;br /&gt;
* 800x480 4.3&amp;quot; 16.7 million colours touchscreen LCD&lt;br /&gt;
* Wifi 802.11b/g, Bluetooth &amp;amp; High Speed USB 2.0 Host&lt;br /&gt;
* Dual SDHC card slots &amp;amp; SVideo TV output&lt;br /&gt;
* Dual Analogue and Digital gaming controls&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* Around 10+ Hours battery life**&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;The 600Mhz+ can be higher or lower. This can be controlled by software designed for the device.&amp;lt;/small&amp;gt;&lt;br /&gt;
:&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;Is affected by use. (example turn bluetooth on or off during play time)&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Advanced Specifications ====&lt;br /&gt;
* Texas Instruments OMAP3530 processor at 600MHz (officially)&lt;br /&gt;
* 256MB DDR-333 SDRAM&lt;br /&gt;
* 512MB NAND FLASH memory&lt;br /&gt;
* IVA2+ audio and video processor using TI's DaVinci™ technology (430MHz C64x DSP)&lt;br /&gt;
* ARM® Cortex™-A8 superscalar microprocessor core&lt;br /&gt;
* PowerVR SGX530 (110MHz officially) OpenGL ES 2.0 compliant 3D hardware&lt;br /&gt;
* integrated Wifi 802.11b/g (up to 18dBm output)&lt;br /&gt;
* integrated Bluetooth 2.0 + EDR (3Mbps) (Class 2, + 4dBm)&lt;br /&gt;
* 800x480 resolution LTPS LCD with resistive touch screen, 4.3&amp;quot; widescreen, 16.7 million colors (300 cd/m2 brightness, 450:1 contrast ratio)&lt;br /&gt;
* Dual analog controllers&lt;br /&gt;
* Full gamepad controls plus shoulder buttons&lt;br /&gt;
* Dual SDHC card slots (up to 64GB of storage currently)&lt;br /&gt;
* headphone output up to 150mW/channel into 16 ohms, 99dB SNR (up to 24 bit/48KHz)&lt;br /&gt;
* TV output (composite and S-Video)&lt;br /&gt;
* Internal microphone plus ability to connect external microphone through headset&lt;br /&gt;
* Stereo line level inputs and outputs&lt;br /&gt;
* 43 button QWERTY and numeric keypad&lt;br /&gt;
* USB 2.0 OTG port (1.5/12/480Mbps) with capability to charge device&lt;br /&gt;
* USB 2.0 HOST port (480Mbps) capable of providing the full 500mA to attached devices (examples include USB memory, keyboard, mouse, 3G modem, GPS)&lt;br /&gt;
* up to two externally accessible UARTs and/or four PWM signals for hardware hacking, robot control, debugging, etc.&lt;br /&gt;
* un-brickable design with integrated boot loader for safe code experimentation&lt;br /&gt;
* Power and hold switch useful for &amp;quot;instant on&amp;quot; and key lockout to aid in media player applications on the go&lt;br /&gt;
* Runs on the Linux operating system (2.6.x)&lt;br /&gt;
* Dimensions: 140x83.4x27.5mm&lt;br /&gt;
* Weight: 335g (with 4200mAh battery)&lt;br /&gt;
&lt;br /&gt;
==== Features ====&lt;br /&gt;
The Pandora is a mixture between a PC and a gaming console (similar to classic computers such as the Amiga). That's why it has gaming controls (Buttons, DPad and analogue nubs). It is fast enough to emulate many other systems, run a full desktop, access the internet via Firefox and play games such as Quake3. However, it is not as big as a netbook. Believe it or not, it will fit in your pocket. It's a bit bigger than the Nintendo DS. (See Applications section of this manual to see what applications your Pandora will come with.)&lt;br /&gt;
Remember that your Pandora console will get better with every application installed!&lt;br /&gt;
&lt;br /&gt;
== First Time Use ==&lt;br /&gt;
Now that you've opened the box, let's set this thing up! Place the battery inside the battery well on the back of the Pandora, making sure the contacts touch(the little silvery metal bits, it's easy). Snap on the battery cover and you're all set!&lt;br /&gt;
==== Charging ====&lt;br /&gt;
Charge your Pandora 8 hours before putting it off the wall charger. This will improve the lifetime of your battery. To charge the Pandora, insert the power cable end in the Pandora and the other end into your wall socket.&lt;br /&gt;
&lt;br /&gt;
The battery comes pre-charged at 40%, and that level might have decreased during shipping, so to be on the safe side, we recommend that you charge the Pandora before you use it. Simply plug in your wall charger into an outlet, or optionally use a mini-USB cable connected to a computer or wall adapter. For extreme silliness, plug your Pandora into an ''already charged Pandora,'' and charge it from that! But not really.&lt;br /&gt;
&lt;br /&gt;
==== First Boot ====&lt;br /&gt;
Once your Pandora is ready, turn it on. The OS will take some time to boot up for the first time (about 10 minutes, this is only for the first boot, this is normal). After it is booted, a series of settings dialogs will pop up in the shape of a &amp;quot;Boot Wizard&amp;quot; allowing you to alter your Pandora's settings to your liking.&lt;br /&gt;
&lt;br /&gt;
There are a total of 3 parts to the Boot Wizard guide:&lt;br /&gt;
===== System configuration =====&lt;br /&gt;
The first thing you will have to do is to calibrate the Pandora's touch screen. Only do this if the screen isn't calibrated already.&lt;br /&gt;
You will have the option for touchscreen calibration during the first time you will boot up your Pandora console.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;quot;Callibrating the touch screen&amp;quot; is a term used to describe the process of matching coodinates given by the touch layer with the underlying screen. A badly callibrated screen will register your push elsewhere on the screen, perhaps half a centimeter to one side. As there are sometimes slight variations in the production of the touch layer, you the user can improve the accuracy by matching the two layers manually.&lt;br /&gt;
&lt;br /&gt;
===== User setup =====&lt;br /&gt;
After that, you will have to enter your full name. This is what you will see in any user selection dialogs or when the system needs to address you, so enter whatever you are most comfortable with. Then follows your username. It is recommended to choose an all-lowercase, one-word username here, since you will have to enter this name every time you log in. Once you've entered your username, a password input dialog appears. You will have to enter the password you want to have twice here. If you don't want to have a password for your device, simply leave both fields empty. If you however decide to enter a password, something hard to guess and between 8 and 16 characters long is preferred.&lt;br /&gt;
&lt;br /&gt;
===== Network and security settings =====&lt;br /&gt;
You will now have to enter a name for your Pandora. This will be the Pandora's host name, so you have two options in this situation:&lt;br /&gt;
&lt;br /&gt;
# If you don't have a domain you want to connect to, simply enter any name here. It should not contain any spaces.&lt;br /&gt;
# If you ''do'' have a domain you want to connect to, enter a name in the form of &amp;quot;pandoraname.domainname.tld&amp;quot;. Note that you may never have a use for this.&lt;br /&gt;
&lt;br /&gt;
Then, you'll have to choose whether you want to automatically log in on your Pandora when it boots, or if you should be given the opportunity to log in as a different user, or enter your password. It is recommended to disable auto login if you want to protect your user data, but if you're often in a hurry, then you can enable auto login here.&lt;br /&gt;
&lt;br /&gt;
The final thing you will have to choose, is whether you want to use the full desktop Xfce environment or the gaming-oriented PMenu environment as your default environment in the Pandora. It is recommended to choose Xfce here if you want to gain access to the Pandora's full potential. This option can be changed later at any point.&lt;br /&gt;
&lt;br /&gt;
==== Calibrating The Touchscreen ====&lt;br /&gt;
The touchscreen in your new Pandora device isn't psychic! You have to tell it what to do, and in order to do that effectively, you need to calibrate it. Simply navigate to settings→screen→calibration wizard{{Verify credibility}} and follow the onscreen instructions. You may have to recalibrate the screen from time to time as well.&lt;br /&gt;
&lt;br /&gt;
During the first boot wizard, you will be offered the option to calibrate the touchscreen. By default it may well work okay, but the option is there. If calibration is far off, use the keyboard to selection the calibration option.&lt;br /&gt;
&lt;br /&gt;
== Basic Use ==&lt;br /&gt;
&lt;br /&gt;
===Pmenu===&lt;br /&gt;
&lt;br /&gt;
===Desktop style environment===&lt;br /&gt;
&lt;br /&gt;
====On the Desktop====&lt;br /&gt;
&lt;br /&gt;
The desktop will contain icons for numerous locations (such as each mounted SD card), as well as any auto-discovered pnd-applications located on SD cards or internal NAND.&lt;br /&gt;
&lt;br /&gt;
====In the menu====&lt;br /&gt;
On the bottom left you have your applications menu, similar to the Windows start menu. Clicking it brings up a list of all installed applications and pnd-applications in the appropriate location on your SD cards.&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
To the right may be some icons, these serve as shortcuts to commonly used applications. Next to that you have your taskbar, which as you might have guessed, lists all running applications in your current workspace. To the right of the taskbar you have your workspaces, think of these as multiple desktops. By default you have two to switch from. Applications running in one workspace will not be visible in the other, so you can effectively hide your Ms. Pacman game from your boss at work, because there's no way you're not going to go for the gold, even at work! Finally there are a few more icons that deal with TV-Out, network connectivity, etc. and some running applications may place an icon there as well. And to the right of THOSE, you have your time. Because time flies when you're using your Pandora! Badum tsh. Aaaaand to the right of that, you have a little icon that, when clicked, displays all running applications.&lt;br /&gt;
&lt;br /&gt;
Finally, I'd just like to reiterate this--EVERYTHING is customizable! We'll get to that section later, but for now, let's just check out the applications on your Pandora.&lt;br /&gt;
&lt;br /&gt;
===Buttons===&lt;br /&gt;
&lt;br /&gt;
====Xfce menu====&lt;br /&gt;
&lt;br /&gt;
The Pandora button will bring up the applications menu, letting you quickly enter a search to locate an application to run or perform operations against running applications.&lt;br /&gt;
&lt;br /&gt;
===Power Modes===&lt;br /&gt;
&lt;br /&gt;
Without switching the device entirely off, it may be placed into low power mode or regular power mode; simply pressing the power button will toggle modes.&lt;br /&gt;
&lt;br /&gt;
Consider low power mode to be akin to turning off a PDA or cellphone -- the screen is off, the CPU is clocked down and so on, but the device is still silently on, allowing for alarms to go off or it to be turned on again instantly. Regular power mode is for normal usage.&lt;br /&gt;
&lt;br /&gt;
Low power mode is probably going to be used as the normal &amp;quot;off&amp;quot; for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few weeks or longer. &lt;br /&gt;
&lt;br /&gt;
Closing the lid will turn off the display but otherwise leave the device operating - handy for audio playing; turning off the display lowers power use.&lt;br /&gt;
&lt;br /&gt;
The actual behaviour of buttons and events can be customized.&lt;br /&gt;
&lt;br /&gt;
== Basic Linux user guide ==&lt;br /&gt;
New to the wonderful world of Linux? No problem! You don't need mad terminal skills to open a web browser, but it can be nice to know what you're doing once in a while.&lt;br /&gt;
==== The structure of the file system ====&lt;br /&gt;
If you're used to the file system of e.g. MS Windows, you will find that a Linux file system is rather different from what you're used to. In this section, we will go through everything you have to know in order to feel comfortable with using the Pandora's file system.&lt;br /&gt;
===== Basic philosophy =====&lt;br /&gt;
In Windows, you have multiple file system roots, called &amp;quot;drives&amp;quot;, that are labeled with different letters, like &amp;quot;C:&amp;quot; or &amp;quot;D:&amp;quot;. In Linux, there aren't multiple root directories, but rather just one root directory, called &amp;quot;/&amp;quot;. All other directories are inside of this directory, including other drives.&lt;br /&gt;
&lt;br /&gt;
===== Common directories =====&lt;br /&gt;
Inside of the root directory (&amp;quot;/&amp;quot;) are quite a lot of other directories. Here are the most important ones:&lt;br /&gt;
* &amp;quot;/home&amp;quot; - This is where all of the files that are owned by all users are stored. Users do not generally have write-access to anything outside of this directory.&lt;br /&gt;
* &amp;quot;/home/username&amp;quot; - Here are the personal files of user &amp;quot;username&amp;quot;. In this directory, you will find a directory called &amp;quot;Documents&amp;quot;, &amp;quot;Pictures&amp;quot;, &amp;quot;Desktop&amp;quot; etc. that correspond to that users personal directories. This directory is also called &amp;quot;username&amp;quot;'s home directory, and can be abbreviated with &amp;quot;~/&amp;quot; (if you're currently logged in as username) or &amp;quot;~username/&amp;quot;.&lt;br /&gt;
* &amp;quot;/boot&amp;quot; - This is the directory where the Linux kernel is stored, and other files that are needed at boot time can be accessed. Do not touch this directory (You can't even do it if you wanted to)!&lt;br /&gt;
* &amp;quot;/bin&amp;quot;, &amp;quot;/lib&amp;quot; - System binaries and libraries are stored here. Most of the terminal commands mentioned below can be found inside of &amp;quot;/bin&amp;quot;. You should generally never have to touch this directory, either.&lt;br /&gt;
* &amp;quot;/usr&amp;quot; - Here is where you'll find programs and files installed by the user. Core applications such as the web browser, media player, and other applications that are available the first time you start your Pandora are stored here. If you decide to install anything via the &amp;quot;ipkg&amp;quot; command (covered later), this is where the files needed by those installations will end up.&lt;br /&gt;
* &amp;quot;/etc&amp;quot; - System-wide configuration. Should only be touched by power-users.&lt;br /&gt;
* &amp;quot;/mnt/sd1&amp;quot;, &amp;quot;/mnt/sd2&amp;quot; - If you insert SD-cards into the device, this is where you will find their contents.&lt;br /&gt;
* &amp;quot;/media/*&amp;quot; - If you connect USB drives or other external media, you will find that the contents of that media have been placed here.&lt;br /&gt;
&lt;br /&gt;
Don't worry if this doesn't make any sense; It was thought up by bearded engineers back in the seventies. They liked the idea that everything would be in a predictable place, but this is no longer completely the case.&lt;br /&gt;
&lt;br /&gt;
==== The File Manager ====&lt;br /&gt;
==== Killing Applications ====&lt;br /&gt;
==== Basic Terminal Commands ====&lt;br /&gt;
Note: Linux is case sensitive. This applies to filenames and directories too. &amp;quot;/home/me/stuff&amp;quot; is a different folder than &amp;quot;/home/me/STUFF&amp;quot;, you can actually have both. You can have &amp;quot;/home/me/Stuff&amp;quot; too if you like, and all three are seperately recognised directories.&lt;br /&gt;
&lt;br /&gt;
=====Navigation=====&lt;br /&gt;
* &amp;quot;ls&amp;quot; - List directory contents (similar to &amp;quot;Dir&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd &amp;lt;directory name&amp;gt;&amp;quot; - Change to a different directory, eg. &amp;quot;cd music&amp;quot; or &amp;quot;cd /home/me/music&amp;quot;&lt;br /&gt;
* &amp;quot;cd ..&amp;quot; - Go up one directory level (similar to &amp;quot;cd..&amp;quot; in Dos)&lt;br /&gt;
* &amp;quot;cd&amp;quot; - Go back to your home directory (similar to My Documents in Windows)&lt;br /&gt;
* &amp;quot;cd -&amp;quot; - Go back to the previous directory you were in (handy if you forget)&lt;br /&gt;
&lt;br /&gt;
=====Controlling Running Apps=====&lt;br /&gt;
* &amp;quot;top&amp;quot; - View running proccesses (like the Task Manager in Windows) press &amp;quot;q&amp;quot; to quit&lt;br /&gt;
* &amp;quot;killall [program name] - Stops running process (use with care)&lt;br /&gt;
&lt;br /&gt;
=====File Manipulation=====&lt;br /&gt;
* &amp;quot;rm &amp;lt;filename&amp;gt;&amp;quot; - Delete a file, eg. &amp;quot;rm somefile.txt&amp;quot; or &amp;quot;rm /home/me/randomfiles/somefile.txt&amp;quot;&lt;br /&gt;
* &amp;quot;mv &amp;lt;original filename&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Moves a file to a new place, also used for renaming, eg. &amp;quot;mv somefile.txt somefile_backup.txt&amp;quot; will rename it, but &amp;quot;mv somefile.txt /home/me/backup/somefile.txt&amp;quot; will move it&lt;br /&gt;
* &amp;quot;cp &amp;lt;file to copy&amp;gt; &amp;lt;new filename&amp;gt;&amp;quot; - Copy a file, eg. &amp;quot;cp twoweeks.txt twomonths.txt&amp;quot; copies into current directory, while &amp;quot;cp twomonths.txt /home/me/ihaveadream/twoweeks.txt&amp;quot; copies to another directory.&lt;br /&gt;
* &amp;quot;mkdir &amp;lt;new directory name&amp;gt;&amp;quot; - Makes a directory&lt;br /&gt;
&lt;br /&gt;
=====Misc.=====&lt;br /&gt;
* &amp;quot;cat &amp;lt;filename&amp;gt;&amp;quot; - Prints the contents of a file, eg. &amp;quot;cat hellolo.txt&amp;quot;&lt;br /&gt;
* &amp;quot;clear&amp;quot; - Clears screen, terminal input begins at the top again&lt;br /&gt;
* &amp;quot;date&amp;quot; - Your friend, the terminal will tell you the date&lt;br /&gt;
* &amp;quot;cal [month] [year]&amp;quot; - Makes a pretty calendar, eg. &amp;quot;cal 12 2009&amp;quot; or &amp;quot;cal * 2010&amp;quot; or &amp;quot;cal 1 2010 &amp;gt; fingers_crossed.txt&amp;quot; sends output to file&lt;br /&gt;
* &amp;quot;history&amp;quot; - Gives a list of the recent commands you have run.  Running !number (e.g. !15) will rerun that numbered command in the history list&lt;br /&gt;
&lt;br /&gt;
History Search: Press CTRL-R.  As you type, BASH will try and find the command in your recent history that most closely matches what you are typing.  To get back to the prompt, press CTRL-C.&lt;br /&gt;
&lt;br /&gt;
Autocompletion: Press TAB. The terminal (also called the shell) will attempt to intelligently figure out what you're trying to type. It needs something to work with however, so try pressing TAB half way through a command or location.&lt;br /&gt;
&lt;br /&gt;
eg. &amp;quot;cd /home/me/pandora_suc&amp;quot; *TAB* will complete it as &amp;quot;cd /home/me/pandora_success&amp;quot; or with a filename &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fa&amp;quot; *TAB* will turn into &amp;quot;cat /home/me/letters/i_want_the_pandora_to_fall_into_my_hands&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
Many applications will come preinstalled into the internal memory; these will be regular Linux applications (not packaged into pnd files, since they do not need to be redistributed to anyone.)&lt;br /&gt;
&lt;br /&gt;
Additional applications may be found as pnd-files (see below, a packaged up single file representing an entire application) or as regular Linux files (an application likely being made up of many files and possibly needing installation.)&lt;br /&gt;
&lt;br /&gt;
==== What Is Included? ====&lt;br /&gt;
* Ångström Linux: Lightweight beautiful Linux-based operating system for the Pandora.&lt;br /&gt;
* Xfce: A full featured window manager for Linux.&lt;br /&gt;
* Midori: A full features web browser, designed to be lighter and faster than a full desktop style browser.&lt;br /&gt;
* OpenOffice: Full desktop document managing. Edit, create and manage your documents on the go. (really??)&lt;br /&gt;
{{Volume needed}}&lt;br /&gt;
&lt;br /&gt;
==== Where Can I Get More Apps? ====&lt;br /&gt;
There are many ways to get more applications onto your Pandora.&lt;br /&gt;
&lt;br /&gt;
*The easiest way is to browse the [http://doesnotexistyet.com Pandora App Store], where you can download a selection of free or commerical applications. To download, navigate to an app, pay for it if you must, and hit the 'download' button. Select where you want to save it, and you're done! Because I assume it will be in .pnd format.&lt;br /&gt;
&lt;br /&gt;
*There is the good ol' [http://dl.openhandhelds.org/cgi-bin/pandora.cgi Pandora File Archive].&lt;br /&gt;
&lt;br /&gt;
*There are nice repositories, such as the [http://www.angstrom-distribution.org/repo Angstrom ARM Repository], or...&lt;br /&gt;
&lt;br /&gt;
*The Pandora includes the package manager [http://en.wikipedia.org/wiki/Ipkg ipkg].&lt;br /&gt;
&lt;br /&gt;
*Also, people may upload their apps to weird crevices in the net, so be on the lookout! (or use a search engine)&lt;br /&gt;
&lt;br /&gt;
== Introduction To .PNDs ==&lt;br /&gt;
==== What Are .PNDs? ====&lt;br /&gt;
&lt;br /&gt;
A .pnd (&amp;quot;pandora&amp;quot;) file is an application (game, word processor, emulator, whatever.) More accurately, it is a full application bundled up into a single file; think of it like a zip, with a relatively well defined internal structure.&lt;br /&gt;
&lt;br /&gt;
The pnd-file system was designed so you could use an application without the hassle of installation or uninstallation, or even having to organize it yourself if you don't want to. You just download or obtain the pnd-file, and use it. &lt;br /&gt;
&lt;br /&gt;
If you remember classic computers such as the Amiga - where you inserted a disk and then launched the applications read by Workbench (the Amiga's operating system) - then this is similar: when you insert an SD card into one of the two slots, the (Linux based) Pandora OS will scan it for your PND program files. Any program it finds will either turn up on the desktop or the application menu (just like in Windows).&lt;br /&gt;
&lt;br /&gt;
More details can be found in the &amp;quot;libpnd hub&amp;quot; part of the wiki, but that is more oriented to techies and developers.&lt;br /&gt;
&lt;br /&gt;
==== How do I run a PND-application? ====&lt;br /&gt;
&lt;br /&gt;
Put your pnd-files in your SD (see below for some suggestions where.)&lt;br /&gt;
&lt;br /&gt;
A pnd-file is usually invoked in one of the following ways&lt;br /&gt;
&lt;br /&gt;
* browse to the file using the directory browser, and click to run it. (.pnd files are file-associated to another program, pnd_run which knows how to run them.) This lets you organize pnd-files in directories of your choice on the device NAND or SD.&lt;br /&gt;
&lt;br /&gt;
* in PMenu, the applications will be shown by name; you can just select and run them from the menu&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/menu on SD, the application will be shown in the Start menu on the device; use your stylus or buttons to invoke it&lt;br /&gt;
&lt;br /&gt;
* for pnd-files placed into /pandora/desktop or /pandora/apps on SD, they will show up automatically on your desktop; invoke them with the stylus, your finger, or controls as you see fit&lt;br /&gt;
&lt;br /&gt;
==== Where Do .PNDs Go? ====&lt;br /&gt;
&lt;br /&gt;
Put .pnd-files into specific directories if you want them to show up in the Start menu or on your Pandora desktop, or in Pmenu. &lt;br /&gt;
&lt;br /&gt;
You can put them anywhere you like in internal NAND or SD, if you wish to organize them yourself and launch them with taps.&lt;br /&gt;
&lt;br /&gt;
/pandora/desktop -&amp;gt; pnd files show up on the desktop&lt;br /&gt;
&lt;br /&gt;
/pandora/menu -&amp;gt; show up in the Start menu (by the developers suggested categories.)&lt;br /&gt;
&lt;br /&gt;
/pandora/apps -&amp;gt; show up in the desktop, and in Pmenu&lt;br /&gt;
&lt;br /&gt;
These locations are not written in stone. The &amp;quot;libpnd&amp;quot; config files are in /etc/pandora/conf in the NAND. Generally you will never need to alter these files, but you certainly can if you wish. In theory, obliterating the files will still leave the system working, and they are easily restored. One file, /etc/pandora/conf/desktop defines the &amp;quot;search paths&amp;quot; to look for .pnd files, and where to put &amp;quot;.desktop&amp;quot; files when they are found. The searchpaths says where to find them (such as /pandora/desktop), and where to put the application link - /usr/share/applications is where the menu items are pulled from. IF you wish to put pnd files somewhere not in the searchpath, just add the directory to the search-path and you're good to go.&lt;br /&gt;
&lt;br /&gt;
==== Where does my data go? How do I make files visible to the applications? ====&lt;br /&gt;
&lt;br /&gt;
An application normally will see what is contained within the pnd-file, or your personal data created with the tool; it can of course look anywhere on the SD or device internal memory. For example a Quake port might expect to see extra level files in /quake, or give you a way of selecting a path to put files in.. or it might just expect it to be in your personal data folders, or in the pnd-file itself. Its up to the application, with suggestions in the pnd-guidelines for developers.&lt;br /&gt;
&lt;br /&gt;
The first time a pnd-application is run, an &amp;quot;app data&amp;quot; directory is created for it; anything that app data folder contains will be visible to the application as if it was in the pnd-file (and in fact, this lets you override files in the pnd-file without modifying the .pnd itself, which could be handy.) If your app creates a file &amp;quot;foo&amp;quot;, it'll show up in /pandora/appdata/appname-id as &amp;quot;foo&amp;quot;. The actual appdata folder name depends on the name used by the developer, but should generally look like application-name and some funny number afterwards. It should be easy to spot.&lt;br /&gt;
&lt;br /&gt;
ex: Quake 1 will probably put score or save data in /pandora/appdata/quake1-123/ or somesuch.&lt;br /&gt;
&lt;br /&gt;
It will always be helpful to read the description or readme file included.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make ROMs available to an emulator? =====&lt;br /&gt;
&lt;br /&gt;
For something like ROMs, hopefully a developer consensus will lead either to a canonical location, or a convention of having a directory picker or browser present, so that ROMs can be stored in SD locations of your choice; doesn't strike me as something that should be in a pnd-file, or to be pretended to be in a pnd-file with appdata tricks.&lt;br /&gt;
&lt;br /&gt;
===== Q: How do I make pak-files available to Quake? =====&lt;br /&gt;
&lt;br /&gt;
For some add-ons or data needed for a game, the developer may require it to be 'in the main application path'; as mentioned above, just drop it into the appdata folder and the app will just see it.&lt;br /&gt;
&lt;br /&gt;
==== How Do I Make .PNDs? ====&lt;br /&gt;
==== More Info About .PNDs ====&lt;br /&gt;
Visit [[libpnd_hub]] for more information!&lt;br /&gt;
== Configuration ==&lt;br /&gt;
==== Updating The Firmware ====&lt;br /&gt;
&lt;br /&gt;
Given a working firmware, you might wish to patch it with official Open Pandora patches; you might also wish to just grab an application from the Angstrom repository, say. &lt;br /&gt;
&lt;br /&gt;
In both of these cases, an ipk file will be made available. (In the future, an automated system may offer to patch up your device or auto-download patches. TBD.)&lt;br /&gt;
&lt;br /&gt;
An ipk file is a compressed installable package.&lt;br /&gt;
&lt;br /&gt;
It should be easily used, but from the Terminal if you wish to manually apply an ipk to patch the firmware, install or update an Angstrom application, it is simple: '''opkg install foo.ipk'''&lt;br /&gt;
&lt;br /&gt;
==== Replacing the Firmware ====&lt;br /&gt;
&lt;br /&gt;
Rather than patch the firmware, the firmware may be replaced wholesale with a freshly downloaded firmware.&lt;br /&gt;
&lt;br /&gt;
==== Booting a Firmware from SD ====&lt;br /&gt;
&lt;br /&gt;
The hardware is capable of booting entirely from SD; if the device is bricked or otherwise has a blank NAND, this could be an option. furthermore you're able to try out alternative operating systems without needing to reinstall your primary operating system.&lt;br /&gt;
&lt;br /&gt;
Steps include:&lt;br /&gt;
&lt;br /&gt;
* Preparing the SD card(s)&lt;br /&gt;
* Setting up the firmware on the SD card&lt;br /&gt;
&lt;br /&gt;
=====Preparing the SD card=====&lt;br /&gt;
&lt;br /&gt;
There are two main approaches:&lt;br /&gt;
&lt;br /&gt;
* Setting up the firmware on on SD card (meaning you need two partitions - a boot partition, and a firmware partition), and&lt;br /&gt;
* Setting things up across two SD cards - meaning you boot from one SD card, and have the firmware on the other.&lt;br /&gt;
&lt;br /&gt;
Operating from one SD card provides you the option of still being able to use the other; operating across two cards provides you he option to have a regular boot-SD, and flip between multiple other SDs for the actual firmware, should you wish to cycle between many operating systems (say.)&lt;br /&gt;
&lt;br /&gt;
The boot partition generally must be FAT32, and then the kernel, MLO and other files need to be unpacked upon it.&lt;br /&gt;
&lt;br /&gt;
The firmware partition must be either ext2fs or ext3fs; under Linux, such a partition can be easily created:&lt;br /&gt;
&lt;br /&gt;
'''mkfs.ext2 -L LABELNAME /dev/mmcblk0p2'''&lt;br /&gt;
- assuming LABELNAME for the partition&lt;br /&gt;
- assuming /dev/mmcblk0p2 for your SD device; you'd better check this carefully ;)&lt;br /&gt;
&lt;br /&gt;
==== Setting Up WiFi ====&lt;br /&gt;
==== Setting Up Blutooth ====&lt;br /&gt;
==== Adjusting Brightness/Contrast ====&lt;br /&gt;
==== Changing Your Theme ====&lt;br /&gt;
== Oops! I Borked My Pandora! ==&lt;br /&gt;
Fear not, young netizen! Your Pandora was designed to be unbrickable, so unless you used the ancient art of alchemy to physically turn your Pandora into a brick (or you just broke the hardware inside), you should be okay!&lt;br /&gt;
==== Restore The Original Firmware ====&lt;br /&gt;
==== Boot From SD or USB ====&lt;br /&gt;
== Pandora FAQ ==&lt;br /&gt;
Silly goose, go to the [[FAQ]] page for more detailed information.&lt;/div&gt;</summary>
		<author><name>Dflemstr</name></author>
		
	</entry>
</feed>