PopulateRes.c
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:76k
源码类别:

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*****************************************************************************
  36.  *
  37.  * Filename:
  38.  * ---------
  39.  *  PopulateRes.c
  40.  *
  41.  * Project:
  42.  * --------
  43.  *  MAUI
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *  Populate Resource Engine
  48.  *
  49.  * Author:
  50.  * -------
  51.  * -------
  52.  *                      
  53.  *============================================================================
  54.  *             HISTORY
  55.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  56.  *------------------------------------------------------------------------------
  57.  * removed!
  58.  *
  59.  * removed!
  60.  * removed!
  61.  * removed!
  62.  *
  63.  * removed!
  64.  * removed!
  65.  * removed!
  66.  *
  67.  * removed!
  68.  * removed!
  69.  * removed!
  70.  *
  71.  * removed!
  72.  * removed!
  73.  * removed!
  74.  *
  75.  * removed!
  76.  * removed!
  77.  * removed!
  78.  *
  79.  * removed!
  80.  * removed!
  81.  * removed!
  82.  *
  83.  * removed!
  84.  * removed!
  85.  * removed!
  86.  *
  87.  * removed!
  88.  * removed!
  89.  * removed!
  90.  *
  91.  * removed!
  92.  * removed!
  93.  * removed!
  94.  *
  95.  * removed!
  96.  * removed!
  97.  * removed!
  98.  *
  99.  * removed!
  100.  * removed!
  101.  * removed!
  102.  *
  103.  * removed!
  104.  * removed!
  105.  * removed!
  106.  *
  107.  * removed!
  108.  * removed!
  109.  * removed!
  110.  *
  111.  * removed!
  112.  * removed!
  113.  * removed!
  114.  *
  115.  * removed!
  116.  * removed!
  117.  * removed!
  118.  *
  119.  * removed!
  120.  * removed!
  121.  * removed!
  122.  *
  123.  * removed!
  124.  * removed!
  125.  * removed!
  126.  *
  127.  * removed!
  128.  * removed!
  129.  * removed!
  130.  *
  131.  * removed!
  132.  * removed!
  133.  * removed!
  134.  *
  135.  * removed!
  136.  * removed!
  137.  * removed!
  138.  *
  139.  * removed!
  140.  * removed!
  141.  * removed!
  142.  *
  143.  * removed!
  144.  * removed!
  145.  * removed!
  146.  *
  147.  * removed!
  148.  * removed!
  149.  * removed!
  150.  *
  151.  * removed!
  152.  * removed!
  153.  * removed!
  154.  *
  155.  * removed!
  156.  * removed!
  157.  * removed!
  158.  *
  159.  * removed!
  160.  * removed!
  161.  * removed!
  162.  *
  163.  * removed!
  164.  * removed!
  165.  * removed!
  166.  *
  167.  * removed!
  168.  * removed!
  169.  * removed!
  170.  *
  171.  * removed!
  172.  * removed!
  173.  * removed!
  174.  *
  175.  * removed!
  176.  * removed!
  177.  * removed!
  178.  * removed!
  179.  * removed!
  180.  *
  181.  * removed!
  182.  * removed!
  183.  * removed!
  184.  *
  185.  * removed!
  186.  * removed!
  187.  * removed!
  188.  *
  189.  * removed!
  190.  * removed!
  191.  * removed!
  192.  *
  193.  * removed!
  194.  * removed!
  195.  * removed!
  196.  *
  197.  * removed!
  198.  * removed!
  199.  * removed!
  200.  *
  201.  * removed!
  202.  * removed!
  203.  * removed!
  204.  *
  205.  * removed!
  206.  * removed!
  207.  * removed!
  208.  *
  209.  * removed!
  210.  * removed!
  211.  * removed!
  212.  *
  213.  * removed!
  214.  * removed!
  215.  * removed!
  216.  *
  217.  * removed!
  218.  * removed!
  219.  * removed!
  220.  *
  221.  * removed!
  222.  * removed!
  223.  * removed!
  224.  *
  225.  * removed!
  226.  * removed!
  227.  * removed!
  228.  *
  229.  * removed!
  230.  * removed!
  231.  * removed!
  232.  *
  233.  * removed!
  234.  * removed!
  235.  * removed!
  236.  *
  237.  * removed!
  238.  * removed!
  239.  * removed!
  240.  *
  241.  *------------------------------------------------------------------------------
  242.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  243.  *============================================================================
  244.  ****************************************************************************/
  245. #define _POPULATE_RES_C
  246.  /****************************************************************************
  247. * Include Files                                                                
  248. *****************************************************************************/
  249. #include "MMI_features.h"
  250. #include "GlobalMenuItems.h"
  251. #include "custdatares.h"
  252. #include "CustDataProts.h"
  253. #include "custmenures.h"
  254. #include "FontDCL.h"
  255. #include "DebugInitDef.h"
  256. #include "CallsDefs.h"
  257. #include "Globaldefs.h"
  258. #include "wgui_categories.h"
  259. #include "wgui_categories_defs.h"
  260. #include "SATGProts.h"
  261. #include "BootUp.h"
  262. #ifdef DEVELOPER_BUILD_FIRST_PASS
  263. /***************************************************************************** 
  264. *
  265. * FIRST_PASS is for Resgen on PC
  266. *
  267. *****************************************************************************/
  268. #include "CustResDef.h"
  269. #include "SettingDefs.h"
  270. /***************************************************************************** 
  271. * Define
  272. *****************************************************************************/
  273. #define  OUTPUT_IMAGE_ID_FILENAME      CUST_IMG_PATH"\\images_file_list.ini"
  274. /* 101205 audio resource Calvin Satrt */
  275. #define  OUTPUT_AUDIO_ID_FILENAME      CUST_ADO_PATH"\\audio_file_list.ini"
  276. /* 101205 audio resource Calvin End */
  277. #define  OUTPUT_MENUTREE_ID_FILENAME   "..\..\Customer\CustResource\CustMenuTreeID_Out.c"
  278. /***************************************************************************** 
  279. * Local Variable
  280. *****************************************************************************/
  281. /* for generate String list file in first pass */
  282. FILE *StringListFile = NULL;
  283. FILE *EnumListFile = NULL;
  284. FILE *OutputImgIDFile = NULL;
  285. /* 101205 audio resource Calvin Satrt */
  286. FILE *OutputAdoIDFile = NULL;
  287. /* 101205 audio resource Calvin End */
  288. FILE *OutputMenutreeIDFile = NULL;
  289. FILE *RepeatIDListFile = NULL;  /* 102604 Calvin added */
  290. U16 gCurrLangIndex;
  291. #if defined(_POPULATE_RES_C) && !defined(PRODUCTION_RELEASE)
  292. FILE *fpMenuResourceUsage = NULL;
  293. FILE *fpImageResourceUsage = NULL;
  294. FILE *fpAudioResourceUsage = NULL;
  295. FILE *fpStringResourceUsage = NULL;
  296. #define MYFOPEN(fp, filename, type) 
  297. do                                  
  298. {                                   
  299.     fp = fopen(filename, type);     
  300.     if (fp == NULL)                 
  301.     {                               
  302.         fprintf(stderr, "%s cannot openn", filename);  
  303.     }                               
  304. } while (0)
  305. #define MYFCLOSE(fp, filename)  
  306.     do                          
  307.     {                           
  308.         if (fp != NULL)         
  309.         {                       
  310.             fprintf(stderr, "output %s done.n", filename); 
  311.             fclose(fp);         
  312.         }                       
  313.     } while (0)
  314. #define PRTRESTITLE(fp)     
  315.     do                      
  316.     {                       
  317.         if (fp != NULL)     
  318.         {                   
  319.             fprintf(fp, "APP_nametRes_basetIDtID_nametsizetdatatres_filenamen"); 
  320.         }                   
  321.     } while (0)
  322. #endif /* #if defined(_POPULATE_RES_C) && !defined(PRODUCTION_RELEASE) */
  323. U16 CurrMaxStringNum;
  324. U32 CurrTotalStrLen;
  325. U16 CurrMaxStringId;
  326. U16 CurrMaxStringIdSearch;
  327. /***************************************************************************** 
  328. * Local Function
  329. *****************************************************************************/
  330. void PopulateGlobalData(void);
  331. #ifdef __FOTA_ENABLE__
  332. static void PopulateFOTAData(void);
  333. #endif /* __FOTA_ENABLE__ */
  334. /****************************************************************************
  335. * Global Variable - Extern                                                                 
  336. *****************************************************************************/
  337. extern U16 CurrMaxImageId;
  338. extern U16 CurrMaxImageNum;
  339. extern U16 CurrMaxImageIdEXT;   /* 040805 CustPack: Calvin added */
  340. extern U16 CurrMaxImageNumEXT;  /* 040805 CustPack: Calvin added */
  341. /* 101205 audio resource Calvin Satrt */
  342. extern U16 CurrMaxAudioId;
  343. extern U16 CurrMaxAudioNum;
  344. extern U16 CurrMaxAudioIdEXT;
  345. extern U16 CurrMaxAudioNumEXT;
  346. /* 101205 audio resource Calvin End */
  347. extern U16 CurrMaxMenuItemIndex;    /* Max menu IDs */
  348. extern U16 CurrMaxStringId;
  349. extern HWND hWnd;
  350. /* 101806 E-NFB start */
  351. #ifdef __MMI_RESOURCE_ENFB_SUPPORT__
  352. extern U16 CurrMaxENFBAssociatedIDNum;
  353. #endif
  354. /* 101806 E-NFB end */
  355. /* 101205 audio resource Calvin Satrt */
  356. #ifdef MMI_ON_HARDWARE_P
  357. extern const CUSTOM_IMAGE_MAP ImageIdMap[];
  358. extern const CUSTOM_IMAGE_MAP ImageIdMapEXT[];
  359. extern const CUSTOM_AUDIO_MAP AudioIdMap[];
  360. extern const CUSTOM_AUDIO_MAP AudioIdMapEXT[];
  361. extern const CUSTOM_MENU nCustMenus[MAX_MENU_ITEMS];
  362. #else /* MMI_ON_HARDWARE_P */ 
  363. extern CUSTOM_IMAGE_MAP ImageIdMap[];
  364. extern CUSTOM_IMAGE_MAP ImageIdMapEXT[];
  365. extern CUSTOM_AUDIO_MAP AudioIdMap[];
  366. extern CUSTOM_AUDIO_MAP AudioIdMapEXT[];
  367. extern CUSTOM_MENU nCustMenus[MAX_MENU_ITEMS];
  368. #endif /* MMI_ON_HARDWARE_P */ 
  369. /* 101205 audio resource Calvin End */
  370. #ifdef MMI_ON_HARDWARE_P
  371. const CUSTOM_STRING *gpStringRes;
  372. const CUSTOM_STRING_MAP *gpStringMapRes;
  373. const CUSTOM_STRMAP_SEARCH *gpStrMapSearch;
  374. extern StringResList *gStringList;
  375. #else /* MMI_ON_HARDWARE_P */ 
  376. CUSTOM_STRING *gpStringRes;
  377. CUSTOM_STRING_MAP *gpStringMapRes;
  378. CUSTOM_STRMAP_SEARCH *gpStrMapSearch;
  379. extern StringResList *gStringList;
  380. #endif /* MMI_ON_HARDWARE_P */ 
  381. /* __CUSTPACK_MULTIBIN Calvin BEGIN */
  382. extern int toolFlag;    /* 040805 CustPack: Calvin added */
  383. /* __CUSTPACK_MULTIBIN Calvin END */
  384. #ifdef __MMI_RESOURCE_ENFB_SUPPORT__
  385. extern FILE *enfb_img_data_file;//100206 ENFB support
  386. #endif
  387. /****************************************************************************
  388. * Global Function - Extern                                                                 
  389. *****************************************************************************/
  390. /* Populate without compile option */
  391. extern void PopulateNFBProgressImg(void);
  392. extern void PopulateMainMenuRes(void);
  393. extern void PopulateIdleMenuRes(void);
  394. extern void PopulatePbResData(void);
  395. extern void PopulateMainDemoRes(void);
  396. extern void PopulateCmResData(void);
  397. extern void PopulateQuickAccessData(void);
  398. extern void populateSettingMenu(void);
  399. extern void populateFunAndGamesMenu(void);
  400. extern void PopulateJavaRes(void);
  401. extern void PopulateResData(void);
  402. extern void PopulateSimDetectionMenuRes(void);
  403. extern void PopulateprofileMenu(void);
  404. extern void PopulateSSCRes(void);
  405. extern void PopulateCallHistoryRes(void);
  406. extern void PopulateHelpResources(void);
  407. extern void PopulateDataAccountMenuList(void);
  408. extern void PopulateChgrPwrOnScrRes(void);
  409. extern void PopulateOrganizerRes(void);
  410. extern void PopulateExtraRes(void);
  411. extern void PopulateAlarmRes(void);
  412. extern void PopulateSATRes(void);
  413. extern void PopulateSpofRes(void);
  414. extern void PopulateResourcesCal(void);
  415. extern void PopulateToDoList(void);
  416. extern void PopulateScreenSaverRes(void);
  417. extern void PopulateCommonScreensResData(void);
  418. extern void PopulateEMSObjectResources(void);
  419. extern void PopulateInputMethodRes(void);
  420. extern void PopulatevObjectRes(void);
  421. extern void PopulateVRSDRes(void);
  422. extern void PopulateWapRes(void);
  423. extern void PopulateMmiapiRes(void);
  424. #if defined(JATAAYU_SUPPORT)
  425. extern void PopulateJaatayuBrowserRes(void);
  426. extern void PopulateJataayuJDDRes(void);
  427. #endif /* defined(JATAAYU_SUPPORT) */ 
  428. /* Populate with compile option */
  429. #if defined(__MMI_NITZ__)
  430. extern void PopulateResourceNITZ(void);
  431. #endif 
  432. #if defined(__MMI_MESSAGES_CHAT__)
  433. extern void PopulateChatAppRes(void);
  434. #endif 
  435. #if defined(__MMI_ENGINEER_MODE__)
  436. extern void populateEngineerModeMenu(void);
  437. #endif 
  438. #if defined(__MMI_FACTORY_MODE__)
  439. extern void populateFactoryModeMenu(void);
  440. #endif 
  441. #if defined(__MMI_RING_COMPOSER__) && defined(__MMI_IMELODY_SUPPORT__)
  442. extern void PopulateComposeRingTone(void);
  443. #endif 
  444. #if defined(__MMI_AUDIO_PLAYER__)
  445. extern void populateAudioPlayerMenu(void);
  446. #endif 
  447. #if defined(__MMI_AB_REPEATER__)
  448. extern void populateABRepeaterMenu(void);
  449. #endif 
  450. #if defined(__MMI_FILE_MANAGER__)
  451. extern void populateFileManagerMenu(void);
  452. #endif 
  453. #if defined(__MMI_SOUND_RECORDER__)
  454. extern void populateSoundRecorderMenu(void);
  455. #endif 
  456. #if defined(__MMI_CAMERA__)
  457. extern void PopulateCameraRes(void);
  458. #endif 
  459. #if defined(__MMI_BARCODEREADER__)
  460. extern void PopulateBarcodeReaderRes(void);
  461. #endif 
  462. #if defined(__MMI_IMAGE_VIEWER__)
  463. extern void PopulateImageViewerRes(void);
  464. #endif 
  465. #if defined(__MMI_VIDEO_PLAYER__)
  466. extern void PopulateVdoPlyRes(void);
  467. #endif 
  468. #if defined(__MMI_VIDEO_RECORDER__)
  469. extern void PopulateVdoRecRes(void);
  470. #endif 
  471. #if defined(__MMI_FM_RADIO__)
  472. extern void PopulateFMRadioRes(void);
  473. #endif 
  474. #if defined(__MMI_FM_RADIO_SCHEDULE_REC__)
  475. extern void PopulateFMScheduleRecRes(void);
  476. #endif 
  477. #if defined(__MOD_SMSAL__)
  478. extern void PopulateMessagesResData(void);
  479. #endif 
  480. #if defined(__MMI_UNIFIED_MESSAGE__)
  481. extern void PopulateUnifiedMessageResData(void);
  482. #endif 
  483. #if defined(__MMI_UNIFIED_COMPOSER__)
  484. extern void PopulateUnifiedComposerResData(void);
  485. #endif
  486. #if defined(__MMI_STOPWATCH__)
  487. extern void PopulateStopwatchRes(void);
  488. #endif 
  489. #if defined(__MMI_PHOTOEDITOR__)
  490. extern void PopulatePhotoEditorRes(void);
  491. #endif 
  492. #if defined(__MMI_BG_SOUND_EFFECT__)
  493. extern void PopulateBGSoundRes(void);
  494. #endif 
  495. #if defined(__MMI_EXT_DEVICE__)
  496. #ifdef __MMI_USB_SUPPORT__
  497. extern void PopulateExtDevUSBRes(void);
  498. #endif 
  499. #ifdef __MMI_IRDA_SUPPORT__
  500. extern void PopulateExtDevIrDARes(void);
  501. #endif 
  502. #ifdef __MMI_BT_HP_SUPPORT__
  503. extern void PopulateExtDevBTHPRes(void);
  504. #endif 
  505. #ifdef __MMI_BT_SUPPORT__
  506. extern void PopulateExtDevBTRes(void);
  507. #endif 
  508. /* micha_PoC */
  509. #ifdef __MMI_POC__
  510. extern void PoCResourceData(void);
  511. #endif 
  512. #ifdef __MMI_VOIP__
  513. extern void VoIPResourceData(void);
  514. #endif /* __MMI_VOIP__ */
  515. #ifdef __SYNCML_SUPPORT__
  516. extern void SyncMLResourceData(void);
  517. #endif 
  518. #endif /* defined(__MMI_EXT_DEVICE__) */ 
  519. #if defined(__MMI_DOWNLOAD_AGENT__)
  520. extern void PopulateDownloadAgentRes(void);
  521. #endif 
  522. #if defined(__FOTA_ENABLE__)
  523. extern void PopulateDMMenuList(void);
  524. #endif 
  525. #ifdef __MMI_CCA_SUPPORT__
  526. extern void PopulateCCARes(void);
  527. #endif
  528. /* 101205 audio resource Calvin Satrt */
  529. /*****************************************************************************
  530.  * FUNCTION
  531.  *  ToolPopulateInitial
  532.  * DESCRIPTION
  533.  *  
  534.  * PARAMETERS
  535.  *  void
  536.  * RETURNS
  537.  *  void
  538.  *****************************************************************************/
  539. void ToolPopulateInitial(void)
  540. {
  541.     /*----------------------------------------------------------------*/
  542.     /* Local Variables                                                */
  543.     /*----------------------------------------------------------------*/
  544.     int i = 0, j;
  545.     unsigned char a[4];
  546.     char cmd[512];
  547.     /*----------------------------------------------------------------*/
  548.     /* Code Body                                                      */
  549.     /*----------------------------------------------------------------*/
  550.     ClearHWIMageFile();
  551. #ifndef __POPULATE_ENGINE_
  552.     SendMessage(hWnd, WM_CLEARFILES, (WPARAM) 0, (LPARAM) 0);
  553. #endif 
  554.     /* 101806 E-NFB start */
  555. #ifdef __MMI_RESOURCE_ENFB_SUPPORT__
  556.     CurrMaxENFBAssociatedIDNum = 0;
  557. #endif
  558.     /* 101806 E-NFB end */
  559.     CurrMaxImageId = 0;
  560.     CurrMaxImageNum = 0;
  561.     CurrMaxImageIdEXT = 0;  /* 040805 CustPack: Calvin added */
  562.     CurrMaxImageNumEXT = 0;
  563.     CurrMaxAudioId = 0;
  564.     CurrMaxAudioNum = 0;
  565.     CurrMaxAudioIdEXT = 0;
  566.     CurrMaxAudioNumEXT = 0;
  567.     CurrMaxMenuItemIndex = MAX_MENU_ITEMS;
  568.     /* to read from NVRAM if possible -vanita */
  569.     gCurrLangIndex = 0;
  570.     memset(nCustMenus, 0, sizeof(CUSTOM_MENU) * MAX_MENU_ITEMS);
  571.     for (i = 0; i < MAX_IMAGE_IDS_SIZE; i++)
  572.     {
  573.         ImageIdMap[i].nImageNum = -1;
  574.         ImageIdMapEXT[i].nImageNum = -1;    /* 040805 CustPack: Calvin added */
  575.     }
  576.     for (i = 0; i < MAX_AUDIO_IDS_SIZE; i++)
  577.     {
  578.         AudioIdMap[i].nAudioNum = -1;
  579.         AudioIdMapEXT[i].nAudioNum = -1;
  580.     }
  581. }
  582. /* 101205 audio resource Calvin End */
  583. /*****************************************************************************
  584.  * FUNCTION
  585.  *  ToolPopulateDone
  586.  * DESCRIPTION
  587.  *  
  588.  * PARAMETERS
  589.  *  void
  590.  * RETURNS
  591.  *  void
  592.  *****************************************************************************/
  593. void ToolPopulateDone(void)
  594. {
  595.     /*----------------------------------------------------------------*/
  596.     /* Local Variables                                                */
  597.     /*----------------------------------------------------------------*/
  598.     /*----------------------------------------------------------------*/
  599.     /* Code Body                                                      */
  600.     /*----------------------------------------------------------------*/
  601.     /*  for generate string list file in first pass */
  602.     fwprintf(StringListFile, L"##numbert%drn", CurrMaxStringId);
  603.     fclose(StringListFile);
  604.     fprintf(EnumListFile, "};n");
  605.     fclose(EnumListFile);
  606.     /* 091004 MTK Calvin added to reduce populate time */
  607.     fclose(OutputImgIDFile);
  608.     fclose(OutputMenutreeIDFile);
  609.     fclose(RepeatIDListFile);   /* 102604 MTK Calvin added */
  610.     /* MTK Calvin end */
  611. #if defined(_POPULATE_RES_C) && !defined(PRODUCTION_RELEASE)
  612.     MYFCLOSE(fpMenuResourceUsage, "menu_resource_usage.txt");
  613.     MYFCLOSE(fpImageResourceUsage, "image_resource_usage.txt");
  614.     MYFCLOSE(fpAudioResourceUsage, "audio_resource_usage.txt");
  615.     MYFCLOSE(fpStringResourceUsage, "string_resource_usage.txt");
  616. #endif /* #if defined(_POPULATE_RES_C) && !defined(PRODUCTION_RELEASE) */
  617. }
  618. /* __CUSTPACK_MULTIBIN Calvin End */
  619. #define TYPE__(A) A##_MENU
  620. #define TYPE_(A)  TYPE__(A)
  621. #define TYPE(A) TYPE_(A)
  622. /*****************************************************************************
  623.  * FUNCTION
  624.  *  PopulateResData
  625.  * DESCRIPTION
  626.  *  Populate Resource
  627.  * PARAMETERS
  628.  *  void
  629.  * RETURNS
  630.  *  void
  631.  *****************************************************************************/
  632. void PopulateResData(void)
  633. {
  634.     /*----------------------------------------------------------------*/
  635.     /* Local Variables                                                */
  636.     /*----------------------------------------------------------------*/
  637.     int i = 0, j;
  638.     unsigned char a[4];
  639.     char path[] = CUST_IMG_PATH;
  640.     char cmd[512];
  641.     /* MTK Leo add */
  642.     FILE *OutputImgDataFile = NULL;
  643.     FILE *nfb_img_res_file = NULL;
  644.     FILE *nfb_img_data_file = NULL;
  645.     FILE *java_img_data_file = NULL;//100206 ENFB support
  646.     /* MTK Leo end */
  647.     sprintf(cmd, "copy_images.bat ");
  648.     j = 16;
  649.     for (i = 0; i < strlen(path); i++)
  650.     {
  651.         if (!(path[i] == '\' && path[i + 1] == '\'))
  652.         {
  653.             cmd[j] = path[i];
  654.             j++;
  655.         }
  656.     }
  657.     cmd[j] = '';
  658.     system(cmd);
  659.     /*----------------------------------------------------------------*/
  660.     /* Code Body                                                      */
  661.     /*----------------------------------------------------------------*/
  662.     nfb_img_res_file = fopen(NFB_IMAGE_RES_FILENAME, "w");
  663.     if (nfb_img_res_file == NULL)
  664.     {
  665.         printf("nfb_img_res_file could not open!n");
  666.     }
  667.     else
  668.     {
  669.         fprintf(nfb_img_res_file, "#include "CustDataRes.h" n");
  670.         fprintf(nfb_img_res_file, "#include "CustNFBProgressImg.h" n");
  671.         fprintf(nfb_img_res_file, "const U8* nfb_progress_images[]={n");
  672.         fclose(nfb_img_res_file);
  673.     }
  674.     nfb_img_data_file = fopen(NFB_IMAGE_DATA_FILENAME, "w");
  675.     if (nfb_img_data_file == NULL)
  676.     {
  677.         printf("nfb_img_data_file could not open!n");
  678.     }
  679.     else
  680.     {
  681.         fprintf(nfb_img_res_file, "#ifdef MMI_ON_WIN32nt#define __align(x)  n#endifn");
  682.         fclose(nfb_img_data_file);
  683.     }
  684.     StringListFile = fopen(CUS_STR_RES_FILENAME, "wb");
  685.     if (StringListFile == NULL)
  686.     {
  687.         printf("StringListFile could not open!n");
  688.     }
  689.     EnumListFile = fopen("enum_list.h", "w");
  690.     if (EnumListFile == NULL)
  691.     {
  692.         printf("EnumListFile could not open!n");
  693.     }
  694.     fclose(EnumListFile);
  695.     EnumListFile = fopen("enum_list.h", "a");
  696.     if (EnumListFile == NULL)
  697.     {
  698.         printf("EnumListFile could not open with again!n");
  699.     }
  700.     /* 091004 MTK Calvin added to reduce populate time */
  701.     OutputImgIDFile = fopen(OUTPUT_IMAGE_ID_FILENAME, "w");
  702.     if (OutputImgIDFile == NULL)
  703.     {
  704.         printf("OutputImgIDFile could not open!n");
  705.         exit(0);
  706.     }
  707.     fclose(OutputImgIDFile);
  708.     OutputImgIDFile = fopen(OUTPUT_IMAGE_ID_FILENAME, "a");
  709.     if (OutputImgIDFile == NULL)
  710.     {
  711.         printf("OutputImgIDFile could not open again!n");
  712.     }
  713.     fprintf(OutputImgIDFile, "[Image File List]n");
  714.     OutputMenutreeIDFile = fopen(OUTPUT_MENUTREE_ID_FILENAME, "w");
  715.     if (OutputMenutreeIDFile == NULL)
  716.     {
  717.         printf("OutputMenutreeIDFile could not open!n");
  718.     }
  719.     fclose(OutputMenutreeIDFile);
  720.     OutputMenutreeIDFile = fopen(OUTPUT_MENUTREE_ID_FILENAME, "a");
  721.     if (OutputMenutreeIDFile == NULL)
  722.     {
  723.         printf("OutputMenutreeIDFile could not open again!n");
  724.     }
  725.     /* MTK Calvin end */
  726.     /* 101205 audio resource Calvin Satrt */
  727.     OutputAdoIDFile = fopen(OUTPUT_AUDIO_ID_FILENAME, "w");
  728.     if (OutputAdoIDFile == NULL)
  729.     {
  730.         printf("OutputAdoIDFile could not open!n");
  731.         exit(0);
  732.     }
  733.     fclose(OutputAdoIDFile);
  734.     OutputAdoIDFile = fopen(OUTPUT_AUDIO_ID_FILENAME, "a");
  735.     if (OutputAdoIDFile == NULL)
  736.     {
  737.         printf("OutputAdoIDFile could not open again!n");
  738.     }
  739.     fprintf(OutputAdoIDFile, "[Audio File List]n");
  740.     /* 101205 audio resource Calvin End */
  741.     /* 102604 MTK Calvin added */
  742.     RepeatIDListFile = fopen("repeat_id_list", "w");
  743.     if (RepeatIDListFile == NULL)
  744.     {
  745.         printf("RepeatIDListFile could not open!n");
  746.     }
  747.     fclose(RepeatIDListFile);
  748.     RepeatIDListFile = fopen("repeat_id_list", "a");
  749.     if (RepeatIDListFile == NULL)
  750.     {
  751.         printf("RepeatIDListFile could not open again!n");
  752.     }
  753.     fprintf(RepeatIDListFile, "StrIdtEnum_ValuettString or Imagen");
  754.     /* MTK Calvin end */
  755. #if defined(_POPULATE_RES_C) && !defined(PRODUCTION_RELEASE)
  756.     MYFOPEN(fpMenuResourceUsage, "menu_resource_usage.txt", "w");
  757.     PRTRESTITLE(fpMenuResourceUsage);
  758.     MYFOPEN(fpImageResourceUsage, "image_resource_usage.txt", "w");
  759.     PRTRESTITLE(fpImageResourceUsage);
  760.     MYFOPEN(fpAudioResourceUsage, "audio_resource_usage.txt", "w");
  761.     PRTRESTITLE(fpAudioResourceUsage);
  762.     MYFOPEN(fpStringResourceUsage, "string_resource_usage.txt", "w");
  763.     PRTRESTITLE(fpStringResourceUsage);
  764.     /* Print resource base mapping table */
  765.     {
  766.         U32 i = 0;
  767.         FILE *fp;
  768.         fp = fopen("resource_base_table.txt", "w");
  769.         if (fp != NULL)
  770.         {
  771.             fprintf(fp, "mintmaxtappnamen");
  772.             while (1)
  773.             {
  774.                 if (strncmp(g_mmi_resource_base_table[i].appname, "END", 3) == 0)
  775.                 {
  776.                     break;
  777.                 }
  778.                 else
  779.                 {
  780.                     fprintf(fp, "%dt%dt%sn",
  781.                             g_mmi_resource_base_table[i].min,
  782.                             g_mmi_resource_base_table[i].max,
  783.                             g_mmi_resource_base_table[i].appname);
  784.                     i++;            
  785.                 }
  786.             }
  787.             fclose(fp);
  788.         }
  789.         fprintf(stderr, "output resource_base_table.txt done.n");
  790.     }
  791. #endif /* #if defined(_POPULATE_RES_C) && !defined(PRODUCTION_RELEASE) */
  792.     java_img_data_file = fopen(JAVA_GAME_FILENAME, "w");//100206 ENFB support
  793.     if (java_img_data_file == NULL)
  794.     {
  795.         printf("OutputAdoIDFile could not open!n");
  796.         exit(0);
  797.     }
  798.     fclose(java_img_data_file);
  799.     a[0] = 0xFF;
  800.     a[1] = 0xFE;
  801.     a[2] = 0x4E;
  802.     a[3] = 0x00;
  803.     fprintf(StringListFile, a);
  804.     fprintf(StringListFile, "%c", a[3]);
  805.     fwprintf(StringListFile, L"Number Of Languagest1rn");
  806.     fwprintf(StringListFile, L"Enum ValuetIDtDescriptiontEnglishrn");
  807.     fprintf(EnumListFile, "const int ENUM_VALUE_MAP[]={n");
  808.     ClearHWIMageFile();
  809. #ifndef __POPULATE_ENGINE_
  810.     SendMessage(hWnd, WM_CLEARFILES, (WPARAM) 0, (LPARAM) 0);
  811. #endif 
  812.     /* 101205 audio resource Calvin Satrt */
  813.     CurrMaxImageId = 0;
  814.     CurrMaxImageNum = 0;
  815.     /* __CUSTPACK_MULTIBIN Calvin BEGIN */
  816.     CurrMaxImageIdEXT = 0;  /* 040805 CustPack: Calvin added */
  817.     CurrMaxImageNumEXT = 0;
  818.     /* __CUSTPACK_MULTIBIN Calvin END */
  819.     CurrMaxAudioId = 0;
  820.     CurrMaxAudioNum = 0;
  821.     CurrMaxAudioIdEXT = 0;
  822.     CurrMaxAudioNumEXT = 0;
  823.     CurrMaxMenuItemIndex = MAX_MENU_ITEMS;
  824.     /* 101205 audio resource Calvin End */
  825.     /* 101806 E-NFB start */
  826. #ifdef __MMI_RESOURCE_ENFB_SUPPORT__
  827.     CurrMaxENFBAssociatedIDNum = 0;
  828. #endif
  829.     /* 101806 E-NFB end */
  830.     /* to read from NVRAM if possible -vanita */
  831.     gCurrLangIndex = 0;
  832.     memset(nCustMenus, 0, sizeof(CUSTOM_MENU) * MAX_MENU_ITEMS);
  833.    /*****************************************************************************
  834.    * Add applcation
  835.    *****************************************************************************/
  836.     ADD_APPLICATION(APP_MAINMENU, "MainMenu Base", MAIN_MENU_BASE, MAIN_MENU_BASE_MAX);
  837.     ADD_APPLICATION(APP_IDLEAPP, "IdleApp", IDLE_APP_BASE, IDLE_APP_BASE_MAX);
  838.     ADD_APPLICATION(APP_BOOTUP, "BootUp", SIM_DETECTION_BASE, SIM_DETECTION_BASE_MAX);
  839.     ADD_APPLICATION(APP_SIMTOOLKIT, "Sim Toolkit", SAT_BASE, SAT_BASE_MAX);
  840.     ADD_APPLICATION(APP_GLOBALDEFS, "Global Defines", GLOBAL_BASE, GLOBAL_BASE_MAX);
  841.     ADD_APPLICATION(APP_CHARGER, "Charger", CHARGER_BASE, CHARGER_BASE_MAX);
  842.     ADD_APPLICATION(APP_UIFRAMEWORK, "UI Framework", CATEGORY_SCREENS_BASE, CATEGORY_SCREENS_BASE_MAX);
  843.     ADD_APPLICATION(APP_PHONEBOOK, "PhoneBook", PHONE_BOOK_BASE, PHONE_BOOK_BASE_MAX);
  844.     ADD_APPLICATION(APP_SHORTCUTS, "ShortCuts", SHORTCUTS_BASE, SHORTCUTS_BASE_MAX);
  845.     ADD_APPLICATION(APP_FUNANDGAMES, "Fun Games", FUN_GAMES_BASE, FUN_GAMES_BASE_MAX);
  846.     ADD_APPLICATION(APP_SERVICES, "Services", SERVICES_BASE, SERVICES_BASE_MAX);
  847.     ADD_APPLICATION(APP_ORGANIZER, "Organizer", ORGANIZER_BASE, ORGANIZER_BASE_MAX);
  848.     ADD_APPLICATION(APP_MESSAGES, "Messages", MESSAGES_BASE, MESSAGES_BASE_MAX);
  849.     ADD_APPLICATION(APP_CHAT, "Chat", CHAT_BASE, CHAT_BASE_MAX);
  850.     ADD_APPLICATION(APP_SETTINGS, "Settings", SETTINGS_BASE, SETTINGS_BASE_MAX);
  851.     ADD_APPLICATION(APP_CALLMANAGEMENT, "CallManagement", CALL_MANAGEMENT_BASE, CALL_MANAGEMENT_BASE_MAX);
  852.     ADD_APPLICATION(APP_DEMOAPP, "DemoApp", DEMO_APP_BASE, DEMO_APP_BASE_MAX);
  853.     ADD_APPLICATION(APP_CALLHISTORY, "Call History", CALL_HISTORY_BASE, CALL_HISTORY_BASE_MAX);
  854.     ADD_APPLICATION(APP_CALLSETUP, "Call Setup", CALL_NEW_BASE, CALL_NEW_BASE_MAX);
  855.     ADD_APPLICATION(APP_PROFILES, "Profiles", PROFILES_BASE, PROFILES_BASE_MAX);
  856.     ADD_APPLICATION(APP_NETWORKSETUP, "Network Setup", NETWORK_SETUP_BASE, NETWORK_SETUP_BASE_MAX);
  857.     ADD_APPLICATION(APP_DATAACCOUNT, "Data Account", DATA_ACCOUNT_BASE, DATA_ACCOUNT_BASE_MAX);
  858.     ADD_APPLICATION(APP_PHONESETUP, "Phone Setup", PHONE_SETUP_BASE, PHONE_SETUP_BASE + 999);
  859.     ADD_APPLICATION(APP_TODOLIST, "To do List", TO_DO_LIST_BASE, TO_DO_LIST_BASE_MAX);
  860.     ADD_APPLICATION(APP_INPUTMETHOD, "INPUTMETHOD", INPUT_METHOD_BASE, INPUT_METHOD_BASE_MAX);
  861.     ADD_APPLICATION(APP_VOICEMEMO, "Voice Memo", VOICE_MEMO_BASE, VOICE_MEMO_BASE_MAX);
  862.     ADD_APPLICATION(APP_ENGINEERMODE, "Engineer Mode", ENGINEER_MODE_BASE, ENGINEER_MODE_BASE_MAX);
  863.     ADD_APPLICATION(APP_CALENDAR, "Calendar", CAL_BASE, CAL_BASE_MAX);
  864.     ADD_APPLICATION(APP_FACTORYMODE, "Factory Mode", FACTORY_MODE_BASE, FACTORY_MODE_BASE_MAX);
  865.     ADD_APPLICATION(APP_GAMES, "Games", GAME_BASE, GAME_BASE_MAX);
  866.     ADD_APPLICATION(APP_WAP, "Wap", WAP_BASE, WAP_BASE_MAX);
  867.     ADD_APPLICATION(APP_PICTURE_EDITOR, "Image Editor", PICTURE_EDITOR_BASE, PICTURE_EDITOR_BASE_MAX);
  868.     ADD_APPLICATION(APP_ALARM, "Alarm", ALARM_BASE, ALARM_BASE_MAX);
  869.     ADD_APPLICATION(APP_CALCULATOR, "Calculator", CALCULATOR_BASE, CALCULATOR_BASE_MAX);
  870.     ADD_APPLICATION(APP_UNITCONVETER, "Unit Converter", UNIT_CONVERTER_BASE, UNIT_CONVERTER_BASE_MAX);
  871.     ADD_APPLICATION(APP_CURRENCYCONVERTER, "Currency Converter", CURRENCY_CONVERTER_BASE, CURRENCY_CONVERTER_BASE_MAX);
  872.     ADD_APPLICATION(APP_WORLDCLOCK, "World Clock", WORLD_CLOCK_BASE, WORLD_CLOCK_BASE_MAX);
  873.     ADD_APPLICATION(APP_HEALTHBMI, "Health BMI", HEALTH_BMI_BASE, HEALTH_BMI_BASE_MAX);
  874.     ADD_APPLICATION(APP_HEALTHCALORIE, "Health Calorie", HEALTH_CALORIE_BASE, HEALTH_CALORIE_BASE_MAX);
  875.     ADD_APPLICATION(APP_HEALTHMENSTRUAL, "Health Menstrual", HEALTH_MENSTRUAL_BASE, HEALTH_MENSTRUAL_BASE_MAX);
  876.     ADD_APPLICATION(APP_SECURITY_SETUP, "Security Setup", SECURITY_SETUP_BASE, SECURITY_SETUP_BASE_MAX);
  877.     ADD_APPLICATION(APP_FILEMANAGER, "File Manager", FILE_MANAGER_BASE, FILE_MANAGER_BASE_MAX);
  878.     ADD_APPLICATION(APP_MULTIMEDIA, "Multimedia", MMEDIA_BASE, MMEDIA_BASE_MAX);
  879. #if defined(__DOWNLOAD__)
  880.     ADD_APPLICATION(APP_DOWNLOAD, "Download", DOWNLOAD_BASE, DOWNLOAD_BASE_MAX);
  881. #endif 
  882. #if defined(__MMI_RING_COMPOSER__) && defined(__MMI_IMELODY_SUPPORT__)
  883.     ADD_APPLICATION(
  884.         APP_RINGTONECOMPOSER,
  885.         "RingToneComposer",
  886.         COMPOSE_RING_TONE_ENGINE_BASE,
  887.         COMPOSE_RING_TONE_ENGINE_BASE_MAX);
  888. #endif /* defined(__MMI_RING_COMPOSER__) && defined(__MMI_IMELODY_SUPPORT__) */ 
  889. #ifdef __MMI_STOPWATCH__
  890.     ADD_APPLICATION(APP_STOPWATCH, "Stopwatch", STOPWATCH_BASE, STOPWATCH_BASE_MAX);
  891. #endif 
  892. #if defined(__MMI_AUDIO_PLAYER__)
  893.     ADD_APPLICATION(APP_AUDIOPLAYER, "Audio Player", AUDIO_PLAYER_BASE, AUDIO_PLAYER_BASE_MAX);
  894. #endif 
  895. #if defined(__MMI_SOUND_RECORDER__)
  896.     ADD_APPLICATION(APP_SOUNDRECORDER, "Sound Recorder", SOUND_RECORDER_BASE, SOUND_RECORDER_BASE_MAX);
  897. #endif 
  898. #ifdef __MMI_CAMERA__
  899.     ADD_APPLICATION(APP_CAMERA, "Camera", CAMERA_BASE, CAMERA_BASE_MAX);
  900. #endif 
  901. #ifdef __MMI_IMAGE_VIEWER__
  902.     ADD_APPLICATION(APP_IMAGEVIEWER, "Image Viewer", IMAGE_VIEWER_BASE, IMAGE_VIEWER_BASE_MAX);
  903. #endif 
  904. #ifdef __MMI_VIDEO_PLAYER__
  905.     ADD_APPLICATION(APP_VDOPLY, "Video Player", VDOPLY_BASE, VDOPLY_BASE_MAX);
  906. #endif 
  907. #ifdef __MMI_VIDEO_RECORDER__
  908.     ADD_APPLICATION(APP_VDOREC, "Video Recorder", VDOREC_BASE, VDOREC_BASE_MAX);
  909. #endif 
  910. #if defined(__MMI_EXT_DEVICE__)
  911.     ADD_APPLICATION(APP_EXTDEVICE, "External Device", EXT_DEVICE_BASE, EXT_DEVICE_BASE_MAX);
  912. #endif 
  913. #if defined(__MMI_VERSION_2__)
  914.     ADD_APPLICATION(APP_EXTRA, "Extra", EXTRA_APP_BASE, EXTRA_APP_BASE_MAX);
  915. #endif 
  916. #ifdef __J2ME__
  917.     ADD_APPLICATION(APP_JAVA, "JAVA", JAVA_BASE, JAVA_BASE_MAX);
  918. #endif 
  919. #ifdef __MMI_EMAIL__
  920.     ADD_APPLICATION(APP_EMAIL, "Email", EMAIL_BASE, EMAIL_BASE_MAX);
  921. #endif 
  922. #ifdef __MMI_IMPS__
  923.     ADD_APPLICATION(APP_IMPS, "IMPS", IMPS_BASE, IMPS_BASE_MAX);
  924. #endif 
  925. #ifdef __MMI_FM_RADIO__
  926.     ADD_APPLICATION(APP_FMRDO, "FM Radio", FM_RADIO_BASE, FM_RADIO_BASE_MAX);
  927. #endif 
  928. #ifdef __MMI_FM_RADIO_SCHEDULE_REC__
  929.     ADD_APPLICATION(
  930.         APP_FMSCHEDULEREC,
  931.         "FM Radio Schedule Record",
  932.         FM_SCHEDULE_REC_BASE,
  933.         FM_SCHEDULE_REC_BASE + FM_SCHEDULE_REC_BASE_MAX);
  934. #endif /* __MMI_FM_RADIO_SCHEDULE_REC__ */ 
  935. #ifdef __MMI_MESSAGES_CLUB__
  936.     ADD_APPLICATION(APP_MESSAGE_CLUB, "Message Club", MESSAGE_CLUB_BASE, MESSAGE_CLUB_BASE_MAX);
  937. #endif 
  938. #if defined (JATAAYU_SUPPORT)
  939.     ADD_APPLICATION(APP_JATAAYU_BROWSER, "Jataayu Browser", JATAAYU_BROWSER_BASE, JATAAYU_BROWSER_BASE_MAX);
  940.     ADD_APPLICATION(
  941.         APP_JATAAYU_PROVISIONING,
  942.         "Jataayu Provisioning",
  943.         JATAAYU_PROVISIONING_BASE,
  944.         JATAAYU_PROVISIONING_BASE_MAX);
  945.     ADD_APPLICATION(APP_JATAAYU_JDD, "Jataayu JDD", JATAAYU_JDD_BASE, JATAAYU_JDD_BASE_MAX);
  946. #if defined(MMS_SUPPORT)
  947.     ADD_APPLICATION(APP_JATAAYU_MMS, "Jataayu MMS", JATAAYU_MMS_BASE, JATAAYU_MMS_BASE_MAX);
  948. #endif 
  949. #endif /* defined (JATAAYU_SUPPORT) */ 
  950.     for (i = 0; i < MAX_IMAGE_IDS_SIZE; i++)
  951.     {
  952.         ImageIdMap[i].nImageNum = -1;
  953.         /* __CUSTPACK_MULTIBIN Calvin BEGIN */
  954.         ImageIdMapEXT[i].nImageNum = -1;    /* 040805 CustPack: Calvin added */
  955.         /* __CUSTPACK_MULTIBIN Calvin END */
  956.     }
  957.     /* 101205 audio resource Calvin Satrt */
  958.     for (i = 0; i < MAX_AUDIO_IDS_SIZE; i++)
  959.     {
  960.         AudioIdMap[i].nAudioNum = -1;
  961.         AudioIdMapEXT[i].nAudioNum = -1;
  962.     }
  963.     /* 101205 audio resource Calvin End */
  964.     /* add an empty image icon */
  965.     ADD_APPLICATION_IMAGE(40000, "..\\..\\Customer\\Images\\EmptyImage.bmp");
  966.     /* 101205 audio resource Calvin Satrt */
  967.     ADD_APPLICATION_AUDIO2(
  968.         ADO_GLOBAL_EMPTYAUDIO,
  969.         "..\\..\\Customer\\Audio\\EmptyAudio.mp3",
  970.         "..\\..\\Customer\\Audio\\EmptyAudio.mp3");
  971.     ADD_APPLICATION_AUDIO3(ADO_GLOBAL_EMPTYAUDIO_EXT, "..\\..\\Customer\\Audio\\EmptyAudio.mp3", "..\\..\\Customer\\Audio\\EmptyAudio.mp3");    /* for custpack */
  972.     ADD_APPLICATION_AUDIO2(
  973.         ADO_GLOBAL_NOAUDIO,
  974.         "..\\..\\Customer\\Audio\\NoAudio.mp3",
  975.         "..\\..\\Customer\\Audio\\NoAudio.mp3");
  976.     ADD_APPLICATION_AUDIO2(
  977.         ADO_GLOBAL_DEFAULT,
  978.         "..\\..\\Customer\\Audio\\Default.mp3",
  979.         "..\\..\\Customer\\Audio\\Default.mp3");
  980.     /* 101205 audio resource Calvin End */
  981.    /*****************************************************************************
  982.    * Populate Resoruce
  983.    *****************************************************************************/
  984.     PopulateNFBProgressImg();
  985.     /* __CUSTPACK_MULTIBIN Calvin BEGIN */
  986.     PRINT_INFORMATION(("Populating Images for multiple binsn"));       /* 040805 CustPack: Calvin added */
  987.     PopulateMultiBinImg();
  988.     /* __CUSTPACK_MULTIBIN Calvin END */
  989.     PRINT_INFORMATION(("Populating Golbal Resourcesn"));
  990.     PopulateGlobalData();
  991.     PRINT_INFORMATION(("Populating Main Menu Resourcesn"));
  992.     PopulateMainMenuRes();
  993.     PRINT_INFORMATION(("Populating Idle Menu Resourcesn"));
  994.     PopulateIdleMenuRes();
  995.     PRINT_INFORMATION(("Populating Phone Book Resourcesn"));
  996.     PopulatePbResData();
  997.     PRINT_INFORMATION(("Populating Main Demo Resourcesn"));
  998.     PopulateMainDemoRes();
  999.     PRINT_INFORMATION(("Populating Setting Resourcesn"));
  1000.     populateSettingMenu();
  1001.     PRINT_INFORMATION(("Populating Fun & Games Resourcesn"));
  1002.     populateFunAndGamesMenu();
  1003.     PRINT_INFORMATION(("Populating SIM Detect Resourcesn"));
  1004.     PopulateSimDetectionMenuRes();
  1005.     PRINT_INFORMATION(("Populating Charger Power On Resourcesn"));
  1006.     PopulateChgrPwrOnScrRes();
  1007.     PRINT_INFORMATION(("Populating Common Screen Resourcesn"));
  1008.     PopulateCommonScreensResData();
  1009.     PRINT_INFORMATION(("Populating EMS object Resourcesn"));
  1010.     PopulateEMSObjectResources();
  1011.     PRINT_INFORMATION(("Populating CM Resourcesn"));
  1012.     PopulateCmResData();
  1013.     PRINT_INFORMATION(("Populating Quick Access Resourcesn"));
  1014.     PopulateQuickAccessData();
  1015.     PRINT_INFORMATION(("Populating Input Method Resourcesn"));
  1016.     PopulateInputMethodRes();
  1017.     PRINT_INFORMATION(("Populating Profiles Resourcesn"));
  1018.     PopulateprofileMenu();
  1019.     PRINT_INFORMATION(("Populating SSC Resourcesn"));
  1020.     PopulateSSCRes();
  1021.     PRINT_INFORMATION(("Populating Call History Resourcesn"));
  1022.     PopulateCallHistoryRes();
  1023.     PRINT_INFORMATION(("Populating Call History Resourcesn"));
  1024.     PopulateDataAccountMenuList();
  1025.     PRINT_INFORMATION(("Populating Organizer Resourcesn"));
  1026.     PopulateOrganizerRes();
  1027.     PRINT_INFORMATION(("Populating Extra Resourcesn"));
  1028.     PopulateExtraRes();
  1029.     PRINT_INFORMATION(("Populating Alarm Resourcesn"));
  1030.     PopulateAlarmRes();
  1031.     PRINT_INFORMATION(("Populating SPOF Resourcesn"));
  1032.     PopulateSpofRes();
  1033.     PRINT_INFORMATION(("Populating Calendar Resourcesn"));
  1034.     PopulateResourcesCal();
  1035.     PRINT_INFORMATION(("Populating ToDo Resourcesn"));
  1036.     PopulateToDoList();
  1037.     PRINT_INFORMATION(("Populating vObjects Resourcen"));
  1038.     PopulatevObjectRes();
  1039.     PRINT_INFORMATION(("Populating Help Resourcesn"));
  1040.     PopulateHelpResources();
  1041. #if 0   /* Cylen 0926, customize display char */
  1042. /* under construction !*/
  1043. /* under construction !*/
  1044. #endif /* 0 */ 
  1045.     PRINT_INFORMATION(("Populating MMIAPI Resourcen"));
  1046.     PopulateMmiapiRes();
  1047. #ifdef __MOD_SMSAL__
  1048.     PRINT_INFORMATION(("Populating Messages Resourcesn"));
  1049.     PopulateMessagesResData();
  1050. #ifdef __MMI_MESSAGES_CHAT__
  1051.     PopulateChatAppRes();
  1052. #endif 
  1053. #endif /* __MOD_SMSAL__ */ 
  1054. #ifdef __MMI_UNIFIED_MESSAGE__
  1055.     PopulateUnifiedMessageResData();
  1056. #endif
  1057. #ifdef __MMI_UNIFIED_COMPOSER__
  1058.     PopulateUnifiedComposerResData();
  1059. #endif
  1060. #ifdef __MMI_EMAIL__
  1061.     PRINT_INFORMATION(("Populating Email Resourcesn"));
  1062.     EmailResourceData();
  1063. #endif /* __MMI_EMAIL__ */ 
  1064. #ifdef __MMI_IMPS__
  1065.     PRINT_INFORMATION(("Populating IMPS Resourcesn"));
  1066.     PopulateIMPSData();
  1067. #endif /* __MMI_IMPS__ */ 
  1068. #ifdef __SAT__
  1069.     PRINT_INFORMATION(("Populating SAT Resourcesn"));
  1070.     PopulateSATRes();
  1071. #endif /* __SAT__ */ 
  1072. #if defined(JATAAYU_SUPPORT)
  1073.     PRINT_INFORMATION(("Populating Jataayu Browser Resourcesn"));
  1074.     PopulateJaatayuBrowserRes();
  1075.     PRINT_INFORMATION(("Populating Jataayu Provisioning Resourcesn"));
  1076.     PopulateJaatayuProvisioningRes();
  1077.     PRINT_INFORMATION(("Populating Jataayu JDD Resourcesn"));
  1078.     PopulateJataayuJDDRes();
  1079. #endif /* defined(JATAAYU_SUPPORT) */ 
  1080. #ifdef __MMI_ENGINEER_MODE__
  1081.     PRINT_INFORMATION(("Populating EM Resourcesn"));
  1082.     populateEngineerModeMenu();
  1083. #endif /* __MMI_ENGINEER_MODE__ */ 
  1084. #ifdef __MMI_FACTORY_MODE__
  1085.     PRINT_INFORMATION(("Populating FM Resourcesn"));
  1086.     populateFactoryModeMenu();
  1087. #endif /* __MMI_FACTORY_MODE__ */ 
  1088. #ifdef __MMI_AUDIO_PLAYER__
  1089.     PRINT_INFORMATION(("Populating Audio Player Resourcesn"));
  1090.     populateAudioPlayerMenu();
  1091. #else /* __MMI_AUDIO_PLAYER__ */ 
  1092.     PRINT_INFORMATION(("Populating Audio Simple Player Resourcesn"));
  1093.     populateAudioPlayerMenu();
  1094. #endif /* __MMI_AUDIO_PLAYER__ */ 
  1095. #ifdef __MMI_AB_REPEATER__
  1096.     PRINT_INFORMATION(("Populating AB Repeater Resourcesn"));
  1097.     populateABRepeaterMenu();
  1098. #endif /* __MMI_AB_REPEATER__ */ 
  1099. #ifdef __MMI_SOUND_RECORDER__
  1100.     PRINT_INFORMATION(("Populating Sound Recorder Resourcesn"));
  1101.     populateSoundRecorderMenu();
  1102. #endif /* __MMI_SOUND_RECORDER__ */ 
  1103. #ifdef __MMI_FILE_MANAGER__
  1104.     PRINT_INFORMATION(("Populating File Manager Resourcesn"));
  1105.     populateFileManagerMenu();
  1106. #endif /* __MMI_FILE_MANAGER__ */ 
  1107. #ifdef __MMI_VIDEO_PLAYER__
  1108.     PRINT_INFORMATION(("Populating Video Player Resourcesn"));
  1109.     PopulateVdoPlyRes();
  1110. #endif /* __MMI_VIDEO_PLAYER__ */ 
  1111. #ifdef __MMI_VIDEO_RECORDER__
  1112.     PRINT_INFORMATION(("Populating Video Recoder Resourcesn"));
  1113.     PopulateVdoRecRes();
  1114. #endif /* __MMI_VIDEO_RECORDER__ */ 
  1115. #ifdef __MMI_NITZ__
  1116.     PRINT_INFORMATION(("Populating NITZ Resourcesn"));
  1117.     PopulateResourceNITZ();
  1118. #endif /* __MMI_NITZ__ */ 
  1119. #ifdef __MMI_PICTURE_EDITOR_SUPPORT__
  1120.     PRINT_INFORMATION(("End Populating Image Editorn"));
  1121.     PopulatePictureEditor();
  1122. #endif /* __MMI_PICTURE_EDITOR_SUPPORT__ */ 
  1123. #ifdef __MMI_STOPWATCH__
  1124.     PRINT_INFORMATION(("Populating StopWatch Resourcesn"));
  1125.     PopulateStopwatchRes();
  1126. #endif /* __MMI_STOPWATCH__ */ 
  1127. #if defined(__MMI_RING_COMPOSER__) && defined(__MMI_IMELODY_SUPPORT__)
  1128.     PRINT_INFORMATION(("Populating Compose RingTonen"));
  1129.     PopulateComposeRingTone();
  1130. #endif /* defined(__MMI_RING_COMPOSER__) && defined(__MMI_IMELODY_SUPPORT__) */ 
  1131. #ifdef __MMI_CAMERA__
  1132.     PRINT_INFORMATION(("Populating Camera Resourcen"));
  1133.     PopulateCameraRes();
  1134. #endif /* __MMI_CAMERA__ */ 
  1135. #ifdef __MMI_BARCODEREADER__
  1136.     PRINT_INFORMATION(("Populating Barcode Reader Resourcen"));
  1137.     PopulateBarcodeReaderRes();
  1138. #endif /* __MMI_BARCODEREADER__ */ 
  1139. #ifdef __MMI_IMAGE_VIEWER__
  1140.     PRINT_INFORMATION(("Populating Image Viewer Resourcen"));
  1141.     PopulateImageViewerRes();
  1142. #endif /* __MMI_IMAGE_VIEWER__ */ 
  1143. #ifdef __MMI_FM_RADIO__
  1144.     PRINT_INFORMATION(("Populating FM Radio Resourcen"));
  1145.     PopulateFMRadioRes();
  1146. #endif /* __MMI_FM_RADIO__ */ 
  1147. #ifdef __MMI_FM_RADIO_SCHEDULE_REC__
  1148.     PRINT_INFORMATION(("Populating Schedule FM Radio Record Resourcen"));
  1149.     PopulateFMScheduleRecRes();
  1150. #endif /* __MMI_FM_RADIO_SCHEDULE_REC__ */ 
  1151. #if defined(__MMI_PHOTOEDITOR__)
  1152.     PRINT_INFORMATION(("Populating PhotoEditor Resourcen"));
  1153.     PopulatePhotoEditorRes();
  1154. #endif /* defined(__MMI_PHOTOEDITOR__) */ 
  1155. #if defined (__MMI_EXT_DEVICE__)
  1156. #ifdef __MMI_USB_SUPPORT__
  1157.     PRINT_INFORMATION(("Populating USB Resourcen"));
  1158.     PopulateExtDevUSBRes();
  1159. #endif /* __MMI_USB_SUPPORT__ */ 
  1160. #ifdef __MMI_IRDA_SUPPORT__
  1161.     PRINT_INFORMATION(("Populating IRDA Resourcen"));
  1162.     PopulateExtDevIrDARes();
  1163. #endif /* __MMI_IRDA_SUPPORT__ */ 
  1164. #ifdef __MMI_BT_HP_SUPPORT__
  1165.     PRINT_INFORMATION(("Populating Bluetooth Resourcen"));
  1166.     PopulateExtDevBTHPRes();
  1167. #endif /* __MMI_BT_HP_SUPPORT__ */ 
  1168. #ifdef __MMI_BT_SUPPORT__
  1169.     PRINT_INFORMATION(("Populating Bluetooth Resourcen"));
  1170.     PopulateExtDevBTRes();
  1171. #endif /* __MMI_BT_SUPPORT__ */ 
  1172. #endif /* defined (__MMI_EXT_DEVICE__) */ 
  1173. #if defined(__MMI_VRSD__)
  1174.     PRINT_INFORMATION(("Populating Voice Recognition SD Resourcen"));
  1175.     PopulateVRSDRes();
  1176. #endif /* defined(__MMI_VRSD__) */ 
  1177. #if defined(__MMI_VRSI__)
  1178.     PRINT_INFORMATION(("Populating Voice Recognition SI Resourcen"));
  1179.     PopulateVRSIRes();
  1180. #endif /* defined(__MMI_VRSI__) */ 
  1181. #if defined(__MMI_BG_SOUND_EFFECT__)
  1182.     PRINT_INFORMATION(("Populating Background Sound Resourcen"));
  1183.     PopulateBGSoundRes();
  1184. #endif /* defined(__MMI_BG_SOUND_EFFECT__) */ 
  1185. #if (defined(OBIGO_SUPPORT) || defined (JATAAYU_SUPPORT)) && (defined(WAP_SUPPORT) || defined(__MMI_MMS__))
  1186.     PRINT_INFORMATION(("Populating WAP Resourcen"));
  1187.     PopulateWapRes();
  1188. #endif /* (defined(OBIGO_SUPPORT) || defined (JATAAYU_SUPPORT)) && (defined(WAP_SUPPORT) || defined(__MMI_MMS__)) */ 
  1189. #ifdef __MMI_POC__
  1190.     PRINT_INFORMATION(("Populating PoC Resourcesn"));
  1191.     PoCResourceData();
  1192. #endif /* __MMI_POC__ */ 
  1193. #ifdef __MMI_VOIP__
  1194.     PRINT_INFORMATION(("Populating VoIP Resourcesn"));
  1195.     VoIPResourceData();
  1196. #endif /* __MMI_VOIP__ */
  1197. #ifdef __SYNCML_SUPPORT__
  1198.     PRINT_INFORMATION(("Populating SyncML Resourcesn"));
  1199.     SyncMLResourceData();
  1200. #endif /* __SYNCML_SUPPORT__ */ 
  1201. #ifndef __POPULATE_ENGINE_
  1202.     SendMessage(hWnd, WM_GENSTRFILE, (WPARAM) 0, (LPARAM) 0);
  1203.     PRINT_INFORMATION(("after 1 sendmsg"));
  1204.     SendMessage(hWnd, WM_GENIMGFILE, (WPARAM) 0, (LPARAM) 0);
  1205.     PRINT_INFORMATION(("after 2 send msg "));
  1206.     SendMessage(hWnd, WM_GENMENUFILE, (WPARAM) 0, (LPARAM) 0);
  1207.     PRINT_INFORMATION(("after 3 send msg "));
  1208. #endif /* __POPULATE_ENGINE_ */ 
  1209. #if defined(__MMI_FTS_SUPPORT__) || defined(__MMI_FTC_SUPPORT__)
  1210.     PopulateExtDevFTPRes();
  1211.     PRINT_INFORMATION(("Populating FTP Resourcen"));
  1212. #endif /* defined(__MMI_FTS_SUPPORT__) || defined(__MMI_FTC_SUPPORT__) */ 
  1213. #ifdef __MMI_OPP_SUPPORT__
  1214.     PopulateExtDevOPPRes();
  1215.     PRINT_INFORMATION(("Populating OPP Resourcen"));
  1216. #endif /* __MMI_OPP_SUPPORT__ */ 
  1217. #ifdef __MMI_DOWNLOAD_AGENT__
  1218.     PRINT_INFORMATION(("Populating Download Agent Resourcesn"));
  1219.     PopulateDownloadAgentRes();
  1220. #endif /* __MMI_DOWNLOAD_AGENT__ */ 
  1221. #ifdef __MMI_SWFLASH__
  1222. PRINT_INFORMATION(("Populating SWFlash Resourcen"));
  1223. PopulateSWFlashRes();
  1224. #endif /* __MMI_SWFLASH__ */
  1225. #if defined(__FOTA_ENABLE__)
  1226.     PRINT_INFORMATION(("Populating Device Management Resourcesn"));
  1227.     PopulateDMMenuRes();
  1228. #endif /* __FOTA_ENABLE__ */ 
  1229.     //WRITE_STRING_RES_FILE;    /* Write the string resource file only for first pass */
  1230.     //WRITE_IMAGE_RES_FILE;     /* Write the image resource file only for first pass */
  1231.     //WRITE_MENU_RES_FILE;
  1232. #ifdef __FOTA_ENABLE__
  1233.     PRINT_INFORMATION(("Populating FOTA Resourcen"));
  1234.     PopulateFOTAData();
  1235. #endif /* __FOTA_ENABLE__ */
  1236. #ifdef __MMI_CCA_SUPPORT__
  1237.     PRINT_INFORMATION(("Populating CCA Resourcen"));
  1238.     PopulateCCARes();
  1239. #endif
  1240.     /*  for generate string list file in first pass */
  1241.     nfb_img_res_file = fopen(NFB_IMAGE_RES_FILENAME, "a");
  1242.     if (nfb_img_res_file != NULL)
  1243.     {
  1244.         fprintf(nfb_img_res_file, "n};n");
  1245.         fclose(nfb_img_res_file);
  1246.     }
  1247.     fwprintf(StringListFile, L"##numbert%drn", CurrMaxStringId);
  1248.     fclose(StringListFile);
  1249.     fprintf(EnumListFile, "};n");
  1250.     fclose(EnumListFile);
  1251.     /* 091004 MTK Calvin added to reduce populate time */
  1252.     fclose(OutputImgIDFile);
  1253.     /* 101205 audio resource Calvin Satrt */
  1254.     fclose(OutputAdoIDFile);
  1255.     /* 101205 audio resource Calvin End */
  1256. #if defined(_POPULATE_RES_C) && !defined(PRODUCTION_RELEASE)
  1257.     MYFCLOSE(fpMenuResourceUsage, "menu_resource_usage.txt");
  1258.     MYFCLOSE(fpImageResourceUsage, "image_resource_usage.txt");
  1259.     MYFCLOSE(fpAudioResourceUsage, "audio_resource_usage.txt");
  1260.     MYFCLOSE(fpStringResourceUsage, "string_resource_usage.txt");
  1261. #endif /* #if defined(_POPULATE_RES_C) && !defined(PRODUCTION_RELEASE) */
  1262.     fclose(OutputMenutreeIDFile);
  1263.     fclose(RepeatIDListFile);   /* 102604 MTK Calvin added */
  1264.     /* MTK Calvin end */
  1265. #ifdef __MMI_RESOURCE_ENFB_SUPPORT__
  1266.     fclose(enfb_img_data_file);//100206 ENFB support
  1267. #endif
  1268.     
  1269.     /* MTK Leo add */
  1270.     if (TYPE(__MMI_MAINMENU_TYPE__) != MATRIX_MENU)
  1271.     {
  1272.         OutputImgDataFile = fopen("..\..\Customer\CustResource\CustImgDataHW.h", "a");
  1273.         if (OutputImgDataFile == NULL)
  1274.         {
  1275.             printf("OutputImageDataFile Open fail !n");
  1276.         }
  1277.         else
  1278.         {
  1279.             fprintf(OutputImgDataFile, "const U8 __MAINLCD__MAINMENU__MATRIX__MM_BG_BMP[]={0x00,0x00};nn");
  1280.             fclose(OutputImgDataFile);
  1281.         }
  1282.     }
  1283.     /* MTK Leo end */
  1284. }
  1285. #ifdef __FOTA_ENABLE__
  1286. /*****************************************************************************
  1287.  * FUNCTION
  1288.  *  PopulateFOTAData
  1289.  * DESCRIPTION
  1290.  *  Populate FOTA data resource
  1291.  * PARAMETERS
  1292.  *  void
  1293.  * RETURNS
  1294.  *  void
  1295.  *****************************************************************************/
  1296. static void PopulateFOTAData(void)
  1297. {
  1298.     /*----------------------------------------------------------------*/
  1299.     /* Local Variables                                                */
  1300.     /*----------------------------------------------------------------*/
  1301.     FILE *fp_in, *fp_out, *fp_temp;
  1302.     char filename_in[] = CUST_IMG_PATH"\MainLCD\Submenu\Services\FOTA\FW_update_bg.pbm";
  1303.     char filename_out[] = "..\..\Customer\CustResource\CustFOTAImgData.h";
  1304.     char filename_temp[] = "TEMPIMAGE";
  1305.     char buff[256];
  1306.     int ret, count;
  1307.     /*----------------------------------------------------------------*/
  1308.     /* Code Body                                                      */
  1309.     /*----------------------------------------------------------------*/
  1310.     fp_in = fopen(filename_in, "rb");
  1311.     if (fp_in == NULL)
  1312.     {
  1313.         fprintf(stderr, "[FOTA] Input file failed !!n");
  1314.         return ;
  1315.     }
  1316.     fclose(fp_in);
  1317.     
  1318.     ret = BMPLoader(filename_in, filename_temp);
  1319.     if (ret == 0)
  1320.     {
  1321.         fprintf(stderr, "[FOTA] BMPLoader failed !!n");
  1322.         return ;
  1323.     }
  1324.     fp_temp = fopen(filename_temp, "rb");
  1325.     if (fp_temp == NULL)
  1326.     {
  1327.         fprintf(stderr, "[FOTA] Read raw data file failed !!n");
  1328.         return ;
  1329.     }
  1330.     fp_out = fopen(filename_out, "w");
  1331.     if (fp_out == NULL)
  1332.     {
  1333.         fprintf(stderr, "[FOTA] Output file failed !!n");
  1334.         fclose(fp_temp);
  1335.         return ;
  1336.     }
  1337.     fprintf(fp_out, "const U8 FOTA_PBAR_IMG_DATA[] = ");
  1338.     while (!feof(fp_temp))
  1339.     {
  1340.         count = fread(buff, sizeof(char), 256, fp_temp);
  1341.         if (count)
  1342.         {
  1343.             fwrite(buff, sizeof(char), count, fp_out);
  1344.         }
  1345.     }
  1346.     fputs("n", fp_out);
  1347.     fclose(fp_temp);
  1348.     fclose(fp_out);
  1349. }
  1350. #endif /* __FOTA_ENABLE__ */
  1351. /*****************************************************************************
  1352.  * FUNCTION
  1353.  *  PopulateGlobalData
  1354.  * DESCRIPTION
  1355.  *  Populate Global Resource
  1356.  * PARAMETERS
  1357.  *  void
  1358.  * RETURNS
  1359.  *  void
  1360.  *****************************************************************************/
  1361. void PopulateGlobalData()
  1362. {
  1363.     /*----------------------------------------------------------------*/
  1364.     /* Local Variables                                                */
  1365.     /*----------------------------------------------------------------*/
  1366.     /*----------------------------------------------------------------*/
  1367.     /* Code Body                                                      */
  1368.     /*----------------------------------------------------------------*/
  1369.     ADD_APPLICATION_STRING2(STR_GLOBAL_OK, "Ok", "Global String- OK");
  1370.     ADD_APPLICATION_STRING2(STR_GLOBAL_BACK, "Back", "Global String- Back");
  1371.     ADD_APPLICATION_STRING2(STR_GLOBAL_OPTIONS, "Option", "Global String- Options");
  1372.     ADD_APPLICATION_STRING2(STR_GLOBAL_YES, "Yes", "Global String- Yes");
  1373.     ADD_APPLICATION_STRING2(STR_GLOBAL_NO, "No", "Global String- No");
  1374.     ADD_APPLICATION_STRING2(STR_GLOBAL_ON, "On", "Global String- On");
  1375.     ADD_APPLICATION_STRING2(STR_GLOBAL_OFF, "Off", "Global String- Off");
  1376.     ADD_APPLICATION_STRING2(STR_GLOBAL_CLEAR, "Clear", "Global String- Clear");
  1377.     ADD_APPLICATION_STRING2(STR_GLOBAL_DONE, "Done", "Global String- Done");
  1378.     ADD_APPLICATION_STRING2(STR_GLOBAL_SAVED, "Saved", "Global String- Saved");
  1379.     ADD_APPLICATION_STRING2(STR_GLOBAL_SAVE, "Save", "Global String- Save");
  1380.     ADD_APPLICATION_STRING2(STR_GLOBAL_SAVING, "Saving", "Global String- Saving");
  1381.     ADD_APPLICATION_STRING2(STR_GLOBAL_NOT_DONE, "Not Done", "Global String- Not Done");
  1382.     ADD_APPLICATION_STRING2(STR_GLOBAL_UNFINISHED, "Unfinished", "Global String- Unfinished");
  1383.     ADD_APPLICATION_STRING2(STR_GLOBAL_DELETE, "Delete", "Global String- Delete");
  1384.     ADD_APPLICATION_STRING2(STR_GLOBAL_CANCEL, "Cancel", "Global String- Cancel");
  1385.     ADD_APPLICATION_STRING2(STR_GLOBAL_EMPTY, "Empty", "Global String- Empty");
  1386.     ADD_APPLICATION_STRING2(STR_GLOBAL_EDIT, "Edit", "Global String- Edit");
  1387.     ADD_APPLICATION_STRING2(STR_GLOBAL_ACTIVATE, "Activate", "Global String- Activate");
  1388.     ADD_APPLICATION_STRING2(STR_GLOBAL_DETACTIVATE, "Deactivate", "Global String- Deactivate");
  1389.     ADD_APPLICATION_STRING2(
  1390.         STR_EARPHONE_POPUP,
  1391.         "Earphone plugged in!",
  1392.         "String Associated with Ear Phone Plug In Popup.");
  1393.     ADD_APPLICATION_STRING2(STR_HEADSET_DEACTIVATE_MESSAGE, "Earphone plugged Out", "Earphone plugged Out");
  1394.     ADD_APPLICATION_STRING2(STR_GLOBAL_INPUT_METHOD, "Input Method", "Global String- Input Method");
  1395.     ADD_APPLICATION_STRING2(STR_GLOBAL_USE_TEMPLATE, "Use Template", "Global String- Use Template");
  1396.     ADD_APPLICATION_STRING2(STR_GLOBAL_SEND, "Send", "Global String- Send");
  1397.     ADD_APPLICATION_STRING2(STR_GLOBAL_REPLY, "Reply", "Global String- Reply");
  1398.     ADD_APPLICATION_STRING2(STR_GLOBAL_EMPTY_LIST, "<Empty>", "Global String- <Empty>");
  1399.     ADD_APPLICATION_STRING2(STR_GLOBAL_ABORT, "Abort", "Global String- Abort");
  1400.     ADD_APPLICATION_STRING2(STR_GLOBAL_ADD, "Add", "Global String- Add");
  1401.     ADD_APPLICATION_STRING2(STR_GLOBAL_DELETE_ALL, "Delete All", "Global String- Delete All");
  1402.     ADD_APPLICATION_STRING2(STR_GLOBAL_DIAL, "Dial", "Global String- Dial");
  1403.     ADD_APPLICATION_STRING2(STR_GLOBAL_ERROR, "Error", "Global String- Error");
  1404.     ADD_APPLICATION_STRING2(STR_GLOBAL_NORMAL, "Normal", "Global String- Normal");
  1405.     ADD_APPLICATION_STRING2(STR_GLOBAL_NONE, "None", "Global String- None");
  1406.     ADD_APPLICATION_STRING2(STR_GLOBAL_SELECT, "Select", "Global String- Select");
  1407.     ADD_APPLICATION_STRING2(STR_GLOBAL_VIEW, "View", "Global String- View");
  1408.     ADD_APPLICATION_STRING2(STR_GLOBAL_UNSUPPORTED_FORMAT, "Unsupported Format", "Global String- Unsupported Format");
  1409.     ADD_APPLICATION_STRING2(STR_GLOBAL_NOT_AVAILABLE, "Not Available", "Global String- Not Available");
  1410.     ADD_APPLICATION_STRING2(STR_GLOBAL_INVALID, "Invalid", "Global String- Invalid");
  1411.     ADD_APPLICATION_STRING2(STR_GLOBAL_DRM_PROHIBITED, "DRM Prohibited", "Global String- DRM Prohibited");
  1412.     ADD_APPLICATION_STRING2(STR_GLOBAL_DRM_PROCESSING, "DRM Processing", "Global String- DRM Processing");
  1413.     ADD_APPLICATION_STRING2(STR_GLOBAL_DRM_NON_DRM, "Not DRM File", "Global String- Not DRM File");
  1414.     ADD_APPLICATION_STRING2(STR_GLOBAL_DRM_FS_ERROR, "File Access Error", "Global String- File Access Error");
  1415.     ADD_APPLICATION_STRING2(STR_GLOBAL_DRM_INVALID_FORMAT, "Format Error", "Global String- Format Error");
  1416.     ADD_APPLICATION_STRING2(STR_GLOBAL_DRM_SIZE_TOO_BIG, "Size Too Big", "Global String- Size Too Big");
  1417.     ADD_APPLICATION_STRING2(STR_GLOBAL_DRM_FILE_EXISTS, "File Exists", "Global String- File Exists");
  1418.     ADD_APPLICATION_STRING2(STR_GLOBAL_DRM_RO_RECEIVED, "DRM Rights Received", "Global String- DRM Rights Received");
  1419.     ADD_APPLICATION_STRING2(STR_GLOBAL_FILENAME, "Filename", "Global String- Filename");
  1420.     ADD_APPLICATION_STRING2(STR_GLOBAL_OPEN, "Open", "Global String- Open");
  1421.     ADD_APPLICATION_STRING2(STR_GLOBAL_CLOSE, "Close", "Global String- Close");
  1422.     ADD_APPLICATION_STRING2(STR_GLOBAL_QUIT, "Quit", "Global String- Quit");
  1423.     ADD_APPLICATION_STRING2(STR_GLOBAL_SEARCH, "Search", "Global String- Search");
  1424.     ADD_APPLICATION_STRING2(STR_GLOBAL_SEARCHING, "Searching", "Global String- Searching");
  1425.     ADD_APPLICATION_STRING2(STR_GLOBAL_ABORTING, "Aborting", "Global String- Aborting");
  1426.     ADD_APPLICATION_STRING2(STR_GLOBAL_0, "0", "Global String- 0");
  1427.     ADD_APPLICATION_STRING2(STR_GLOBAL_1, "1", "Global String- 1");
  1428.     ADD_APPLICATION_STRING2(STR_GLOBAL_2, "2", "Global String- 2");
  1429.     ADD_APPLICATION_STRING2(STR_GLOBAL_3, "3", "Global String- 3");
  1430.     ADD_APPLICATION_STRING2(STR_GLOBAL_4, "4", "Global String- 4");
  1431.     ADD_APPLICATION_STRING2(STR_GLOBAL_5, "5", "Global String- 5");
  1432.     ADD_APPLICATION_STRING2(STR_GLOBAL_6, "6", "Global String- 6");
  1433.     ADD_APPLICATION_STRING2(STR_GLOBAL_7, "7", "Global String- 7");
  1434.     ADD_APPLICATION_STRING2(STR_GLOBAL_8, "8", "Global String- 8");
  1435.     ADD_APPLICATION_STRING2(STR_GLOBAL_9, "9", "Global String- 9");
  1436.     ADD_APPLICATION_STRING2(STR_GLOBAL_10, "10", "Global String- 10");
  1437.     ADD_APPLICATION_STRING2(
  1438.         STR_GLOBAL_NOT_SUPPORT_AT_PC_SIMULATOR,
  1439.         "Not Support at PC Simulator",
  1440.         "Global String- Not Support at PC Simulator");
  1441.     ADD_APPLICATION_STRING2(STR_GLOBAL_NO_MEMORY_CARD, "No Memory Card", "[Notify-No Memory Card]");
  1442.     ADD_APPLICATION_STRING2(STR_GLOBAL_DOWNLOAD, "Download", "STR_GLOBAL_DOWNLOAD");
  1443.     ADD_APPLICATION_STRING2(STR_GLOBAL_DOWNLOAD_ASK, "Download?", "STR_GLOBAL_DOWNLOAD_ASK");
  1444.     ADD_APPLICATION_STRING2(STR_GLOBAL_DOWNLOADING, "Downloading...", "STR_GLOBAL_DOWNLOADING");
  1445.     ADD_APPLICATION_STRING2(STR_GLOBAL_DOWNLOADED, "Downloaded~", "STR_GLOBAL_DOWNLOADED");
  1446.     ADD_APPLICATION_STRING2(STR_GLOBAL_DOWNLOAD_FAILED, "Download failed~", "STR_GLOBAL_DOWNLOAD_FAILED");
  1447.     ADD_APPLICATION_STRING2(STR_GLOBAL_INSTALL, "Install", "STR_GLOBAL_INSTALL");
  1448.     ADD_APPLICATION_STRING2(STR_GLOBAL_INSTALL_ASK, "Install?", "STR_GLOBAL_INSTALL_ASK");
  1449.     ADD_APPLICATION_STRING2(STR_GLOBAL_INSTALLING, "Start Installing", "STR_GLOBAL_INSTALLING");
  1450.     ADD_APPLICATION_STRING2(STR_GLOBAL_INSTALLED, "Installed~", "STR_GLOBAL_INSTALLED");
  1451.     ADD_APPLICATION_STRING2(STR_GLOBAL_INSTALL_FAILED, "Install failed~", "STR_GLOBAL_INSTALL_FAILED");
  1452.     ADD_APPLICATION_STRING2(STR_GLOBAL_BUSY_TRY_LATER, "Busy", "STR_GLOBAL_BUSY_TRY_LATER");
  1453. ADD_APPLICATION_STRING2(STR_GLOBAL_SUBMIT,"Submit","Accept");
  1454. ADD_APPLICATION_STRING2(STR_GLOBAL_USERNAME,"User Name","User name menu");
  1455. ADD_APPLICATION_STRING2(STR_GLOBAL_PASSWORD,"Password","Password menu");
  1456. ADD_APPLICATION_STRING2(STR_GLOBAL_AUTHENTICATION,"Authentication","Authentication");
  1457.     ADD_APPLICATION_IMAGE2(IMG_BOOTUP_SCANNING_LOGO,CUST_IMG_PATH"\\MainLCD\\Active\\poweronoff\\logo.gif","Bootup Scanning Image");
  1458.     ADD_APPLICATION_IMAGE2(IMG_GLOBAL_OK, "..\\..\\Customer\\Images\\EmptyImage.bmp", "Global Image-Ok");
  1459.     ADD_APPLICATION_IMAGE2(IMG_GLOBAL_BACK, "..\\..\\Customer\\Images\\EmptyImage.bmp", "Global Image-Back");
  1460.     ADD_APPLICATION_IMAGE2(IMG_GLOBAL_YES, "..\\..\\Customer\\Images\\EmptyImage.bmp", "Global Image-Yes");
  1461.     ADD_APPLICATION_IMAGE2(IMG_GLOBAL_NO, "..\\..\\Customer\\Images\\EmptyImage.bmp", "Global Image-No");
  1462.     ADD_APPLICATION_IMAGE2(
  1463.         IMG_GLOBAL_OPTIONS,
  1464.         "..\\..\\Customer\\Images\\EmptyImage.bmp",
  1465.         "Global Image-Options");
  1466.  //jerson add begin 20070606
  1467. #ifdef __MMI_MAINLCD_176X220__
  1468.     ADD_APPLICATION_IMAGE2(
  1469.         IMG_GLOBAL_L1,
  1470.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\Listmenuicon\\L_NB1.PBM",
  1471.         "Menu Image");     //Old:PBM
  1472.     ADD_APPLICATION_IMAGE2(
  1473.         IMG_GLOBAL_L2,
  1474.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB2.PBM",
  1475.         "Menu Image");     //Old:PBM
  1476.     ADD_APPLICATION_IMAGE2(
  1477.         IMG_GLOBAL_L3,
  1478.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB3.PBM",
  1479.         "Menu Image");     //Old:PBM
  1480.     ADD_APPLICATION_IMAGE2(
  1481.         IMG_GLOBAL_L4,
  1482.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB4.PBM",
  1483.         "Menu Image");     //Old:PBM
  1484.     ADD_APPLICATION_IMAGE2(
  1485.         IMG_GLOBAL_L5,
  1486.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB5.PBM",
  1487.         "Menu Image");     //Old:PBM
  1488.     ADD_APPLICATION_IMAGE2(
  1489.         IMG_GLOBAL_L6,
  1490.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB6.PBM",
  1491.         "Menu Image");     //Old:PBM
  1492.     ADD_APPLICATION_IMAGE2(
  1493.         IMG_GLOBAL_L7,
  1494.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB7.PBM",
  1495.         "Menu Image");     //Old:PBM
  1496.     ADD_APPLICATION_IMAGE2(
  1497.         IMG_GLOBAL_L8,
  1498.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB8.PBM",
  1499.         "Menu Image");     //Old:PBM
  1500.     ADD_APPLICATION_IMAGE2(
  1501.         IMG_GLOBAL_L9,
  1502.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB9.PBM",
  1503.         "Menu Image");     //Old:PBM
  1504.     ADD_APPLICATION_IMAGE2(
  1505.         IMG_GLOBAL_L10,
  1506.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB10.PBM",
  1507.         "Menu Image");     //Old:PBM
  1508.     ADD_APPLICATION_IMAGE2(
  1509.         IMG_GLOBAL_L11,
  1510.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB11.PBM",
  1511.         "Menu Image");     //Old:PBM
  1512.     ADD_APPLICATION_IMAGE2(
  1513.         IMG_GLOBAL_L12,
  1514.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB12.PBM",
  1515.         "Menu Image");     //Old:PBM
  1516.     ADD_APPLICATION_IMAGE2(
  1517.         IMG_GLOBAL_L13,
  1518.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB13.PBM",
  1519.         "Menu Image");     //Old:PBM
  1520.     ADD_APPLICATION_IMAGE2(
  1521.         IMG_GLOBAL_L14,
  1522.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB14.PBM",
  1523.         "Menu Image");     //Old:PBM
  1524.     ADD_APPLICATION_IMAGE2(
  1525.         IMG_GLOBAL_L15,
  1526.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB15.PBM",
  1527.         "Menu Image");     //Old:PBM
  1528.     ADD_APPLICATION_IMAGE2(
  1529.         IMG_GLOBAL_L16,
  1530.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB16.PBM",
  1531.         "Menu Image");     //Old:PBM
  1532.     ADD_APPLICATION_IMAGE2(
  1533.         IMG_GLOBAL_L17,
  1534.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB17.PBM",
  1535.         "Menu Image");     //Old:PBM
  1536.     ADD_APPLICATION_IMAGE2(
  1537.         IMG_GLOBAL_L18,
  1538.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB18.PBM",
  1539.         "Menu Image");     //Old:PBM
  1540.     ADD_APPLICATION_IMAGE2(
  1541.         IMG_GLOBAL_L19,
  1542.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB19.PBM",
  1543.         "Menu Image");     //Old:PBM
  1544.     ADD_APPLICATION_IMAGE2(
  1545.         IMG_GLOBAL_L20,
  1546.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB20.PBM",
  1547.         "Menu Image");     //Old:PBM
  1548.     ADD_APPLICATION_IMAGE2(
  1549.         IMG_GLOBAL_L21,
  1550.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB21.PBM",
  1551.         "Menu Image");     //Old:PBM
  1552.     ADD_APPLICATION_IMAGE2(
  1553.         IMG_GLOBAL_L22,
  1554.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB22.PBM",
  1555.         "Menu Image");     //Old:PBM
  1556.     ADD_APPLICATION_IMAGE2(
  1557.         IMG_GLOBAL_L23,
  1558.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB23.PBM",
  1559.         "Menu Image");     //Old:PBM
  1560.     ADD_APPLICATION_IMAGE2(
  1561.         IMG_GLOBAL_L24,
  1562.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB24.PBM",
  1563.         "Menu Image");     //Old:PBM
  1564.     ADD_APPLICATION_IMAGE2(
  1565.         IMG_GLOBAL_L25,
  1566.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB25.PBM",
  1567.         "Menu Image");     //Old:PBM
  1568.     ADD_APPLICATION_IMAGE2(
  1569.         IMG_GLOBAL_L26,
  1570.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB26.PBM",
  1571.         "Menu Image");     //Old:PBM
  1572.     ADD_APPLICATION_IMAGE2(
  1573.         IMG_GLOBAL_L27,
  1574.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB27.PBM",
  1575.         "Menu Image");     //Old:PBM
  1576.     ADD_APPLICATION_IMAGE2(
  1577.         IMG_GLOBAL_L28,
  1578.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB28.PBM",
  1579.         "Menu Image");     //Old:PBM
  1580.     ADD_APPLICATION_IMAGE2(
  1581.         IMG_GLOBAL_L29,
  1582.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB29.PBM",
  1583.         "Menu Image");     //Old:PBM
  1584.     ADD_APPLICATION_IMAGE2(
  1585.         IMG_GLOBAL_L30,
  1586.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB30.PBM",
  1587.         "Menu Image");     //Old:PBM
  1588. #else  //__MMI_MAINLCD_240X320__
  1589. //jerson add end 20070606     
  1590.     //KP Jerry modify on 2007-3-8 start
  1591.     ADD_APPLICATION_IMAGE2(
  1592.         IMG_GLOBAL_L1,
  1593.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\Listmenuicon\\L_NB1.GIF",
  1594.         "Menu Image");     //Old:PBM
  1595.     ADD_APPLICATION_IMAGE2(
  1596.         IMG_GLOBAL_L2,
  1597.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB2.GIF",
  1598.         "Menu Image");     //Old:PBM
  1599.     ADD_APPLICATION_IMAGE2(
  1600.         IMG_GLOBAL_L3,
  1601.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB3.gif",
  1602.         "Menu Image");     //Old:PBM
  1603.     ADD_APPLICATION_IMAGE2(
  1604.         IMG_GLOBAL_L4,
  1605.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB4.gif",
  1606.         "Menu Image");     //Old:PBM
  1607.     ADD_APPLICATION_IMAGE2(
  1608.         IMG_GLOBAL_L5,
  1609.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB5.gif",
  1610.         "Menu Image");     //Old:PBM
  1611.     ADD_APPLICATION_IMAGE2(
  1612.         IMG_GLOBAL_L6,
  1613.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB6.gif",
  1614.         "Menu Image");     //Old:PBM
  1615.     ADD_APPLICATION_IMAGE2(
  1616.         IMG_GLOBAL_L7,
  1617.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB7.gif",
  1618.         "Menu Image");     //Old:PBM
  1619.     ADD_APPLICATION_IMAGE2(
  1620.         IMG_GLOBAL_L8,
  1621.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB8.gif",
  1622.         "Menu Image");     //Old:PBM
  1623.     ADD_APPLICATION_IMAGE2(
  1624.         IMG_GLOBAL_L9,
  1625.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB9.gif",
  1626.         "Menu Image");     //Old:PBM
  1627.     ADD_APPLICATION_IMAGE2(
  1628.         IMG_GLOBAL_L10,
  1629.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB10.gif",
  1630.         "Menu Image");     //Old:PBM
  1631.     ADD_APPLICATION_IMAGE2(
  1632.         IMG_GLOBAL_L11,
  1633.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB11.gif",
  1634.         "Menu Image");     //Old:PBM
  1635.     ADD_APPLICATION_IMAGE2(
  1636.         IMG_GLOBAL_L12,
  1637.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB12.gif",
  1638.         "Menu Image");     //Old:PBM
  1639.     ADD_APPLICATION_IMAGE2(
  1640.         IMG_GLOBAL_L13,
  1641.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB13.gif",
  1642.         "Menu Image");     //Old:PBM
  1643.     ADD_APPLICATION_IMAGE2(
  1644.         IMG_GLOBAL_L14,
  1645.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB14.gif",
  1646.         "Menu Image");     //Old:PBM
  1647.     ADD_APPLICATION_IMAGE2(
  1648.         IMG_GLOBAL_L15,
  1649.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB15.gif",
  1650.         "Menu Image");     //Old:PBM
  1651.     ADD_APPLICATION_IMAGE2(
  1652.         IMG_GLOBAL_L16,
  1653.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB16.gif",
  1654.         "Menu Image");     //Old:PBM
  1655.     ADD_APPLICATION_IMAGE2(
  1656.         IMG_GLOBAL_L17,
  1657.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB17.gif",
  1658.         "Menu Image");     //Old:PBM
  1659.     ADD_APPLICATION_IMAGE2(
  1660.         IMG_GLOBAL_L18,
  1661.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB18.gif",
  1662.         "Menu Image");     //Old:PBM
  1663.     ADD_APPLICATION_IMAGE2(
  1664.         IMG_GLOBAL_L19,
  1665.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB19.gif",
  1666.         "Menu Image");     //Old:PBM
  1667.     ADD_APPLICATION_IMAGE2(
  1668.         IMG_GLOBAL_L20,
  1669.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB20.gif",
  1670.         "Menu Image");     //Old:PBM
  1671.     ADD_APPLICATION_IMAGE2(
  1672.         IMG_GLOBAL_L21,
  1673.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB21.gif",
  1674.         "Menu Image");     //Old:PBM
  1675.     ADD_APPLICATION_IMAGE2(
  1676.         IMG_GLOBAL_L22,
  1677.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB22.gif",
  1678.         "Menu Image");     //Old:PBM
  1679.     ADD_APPLICATION_IMAGE2(
  1680.         IMG_GLOBAL_L23,
  1681.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB23.gif",
  1682.         "Menu Image");     //Old:PBM
  1683.     ADD_APPLICATION_IMAGE2(
  1684.         IMG_GLOBAL_L24,
  1685.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB24.gif",
  1686.         "Menu Image");     //Old:PBM
  1687.     ADD_APPLICATION_IMAGE2(
  1688.         IMG_GLOBAL_L25,
  1689.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB25.gif",
  1690.         "Menu Image");     //Old:PBM
  1691.     ADD_APPLICATION_IMAGE2(
  1692.         IMG_GLOBAL_L26,
  1693.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB26.gif",
  1694.         "Menu Image");     //Old:PBM
  1695.     ADD_APPLICATION_IMAGE2(
  1696.         IMG_GLOBAL_L27,
  1697.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB27.gif",
  1698.         "Menu Image");     //Old:PBM
  1699.     ADD_APPLICATION_IMAGE2(
  1700.         IMG_GLOBAL_L28,
  1701.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB28.gif",
  1702.         "Menu Image");     //Old:PBM
  1703.     ADD_APPLICATION_IMAGE2(
  1704.         IMG_GLOBAL_L29,
  1705.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB29.gif",
  1706.         "Menu Image");     //Old:PBM
  1707.     ADD_APPLICATION_IMAGE2(
  1708.         IMG_GLOBAL_L30,
  1709.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\ListMenuIcon\\L_NB30.gif",
  1710.         "Menu Image");     //Old:PBM
  1711.     //KP Jerry modify on 2007-3-8 end
  1712. #endif
  1713.     ADD_APPLICATION_IMAGE2(IMG_GLOBAL_CLEAR, "..\\..\\Customer\\Images\\EmptyImage.bmp", "Global Image-Clear");
  1714.     ADD_APPLICATION_IMAGE2(IMG_STATUS, CUST_IMG_PATH "\\MainLCD\\Alarm\\OA_STATU.PBM", "Status Image");
  1715.     ADD_APPLICATION_IMAGE2(IMG_VICON, CUST_IMG_PATH "\\MainLCD\\UIElement\\checkbox\\CK_V.bmp", "Status Image");
  1716.     ADD_APPLICATION_IMAGE2(IMG_TIME, CUST_IMG_PATH "\\MainLCD\\Alarm\\OA_TIME.PBM", "Time Image");
  1717.     ADD_APPLICATION_IMAGE2(IMG_REPEAT, CUST_IMG_PATH "\\MainLCD\\Alarm\\OA_REPT.PBM", "Repeat Image");
  1718.     ADD_APPLICATION_IMAGE2(
  1719.         IMG_CAL,
  1720.         CUST_IMG_PATH "\\MainLCD\\SubMenu\\Settings\\DateAndTime\\ST_CALEN.PBM",
  1721.         "Calendar Image");
  1722.     ADD_APPLICATION_IMAGE2(
  1723.         IMG_GLOBAL_QUESTION,
  1724.         CUST_IMG_PATH "\\MainLCD\\Warningpage\\PopUpPage\\PP_QUE.gif",
  1725.         "Question Mark image");
  1726.     ADD_APPLICATION_IMAGE2(
  1727.         IMG_GLOBAL_SAVE,
  1728.         CUST_IMG_PATH "\\MainLCD\\Warningpage\\PopUpPage\\PP_SAV.GIF",
  1729.         "saved image");
  1730.     ADD_APPLICATION_IMAGE2(
  1731.         IMG_GLOBAL_DELETED,
  1732.         CUST_IMG_PATH "\\MainLCD\\Warningpage\\PopUpPage\\PP_DEL.GIF",
  1733.         "deleted image");
  1734.     ADD_APPLICATION_IMAGE2(
  1735.         IMG_GLOBAL_EMPTY,
  1736.         CUST_IMG_PATH "\\MainLCD\\Warningpage\\PopUpPage\\PP_EMP.gif",
  1737.         "empty image");
  1738.     ADD_APPLICATION_IMAGE2(
  1739.         IMG_GLOBAL_UNFINISHED,
  1740.         CUST_IMG_PATH "\\MainLCD\\Warningpage\\PopUpPage\\PP_UNF.gif",
  1741.         "unfinished image");
  1742.    //jerson add begin 20070606
  1743. #ifdef __MMI_MAINLCD_176X220__
  1744. ADD_APPLICATION_IMAGE2(IMG_GLOBAL_WARNING, CUST_IMG_PATH"\\MainLCD\\Warningpage\\PopUpPage\\PP_WARN.bmp", "warning image");      
  1745. #else  //__MMI_MAINLCD_240X320__
  1746. //jerson add end 20070606      
  1747. ADD_APPLICATION_IMAGE2(IMG_GLOBAL_WARNING, CUST_IMG_PATH"\\MainLCD\\Warningpage\\PopUpPage\\PP_WARN.gif", "warning image");      //Old:PP_WARN.bmp     //KP Jerry modify on 2006-11-18
  1748. #endif
  1749.     ADD_APPLICATION_IMAGE2(
  1750.         IMG_GLOBAL_PROGRESS,
  1751.         CUST_IMG_PATH "\\MainLCD\\UIElement\\Progress\\PROGRESS.GIF",
  1752.         "Progress Image");
  1753.     ADD_APPLICATION_IMAGE2(IMG_GLOBAL_DEFAULT, "..\\..\\Customer\\Images\\Default.bmp", "default image");
  1754.     ADD_APPLICATION_IMAGE2(
  1755.         IMG_GLOBAL_ACTIVATED,
  1756.         CUST_IMG_PATH "\\MainLCD\\Warningpage\\PopUpPage\\PP_DONE.gif",
  1757.         "Activated image");
  1758.     ADD_APPLICATION_IMAGE2(
  1759.         IMG_GLOBAL_ERASED,
  1760.         CUST_IMG_PATH "\\MainLCD\\Warningpage\\PopUpPage\\PP_ERASE.gif",
  1761.         "Erased image");
  1762.     ADD_APPLICATION_IMAGE2(
  1763.         IMG_GLOBAL_ERROR,
  1764.         CUST_IMG_PATH "\\MainLCD\\Warningpage\\PopUpPage\\PP_ERR.gif",
  1765.         "Error Image");
  1766.     ADD_APPLICATION_IMAGE2(
  1767.         IMG_GLOBAL_INFO,
  1768.         CUST_IMG_PATH "\\MainLCD\\Warningpage\\PopUpPage\\PP_INF.gif",
  1769.         "Info Image");
  1770. //jerson add begin 20070606
  1771. #ifdef __MMI_MAINLCD_176X220__
  1772.     ADD_APPLICATION_IMAGE2(
  1773.         IMG_EARPHONE_POPUP_MAINLCD,
  1774.         CUST_IMG_PATH "\\MAINLCD\\WarningPage\\notification\\N_HDSET.BMP",     
  1775.         "Main LCD Image Associated with Ear Phone Plug In Popup.");
  1776. #else  //__MMI_MAINLCD_240X320__
  1777. //jerson add end 20070606        
  1778.     ADD_APPLICATION_IMAGE2(
  1779.         IMG_EARPHONE_POPUP_MAINLCD,
  1780.         CUST_IMG_PATH "\\MAINLCD\\WarningPage\\notification\\N_HDSET.gif",       //Old:BMP      //KP Jerry modify on 2007-3-7
  1781.         "Main LCD Image Associated with Ear Phone Plug In Popup.");
  1782. #endif        
  1783.     ADD_APPLICATION_IMAGE2(
  1784.         IMG_EARPHONE_POPUP_SUBLCD,
  1785.         CUST_IMG_PATH "\\SUBLCD\\Active\\SB_EAR.BMP",
  1786.         "Sub LCD Image Associated with Ear Phone Plug In Popup.");
  1787. //KP Jerry modify on 2006-11-14 start //jerson modify 20070605
  1788. ADD_APPLICATION_IMAGE2(IMG_GLOBAL_SUB_MENU_BG,CUST_IMG_PATH"\\MAINLCD\\SUBMENU\\SB_BG.GIF","SubMenu BG Image.");
  1789. ADD_APPLICATION_IMAGE2(IMG_GLOBAL_SUB_MENU_BG_1,CUST_IMG_PATH"\\MAINLCD\\SUBMENU\\SB_BG_1.GIF","SubMenu BG Image.");
  1790. ADD_APPLICATION_IMAGE2(IMG_GLOBAL_SUB_MENU_BG_2,CUST_IMG_PATH"\\MAINLCD\\SUBMENU\\SB_BG_2.GIF","SubMenu BG Image.");
  1791. ADD_APPLICATION_IMAGE2(IMG_GLOBAL_SUB_MENU_BG_3,CUST_IMG_PATH"\\MAINLCD\\SUBMENU\\SB_BG_3.GIF","SubMenu BG Image.");
  1792. ADD_APPLICATION_IMAGE2(IMG_GLOBAL_SUB_MENU_BG_4,CUST_IMG_PATH"\\MAINLCD\\SUBMENU\\SB_BG_4.GIF","SubMenu BG Image.");
  1793. //KP Jerry modify on 2006-11-14 end
  1794. #ifdef __MMI_SLIM_PROGRESS_ANIMATION__
  1795.     ADD_APPLICATION_IMAGE2(
  1796.         IMG_GLOBAL_LOADING,
  1797.         CUST_IMG_PATH "\\MainLCD\\UIElement\\Progress\\PROGRESS.GIF",
  1798.         "Loading Progress Image");
  1799. #else /* __MMI_SLIM_PROGRESS_ANIMATION__ */ 
  1800.     ADD_APPLICATION_IMAGE2(
  1801.         IMG_GLOBAL_LOADING,
  1802.         CUST_IMG_PATH "\\MainLCD\\UIElement\\Progress\\LOADING.GIF",
  1803.         "Loading Progress Image");
  1804. #endif /* __MMI_SLIM_PROGRESS_ANIMATION__ */ 
  1805. }
  1806. #else /* DEVELOPER_BUILD_FIRST_PASS */ 
  1807. /***************************************************************************** 
  1808. *
  1809. * Not FIRST_PASS, for MMI to get global resource info
  1810. *
  1811. *****************************************************************************/
  1812. U16 CurrMaxStringNum;
  1813. U32 CurrTotalStrLen;
  1814. U16 CurrMaxStringId;
  1815. U16 CurrMaxStringIdSearch;
  1816. U16 gCurrLangIndex;
  1817. #ifdef MMI_ON_HARDWARE_P
  1818. const CUSTOM_STRING *gpStringRes;
  1819. const CUSTOM_STRING_MAP *gpStringMapRes;
  1820. const CUSTOM_STRMAP_SEARCH *gpStrMapSearch;
  1821. extern StringResList *gStringList;
  1822. #else /* MMI_ON_HARDWARE_P */ 
  1823. CUSTOM_STRING *gpStringRes;
  1824. CUSTOM_STRING_MAP *gpStringMapRes;
  1825. CUSTOM_STRMAP_SEARCH *gpStrMapSearch;
  1826. extern StringResList *gStringList;
  1827. #endif /* MMI_ON_HARDWARE_P */ 
  1828. #if defined(MMI_ON_WIN32)
  1829. extern void InitializeResourceVariables(void);
  1830. #endif 
  1831. /*****************************************************************************
  1832.  * FUNCTION
  1833.  *  PopulateResGetBaseIDTable
  1834.  * DESCRIPTION
  1835.  *  Dummy function to make ARM linker happy such that developers can access
  1836.  *  g_mmi_resource_base_table in Trace32/VC++ even though the variable is not used
  1837.  *  in other places.
  1838.  * PARAMETERS
  1839.  *  void
  1840.  * RETURNS
  1841.  *  void
  1842.  *****************************************************************************/
  1843. void *PopulateResGetBaseIDTable(void)
  1844. {
  1845. #if !defined(PRODUCTION_RELEASE)
  1846.     /*----------------------------------------------------------------*/
  1847.     /* Local Variables                                                */
  1848.     /*----------------------------------------------------------------*/
  1849.     /*----------------------------------------------------------------*/
  1850.     /* Code Body                                                      */
  1851.     /*----------------------------------------------------------------*/
  1852.     return (void*)g_mmi_resource_base_table;
  1853. #else /* !defined(PRODUCTION_RELEASE) */ 
  1854.     return NULL;
  1855. #endif /* !defined(PRODUCTION_RELEASE) */ 
  1856. }
  1857. /*****************************************************************************
  1858.  * FUNCTION
  1859.  *  PopulateResData
  1860.  * DESCRIPTION
  1861.  *  Populate Resource, assign resource info to global variable
  1862.  * PARAMETERS
  1863.  *  void
  1864.  * RETURNS
  1865.  *  void
  1866.  *****************************************************************************/
  1867. void PopulateResData(void)
  1868. {
  1869.     /*----------------------------------------------------------------*/
  1870.     /* Local Variables                                                */
  1871.     /*----------------------------------------------------------------*/
  1872.     /*----------------------------------------------------------------*/
  1873.     /* Code Body                                                      */
  1874.     /*----------------------------------------------------------------*/
  1875.     /* to read from NVRAM if possible -vanita */
  1876. #if defined(MMI_ON_WIN32)
  1877.     InitializeResourceVariables();
  1878. #endif 
  1879.     gCurrLangIndex = 0;
  1880.     gpStringRes = gStringList[gCurrLangIndex].pStringRes;
  1881.     gpStringMapRes = gStringList[gCurrLangIndex].pStringMap;
  1882.     gpStrMapSearch = gStringList[gCurrLangIndex].pStrMapSearch;
  1883.     CurrMaxStringNum = gStringList[gCurrLangIndex].nTotalStrRes;
  1884.     CurrMaxStringId = gStringList[gCurrLangIndex].nTotalStrMap;
  1885.     CurrMaxStringIdSearch = gStringList[gCurrLangIndex].nTotalStrMapSearch;
  1886.     return;
  1887. }
  1888. #endif /* DEVELOPER_BUILD_FIRST_PASS */