关于Symbian里面的mifconv ,(.mk和.miflist文件的作用和工作)【转】2010-04-30 15:28简单的说,mifconv是symbian提供的一个图像压缩打包工具,用于将svg/bmp格式的多个源文件合成一个mif/mbm复合文件。关于mifconv的更多介绍可参考相关文档,这里我这要介绍下它的用法。
通过命令行可看到mifconv的参数信息如下:
mifconv
Multi Icon File converter tool. Version 1.11 (Build 50, SVG stand-alone)
Copyright (c) 2001-2008 Nokia Corporation. All rights reserved.
Usage:
MIFCONV miffile.MIF
[/Hheaderfile.MBG]
[/E]
[/Ppalettefile]
[/Ttemppath]
[/Bbmconvpath]
[/Ssvgencodepath]
[/Vsvgtversion]
[/Fparametername.txt]
[/A] [/OPT] iconsource1.EXT [ ... [/A] [/OPT] iconsourceN.EXT]
/Hheaderfile.MBG specifies output header file name
/E specifies that source icons are only loaded with given file
extensions. By default, MifConv prefers source icons with
extension .SVG over .BMP, regardless of which is given as
a parameter.
/Ppalettefile palette parameter, which is forwarded to BMCONV for
bitmap icons. See more details in BMCONV help.
/Ttemppath specifies the location of temporary files.
/Bbmconvpath specifies the location path of BMCONV.exe.
/Ssvgencodepath specifies the location path of SVGTBINENCODE.exe.
/Vsvgversion specifies the format version of the generated SVGB binary
code by SVGTBINENCODE.exe.
svgversion may be one of the following values:
1 - original encoding for 3.0 and 3.1 (BGR/float)
2 - encoding (BGR/fixed point)
3 - optimized encoding for 3.1 only (RGB/fixed pt)
4 - encoding (RGB/float)
/A specifies animated flag for icon
/OPT specifies icon framebuffer depth and mask depth and
the syntax is DEPTH[ ,MASK]
DEPTH may be one of /1,/2,/4,/8,/c4,/c8,/c12,/c16,/c24,/c32
MASK may be one of 1,8
EXT may be one of SVG, BMP
Parameter file defined with option /F may contain
any of the parameters listed above, separated by spaces or newlines.
上面的英文相比大家都能看懂。
下面我们看一个具体的使用mifconv例子:
//your_makeimage.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)/youtimage_res.mbm ;你的合成后的图片资源文件名,以mbm结尾
HEADERDIR=$(EPOCROOT)epoc32/include
HEADERFILENAME=$(HEADERDIR)/youtimage_res.mbg ;include下面的头文件名
ICONDIR=../gfx
do_nothing :
@rem do_nothing
MAKMAKE : do_nothing
BLD : do_nothing
CLEAN : do_nothing
LIB : do_nothing
CLEANLIB : do_nothing
RESOURCE :
mifconv $(ICONTARGETFILENAME) /H$(HEADERFILENAME) /FImages.miflist ;/F后面是资源列表文件名
FREEZE : do_nothing
SAVESPACE : do_nothing
RELEASABLES :
@echo $(HEADERFILENAME)&& /
@echo $(ICONTARGETFILENAME) /
@echo $(OTHERICONTARGETFILENAME)
FINAL : do_nothing
//看下Images.miflist里面的写法和格式
/c16,1 ../gfx/icon_rectangle_pressed_38x38.svg
/c16,1 ../gfx/icon_rectangle_unpressed_38x38.svg
/c16,1 ../gfx/icon_undo_pressed_38x38.svg
/c16,1 ../gfx/icon_undo_unpressed_38x38.svg
/c16,1 ../gfx/Mobile_splashscreen.bmp //如果是bmp的图,并且使用mask参数的话,必须有*_mask.bmp存在(此处*代表Mobile_splashscreen)。
......
最后在pkg里面打包的时候别忘了把youtimage_res.mbm和youtimage_res.mif都打进去,否则有些资源会找不到.
http://blog.csdn.net/zhaojiangwei102/archive/2009/08/10/4431084.aspx