1> 在工程的gfx目录下准备好icon_cxt.bmp icon_cxt_mask.bmp icon_lst.bmp icon_lst_mask.bmp四个图标,前两个是大图,后两个是小图,xxx_mask.bmp是黑白的,它是相应图片的遮罩图,系统用来作透明效果。如下
2> 在group目录下增加 icons_aif.mk 文件,用它来生成系统所需的mbm文件,内容如下.
ZDIR=$(EPOCROOT)epoc32/release/$(PLATFORM)/$(CFG)/Z
else
ZDIR=$(EPOCROOT)epoc32/data/z
endif
TARGETDIR=$(ZDIR)/RESOURCE/APPS
ICONTARGETFILENAME=$(TARGETDIR)/xxx_aif.mbm
do_nothing :
@rem do_nothing
MAKMAKE : do_nothing
BLD : do_nothing
CLEAN : do_nothing
LIB : do_nothing
CLEANLIB : do_nothing
RESOURCE :
mifconv $(ICONTARGETFILENAME) /c24,1 ../gfx/icon_lst.bmp /c24,1 ../gfx/icon_cxt.bmp
FREEZE : do_nothing
SAVESPACE : do_nothing
RELEASABLES :
@echo $(ICONTARGETFILENAME)
FINAL : do_nothing
3> 工程group目录下的 bld.inf 中加入一句,就在xxx.mmp这句的上面即可
......
gnumakefile icons_aif.mk
xxx.mmp
4> 在data目录中的rss文件中声明
RESOURCE LOCALISABLE_APP_INFO r_xxx_localisable_app_info { short_caption = qtn_app_short_caption_string; caption_and_icon = CAPTION_AND_ICON_INFO { caption = qtn_app_caption_string; number_of_icons = 1; icon_file = "//resource//apps//xxx_aif.mbm"; }; }