This file gives a brief description of Web Runtime for Maemo/MeeGo.

The Web Runtime can be logically separated into two parts:
 - Core, containing the basic components, including widget installer and runner, etc. You can run widgets built from HTML, CSS, and JavaScript with this component.
 - Device APIs, containing the extended JavaScript API support for accessing device resources, e.g. file system, sensors, etc.


To make the life of end users easier, we have the following five packages provided:
 - qtwrt: serves as the meta package, which the widgets depend on.
 - libwrt1: the libraries for Web Runtime Core.
 - wrt: the binaries for Web Runtime Core.
 - libwrt-api1: the libraries for Web Runtime Device APIs.
 - wrt-api: the JavaScript API interfaces and configuration files for Web Runtime Device APIs.



0) Dependencies

You will need a working Scratchbox environment to build WebRuntime. You can
follow the instructions from http://wiki.maemo.org/Documentation/Maemo5_Final_Installation
to setup a working Scratchbox environment.

You need to add the extras-devel repository to get libarchive-dev, by adding:
deb http://repository.maemo.org/extras-devel/ fremantle free non-free
into your /etc/apt/sources.list file.

You also need to add the nokia-binary repository to get libqt4-dev. Please follow the instructions at:
http://tablets-dev.nokia.com/eula/index.php


To build Web Runtime Core, you need some packages not installed by default on Maemo 5 SDK:
 - libqt4-dev
 - libhildondesktop1-dev
 - libarchive-dev

In Scratchbox:
apt-get install libqt4-dev libhildondesktop1-dev libarchive-dev


the following packages are needed to build Web Runtime Device APIs:
 - librtcom-eventlogger-dev
 - liblocation-dev
 - libical-dev
 - calendar-backend-dev
 - libqtm-dev

In Scratchbox:
apt-get install librtcom-eventlogger-dev libical-dev calendar-backend-dev libqtm-dev


To install Web Runtime Core, you need the following packages:
 - libqt4-sql-sqlite
 - libarchive1
 - unzip are needed for the Core, and Qt Mobility is needed for Device APIs.

In Scratchbox:
apt-get install libqt4-sql-sqlite libarchive1 unzip


To install Web Runtime Device API, you need the following packages:
 - calendar-backend
 - libgstreamer0.10-0
 - libqtm-bearer
 - libqtm-contacts
 - libqtm-location
 - libqtm-messaging
 - librtcom-eventlogger1

In Scratchbox:
apt-get install calendar-backend libgstreamer0.10-0 libqtm-bearer libqtm-contacts libqtm-location libqtm-messaging librtcom-eventlogger1



1) Build Web Runtime

You should first build Web Runtime Core, through "dpkg-buildpackage -rfakeroot" at the root of the source tree.

Then build Web Runtime Device APIs:
 a) Build Web Runtime Core.

 b) Install the generated packages of libwrt1, libwrt-dev, and wrt. In Scratchbox from the root of the source tree (ARM build):
     cd ..
     dpkg -i libwrt1_1.1tp-1_armel.deb libwrt-dev_1.1tp-1_armel.deb wrt_1.1tp-1_armel.deb

 c) Link the debian folder for Device APIs. 
    In Scratchbox (assuming src is the root of the source tree):
     ln -s src/wrt/serviceproviders/dist/platform/maemo5/debian debian

 d) Build the Device APIs. In Scratchbox: 
     dpkg-buildpackage -rfakeroot



2) Install Web Runtime

You need to install in the following order: libwrt1, wrt, libwrt-api1, wrt-api, and qtwrt.
Or you can install all these five packages in one single command.

Note that you need to reboot your device when you have Web Runtime installed to have all its functions enabled.



3) Install web applications

You need first have all the five packages installed, then web applications can be installed through file manager, web browser, or terminal.

Note that there's a known issue that the installation would fail if you try to install through SSH connection.



4) Start web applications

If the application contains "minimized" view mode, it will automatically appear in the home screen.
If the application contains "windowed" or "fullscreen" view mode, you can find and launch it in the application grid.



5) Examples

You can find two examples at the src/examples directory.

To install them:
 a) Copy them to your device or Scratchbox.

 b) Open the file from your File Manager, or run "widgetinstaller <.wgt>" in your terminal.

 c) Application Manager will be launched to have it installed.


To launch them:
 a) Open the Application Grid.

 b) Tap on the application icon to launch it.

