Programming Languages
Introduction
By default, the maemo development environment supports the C programming language but you may add support for other programming languages. This document describes the steps needed to install maemo support for C++ and Python application development. The Maemo development environment defines helpful meta packages that include all the components and tools for these additional development environments but the individual packages can also be installed separately.
These meta packages are available from the maemo SDK community repository. For instance, maemo Chinook packages are in the Chinook Extras repository and maemo Diablo packages are in the Diablo Extras repository. There are separate meta packages available to install the development environment to the Tablet and to the maemo SDK.
These meta packages are named using the following syntax:
- for maemo SDK: maemo-<programming language>-env
- for Tablet: maemo-<programming language>-device-env
These packages will install the full programming-language-specific development environment for the maemo SDK and the needed runtime and debugging environment for Tablet.
These maemo programming environments are supported on the maemo 4.0.x Chinook and 4.1.x Diablo SDK releases and on both N800 and N810 Internet Tablet devices.
Notice that these meta packages are available only to set up the development environment and must not be used as dependencies for your own application installation packages. You should always use the exact packages for your dependencies instead of meta packages.
Configuring repositories
To install a programming-language-specific environment to the maemo SDK and Tablet you need to enable the maemo SDK specific Tools and community Extras repositories.
Scratchbox
Add the maemo SDK Extras repository to each scratchbox target (to the /etc/apt/sources.list file)
-
For Chinook (4.0.x) SDK, add this line, if it is not already present:
-
deb http://repository.maemo.org/extras chinook free non-free
-
-
For Diablo (4.1.x) SDK, add these lines, if it is not already present:
-
deb http://repository.maemo.org diablo/tools free non-free
-
deb http://repository.maemo.org/extras diablo free non-free
-
Update your package lists with “fakeroot apt-get update”.
Tablet
For the Tablet, you may use the Application Manager to enable the Extras and Tools repositories.
First, be sure your tablet is configured to access the internet properly over wifi. If you are behind a firewall and need to use a web proxy, make the settings in Settings > Control Panel > Connectivity > Connections > your wifi connection > Edit > Next > Next > Advanced > Proxies.
Then add the Extras repository using the following steps:
-
Run Settings > Application Manager
-
Go to menu > Tools > Application Catalog...
-
Click “maemo Extras”
-
Click “Edit”
-
Then uncheck “Disabled”
-
Hit “Ok”
-
Answer “Ok” for “Refresh application list?”
For Diablo, also add the Tools repository using these steps:
-
Run Settings > Application Manager
-
Go to menu > Tools > Application Catalog...
-
Click “New”
-
Enter Catalog Name: maemo Tools
-
Enter Web Address: http://repository.maemo.org/
-
Enter Distribution: diablo/tools
-
Enter Components: free
-
Click “Ok”
-
Click “Close”
-
Answer “Ok” for “Refresh application list?”
Notice that packages from these repositories are available in a variety of categories, not all of which are for programming languages.
C support
The Maemo SDK environment ships with the necessary scratchbox devkits for C (and C++) compilation. The maemo SDK rootstraps contain glibc and the development packages for Hildon APIs so Hildon C programs can be built right out of the box and run under scratchbox or on the Tablet.
The Maemo SDK Tools repository has two meta packages maemo-c-debug-tools and maemo-debug-scripts to install some default tools that are needed for basic C/C++ development. These packages will install, for example, the gdb and ltrace tools, and glibc debug symbols.
Notice that these meta package may not be available for Maemo Chinook but only for Maemo Diablo, and only from the Diablo Tools repository. For Chinook you can install these same tools one-by-one from the Chinook SDK repository.
Notice that, in addition to the tools delivered as part of default maemo SDK installation, maemo provides additional development tools, see Maemo SDK Tools.
Notice that debug symbols needed to debug open source components delivered together with the maemo SDK are available from the maemo SDK repository and can be installed using apt-get.
Scratchbox
Maemo debug tools are installed to the x86 rootstrap. Notice that for Chinook debug tools are installed from Chinook SDK repository and for Diablo from Diablo Tools repository.
- Invoke "fakeroot apt-get install gdb ltrace libc6-dbg" (Chinook)
-
Invoke "fakeroot apt-get install maemo-c-debug-tools". (Diablo)
- Invoke "fakeroot apt-get install maemo-debug-scripts". (Diablo)
Tablet
You can install the same tools to the Tablet using apt-get.
- Become root, and invoke "apt-get install gdb ltrace libc6-dbg" (Chinook)
-
Become root, and invoke "apt-get install maemo-c-debug-tools". (Diablo)
- Become root, and invoke "apt-get install maemo-debug-scripts". (Diablo)
C++ support
For the C++ development environment you need to install the maemo-c-debug-tools and maemo-debug-scripts meta packages (installation instructions were given above) and you will have all basic tools for C++ development. In addition to these tools you also need to install maemo C++ bindings and for that there are C++ development environment specific meta packages available from maemo Extras repository.
For a general overview of C++ development in maemo see Maemo for mobile developers and for details of maemo C++ bindings see Maemomm Documentation.
The Maemo C++ development environment meta packages provide all the needed runtime and development packages for C++ application development.
Scratchbox
Install the maemo-cplusplus-env meta package with "fakeroot apt-get install maemo-cplusplus-env" for x86 and ARMEL rootstraps.
Tablet
You need only the runtime and debugging environment for the Tablet. You can install them to the Tablet using either single click installation file or apt-get.
Either:
-
Install from maemo-cplusplus-device-env.install (Diablo only)
or
-
Become root, and invoke "apt-get install maemo-cplusplus-device-env".
Python support
For the Python development environment you need to install the Python programming-language-specific meta packages for the Tablet and maemo SDK. These packages are available from the maemo Extras repository.
For a general overview of Python development in maemo see Python for maemo.
The Maemo Python development environment meta packages provide all the needed runtime and development packages for Python application development. The Maemo Python development environment also supports development of your own C/C++ Python extensions for the Python applications. To fully support C++ extensions you need to install the maemo C++ development environment as described above.
Scratchbox
Install the maemo-python-env meta package with "fakeroot apt-get install maemo-python-env" for x86 and ARMEL rootstraps.
Tablet
You need a basic runtime and debugging environment for the Tablet. You can install them to the Tablet using either single click installation file or apt-get.
Either:
-
Install from maemo-python-device-env.install (Diablo only)
or
-
Become root, and invoke "apt-get install maemo-python-device-env".
Improve this page