Thursday, October 30, 2008

Generating resource file for Symbian S60

How many of less-than-a-year Symbian developer really know about generating of resource file but the abld resource command ?

Yesteday evening I was asked to make a sample of 5 resource files for varies oem's id for 5 customers. That means I need to change the rss file by replacing the existing rss with new customer id, save it, then call the abld command, rename it and store it to its place. Afterward I must repeat the same procedures 5 times!! No, no, no. We planed to support 40 customers at the first release! So, I asked Stephane, my colleague who is symbian expert what tool behind the abld, he said rcomp but he never uses it directly.

So I checked the SDK, yeah, it seemed to be what I wanted. But what were the differences of baseinputfile and the sourcefile and what was RPP, how could we get that? Googled, googled, no answer!! There were few people asked for the rcomp but no answer. Ahhh.. not so many entries met my search string either "symbian rcomp" or "symbian rpp". answer also for rpp. Hence I read and read again every detail of rcomp and this rpp from SDK and experiment, experiment. What the rcomp gave back to me was "BANG!! RCOMP Crash!!", again and again and again. More than 1 hour passed, although I had really believed I understood every single parameters required from rcomp. Something came to my mind..or the rcomp was broken under my PC?? Well, if so, how the abld worked then? Hmm.. ok, let's check the perl package called by abld. Any news? ...Bad.....Sh_____! It still gave me with "BANG, Crash!!!",Crash, Crasssssh!!!

Hey, wait a second!! SDK mentioned another command for generating rsc resource file which again it was kind of wrapper of this rcomp! What was it called ? Right, "epocrc". Hey..there was an example at the end of the help, hmm....the sample looked quite simple, no suspicious parameters nor strange unknown params required Let 's give it a try!


The rest (of the story) is just a piece of cake, a simple perl to take any kind of id and replace it in new rss file and pass the file to "epocrc".