PND quickstart
This page is a work in progress, the instructions in here may or may not work for you. The PXML.xml and .pnd files section on libpnd hub may also be a good place to start.
This page is a quickstart to packaging an existing directory tree as a PND for distribution.
Contents |
PND generation overview
- create a directory to represent the application on SD card; i.e.: ./mame-app
- create a PXML.xml file and drop it into the dir (./mame-app/PXML.xml); genpxml script can be used, or do it by hand
- drop the executable and data files into this dir (say, ./mame-app/mame.bin, and ./mame-app/artwork/foo, etc.) <- note, with a PXML.xml and executable, it can now be discovered and run without even bundling into .pnd!
- invoke pnd-make.sh (or on Windows, various commands in the command-line) to produce mame4all-pandora-1.0-arm.pnd or whatever you want to call it (foobearspanky.pnd, we don't care.)
- you're done, distribute it as you see fit
Preparations
When GUI tools get released, they may simplify these steps. However, until then you must do the following:
- 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.) Check out the PXML specification, as well as this example file.
- Put your application and all needed files into a single directory .. say "myapp"; it doesn't matter what you call it.
- In your app-dir, put the PXML.xml file in the root
- Put the icon in the root of that dir as well (make it a .png file)
- Make sure the PXML.xml names the icon (just its filename.png), and specifies the executable (foo.bin or whatever.)
Making PND files
Windows / DOS
Command-line
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.
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.
Windows specific preparations
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
If you want to make a compressed image, use squashfs tools here: ftp://ftp.slax.org/useful-binaries/win32/squashfs-tools/
Generate the actual PND-file
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.
mkisofs -o foo.iso -R /path/to/folder/myapp
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.)
copy foo.iso+PXML.xml foo.step2
Append the icon PNG file to the .iso (if you have an icon; if not, you can leave this step out.)
copy foo.step2+myicon.png foo.pnd
Clean up:
del foo.step2 foo.iso
Profit!
GUI
You have a few choices here:
- PNDTools by foxblock. Discussion: OP, GP32X. Can browse and create PNDs. Two (simple and advanced) editors for PXML creation.
- PNDBuilder by StreaK. Discussion (old). Can create PNDs and edit PXML files.
- PNDManager by Speaker Ender. Discussion.
- PNDbuilder by freedomdown. Discussion.
Linux/BSD/Unix (including on Pandora)
Command-line
Tools are included in the libpnd distribution; see below for discussion, but suffice to say they are included in the GIT. Look in testdata/scripts for:
- genpxml - spits out a template PXML.xml for you, and even includes a reasonably unique-id
- pnd_make.sh - given a directory and some arguments, will spit out a .pnd file; great for use in Makefiles
We're working on others as well, so it should be a piece of cake under Unix and Unix-like OSes.
Command-line (alternate instructions)
For these instructions, you will first need to grab the example file, here.
- Edit ./pnds.sh. I use that script to handle multiple apps at once. Each line represents a command line for an app / game to turn the directory into a PND. If I change the app / game, I simply uncomment the line in pnds.sh so that I can easily create or update multiple PNDs by simply running one single script.
- Run ./pnds.sh
- Upload
Don't forget to check the license conditions for anything you re-distribute.
GUI
- PNDbuilder by freedomdown. Discussion. Download v1.1 for Pandora.
Mac OSX
TBD
Example PNDs
You can look at an example PND file to help you out if you're struggling with the above steps. Download one or several PNDs (preferably from the Repo, as it forces strict PXML standards), and use PNDTools to open them and see how they're organised inside, what the PXML file looks like, and so on.
The PND Cookbook contains recipes for common PND tasks, like setting up your application's environment and configuration, locating and copying files, etc.
See also
- libpnd hub - Intensive documentation on PXML and PND
- PND file format explained
- Further packaging tools