Qtopia Home - Classes - Hierachy - Annotated - Functions - Qt Embedded |

# Qtopia Filesystem standards

- Introduction
- Definitions
- Standards

## Introduction

Qtopia software is installed in the `/opt/Qtopia` directory of the target system. Within this directory, applications must follow the file placement standards described in this document.

## Definitions

Term | Definition
--- | ---
appname | this is the application's executable filename. It should be globally unique. Since this name is almost never seen or entered by the end-user, long and complex names such as "abc-textedit-3" can be used.
language | this is the ISO639 language code (e.g. "de" for German).

## Standards

File Type | Placement | Explanation
--- | --- | ---
Executable | `/opt/Qtopia/bin/appname` | This is the executable program. Note that it is not appropriate to use the same executable with arguments to modify it's behaviour, since only one instance of each application will be run (additional attempts to run the application will merely raise the previous instance).
Image | `/opt/Qtopia/pics/appname/...` | Any image files the application needs to use should either be standard built-in images, or be files in this application-specific directory. See the Resource class for an explanation of how to access these files.

.desktop

`/opt/Qtopia/apps/category/appname.desktop`

The .desktop file specifies an entry in the launcher and the start menu. Category must be one of the following and should reflect the launcher Category in which you want the application to appear.:

- Settings: if the software configures functionality that has an ongoing effect on the user's environment. Such software never creates Documents.
- Games: if the software is solely for amusement purposes.
- Applications: for all other software.

These categories have been chosen and defined in this way because it is easy for the average user to differentiate between them.

To install software in other categories would create confusion and should be avoided. For example, you should not attempt to categorize your software as a "Utility", since it is difficult to differentiate this category from the Settings and Applications categories (it falls somewhere in between).

The file format is similar to the file format used by the Unix desktops KDE and Gnome. The format is as follows (lines beginning with a '#' are ignored as comments):

    {[Desktop Entry]
    # the line above is mandatory at the beginning of the file
    # Exec specifies the name of the executable that should be in /opt/Qtopia/bin
    Exec=executablename
    # This should always be Application for links to applications.
    Type=Application
    # Specifies the icon to be found in /opt/Qtopia/pics. Endings are autodetected.
    # The icons should be at least 32x32 and should smooth-scale well
    # from 14x14 to at least 48x48
    Icon=Iconfile
    # The mimetype entry specifies a comma separated list of mimetypes this application can handle.
    MimeType=/audio/mp3
    # the next lines specify the name of the application as it should appear in the launcher
    # and start menu
    Name=My fancy application
    # and if you want to support different languages:
    Name[de]=Meine Anwendung}

The whole file has to be encoded in utf8.

Sound | `/opt/Qtopia/sounds/appname/...` | Any sound files the application needs to use should either be standard built-in sounds, or be files in this application-specific directory. See the Resource class for an explanation of how to access these files.
Internationalization | `/opt/Qtopia/i18n/language/appname.qm` | These files are translations of the software (see Internationalization).
English online documentation | `/opt/Qtopia/help/html/appname-suffixes.html` | These files provide the English online documentation of the software (the -suffixes is optional). Note that on-line documentation can refer to images under the `/opt/Qtopia/pics` directory, so you can refer to icons and other images explicitly without duplicating the files.

Online documentation

`/opt/Qtopia/help/language/html/appname-suffixes.html`

These files are the online documentation of the software (the -suffixes is optional), in the language specified. The suffixes are the choice of the application developer, but Qtopia will automatically connect the Help button in the window decorations to appname-widgetname.html if such a file exists, thereby allowing different application windows to have different associated help pages.

Taskbar applets | `/opt/Qtopia/plugins/applets` | Taskbar applets are placed in this directory.
Media player codecs | `/opt/Qtopia/plugins/codecs` | Mediaplayer codecs are placed in this directory.
Font | `/opt/Qtopia/plugins/fontfactories` | Font factory extensions are placed in this directory.
Input method plugins | `/opt/Qtopia/plugins/inputmethods` | Input Method plugins are placed in this directory.
Network setup | `/opt/Qtopia/plugins/network` | Network setup modules are placed in this directory.
Configuration | `/opt/Qtopia/etc/default` | Configuration files should be stored in $HOME/Settings. This is done automatically for normal usage of the Config class. However if default configuration files are needed, they should be installed in the above directory as read only. When modified, they should be saved to $HOME/Settings.

Applications may put files in the `/opt/Qtopia/lib/appname/...` directory as required.