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"; }; }