Skip to content

Package file format

Maarten ter Huurne edited this page Sep 10, 2013 · 12 revisions

Structure of the package


Base requirements:

  • Package installation must be possible without an internet connection to the device
  • Package installation should be quick and simple for end users
  • Developers must have a quick and easy way to test packages that are in development
  • Run-time performance must be good enough

To satisfy the offline installation requirement:

  • A package must be easy to transfer: one file per package
  • A package must be self-contained: no inter-package dependencies

To satisfy the end user installation requirement:

  • No unpack step necessary: package file has to be mountable

To satisfy the development requirement:

  • A plain directory with the same structure as a mounted package should also be accepted by the launcher

OPK file format

Is a SquashFS filesystem image:

  • Designed for ROM images
  • ZLIB and LZO compression
  • Can be mounted without FUSE
  • Very good performance
  • Possible to seek in contained files

Is not OpenPandora's PND:

  • The mountpoint is not writable
  • User data should go to $HOME
  • Additional game data should go to local/usr/games

Is cross-platform:

  • Mountable on all Linux systems
  • Provides different binaries for different platforms, if needed

Has tools:

  • libopk to read meta-data of OPK files. Python bindings are available.
  • OpenPackageCreator to easily create OPKs from Windows or Linux (through Mono).

The meta-data

The meta-data files:

One or more meta-data files per platform, generally named, where xxx is the platform.

  • e.g.: default.gcw0.desktop, default.a320.desktop

The platform name can be "all": in this case, the meta-data will correspond to all platforms. It is useful when packing scripts (shell/python...), or when the executable is built into the root filesystem.

  • e.g.: default.all.desktop

More than one meta-data file for one given platform will give multiple links on the launcher.

  • e.g.: quake1.gcw0.desktop, quake2.gcw0.desktop

Uses the .desktop file format:

  • Type: always set this to "Application".
  • Name: the title of the app on the menu.
  • Comment: a short description of the app.
  • Categories: Semicolon-separated list of categories of the menu in which the app will be displayed. Must be terminated by a semicolon.
  • Icon: defines the name of the PNG that should be used for that application. The PNG file is first searched on the user local directory, then on the root of the package, then on the system directory. Do not append the .png extension here, it is implied.
  • Exec: the command to execute the program. If the program requires a file, use the token '%f'.
  • Terminal: tell the menu to launch the app in a framebuffer console if enabled.
  • MimeType: Semicolon-separated list of MIME types the emulator / application can open. If no "MimeType" parameter is provided, the application is started without any file. Must be terminated by a semicolon.

Non-standard extensions:

  • X-OD-Manual: Name of a text file that will be used as the manual of the app by the launcher.
You can’t perform that action at this time.