×
Namespaces

Variants
Actions
Revision as of 04:37, 30 May 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

如何生成一个MIF文件

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata

文章
翻译:
hoolee
最后由 hamishwillee 在 30 May 2013 编辑

Contents

在Bld.inf文件添加

// ..
 
PRJ_MMPFILES
 
gnumakefile My_Icon.mk
MyProject.mmp
// ..


在My_Icon.mk文件中添加

ifeq (WINS,$(findstring WINS, $(PLATFORM)))
ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z
else
ZDIR=$(EPOCROOT)epoc32\data\z
endif
 
TARGETDIR=$(ZDIR)\resource\apps
ICONTARGETFILENAME=$(TARGETDIR)\My_Icon.mif
 
HEADERDIR=$(EPOCROOT)epoc32\include
HEADERFILENAME=$(HEADERDIR)\My_Icon.mbg
 
ICONDIR=..\gfx
 
do_nothing :
@rem do_nothing
 
MAKMAKE : do_nothing
 
BLD : do_nothing
 
CLEAN : do_nothing
 
LIB : do_nothing
 
CLEANLIB : do_nothing
 
# In the below lines the c32,8 the 32 is for the image and
# 8 is for it's mask. See how the BMP file is mentioned
# below the SVG's here.
 
RESOURCE :
mifconv $(ICONTARGETFILENAME) /H$(HEADERFILENAME) \
/c32,8 $(ICONDIR)\My_Icon1.svg\
/c32,8 $(ICONDIR)\My_Icon2.svg\
/c32,8 $(ICONDIR)\My_IconN.svg\
/c24 $(ICONDIR)\My_BMPIcon1.bmp\
/c8 $(ICONDIR)\My_BMPIcon1_Mask.bmp\
/c24 $(ICONDIR)\My_BMPIcon2.bmp\
/c8 $(ICONDIR)\My_BMPIcon2_Mask.bmp\
/c24 $(ICONDIR)\My_BMPIconN.bmp\
/c8 $(ICONDIR)\My_BMPIconN_Mask.bmp
 
 
FREEZE : do_nothing
 
SAVESPACE : do_nothing
 
RELEASABLES :
@echo $(HEADERFILENAME)&& \
@echo $(ICONTARGETFILENAME)
 
FINAL : do_nothing

在command line中添加

c:\MyProject\Group> bldmake bldfiles
c:\MyProject\Group> abld build gcce urel


输出内容

...
 
Checking: ..\gfx\My_Icon.svg
Choosing...
1 file(s) copied.
Loading mif icons...
Loading file: \epoc32\winscw\c\system\temp\s5bs.tmp\.._gfx_My_Icon.svgb
Writing mif: \epoc32\data\z\resource\apps\My_Icon.mif
Writing mbg...\epoc32\include\My_Icon.mbg
...
This page was last modified on 30 May 2013, at 04:37.
120 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.

×