MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

Configuring Platform SDK for Harmattan

This section instructs on configuring Platform SDK for MeeGo 1.2. Harmattan. Follow these instructions if you are a Fremantle user, otherwise see Installing Harmattan Platform SDK.

Updating Scratchbox and installing Harmattan Platform SDK

1. Download the Harmattan Platform SDK installer from MeeGo 1.2 Harmattan Platform SDK downloads.

2. To provide executable permission to the script, enter the following command:

 $ chmod +x

3. To run the script with root permission, enter the following commands:

$ sudo -i
[sudo] password for <user>: 
# ./  admininstall 

Platform SDK is installed and ready to use.

Setting up scratchbox-devkit-autotools-legacy

The scratchbox-core 1.0.22 autotools are no longer provided by scratchbox-core. If you want to use Scratchbox provided autotools, you need to install the scratchbox-devkit-autotools-legacy package and select autotools-legacy for your target.

On Debian-based systems:

  1. Enter the following command on the host system (outside Scratchbox):
    $ sudo apt-get install scratchbox-devkit-autotools-legacy
  2. Enter Scratchbox and add the autotools-legacy devkit to the Fremantle targets.
    1. To make a list of the currently configured Fremantle devkits, enter the following command:
      [sbox ~] > sb-conf sh FREMANTLE_X86 -d
    2. To add autotools-legacy to the end of the list and change the target, enter the following command:
      [sbox ~] > sb-conf st FREMANTLE_X86 -d perl:debian-etch:doctools:svn:git:autotools-legacy -f

Logging into Scratchbox

To log into Scratchbox:

  1. In the command prompt, enter the following command:
    $ /scratchbox/login
    The Scratchbox prompt [sbox-HARMATTAN_ARMEL: ~] > shows that you are in the Scratchbox ARMEL target for Harmattan.
  2. To switch to HARMATTAN_X86 target, enter the following command:
    [sbox-HARMATTAN_ARMEL: ~] > sb-conf se HARMATTAN_X86
    [sbox-HARMATTAN_X86: ~] >

Running X server on your host system

In most cases, you already have Xephyr installed on your host system. If not, install it outside the Scratchbox environment (on Debian-based host systems). Enter the following command:

$ sudo apt-get install xserver-xephyr

Note: The screen resolution used in Harmattan is slightly different from Fremantle or other releases.

1. To start Xephyr outside Scratchbox, enter the following command:

$ Xephyr :2 -host-cursor -screen 480x854x16 -dpi 96 -ac -extension Composite &

2. To set the DISPLAY variable inside Scratchbox to match the display setting given for the Xephyr server (in this case, :2), enter the following command:

[sbox-HARMATTAN_X86: ~] > export DISPLAY=:2

Running applications

The startup scripts for Harmattan are named differently from other releases. To start the UI framework services, enter the following command:

[sbox-HARMATTAN_X86: ~] > meego-sb-session start

To run a simple Qt application called <TODO>, enter the following command:

[sbox-HARMATTAN_X86: ~] > meego-run <TODO_app>

Uninstalling Platform SDK

Uninstalling MeeGo 1.2 Harmattan Platform SDK removes the content from your Scratchbox home directory and all your Scratchbox targets (including Fremantle, Diablo, or any other targets that you have set up manually). Thus, it is recommended that you take a backup of your /scratchbox/users/<USERNAME>/home/<USERNAME> directory before proceeding with the uninstallation.

To uninstall Platform SDK:

  1. To stop Scratchbox, enter the following command:
    $ sudo /scratchbox/sbin/sbox_ctl stop
  2. To remove Scratchbox, enter either of the the following commands:
    On 32-bit host systems:
    $ sudo apt-get remove scratchbox* --purge
    On 64-bit host systems:
    $ sudo rm -rf /scratchbox