加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

MTK resgen编译分析

发布时间:2020-12-15 20:57:38 所属栏目:大数据 来源:网络整理
导读:MTK命令分析之resgen 以下是命令resgen的源码分析: resgen: ifeq ($(strip $(call Upper,$(LEVEL))),VENDOR) ?@if exist $(MMIDIR)/VendorApp/DevResource/ResGenerator.bat / ??($(MMIDIR)/VendorApp/DevResource/ResGenerator.bat -t) else # 生成custom_

MTK命令分析之resgen

以下是命令resgen的源码分析:

resgen:
ifeq ($(strip $(call Upper,$(LEVEL))),VENDOR)
?@if exist $(MMIDIR)/VendorApp/DevResource/ResGenerator.bat /
??($(MMIDIR)/VendorApp/DevResource/ResGenerator.bat -t)
else
# 生成custom_option.txt文件
?@if exist $(MMIDIR)/customer /
??(@if /I $(RUN_RESGEN) EQU TRUE /
???(echo CUSTOM_OPTION = $(foreach def,$(BOARD_VER) $(PLATFORM) $(LCD_MODULE) $(EXT_CAM_MODULE) $(CMOS_SENSOR),-D "$(def)") /> $(MMIDIR)/customer/resGenerator/custom_option.txt) /
??)

?@tools/strcmpex.exe TRUE TRUE e make/~cus_opt.tmp $(foreach def,$(sort $(COM_DEFS)),-D /"$(def)/")
?@if exist $(MMIDIR)/customer /
??(@if /I $(RUN_RESGEN) EQU TRUE /
???(type make/~cus_opt.tmp >> $(MMIDIR)/customer/resGenerator/custom_option.txt) /
??)

?@tools/strcmpex.exe TRUE TRUE e make/~tgt_opt.tmp $(foreach def,$(COM_DEFS) $(LCD_MODULE),/D /"$(def)/")
?@if exist $(MMIDIR)/customer /
??(@if /I $(RUN_RESGEN) EQU TRUE /
???(@del $(MMIDIR)/mmi/TargetOption.txt) & /
???(copy /Y make/~tgt_opt.tmp $(MMIDIR)/MMI/TargetOption.txt) /
??)

?@tools/strcmpex.exe TRUE TRUE e make/~inc.tmp $(foreach inc,$(COMMINCDIRS),$(inc))
?@if exist $(MMIDIR)/customer /
??(@if /I $(RUN_RESGEN) EQU TRUE /
???(type make/~inc.tmp > $(MMIDIR)/customer/resGenerator/custom_include.tmp) /
??)


ifdef OPTR_SPEC
# FALSE
? ifneq ($(strip $(OPTR_SPEC)),NONE)
?@if exist $(MMIDIR)/customer/replace_project_name.pl /
??(@if exist $(OPTR_PATH)/ResGenerator_OP.tmp /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(OPTR_PATH)/ResGenerator_OP.tmp {OP_NAME} $(strip $(word 1,$(subst _,$(OPTR_SPEC)))) $(OPTR_PATH)/ResGenerator_OP.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(OPTR_PATH)/ResGenerator_OP.bat {VER_NUM} $(strip $(word 2,$(OPTR_SPEC)))) $(OPTR_PATH)/ResGenerator_OP.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(OPTR_PATH)/ResGenerator_OP.bat {SEG_NAME} $(strip $(word 3,$(OPTR_SPEC)))) $(OPTR_PATH)/ResGenerator_OP.bat)? /
??) & /
??(@if exist $(OPTR_PATH)/operator_CustResDef.tmp /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(OPTR_PATH)/operator_CustResDef.tmp {OP_NAME} $(strip $(word 1,$(OPTR_SPEC)))) $(OPTR_PATH)/operator_CustResDef.h) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(OPTR_PATH)/operator_CustResDef.h {VER_NUM} $(strip $(word 2,$(OPTR_SPEC)))) $(OPTR_PATH)/operator_CustResDef.h) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(OPTR_PATH)/operator_CustResDef.h {SEG_NAME} $(strip $(word 3,$(OPTR_SPEC)))) $(OPTR_PATH)/operator_CustResDef.h) )
? endif
endif
# TRUE
# 生成文件custom_include.txt
# 生成文件
GlobalTargetPathDef
# 将参数一表示的文件中的参数二替换为参数三,保存为文件参数四
ifeq ($(strip $(NEED_COPY_MMIFEATURE)),CUSTOMER_MMI)
?@if exist $(MMIDIR)/customer /
??(@if /I $(RUN_RESGEN) EQU TRUE /
???(@perl -e "open F,'<$(MMIDIR)/customer/resGenerator/custom_include.tmp';my $$i=join('',<F>);close F;$$i =~s//s+/ /gs;$$i =~ s/(/S+)/-I /"..//..//..//$$1/"/gs;print /"CUSTOM_INC = $$i/";" > $(MMIDIR)/customer/resGenerator/custom_include.txt) & /
???(@perl -e "open F,<F>);close F;$$i =~s//s+/ /gs;$$i =~ s/(/S+)///I /"..//..//$$1/"/n/gs;print /"$$i/";" > $(MMIDIR)/MMI/GlobalTargetPathDef) & /
???(@if exist $(MMIDIR)/customer/replace_project_name.pl /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator_HW.tmp XXX $(patsubst %_MMI,%,$(MMI_VERSION)) $(MMIDIR)/customer/ResGenerator_HW.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator.tmp XXX $(patsubst %_MMI,$(MMI_VERSION)) $(MMIDIR)/customer/ResGenerator.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/remakeResource.tmp XXX $(patsubst %_MMI,$(MMI_VERSION)) $(MMIDIR)/customer/remakeResource.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/UpdateSkin.tmp XXX $(patsubst %_MMI,$(MMI_VERSION)) $(MMIDIR)/customer/UpdateSkin.bat) & /
?????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator_HW.bat YYY $(patsubst %_MMI,$(CUSTOMER)) $(MMIDIR)/customer/ResGenerator_HW.bat) & /
?????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator.bat YYY $(patsubst %_MMI,$(CUSTOMER)) $(MMIDIR)/customer/ResGenerator.bat) & /
?????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/remakeResource.bat YYY $(patsubst %_MMI,$(CUSTOMER)) $(MMIDIR)/customer/remakeResource.bat) & /
?????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/UpdateSkin.bat YYY $(patsubst %_MMI,$(CUSTOMER)) $(MMIDIR)/customer/UpdateSkin.bat) /
???) /
??)
?@if exist $(MMIDIR)/customer /
??(@if /I $(RUN_RESGEN) EQU TRUE /
???(@if exist $(MMIDIR)/customer/replace_project_name.pl /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator_HW.bat SSS $(call Upper,$(strip $(OPTR_SPEC))) $(MMIDIR)/customer/ResGenerator_HW.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator_HW.bat MMM $(call Upper,$(strip $(MAIN_LCD_SIZE))) $(MMIDIR)/customer/ResGenerator_HW.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator_HW.bat PPP $(strip $(OPTR_PATH)) $(MMIDIR)/customer/ResGenerator_HW.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator_HW.bat QQQ $(call Upper,$(strip $(TOUCH_PANEL_SUPPORT))) $(MMIDIR)/customer/ResGenerator_HW.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator.bat SSS $(call Upper,$(strip $(OPTR_SPEC))) $(MMIDIR)/customer/ResGenerator.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator.bat MMM $(call Upper,$(strip $(MAIN_LCD_SIZE))) $(MMIDIR)/customer/ResGenerator.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator.bat PPP $(strip $(OPTR_PATH)) $(MMIDIR)/customer/ResGenerator.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator.bat QQQ $(call Upper,$(strip $(TOUCH_PANEL_SUPPORT))) $(MMIDIR)/customer/ResGenerator.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/remakeResource.bat SSS $(call Upper,$(strip $(OPTR_SPEC))) $(MMIDIR)/customer/remakeResource.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/remakeResource.bat MMM $(call Upper,$(strip $(MAIN_LCD_SIZE))) $(MMIDIR)/customer/remakeResource.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/remakeResource.bat PPP $(strip $(OPTR_PATH)) $(MMIDIR)/customer/remakeResource.bat) & /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/remakeResource.bat QQQ $(call Upper,$(strip $(TOUCH_PANEL_SUPPORT))) $(MMIDIR)/customer/remakeResource.bat) /
???) & /
???(@del $(MMIDIR)/customer/resGenerator/custom_include.tmp) & /
???($(MMIDIR)/customer/ResGenerator_HW.bat $(MMI_VERSION) $(CUSTOMER)) /
??)
else
?@if exist $(MMIDIR)/customer /
??(@if /I $(RUN_RESGEN) EQU TRUE /
???(@perl -e "open F,$(MMI_VERSION)) $(MMIDIR)/customer/ResGenerator_HW.bat) & /
?????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator.bat YYY $(patsubst %_MMI,$(MMI_VERSION)) $(MMIDIR)/customer/ResGenerator.bat) & /
?????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/remakeResource.bat YYY $(patsubst %_MMI,$(MMI_VERSION)) $(MMIDIR)/customer/remakeResource.bat) & /
?????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/UpdateSkin.bat YYY $(patsubst %_MMI,$(MMI_VERSION)) $(MMIDIR)/customer/UpdateSkin.bat) /
???) /
??)
?@if exist $(MMIDIR)/customer /
??(@if /I $(RUN_RESGEN) EQU TRUE /
???(@if exist $(MMIDIR)/customer/replace_project_name.pl /
????(@perl $(MMIDIR)/customer/replace_project_name.pl $(MMIDIR)/customer/ResGenerator_HW.bat SSS $(call Upper,$(strip $(TOUCH_PANEL_SUPPORT))) $(MMIDIR)/customer/remakeResource.bat) /
???) & /
???(@del $(MMIDIR)/customer/resGenerator/custom_include.tmp) & /
???($(MMIDIR)/customer/ResGenerator_HW.bat $(MMI_VERSION) $(CUSTOMER)) /
??)
endif
?? # copy only for Neptune162
# FALSE??
?if /I "$(strip $(CUSTOMER))" EQU "NEPTUNE162" /
??(if exist $(FIXPATH)/$(MMIDIR)/customer/CustResource/$(strip $(CUSTOMER))_MMI/resource_shortcuts.c /
???? (copy /y $(FIXPATH)/$(MMIDIR)/Customer/CustResource/$(strip $(CUSTOMER))_MMI/resource_shortcuts.c $(FIXPATH)/$(MMIDIR)/Customer/CustResource/resource_shortcuts.c) /
??)
# 复制文件custom_option.txt和custom_include.txt到$(MMIDIR)/VendorApp/resGenerator目录下
?@if exist $(MMIDIR)/customer/resGenerator/custom_option.txt /
??(@if exist $(MMIDIR)/VendorApp/resGenerator /
???(copy /z $(MMIDIR)/customer/resGenerator/custom_option.txt $(MMIDIR)/VendorApp/resGenerator/custom_option.txt) & /
???(copy /z $(MMIDIR)/customer/resGenerator/custom_include.txt $(MMIDIR)/VendorApp/resGenerator/custom_include.txt) /
??)

endif

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读