BldDemo is an interesting batch file.  I suspect that it was originally created to demonstrate how to build a Windows CE project. Today, it is the used by the Platform Builder IDE to build projects.  I don't really use it very often, except through Platform Builder, but it is a good source of information and is useful when I do use it.

What is BldDemo?  It is a batch file that can be used to build a Windows CE image.  It hides the real tools that do the job.  You can find it in %_WINCEROOT%\Public\Common\OAK\Misc if you want to review the commands that are in it.  The following are the things 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, which you can view by running "blddemo -?".  I will focus on building the whole system because later I will break out the other command line tools. 

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 use blddemo.  I do this for two reasons; it speeds up the build and we, the average user, don't have all of the code to do a full build.  It is important to note here that the last command line arguments to blddemo are passed on to cebuild, so any parameters that you want passed on the cebuild should be at the end of the command line.

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

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

Go to Summary of Building Windows CE

Copyright © 2008 – Bruce Eitman
All Rights Reserved