Header Sep
Symbian OS Tips, Tricks & Code
Score
Login to rate page

November 2004
Automatic conversion of Series 60 projects to UIQ with S2U

 

S2U is a tool provided by Peroon Ltd, which automatically converts Series 60 projects to UIQ. The tool can be downloaded for free from http://www.peroon.co.il/s2u.html

Series 60 and UIQ are different in some ways; the former uses a keypad for input, while the latter uses a touch-screen. They also have different sizes of screens. Therefore, porting is necessary in order to convert an application from one platform to the other. S2U makes this job easier, since the process is largely automatic.

S2U consists of a build-time environment and a run-time environment. It can be seen as an add-on to the UIQ SDK and enable Series 60 applications to be built and executed as UIQ applications using the standard UIQ build procedure.

Build-time environment
The build-time environment includes a command-line tool, s602uiq, which is used to migrate Symbian OS projects developed for Series 60 to UIQ. The process requires that some project files be converted. Specifically, this includes the mmp, rss, pkg and bld.inf files. The build-time environment also includes a set of resource-header and link-library files.

The following diagram shows the build procedure with S2U, after the s602uiq tool has been used:

Run-time environment
The S2U run-time environment is currently installed from a SIS file named s602uiq.SIS. This SIS file can be found on the PC hard disk drive after the installation of the package. Normally, it will be located at C:\Program Files\Peroon\S2U\s602uiq.SIS. This SIS installs the S2U runtime engine on the smartphone, which includes a dll named C:\system\libs\s602uiq.dll. When running a converted project, the runtime engine dll supports the UIQ look and feel for applications.


GUI correspondence between the platforms
The following pictures show a Series 60 screen, with the corresponding UIQ screen for a project that has been converted using S2U:

  
Non-portable areas
For some types of application code, it's not possible to automatically convert a complete project. However, even if there are areas where some manual porting is needed, the S2U tool allows the developer to concentrate on non-portable issues instead of the parts that can be automatically converted.

In some cases, #ifdef statements are needed in the original source. This might be the case because of differences in the following areas:

  • Hardware
  • Symbian OS version
  • Device manufacturer variations in OS or UI platform

In some cases, non-portable assumptions should be avoided. This makes the code automatically portable. Please avoid making any of the following assumptions:

  • Absolute screen coordinates
  • Absolute graphical-elements size
  • Hard-coded paths to platform-specific files and folders
  • Explicit names of platform-specific fonts
  • Explicit UID's of platform-specific applications


Conversion of an example project
S2U requires the UIQ 2.1 SDK to be installed on your computer. When the SDK is present, the installation of the tool is easily done using an install wizard.

Porting Series 60 applications to UIQ consists of 2 main steps. Sometimes a third step is necessary. These steps are:
1. Automatic Series 60 project conversion of inf, mmp, rss and pkg files
2. Building the project
3. Modifications to the original source code is sometimes required

Below, we show how to convert an example project named "bitmap" from Series 60 to UIQ.

To convert the project, you'll first have change to the directory where the Series 60 project is located. In this example, we change to C:\Symbian\UIQ_21\S602UIQEx\EMCC\Bitmap.

The s602uiq command-line application should be invoked with the name of the file or folder to be converted. If a folder name is given, the tool will convert relevant project files in that folder. In our case, there is a directory named "group" containing files to be converted. Therefore the following command is given:

$ s602uiq group

Executing this command will create a new folder named "groupUIQ", containing converted files. In this case the project also includes a folder named "install" that contains the pkg file. Therefore, the following command is given:

$ s602uiq install

This command creates a new folder named "installUIQ", with the converted pkg file.

This completes the project conversion and the project can now be built for UIQ, in the normal manner. To build the project for the Sony Ericsson P910 smartphone, based on UIQ 2.1, the following commands are issued:

$ bldmake bldfiles
$ abld build armi urel
$ makesis installUIQ\bitmap.pkg

This creates the file bitmap.sis, which can be installed on the P910 smartphone. Note that the S2U runtime engine must be installed on the phone before the new application can be installed.


 

Score
Login to rate page