如:
discovery\discoveryinc\myappDefs.h文件在资源编译时找不到,为什么呢?
如果这么个模块是我们自己新加入的,则很有可能没有在目录(plutommi\Customer\ResGenerator)下的makefile中添加我们自己头文件目录。
以下是该makefile文件中的有关系统中所有module的头文件路径设置;该makefile文件是由资源编译加载程序所使用。
include custom_option.txt
include custom_include.txt
PLUTO_INC = \
-I "../../../Discovery/DiscoveryInc" \
-I "../customerinc" \
-I "../../MMI/PoC/PoCInc" \
-I "../../MMI/DebugLevels/DebugLevelInc" \
-I "../../MMI/Calls/CallsInc" \
-I "../../MMI/ChatApp/ChatAppInc" \
-I "../../MMI/EmailApp/EmailAppInc" \
-I "../../MMI/IMPS/IMPSInc" \
-I "../../MMI/Inc" \
-I "../../MMI/Inc/ImgID" \
-I "../../MMI/Inc/MenuID" \
-I "../../MMI/Inc/StringID" \
-I "../../MtkApp/MtkAppInc" \
-I "../../MtkApp/EngineerMode/EngineerModeInc" \
-I "../../MtkApp/Connectivity/ConnectivityInc" \
-I "../../MtkApp/SoundRecorder/SoundRecorderInc" \
-I "../../MtkApp/AudioPlayer/AudioPlayerInc" \
-I "../../MtkApp/ABRepeater/ABRepeaterInc" \
-I "../../MtkApp/mmiapi/include" \
-I "../../MMI/Framework/osl/oslinc" \
-I "../../MMI/CallManagement/CommonFiles/CommonInc" \
-I "../../MMI/CallManagement/OutgoingCallManagement/OutgoingInc" \
-I "../../MMI/CallManagement/IncomingCallManagement/IncomingInc" \
-I "../../MMI/GSMCallApplication/CommonFiles/CommonInc" \
-I "../../MMI/GSMCallApplication/OutgoingCallManagement/OutgoingInc" \
-I "../../MMI/GSMCallApplication/IncomingCallManagement/IncomingInc" \
-I "../../MMI/Setting/SettingInc" \
-I "../../MMI/PhoneBook/PhoneBookInc" \
-I "../../MMI/CommonScreens/CommonScreensInc" \
-I "../../MMI/Framework/CommonFiles/CommonInc" \
-I "../../MMI/Framework/Tasks/TasksInc" \
-I "../../MMI/Framework/EventHandling/EventsInc" \
-I "../../MMI/Framework/History/HistoryInc" \
-I "../../MMI/Framework/MemManager/MemManagerInc" \
-I "../../MMI/DataAccount/DataAccountInc" \
-I "../../MMI/FunAndGames/FunAndGamesInc" \
-I "../../MMI/gui/gui_inc" \
-I "../../MMI/gui/oem_inc" \
-I "../../MMI/DateTime/DateTimeInc" \
-I "../../MMI/MiscFramework/MiscFrameworkInc" \
-I "../../MMI/Help/HelpInc" \
-I "../../MMI/IdleScreen/IdleScreenInc" \
-I "../../MMI/Messages/MessagesInc" \
-I "../../MMI/NITZHandler/NITZInc" \
-I "../../MMI/PROFILES/ProfilesInc" \
-I "../../MMI/SAT/SATInc" \
-I "../../MMI/SSC/SSCInc" \
-I "../../MMI/Organizer/OrganizerInc" \
-I "../../MMI/Extra/ExtraInc" \
-I "../../MMI/JataayuApp\jBrowserMMI\jBrowserMMIInc" \
-I "../../MMI/UnifiedMMS/MMSApp/MMSAppInc" \
-I "../../MMI/JataayuApp\jCommonModules\jProvisioning\jProvisioningInc" \
-I "../../MMI/JataayuApp\jCommonModules\jProfileHandler\jProfileHandlerInc" \
-I "../../MMI/JataayuApp\jMMSMMI\jMMSMMIInc" \
-I "../../MMI/Customer/CustResource" \
-I "../../MMI/FontData" \
-I "../../MMI/debuglevels/DebugLevelInc" \
-I "../../MMI/MainMenu/MainMenuInc" \
-I "../../MMI/ems/emsinc" \
-I "../../MMI/Dictionary/DictInc" \
-I "../../MMI/Framework/NVRAMManager/NVRAMManagerInc" \
-I "../../MMI/EbookReader/EbookInc" \
-I "../../MMI/VoIP/VoIPInc" \
-I "../../MMI/UCM/UCMInc" \
-I "../../../kal/include" \
-I "../../../ps/interfaces/enum" \
-I "../../../ps/l4/include" \
-I "../../../ps/gen/mcd" \
-I "../../../ps/interfaces/local_inc" \
-I "../../MMI/CPHS/CPHSInc" \
-I "../../MMI/audio/audioinc" \
-I "." \
-I "../../../custom/audio/MT6208_CEVB" \
-I "../Customize" \
-I "../.." \
-I "../../../custom/audio/CHICAGO2003_BB" \
-I "../../../custom/audio/KLM2003_BB" \
-I "../../../interface/mmi" \
-I "../../MTkApp/Camera/CameraInc" \
-I "../../MTkApp/Video/VideoInc" \
-I "../../MTkApp/FileMgr/FileMgrInc" \
-I "../../../j2me/interface" \
-I "../../../j2me/jam/include" \
-I "../../MTkApp/GDI/GDIInc" \
-I "../../../fmt\include" \
-I "../../MTkApp/vObjects/vObjectInc" \
-I "../../MMI/Stopwatch/StopwatchInc" \
-I "../../MTkApp/FMRadio/FMRadioInc" \
-I "../../MTkApp/FMScheduleRec/FMScheduleRecInc" \
-I "../../MTkApp/VRSD/VRSDInc" \
-I "../../MTkApp/VRSI/VRSIInc" \
-I "../../MTkApp/PhotoEditor\PhotoEditorInc" \
-I "../../MTkApp/BGSound/BGSoundInc" \
-I "../../MMI/Resource\Inc" \
-I "../../../vendor/wap/jataayu4/adaptation/mmi/srcs/include" \
-I "../../MtkApp\JavaAgency\JavaAgencyInc" \
-I "../../MMI/UnifiedMessage/UnifiedMessageInc" \
-I "../../MtkApp/DLAgent/DLAgentInc" \
-I "../../MTkApp/BarcodeReader/BarcodeReaderInc" \
-I "../../MTkApp/SWFlash/SWFlashInc" \
-I "../../MTkApp/SyncML/SyncMLInc" \
-I "../../MMI/UnifiedComposer/UnifiedComposerInc" \
-I "../../MtkApp/VideoEditor/VideoEditorInc" \
-I "../../MTkApp/DeviceManagement/DeviceManagementInc" \
-I "../../MtkApp/CentralConfigAgent/CentralConfigAgentInc" \
-I "../../MTkApp/Avatar/AvatarInc" \
-I "../../MtkApp/CSBrowser/CSBrowserInc" \
-I "../../MtkApp/PictBridge/PictBridgeInc" \
-I "../../MMI/BrowserApp/Browser/BrowserInc" \
-I "../../MMI/BrowserApp/Profile/ProfileInc" \
-I "../../MMI/BrowserApp/PushInbox/PushInboxInc" \
-I "../../MTkApp/RightsMgr/RightsMgrInc" \
-I "../../MtkApp/DMUIApp/DMUIAppInc" \
-I "../../MMI/MobileService/MobileServiceInc" \
-I "../../MMI/CustomerService/CustomerServiceInc" \
-I "../../../vendor/langlearn/app/inc" \
-I "../../../vendor/mercury_master/inc" \
-I "../../MTkApp/MyFavorite/MyFavoriteInc" \
-I "../../MtkApp/MobileTVPlayer/MobileTVPlayerInc" \
-I "../../MMI/VideoCall/VideoCallInc" \
-I "../../MMI/UnifiedMMS/MMSBGSR/MMSBGSRInc" \
-I "../../../vendor/gis/mapbar/mmi/inc" \
-I "../../mercury_master/inc" \
-I "../../../vendor/mercury_master/inc"
INC = $(PLUTO_INC) ${CUSTOM_INC}
如以上红色标注的就是我们自己添加的模块头文件路径,这样在编译加载资源时(make resgen时 )就不会提示找不到我们自己模块的头文件了。
当然了,我们也可以将我们模块的头文件路径放置在变量CUSTOM_INC中,那么怎样放进去呢???
这个就要追溯到Gsm2.mak文件了,看下resgen行为就明白了。
##############################################################
# Resource generate
##############################################################
resgen:
ifeq ($(strip $(call Upper,$(LEVEL))),VENDOR)
@if exist $(MMIDIR)\VendorApp\DevResource\ResGenerator.bat \
($(MMIDIR)\VendorApp\DevResource\ResGenerator.bat -t)
else
@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,$(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) \
)
以上红色语句表示,函数foreach将目录变量COMMINCLUDIRS中的目录路径一个个解析出来放到零时文件~inc.tmp中,然后再将零时文件内容复制到custom_include.tmp中。
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,'<$(MMIDIR)\customer\resGenerator\custom_include.tmp';my $$i=join('',<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 $(patsubst %_MMI,%,$(OPTR_SPEC)) $(MMIDIR)\customer\ResGenerator_HW.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\ResGenerator_HW.bat MMM $(patsubst %_MMI,%,$(MAIN_LCD_SIZE)) $(MMIDIR)\customer\ResGenerator_HW.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\ResGenerator_HW.bat PPP $(patsubst %_MMI,%,$(OPTR_PATH)) $(MMIDIR)\customer\ResGenerator_HW.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\ResGenerator.bat SSS $(patsubst %_MMI,%,$(OPTR_SPEC)) $(MMIDIR)\customer\ResGenerator.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\ResGenerator.bat MMM $(patsubst %_MMI,%,$(MAIN_LCD_SIZE)) $(MMIDIR)\customer\ResGenerator.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\ResGenerator.bat PPP $(patsubst %_MMI,%,$(OPTR_PATH)) $(MMIDIR)\customer\ResGenerator.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\remakeResource.bat SSS $(patsubst %_MMI,%,$(OPTR_SPEC)) $(MMIDIR)\customer\remakeResource.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\remakeResource.bat MMM $(patsubst %_MMI,%,$(MAIN_LCD_SIZE)) $(MMIDIR)\customer\remakeResource.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\remakeResource.bat PPP $(patsubst %_MMI,%,$(OPTR_PATH)) $(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,'<$(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,'<$(MMIDIR)\customer\resGenerator\custom_include.tmp';my $$i=join('',<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,%,$(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 $(patsubst %_MMI,%,$(OPTR_SPEC)) $(MMIDIR)\customer\ResGenerator_HW.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\ResGenerator_HW.bat MMM $(patsubst %_MMI,%,$(MAIN_LCD_SIZE)) $(MMIDIR)\customer\ResGenerator_HW.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\ResGenerator_HW.bat PPP $(patsubst %_MMI,%,$(OPTR_PATH)) $(MMIDIR)\customer\ResGenerator_HW.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\ResGenerator.bat SSS $(patsubst %_MMI,%,$(OPTR_SPEC)) $(MMIDIR)\customer\ResGenerator.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\ResGenerator.bat MMM $(patsubst %_MMI,%,$(MAIN_LCD_SIZE)) $(MMIDIR)\customer\ResGenerator.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\ResGenerator.bat PPP $(patsubst %_MMI,%,$(OPTR_PATH)) $(MMIDIR)\customer\ResGenerator.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\remakeResource.bat SSS $(patsubst %_MMI,%,$(OPTR_SPEC)) $(MMIDIR)\customer\remakeResource.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\remakeResource.bat MMM $(patsubst %_MMI,%,$(MAIN_LCD_SIZE)) $(MMIDIR)\customer\remakeResource.bat) & \
(@perl $(MMIDIR)\customer\replace_project_name.pl $(MMIDIR)\customer\remakeResource.bat PPP $(patsubst %_MMI,%,$(OPTR_PATH)) $(MMIDIR)\customer\remakeResource.bat) \
) & \
(@del $(MMIDIR)\customer\resGenerator\custom_include.tmp) & \
($(MMIDIR)\customer\ResGenerator_HW.bat $(MMI_VERSION) $(CUSTOMER)) \
)
endif
# copy only for Neptune162
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) \
)
@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
那么变量MMIDIR由表示什么目录呢????
请看另一个makefile文件--------REL_CR_GEMINI_MMI_GPRS.mak,其中有如下定义:
# Different Release Levels for plutommi/lcmmi related components
# LEVEL1: Customer can change ~50% image files and view on PC simulator
# LEVEL2_OBJ: Customer can change some resources and use PC simulator and Network simulator
# LEVEL2_SRC: Customer will have the source code of PC simulator and Network simulator
ifndef MMI_BASE
MMI_BASE = PLUTO_MMI
MMIDIR = plutommi
else
ifeq ($(strip $(MMI_BASE)),NEPTUNE_MMI)
MMIDIR = lcmmi
else
MMIDIR = plutommi
endif
endif
所有说MMIDIR有可能使lcmmi或plutommi目录,究竟是哪个看你自己的系统配置。
通过以上给出的Gsm2.mak红色标注的部分,知道了custom_include.txt文件是自动生成的,其内容就是CUSTOM_INC = -I "..\..\..\nucleus\inc" -I "..\..\..\kal\include" 。。。
小结:
我们模块的头文件要想被资源编译加载程序找到,则有两个方法:
1,