Platform Builder for Windows CE 5.0 and 6.0 allows you to build from the command line and get the same results as building from the IDE.  Platform Builder for Windows CE 4.x does not necessarily give the same results, but that depends on what you are doing.  The question is, how do we get to a command prompt that has the correct environment set up for us to build?  There are a few ways:

  1. The most obvious way is to open the "Build OS" menu and select "Open Release Directory".  When you do this, a command window will open with the environment set up and the current working directory set to the _FLATRELEASEDIR.  _FLATRELEASEDIR is the folder that your build results end up in, that is the folder that contains the nk.bin.
  2. You can also right click on your OS Design or PBWorkspace's PBXML file and select "Open Build Window..." then select the type of build you want from the available list.
  3. You can create a shortcut to a build window by right clicking on your OS Design or PBWorkspace's PBXML file and select "Create Build Window Shortcut..." then select the type of build you want from the available list.  Then use your new shortcut to open a build window.
  4. In a previous post, I created a batch file that will automatically build in a build window.  A few minor changes and it can be used to open a build window, but given that you can create a shortcut to open a build window, I don't use this for manual building.

So now we know how to open a build window, lets just give it a quick try.  I'm not going to explain what we are doing just yet, let's just see if you can use the command line to build your project.

First, use your build window to do the sysgen.  To do this just run "blddemo -q".  The results will be in your _FLATRELEASEDIR when it is finished, assuming that you haven't done something to prevent it.

Second, build a driver in your BSP, I will let you pick one but for simplicity I will call it your driver.  The following steps assume that you have already sysgened your project.

  • Run "Set WINCEREL=1"
    This will cause the dll to be automatically copied to the release folder when it is built.  That will save us some time.
  • Change directories to your driver folder
  • Run "build"
  • Run "makeimg"

You are building now, next time I will explore what we just did in more detail.

Go to Summary of Building Windows CE

Copyright © 2008 – Bruce Eitman
All Rights Reserved