windows ce 快速编译

来源:互联网 发布:php视频采集源码 编辑:程序博客网 时间:2024/06/05 07:35

http://geekswithblogs.net/BruceEitman/archive/2008/05/17/platform-builder--using-blddemo.aspx

 

Platform Builder: Using BldDemo

 

BldDemois an interesting batch file.  I suspect that it was originally createdto demonstrate how to build a Windows CE project. Today, it is the usedby the Platform Builder IDE to build projects.  I don't really use itvery often, except through Platform Builder, but it is a good source ofinformation and is useful when I do use it.

What is BldDemo?  It is a batch file that can beused to build a Windows CE image.  It hides the real tools that do thejob.  You can find it in %_WINCEROOT%/Public/Common/OAK/Misc if youwant to review the commands that are in it.  The following are thethings that it does from a high level:

  1. Cleans the results of previous builds
  2. Sets up the workspace if needed
  3. Builds the Public folders
  4. Builds the workspace
  5. Builds the BSP
  6. Copies the results to the _FLATRELEASEDIR
  7. Creates the OS image

BldDemo has several command line options, whichyou can view by running "blddemo -?".  I will focus on building thewhole system because later I will break out the other command linetools. 

The only options that I use from the command line are "clean" and "-q".  This is what they do:

  •  clean forces the project and platform cesysgen folders to be deleted.
  •  -q is passed on to cebuild and tells cebuild to do a quick build rather than a full build of the public folders.

I always pass "-q" to blddemo when I useblddemo.  I do this for two reasons; it speeds up the build and we, theaverage user, don't have all of the code to do a full build.  It isimportant to note here that the last command line arguments to blddemoare passed on to cebuild, so any parameters that you want passed on thecebuild should be at the end of the command line.

I use clean whenever I change something thatrequires a sysgen, which is the only time that I actually use blddemo. So when do we require a sysgen?  A sysgen is required when environmentvariables are changed that would affect the results of sysgen.  Thatput more simply is whenever you drag something from the catalog thatsets a SYSGEN_<something> variable.  You also require a sysgen ifyou change code in the public tree, but you shouldn't do that so itdoesn't count as a reason to sysgen does it?

This should set you on your way to using thecommand line to build.  You can either run "blddemo clean -q" or"blddemo -q" to build your Windows CE OS.

原创粉丝点击