ResGenerator.tmp
14.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
@echo off
set prj=
set customer=YYY
set optr_path=PPP
set optr_spec=SSS
set main_lcd_size=MMM
set touch_panel_support=QQQ
set MTK_PROJECT_PATH=%2
set COMPILER_VER=gcc33
if %customer%==MTK set customer=PLUTO
if "%RESGEN_DEBUG%"=="YES" (
set RESGEN_OPTION='USES_DEBUG=YES'
)
if %COMPILER_VER%==gcc45 goto compiler_ver_gcc45:
path ..\..\tools;..\..\..\tools;..\..\..\Tools\MSYS\bin;..\..\..\..\Tools\MSYS\bin;..\..\Tools\MinGW\bin;..\..\..\Tools\MinGW\bin;..\..\..\tools\MinGW\lib\gcc-lib\mingw32\3.3.1;..\debug;.\debug;..\..\..\Tools;%path%;
set RESGEN_MAKE=..\..\..\Tools\MSYS\bin\make
goto end_compiler_setting:
:compiler_ver_gcc45
path ..\..\tools;..\..\..\tools;..\..\Tools\MinGW\bin;..\..\..\Tools\MinGW\bin;..\..\..\tools\MinGW\lib\gcc-lib\mingw32\3.3.1;..\debug;.\debug;..\..\..\Tools;%path%;
set RESGEN_MAKE=..\..\..\Tools\make
:end_compiler_setting
if not .%1==. goto a:
goto menu:
:a
cd plutommi\Customer\ResGenerator
set /a COMPILE_NUM=%NUMBER_OF_PROCESSORS%*2
echo NUMBER_OF_PROCESSORS=[%NUMBER_OF_PROCESSORS%] COMPILE_NUM=[%COMPILE_NUM%]
set /a MAX_COMPILE_NUM=32
if %COMPILE_NUM% GTR %MAX_COMPILE_NUM% goto set_singel_process
goto end_singel_process
:set_singel_process
set /a COMPILE_NUM=%NUMBER_OF_PROCESSORS%
echo NUMBER_OF_PROCESSORS=[%NUMBER_OF_PROCESSORS%] COMPILE_NUM=[%COMPILE_NUM%]
:end_singel_process
set TIMELOGFILE=%CD%\resgen_time.log
echo [%Time%] start > %TIMELOGFILE%
if .%1==.XXX_MMI set prj=XXX
rem ****************************************************************
rem *************** Run ResGenerator_OP_pre.bat ********************
rem ****************************************************************
if %optr_spec%==NONE goto skip_optr_pre
echo -----------------Run ResGenerator_OP_pre.bat---------------------------------------------------
call ..\..\..\%optr_path%\ResGenerator_OP_pre.bat %optr_path%
echo ------------------------------DONE-------------------------------------------------------------
:skip_optr_pre
rem ************************************************************
rem *************** Start to Generate Font File ! **************
rem ************************************************************
echo -------------Start to Generate Font File !-------------
if exist ..\FontResgen\font_gen.exe if exist ..\CustResource\FontRes.c if exist ..\..\..\vendor\font\inc\L_*.h goto success_font_gen
if exist .\font_gen.exe del /q .\font_gen.exe
%RESGEN_MAKE% -j%COMPILE_NUM% -fMAKEFILE font_gen.exe -k 2> .\..\..\..\build\%MTK_PROJECT_PATH%\log\res_gen_font_tool.log
echo [%Time%] Compiled font_gen.exe >> %TIMELOGFILE%
if not exist font_gen.exe goto skip_font_gen
copy /y .\font_gen.exe ..\FontResgen\ >NUL
cd ..\FontResgen
if not exist FontFile\NUL md FontFile
if not exist debug\NUL md debug
if not exist font_gen.exe goto skip_font_gen
if not exist ..\..\..\vendor\font\inc md ..\..\..\vendor\font\inc
if exist ..\..\..\vendor\font\inc\*.* del /q ..\..\..\vendor\font\inc\*.*
font_gen.exe > .\debug\res_gen_font.log
echo [%Time%] Executed font_gen.exe >> %TIMELOGFILE%
copy /y .\FontFile\L_*.h ..\..\..\vendor\font\inc\ >NUL
copy /y .\FontFile\FontRes.c ..\CustResource\ >NUL
del /q .\FontFile\*.*
rd /s /q .\FontFile
cd ..\ResGenerator
echo Font Resgen Done
goto success_font_gen
:skip_font_gen
echo Font Resgen Error
echo Please Check again!!
exit 3
:success_font_gen
rem ************************************************************
rem ************** Start to Generate Resource ******************
rem ************** -Using Pixtel ResGenerator ******************
rem ************************************************************
rem goto skip_del_obj
if exist ..\..\customer\custresource\ref_list.txt del ..\..\customer\custresource\ref_list.txt > nul
rem if exist .\temp\ rd /S/Q .\temp\ >nul
rem if exist .\debug\ rd /S/Q .\debug\ >nul
rem if exist ..\CustomerInc\mmi_rp*.* del ..\CustomerInc\mmi_rp*.* > nul
if exist .\mtk_resgenerator.exe del .\mtk_resgenerator.exe > nul
if exist .\mtk_resgenerator.map del .\mtk_resgenerator.map > nul
if exist .\ref_list_merge.exe del .\ref_list_merge.exe > nul
if exist .\plmncreate.exe del .\plmncreate.exe > nul
if exist .\vf*.tmp del .\vf*.tmp > nul
if exist .\modis_vf*.obj del .\modis_vf*.obj > nul
if exist .\vf*.obj del .\vf*.obj > nul
if exist *.o del *.o > nul
:skip_del_obj
if not exist .\temp\ md .\temp\
if not exist .\debug\ md .\debug\
if not exist .\debug\obj md .\debug\obj
if not exist .\..\..\..\build\%MTK_PROJECT_PATH%\log\ md .\..\..\..\build\%MTK_PROJECT_PATH%\log\
rem ************************************************************
rem copy ref_list_xxx.txt
rem ************************************************************
if exist copy_ref_list.pl perl copy_ref_list.pl
echo [%Time%] Executed copy_ref_list.pl >> %TIMELOGFILE%
rem ************************************************************
rem *************** make and run ref_list_merge.exe ************
rem ************************************************************
echo -----------------make and run ref_list_merge.exe----------------
%RESGEN_MAKE% -j%COMPILE_NUM% -fMAKEFILE ref_list_merge.exe -k 2> .\..\..\..\build\%MTK_PROJECT_PATH%\log\res_gen_make_ref_list.log
echo [%Time%] Compiled ref_list_merge.exe >> %TIMELOGFILE%
if not exist ref_list_merge.exe goto RESGEN_REF_LIST_MERGE_ERR
ref_list_merge.exe > .\debug\res_gen_run_ref_list.log
echo [%Time%] Executed ref_list_merge.exe >> %TIMELOGFILE%
IF ERRORLEVEL 2 goto RESGEN_RUN_REF_LIST_MERGE_ERR
rem COPY ..\custresource\%prj%_MMI\ref_list.txt ..\custresource\ref_list.txt
COPY ..\custresource\PLUTO_MMI\ref_list.txt ..\custresource\ref_list.txt
if not exist ..\custresource\ref_list.txt goto RESGEN_REF_LIST_ERR
echo ------------------------------DONE------------------------------
rem ************************************************************
rem *************** make and run plmncreate.exe ************
rem ************************************************************
echo ---------------------make and run plmncreate.exe-----------------
COPY ..\custresource\PLUTO_MMI\plmnlist.txt ..\custresource\plmnlist.txt
COPY ..\custresource\PLUTO_MMI\PlmnEnum.tmp ..\..\MMI\MiscFramework\MiscFrameworkInc\PlmnEnum.h
COPY ..\custresource\PLUTO_MMI\PlmnName.tmp ..\..\Service\NetSetSrv\PlmnName.c
if not exist .\..\..\..\build\%MTK_PROJECT_PATH%\log\ md .\..\..\..\build\%MTK_PROJECT_PATH%\log\
%RESGEN_MAKE% -j%COMPILE_NUM% -fMAKEFILE plmncreate.exe 2> .\..\..\..\build\%MTK_PROJECT_PATH%\log\res_gen_make_plmn.log
echo [%Time%] Compiled plmncreate.exe >> %TIMELOGFILE%
if not exist plmncreate.exe goto RESGEN_PLMN_ERR
plmncreate.exe > .\debug\res_gen_run_plmn.log
echo [%Time%] Executed plmncreate.exe >> %TIMELOGFILE%
IF ERRORLEVEL 2 goto RESGEN_RUN_PLMN_ERR
echo ------------------------------DONE------------------------------
rem ************************************************************
rem *************** make and run VKV2ResourceGen.exe ***********
rem ************************************************************
copy ..\custresource\PLUTO_MMI\VKV2.vkw ..\resgenerator > nul
copy ..\custresource\PLUTO_MMI\VKV2ResourceGen.exe ..\resgenerator > nul
if %customer%==PLUTO goto skip_copy_vkv2_customer
copy ..\custresource\%customer%_MMI\VKV2.vkw ..\resgenerator > nul
copy ..\custresource\%customer%_MMI\VKV2ResourceGen.exe ..\resgenerator > nul
:skip_copy_vkv2_customer
echo ------------------------------COPY VKV2 DONE------------------------------
echo ------------------------run VKV2ResourceGen.exe-------------------
if not exist VKV2ResourceGen.exe goto RESGEN_VKV2_ERR_1
if not exist VKV2.vkw goto RESGEN_VKV2_ERR_2
VKV2ResourceGen.exe > .\debug\VKV2ResourceGen.log
echo [%Time%] Executed VKV2ResourceGen.exe >> %TIMELOGFILE%
IF ERRORLEVEL 2 goto RESGEN_VKV2_ERR_6
if not exist gui_virtual_keyboard_res.h goto RESGEN_VKV2_ERR_3
if not exist res_virtual_keyboard.c goto RESGEN_VKV2_ERR_4
if not exist VKB.dat goto RESGEN_VKV2_ERR_5
movefile ..\resgenerator\gui_virtual_keyboard_res.h ..\..\Framework\GUI\GUI_INC\gui_virtual_keyboard_res.h
movefile ..\resgenerator\VKB.dat ..\..\Framework\GUI\GUI_INC\VKB.dat
COPY ..\resgenerator\res_virtual_keyboard.c ..\Res_MMI\res_virtual_keyboard.c
if exist ..\resgenerator\VKV2ResourceGen.exe del ..\resgenerator\VKV2ResourceGen.exe
if exist ..\resgenerator\VKV2.vkw del ..\resgenerator\VKV2.vkw
echo ------------------------------DONE------------------------------
rem ************************************************************
rem *************** make and run mtk_resgenerator.exe ********
rem ************************************************************
:make_old_resgen
rem goto jump_old_resgen
echo ---------------make mtk_resgenerator.exe---------------
if not exist .\..\..\..\build\%MTK_PROJECT_PATH%\log\ md .\..\..\..\build\%MTK_PROJECT_PATH%\log\
%RESGEN_MAKE% %RESGEN_OPTION% -j%COMPILE_NUM% -fMAKEFILE mtk_resgenerator.exe -k 2> .\..\..\..\build\%MTK_PROJECT_PATH%\log\res_gen.log
echo [%Time%] Compiled mtk_resgenerator.exe >> %TIMELOGFILE%
if not exist mtk_resgenerator.exe goto RESGEN_MAKE_RESGEN_EXE_ERR
echo ------------------------------DONE------------------------------
rem ************************************************************
rem ********** Copy obj files for vendor app *****************
rem ************************************************************
for %%i in (bmp2ems.o BMPLoader.o GIFLoader.o ResBytestream.o UCS2.o ImageGetDimension.o FontRes.o) do if exist .\debug\obj\mtk_resgenerator\%%i copy /y .\debug\obj\mtk_resgenerator\%%i ..\..\VendorApp\ResGenerator\obj\ >NUL
echo -----------------run mtk_resgenerator.exe---------------
mtk_resgenerator.exe -g -x > .\debug\res_gen_mtk_resgenerator.log
echo [%Time%] Executed mtk_resgenerator.exe >> %TIMELOGFILE%
IF ERRORLEVEL 2 goto RESGEN_RUN_RESGEN_EXE_ERR
echo ------------------------------DONE------------------------------
:jump_old_resgen
rem ************************************************************
rem *** Menu Tree Tool gen resource to copy back if needed *****
rem ************************************************************
if exist ..\custresource\CustMenuToolRes.c copy ..\custresource\CustMenuToolRes.c ..\custresource\CustMenuRes.c /y
rem ************************************************************
rem ************** Start to Generate Resource ******************
rem ************************************************************
echo -----------------clear intermediate files-----------------
rem if exist ..\Res_MMI\ rd /S/Q ..\Res_MMI\
rem if exist .\temp\ rd /S/Q .\temp\
if exist ..\custresource\CustENFBImgData copy ..\custresource\CustENFBImgData ..\..\..\MoDIS_VC9\MoDIS\CustENFBImgData /y
if exist ..\custresource\CustENFBImgData copy ..\custresource\CustENFBStrData ..\..\..\MoDIS_VC9\MoDIS\CustENFBStrData /y
rem ************************************************************
rem Generate the MTE image resource header file.
rem ************************************************************
perl mte_parse_img_usage.pl
echo [%Time%] Executed mte_parse_img_usage.pl >> %TIMELOGFILE%
rem ************************************************************
rem Generate the MSLT resource header file.
rem ************************************************************
if exist mslt_parse_info.pl perl mslt_parse_info.pl
echo [%Time%] Executed mslt_parse_info.pl >> %TIMELOGFILE%
rem ************************************************************
rem Generate the image_resource_usage.htm
rem ************************************************************
if exist resgen_log_info_gen.py ..\..\..\tools\python25\python resgen_log_info_gen.py
if exist output_image_html.pl perl output_image_html.pl
echo [%Time%] Executed output_image_html.pl >> %TIMELOGFILE%
rem ************************************************************
rem Generate Venus theme resource
rem ************************************************************
if exist venus_theme_generator.pl perl venus_theme_generator.pl
echo [%Time%] Executed venus_theme_generator.pl >> %TIMELOGFILE%
rem ************************************************************
rem Generate file list
rem ************************************************************
if exist generate_file_list.pl perl generate_file_list.pl
echo [%Time%] Executed generate_file_list.pl >> %TIMELOGFILE%
perl ..\..\..\tools\pack_dep_gcc.pl debug\dep\resgen.dep debug\dep plutommi\Customer\ResGenerator
rem ************************************************************
rem Generate used include path list
rem ************************************************************
..\..\..\tools\python25\python .\merge_dep.py
cd ..\..\..\
echo -----------------ResGenerator Complete!!-----------------
goto done
rem ************************************************************
rem ************** Error Handling and Messages *****************
rem ************************************************************
:RESGEN_REF_LIST_MERGE_ERR
echo Error in ResGenerating Process make merge ref_list.txt error!!
echo Please Check log file res_gen_make_ref_list.log !!
exit 3
:RESGEN_RUN_REF_LIST_MERGE_ERR
echo Error in ResGenerating run merge ref_list.txt error!!
echo Please Check log file res_gen_run_ref_list.log !!
exit 3
:RESGEN_REF_LIST_ERR
echo Error in ResGenerating Process ref_list.txt not exist!!
echo Please Check it !!
exit 3
:RESGEN_PLMN_ERR
echo Error in ResGenerating Process make plmn error!!
echo Please Check log file res_gen_make_plmn.log !!
exit 3
:RESGEN_RUN_PLMN_ERR
echo Error in run plmncreate error!!
echo Please Check log file res_gen_run_plmn.log !!
exit 3
:RESGEN_MAKE_RESGEN_EXE_ERR
echo Error in ResGenerating Process make mtk_resgenerator.exe!!
echo Please Check log file res_gen.log !!
exit 3
:RESGEN_RUN_RESGEN_EXE_ERR
echo Error in ResGenerating Process run mtk_resgenerator.exe!!
echo Please Check log file res_gen_mtk_resgenerator.log !!
exit 3
:RESGEN_VKV2_ERR_1
echo Error in ResGenerating Process VK_V2 error1!!
echo Please Check again!!
exit 3
:RESGEN_VKV2_ERR_2
echo Error in ResGenerating Process VK_V2 error2!!
echo Please Check again!!
exit 3
:RESGEN_VKV2_ERR_3
echo Error in ResGenerating Process VK_V2 error3!!
echo Please Check again!!
exit 3
:RESGEN_VKV2_ERR_4
echo Error in ResGenerating Process VK_V2 error4!!
echo Please Check again!!
exit 3
:RESGEN_VKV2_ERR_5
echo Error in ResGenerating Process VK_V2 error5!!
echo Please Check again!!
exit 3
:RESGEN_VKV2_ERR_6
echo Error in ResGenerating Process VK_V2 error6!!
echo Please Check VKV2ResourceGen.log!!
exit 3
rem ************************************************************
rem **************** Menu To Select Project ********************
rem ************************************************************
:menu
@echo off
rem cls
rem echo MediaTek Resource Generator
rem echo.
rem echo Please select one project to generate resource...
rem echo.
rem echo SELECT MENU
rem echo ==========
rem echo.
rem echo 1 - XXX
rem echo.
rem echo Q - Quit
rem choice /C:1Q>nul
rem if errorlevel 23 goto done
rem if errorlevel 1 goto XXX:
goto XXX:
goto done
:XXX
set prj=XXX
goto a:
:done