Sysgen Tool
**Note **Cebuild.bat calls this tool. You should not normally call this tool directly. To run Sysgen.bat correctly for all the OS trees that are used by your project, run cebuild -q instead. The following documentation is provided for completeness and informational purposes only.
The Sysgen tool (Sysgen.bat) builds a customized Windows CE OS by using the configuration specified in Cesysgen.bat. It uses Nmake.exe to create the modules specified in Cesysgen.bat by linking together the .lib files that correspond to the features specified in Cesysgen.bat.
After verifying that the Cesysgen.bat file exists in the %_PROJECTROOT%\Oak\Misc directory, Sysgen.bat sets the appropriate environment variables for the features specified in Cesysgen.bat.
Sysgen.bat then calls Nmake.exe, which uses the rules in the makefile file, located in either the %_WINCEROOT%\Public\Common\Cesysgen directory or, if the -pProject option is specified in the makefile file, the %_WINCEROOT%\Public\<Project Name>\Cesysgen directory, to do the following:
Create any target system directories that do not already exist.
Create the modules specified in Cesysgen.bat by linking the .lib files that correspond to the specified features for each module in Cesysgen.bat.
Call the Resource Combining tool (Res2res.exe) to combine the resource files for each feature specified in Cesysgen.bat. Sysgen.bat calls Res2res.exe once for each language.
Call the Resource Check tool (Checkres.exe) and the Resource Merge tool (Rebaseic.exe) to combine multiple binary resource files (.res) into a single .res file and fix any conflicting resource identifiers. During this process, the following warning may be displayed:
Did not find a redirect resource.
You can ignore this message.
Call the Feature Filter tool (Cefilter.exe) to preprocess the Windows CE header files and other miscellaneous source files before the selected modules and features are linked.
The Windows CE header files and the common files contain comment lines with special tags that Cefilter.exe uses for preprocessing. These tags are written in the @CESYSGEN tag language. The syntax of this language includes conditional statements; for example, logical-and, logical-or, and logical-not conditions. If you edit or remove these tags, unexpected errors will occur.
The following table shows the files that Cefilter.exe calls for preprocessing and location of these files after processing is complete.
Input files from %_COMMONPUBROOT% Output directory in %_PROJECTROOT% Sdk\Inc\*.* Cesysgen\Sdk\Inc Oak\Inc\*.* Cesysgen\Oak\Inc Ddk\Inc\*.* Cesysgen\Ddk\Inc Oak\Files\Common\*.* Cesysgen\Oak\Files Copy modules that do not have features into the appropriate target directories.
Sysgen.bat places the resulting files in various subdirectories of %_PROJECTROOT%\Cesysgen.
Sysgen.bat places error information in the Build.log file in the %_WINCEROOT% directory.
sysgen [-h] [-b] [-c] [-p Tree][NmakeTarget] [NmakeTarget] ...
Parameters
- -h
Displays a Help screen. - -b
Used for internal calls only. - -c
Runs Nmake.exe with the -clean parameter. - -pTree
Runs Sysgen.bat in the specified project. If no project is specified, Sysgen.bat runs in the Common project, which builds the Windows CE core features. - NmakeTarget
Specifies a specific module to build. If NmakeTarget is not specified, Nmake.exe builds all the modules listed in Cesysgen.bat. Normally, you should not use this parameter, because a target device with only one project may be incomplete.
You can use NmakeTarget to specify a special target, as well as a module. The following table describes the special targets that can be used as NmakeTarget parameters.
Value | Description |
---|---|
Files | Copies the filtered Common.* files to the local target directory. |
Includes | Copies the filtered include files to the local target directories. |
Makedirs | Creates NLS files and copies them to the local target directory. |
Nls | Copies the code page files to the local target directory. |
Error Messages
- ERROR: Project specific cesysgen.bat not found. Please create a cesysgen.bat in %_PROJECTROOT%\oak\misc
Sysgen.bat relies on Cesysgen.bat to specify the features and modules for the Windows CE project. Sysgen.bat looks for Cesysgen.bat in %_PROJECTROOT%\Oak\Misc. To troubleshoot, be sure Cesysgen.bat resides in this directory.
Any additional errors during the running of this tool appear in the Build.log file, located in the %_WINCEROOT% directory.
Examples
The following code example shows how to use Sysgen.bat to call Nmake.exe to create target system directories as required, build or link the Windows CE core features, and copy the core features to the local target areas.
sysgen
The following code example shows how to use Sysgen.bat to call Nmake.exe to build or link the Windows CE shell features and copy them to the local target areas.
sysgen -p wceshell
See Also
Last updated on Friday, October 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.