|
1.在PLutommi\mmi\inc\PixtelDataType.h中定义:
RESOURCE_BASE_RANGE(MYAPP, 100),
/***************************************************************************
* MyApp
****************************************************************************/
#define MYAPP_BASE ((U16) RESOURCE_BASE_MYAPP)
#define MYAPP_BASE_MAX ((U16) RESOURCE_BASE_MYAPP_END)
RESOURCE_BASE_TABLE_ITEM(MYAPP)
2.在plutommi\Customer\ResGenerator\makefile加上路径:
-I "../../MMI/MyApp/MyAppInc"
3.在PLUTOMMI\MMI\MYAPP\MYAPPINC\MYAPPDEFS.H为:
#ifndef __MYAPPDEFS_H
#define _MYAPPDEFS_H
#include "MMI_features.h"
#include "PixtelDataTypes.h"
typedef enum
{
SCR_MYAPP_MAIN=MYAPP_BASE+1,
}SCREENID_LIST_MYAPP;
typedef enum
{
STR_MYAPP_HELLO=MYAPP_BASE+1,
}STRINGID_LIST_MYAPP;
#endif /*_MYAPPDEFS_H*/
4.在plutommi\Customer\CustResource\PLUTO_MMI中的ref_list.txt(同时将RES_MMI目录中的ref_list.txt)定义字串(UltraEdit情况):
在Microsoft Excel中显示
5.在plutommi\customer\custresource\pluto_mmi\res_mmi中编辑res_myapp.c
#include "MMI_features.h"
#include "StdC.h"
#include "CustomCfg.h"
#include "myappdefs.h"
#ifdef DEVELOPER_BUILD_FIRST_PASS
#include "PopulateRes.h"
void PopulateMyAppRes(void)
{
ADD_APPLICATION_STRING2(STR_MYAPP_HELLO,"Hello,World","MyApp.");
}
#endif /*DEVELOPER_BUILD_FIRST_PASS*/
6.修改plutommi\mmi\resource目录下的PopulateRes.c文件:
//#if defined(__MMI_MYAPP__)
extern void PopulateMyAppRes(void);
//#endif
void PopulateResData(void)
{
……
#if defined(__MMI_MYAPP__)
PRINT_INFORMATION(("Populating MyApp Resources\n"));
PopulateMyAppRes();
#endif
……
}
7. 在plutommi\mmi\inc\mmi_feaures.h中定认MMI_MYAPP
/****************************************************************************
[Application]:MyApp
****************************************************************************/
#define _MMI_MYAPP_
完成上述过程后,build new或在plutommi\customer\下运行remakeresource.bat,然后在VC中build,
可是运行后, pixtel_UI_print_text((UI_string_type)GetString(STR_MYAPP_HELLO));得不到字串。
而且在remakeresource.bat运行后,看custstrlist.txt中没有STR_MYAPP_HELLO字符串的定义。
不知道原因是什么。请各位指点。 |
|