Integrating your application with Alchemy OS

This document describes how you can integrate your programs with graphical environment of Alchemy OS.

Placing entry in the application menu

To make your application appear in the startup application menu you need to place .desktop file under /res/apps/. In general I aim to support FreeDesktop specification of desktop entries but for now it is sufficient to put three lines in this file:

Name=<description>
Exec=<command>
Icon=<path/to/icon.png>

The "Name" and "Icon" lines are what will appear in menu while "Exec" line is what will be executed. It is recommended for icon to have the same name as application and to be installed under /res/icons/. In the latter case you may specify only name of the icon.

Example layout for application foo:

/bin/foo Application itself
/res/foo/* Application data
/res/icons/foo.png Icon
/res/apps/foo.desktop Desktop launcher

Contents of foo.desktop:

[Desktop Entry]
Name=Foo program
Exec=foo
Icon=foo.png

Registering file type for your application

I decided that full featured mime-type solution is rather heavy to be incorporated in Alchemy OS (which tends to be lightweight). So file association system is rather simple.

File types are stored in /cfg/filetypes/. Syntax of file types is the following

extension,description,category,command

Where category is one of "exec", "lib", "text", "audio", "video", "image" and "web". For example, if your program is a web-browser and you want *.html files to be opened by it, you can add the line like

html,HTML page,web,mycoolbrowser

in /cfg/filetypes/.


Copyright (c) 2012, Sergey Basalaev

This manual is free software; you may redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

This is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

A copy of the GNU General Public License is available on the World Wide Web (see http://www.gnu.org/copyleft/gpl.html). You can also obtain it by writing to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.