This Primer deals mainly with Symbian OS devices. Most of it can apply to EPOC machines. This paper is not a fully step by step guide, but provides the major points in getting OPL running. You should follow any read.me files in the downloaded SDK's as you install them. If any points are unclear, then feel free to ask in the comments, on the
OPL Forum at
All About Symbian or ask Ewan_ on irc.freenode.net on the #mobitopia channel.
Note that all the OPL Tools currently available for Windows based IBM PC and compatibles. There are no Mac or Linux tools (of course, the tools are Open Sourced, so there's nothing stopping you...). Unless you have a pressing need, you should stick with all the default paths and options given when installing the SDK's.
*
Nokia 9210 SDK from Forum Nokia.
*
9210 OPL Developer Kit from OPL-Dev on Sourceforge.
* Your favorite Text Editor.
*
Series 60 SDK For Symbian OS from Forum Nokia.
*
Series 60 OPL Developer Kit from OPL-Dev on Sourceforge.
* Your favorite Text Editor
*
FExplorer: File Explorer and Launcher for Series 60 devices.
Without the runtime, OPL Programs will not work. In the OPL SDK you installed, look for ..\binaries\sisfiles\target\other\ which should contain a file starting OPL and ending. SIS. This is the OPL Runtime Application, and needs installed just like any other application (so a double click on the PC should do it, otherwise Bluetooth or IR Beam it to the Inbox).
It's best to create a new folder for each OPL Project on your PC, as you may end up with a variety of resource files (such as graphics, scripts to build .sis files, etc). We'll illustrate the Command Line Tool Chain with a simple Hello Word program, as is traditional.
Open up a blank text file and type in the following source code.
Save this file as helloworld.tpl. OPLTran reads in ASCII text files, so be sure your editor saves in this format.
Open up the Command Line on your PC, and navigate to the directoyr which has the source code file you saved above. Type in the following command line:
This should happily work away for a few moments, and output helloworld.opo. THis is your compiled OPL Program.
Now send the compiled .opo file to your Symbian OS Device. This can be through:
* A PC Based File Manager (eg
Epocware's PC File Manager)
* Send via InfraRed.
* Send via Bluetooth.
When distributing applications, you can use the Symbian OS .sis installation files to make it easier for the end user, but you'll end up using this method a lot when developing OPL programs.
The file will appear in your Inbox. Highlight this and choose the option to save the .opo file. Now go to the Files application, and find the .file you've just saved. Highlight in, and press enter to run the file. Hello World should be on the screen. Congratulations!
The file will appear in your Inbox. Unfortunatly you can't run it directly from the Inbox, and Series 60 doesn;t allow you direct access to the File System, so you can't save it anywhere.
Open up FExplorer, and use the Find function to locate helloworld.tpl. Cut this, press back and move to an appropriate folder to store your .opo files. (I use C:/OPO/). You can now highlight the .opo file, and run it. Hello World should be on the screen. Congratulations!