Nov 23

I have always wanted to write this, but never had the time to do it. Porting to Series 60 3rd edition is quite easy, if you have designed your application correctly, but takes quite some time because of the details. There are applications that will be hard to port (those that “hacks” the system) because of the new security model, but for most applications, porting to 3rd edition is quite easy.

First you need to create a new bld.inf and MMP file, usually you just need to change the target to WINSCW GCCE and add gnumakefile icons.mk if you are planning to use SVG icon (I think you should, and this article assumes that you are). Its rather difficult to explain the contents of icons.mk, just copy from the Series 60 Examples, and edit the svg filename. You can create the SVG icon using InkScape (free).

Change the MMP file as follows:

  1. Change target type to EXE
  2. Name the target file from name.app to name.exe
  3. Map your old uid from 1xxxxxxx range to Fxxxxxx range, i.e change the first hex from 1 to F (or request a new one from www.symbiansigned.com)
  4. Change the stack size just in case it is not enough for you, add epocstacksize 0x5000. If your application needs large amount of heap, change also the epocheapsize.
  5. If your application needs special capabilites, add CAPABILITY

The creation of resource files from MMP needs to be changed from:


RESOURCE S60Bible.rss

to

START RESOURCE S60Bible.rss
HEADER
TARGETPATH \resource\apps
LANG SC
END

Add the following code to your RSS file:

RESOURCE LOCALISABLE_APP_INFO r_s60bible_localisable_app_info
{
short_caption = STRING_s60bible_short_caption_string;
caption_and_icon =
CAPTION_AND_ICON_INFO
{
caption = STRING_s60bible_caption_string;
number_of_icons = 1;
icon_file = "\\resource\\apps\\s60bible_aif.mif";
};
}

Create registration file (it must be done so your app will shows up on the menu), names yourapp_reg.rss:

include
#include

UID2 KUidAppRegistrationResourceFile
UID3 0xYOURUID

RESOURCE APP_REGISTRATION_INFO
{
app_file=”S60Bible”;

localisable_resource_file = “\\resource\\apps\\s60bible”;
localisable_resource_id = R_S60BIBLE_LOCALISABLE_APP_INFO;

embeddability=KAppNotEmbeddable;
newfile=KAppDoesNotSupportNewFile;
}

This RSS file also needs to be added to the MMP (the target is different between the emulator and the real device, why the hell are they doing that?):


START RESOURCE S60Bible_reg.rss
#ifdef WINSCW
TARGETPATH \private\10003a3f\apps
#else
TARGETPATH \private\10003a3f\import\apps
#endif
END

if you are using avkon.mbm, change it to avkon2.mbm, like this:
#define AVKON_BMPFILE_NAME "z:\\resource\\apps\\avkon2.mbm"

OK, you should be ready to change the code now.

Topics: General |

Comments