Revision as of 14:54, 6 February 2008 by Forum Nokia KB (Talk | contribs)

Creating and adding an icon to an S60 3rd Edition application

From Nokia Developer Wiki
Jump to: navigation, search


ID CS000808 Creation date February 6, 2008
Platform S60 3rd Edition
S60 3rd Edition, FP1
S60 3rd Edition, FP2
Tested on devices Nokia E90 Communicator
Category Symbian C++ Subcategory Graphics, SVG
APIs None Classes None
Methods None    


This code example describes how to create and add an icon to an S60 3rd Edition application.

In order to create SVG icons, you must have a suitable graphics editor, for example,Inkscape.

This snippet can be self-signed.


1. Create an SVG icon on a 48-x-48-pixel canvas. You can test the icon by building the HelloWorldBasic application (in S60Ex directory under the SDK) with your own icon.

2. Save the icon in the gfx folder of your application according to the standard Symbian directory structure guidelines.

3. Create group\icons_scalable_dc.mk to automatically convert the icon to a Symbian .mif file whenever the application is compiled:

ifeq (WINS,$(findstring WINS, $(PLATFORM)))
do_nothing :
@rem do_nothing
MAKMAKE : do_nothing
BLD : do_nothing
CLEAN : do_nothing
LIB : do_nothing
CLEANLIB : do_nothing
/c32 $(ICONDIR)\icon.svg
FREEZE : do_nothing
SAVESPACE : do_nothing
FINAL : do_nothing

Note: When editing the makefile, make sure that you use tabulators instead of spaces. (Otherwise you get the error: "ICONS_SCALABLE_DC.MK:25: *** missing separator. Stop.")

4. Edit group\bld.inf to contain the makefile created above:

#ifdef EKA2 //3rd Edition
gnumakefile icons_scalable_dc.mk
#else //1st and 2nd Edition

Note: Remember to run "bldmake bldfiles" after editing the bld.inf file.

5. Edit the resource file of your application (data\[app].rss) to contain the icon:

#include <appinfo.rh>
#include "Application.rls"
// ----------------------------------------------------------------------------
// r_application_localisable_app_info
// ----------------------------------------------------------------------------
RESOURCE LOCALISABLE_APP_INFO r_application_localisable_app_info
short_caption = STRING_r_app_caption_string;
caption_and_icon =
caption = STRING_r_app_caption_string;
number_of_icons = 1;
icon_file = "\\resource\\apps\\Application_aif.mif";

Note: The localizable application information presented above is often located in data\[app]_loc.rss file. Experience has shown that an icon may not always show on the device if it is declared in the loc.rss file. If you decide to use .rss instead of loc.rss, make sure that you remove all references to loc.rss (especially the localisable_resource_file declaration in APP_REGISTRATION_INFO resource in data\[app]_reg.rss and RESOURCE section in group\[app].mmp).

6. Edit the pkg file (sis\[app].pkg):

;Language - standard language definitions
} -"!:\resource\apps\Application.rsc"
;Icon resources

See also

123 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.