Buildrel is a batch file that populates the _FLATRELEASEDIR.  That is, it builds the release directory.  It does this by copying files from different folders into one folder.  This step is needed because the next build step is makeimg, which uses files in the _FLATRELEASEDIR to create the OS.

This is what Buildrel does:

  1. Cleans the _FLATRELEASEDIR by deleting all files and sub-folders.  This step can be disabled by setting the environment variable ___BLDRELNOCLEAN=1.
  2. Creates PBUserProjects files by pulling information from the user projects in your workspace.
  3. For each folder in _DEPTREES run bldrel1.bat which:
     a.  Copies files from the Target folder
     b.  Copies files from the Files folder to the _FLATRELEASEDIR
     c.  Copies files from the cesysgen\files folder to the _FLATRELASEDIR
     
    This step includes your Project as the last folder in _DEPTREES.
  4. Run bldrel1.bat on the Platform

There are important lessons that we can learn from these steps:

  •  Editing files in the _FLATRELEASEDIR should only be done for temporary testing.  These edits will be deleted if and when you run Buildrel.  It is better to find the original source file, edit it in its source folder, then copy it to the _FLATRELEASEDIR if you don't want to loose your changes.
  • If the same file exists in the Public folders and your Project, the file in your Project will overwrite the file from Public in the _FLATRELEASEDIR.
  • If the same file exists in the Public folders and your platform, the file in your platform will overwrite the file from Public in the _FLATRELEASEDIR.
  • If the same file exists in your Project and your platform, the file in your platform will overwrite the file from your Project in the _FLATRELEASEDIR.

Buildrel doesn't use any command line arguments, but it can be modified by setting environment variables.  The most common variable is BUILDREL_USE_COPY which if set to '1' will cause buildrel to use xcopy to copy the files.  If BUILDREL_USE_COPY is not set, buildrel will use soft links to the original files.

Go to Summary of Building Windows CE

Copyright © 2008 – Bruce Eitman
All Rights Reserved