April 28, 2003

Coding OPL for the Series 60

The OPL Runtime (build 0.20) has been released. Here we look at what tools are available to get your OPL programs running on a Series 60 device.

Runtime
The Series 60 Runtime can be obtained from the OPL-Dev Homepage. This is a simple SIS file that you install via the PC Suite as you would any other application. This provides the 'engine' that understands the compiled OPL code and actually does the work of doing things on the phone.


Translation (9210)
The easiest way to code in OPL is to use the Nokia 9210. The Developers Pack for the Nokia 9200 can be installed onto your Nokia Communicator, providing an Editor and Translator on the Phone (under the Program application, found under Extras after installing). The compiled .opo files can be sent via IrDA from the File Manager into your Series 60 phone, and run via any File Manager (see a bit later for running .opo's).


Translation (9210 Emulator)
Don't have a Communicator? There's nothing to stop you installing the Communicator SDK (from Forum Nokia, and installing this gives you a COmmunicator Emulator on your Windows PC. Now if you grab the Developers Pack for the Nokia 9200, you'll find instructions on installing OPL into the Emulator.

Now you can code in the Communicator enviroment in the dedicated OPL Program application. The resulting .opo file can be found in your PC's file system, and copied over to the Series 60 by IrDA or Bluetooth.


Translation (PC Command Line)
Windows PC command line tools to translate plain text files into .opo files can be found in the Developers Pack for the Nokia 9200. Again you'll need the SDK from Forum Nokia, but this method means you don't need to run the Emulator, and you can use your favorite Windows Text Editor.


Getting the .opo onto the Series 60 Device
No matter where you comiple your .opl file into a .opo file, you need to get it onto the device. From the 9210, you can IrDA beam the .opo file to the Series 60 device. From the PC (be it from the emulator or a command line compiler) you can right click from within Windows Explorer, and Send To the device via IrDA or Bluetooth.

The above method will put the file into the Message application as an incoming message. You'll probably need to go deep into the file system on the device to find it and move it to somewhere sensible - it will be somewhere under C:\System\Mail\ and then it's happy hunting... so best to choose a File Manager with a Find function!

An easier option would be to use Epocware's PC File Manager. This lets you drag and drop files directly from Windows Explorer to any directory on your Series 60 device, bypassing the Message app. When you're developing on a PC and moving a translated .opo every few minutes while devloping, this method is really convenient. It's well worth the $18 registration fee - but you do have a 30 Day evaluation period to see if it's for you.


Running .opo on the Series 60
Currently the only way to run OPL applications on a Series 60 device is to run the compiled .opo from a File Manager. Series 60 devices don't have a File Manager as a standard application, so you will need to download and install a third party File Manager.

There are various ones to choose from, but it is worth looking at FExplorer by Domi Hugo. It's freeware, and has the all important Find function. Simply selecting the .opo file in FExplorer will run the .opo and hten your application will be running on your phone!

In later versions of the runtime, you'll be able to compile your .opl files so they can be installed on your phone and appear as fully fledged applications, in the same way as C++ and the built-in applications, but this is some time off.


Web Links
OPL-Dev Homepage.
OPL-Dev Project Page on Sourceforge.
OPL Developers Pack for the Nokia 9200.
Forum Nokia.
PC File Manager, by Epocware.
FExplorer, by Domi Hugo.

Posted by Ewan at April 28, 2003 06:00 PM
Comments
Helpful summary, as documentation seems scattered all over the place! Thanks. Posted by: Jason on August 14, 2003 08:11 PM
Post a comment