Wednesday 12 August 2009

Windows Embedded CE: Build system considerations

Hi folks,

today I want to focus on the Windows Embedded CE build system. Well not on the whole build system but on one particular aspect, namely “how does Windows Embedded CE know which folders are in the PUBLIC tree and how can I make sure that my own folder in the PUBLIC tree will be included in the Windows Embedded CE build system

The answer is fairly simple: There is an environment variable in Windows Embedded CE which holds all components from the PUBLIC tree that are included in the build. This environment variable is called _DEPTREES (= Dependency trees).

I bet now you wanna know how this _DEPTREES environment variable is set:
  • For each folder that is by default in the PUBLIC tree the build system (more precisely the file wince.bat) checks if a makefile exists. If so, the folder is added to the _DEPTREES variable.

  • For each 3rd party folder in the PUBLIC tree the build system checks if a cebasesysgen.bat file is present. If so, the folder is added to the _DEPTREES variable

  • Lastly the _TGTPROJ folder is added to the _DEPTREES variable

  • Of course it is also possible to edit the _DEPTREES variable manually. This can be done by adding something like set _DEPTREES=%_DEPTREES% myComponent to wince.bat. NOTE: opening a build window from within PlatformBuilder (Build -> Open Release Directory in Build Window) and typing set _DEPTREES=myComponent will overwrite all previously set components!

Have fun!

No comments: