---
title: "Advanced Build Commands"
author: "mmdev"
date: "2011-12-22T16:13:00Z"
tags: []
slug: "advanced-build-commands"
draft: false
lastmod: "2012-06-01T09:28:11Z"
id: 1546158
url: "https://mmdev.iteye.com/blog/1546158"
---

![](http://hi.csdn.net/attachment/201112/22/0_1324541154qMHf.gif)

**Advanced Build Commands Menu** **Menu Item** **Action** **Sysgen**

- Same as**Build Solution**menu.
- Runs the Sysgen tool on files in the OS design.
- Choose this command when you change the SYSGEN variables, typically by adding or removing items from the Catalog.
- Build Command Prompt:**blddemo -q**

**Clean Sysgen**

- Same as**Rebuild Solution**menu.
- Cleans the SYSGEN variables in the operating system, runs the Sysgen tool on files in the OS design, compiles BSPs and runs the Sysgen tool on BSPs, and builds subprojects.
- Build Command Prompt:**blddemo clean -q**

**Build and Sysgen**

- Builds commponents that supplied by Microsoft, and then Build Solution.
- Run this command when you modify files under %\_WINCEROOT%\\Public, or under %\_WINCEROOT%\\&lt;custom\_directory&gt;, that are included in the OS design.
- **NOTRECOMMANDED**because may take several hours on slow PC.
- Build Command Prompt: **`blddemo`**

**Rebuild and Sysgen Clean**

- Removes all previously built OS components, and then Build all components source codes supplied by Microsoft. After that, build as same as Build Solution.
- **NOTRECOMMANDED**because may take several hours on slow PC.
- Build Command Prompt:**blddemo clean cleanplat -c**

**Build and Sysgen Current BSP**

- Builds BSP source code and subproject code, and then runs the Sysgen tool on files in the BSP.
- If you modify files in your BSP directory or in one of your subprojects, then choose this command.
- Build Command Prompt:**blddemo -qbsp**

**Rebuild and Clean Sysgen Current BSP**

- Deletes the previously build BSP modules, subprojects, and rebuild them.
- Build Command Prompt:**blddemo -qbsp -c**

**（1）"Sysgen"**：相当于执行命令"blddemo -q”，一般第一次编译或者是改变了"Catalog"中的item的时候，就用这个了。

**（2）"Clean Sysgen"：**相当于执行命令"blddemo clean -q"，按照文档上的说明，当修改了 %\_WINCEROOT%\\Public\\CEBASE\\OAK\\Misc\\Cesysgen.bat的时候，或者改变了以SYSGEN，BSP为前缀的环境变量的时候，需要使用这个来编译。

一般只有第一次创建完工程的时候，我会用"Sysgen"命令，以后只要是改变了SYSGEN为前缀的环境变量的设置或者是"Catalog"中的item，我就会使用"Clean Sysgen"，而改变了以BSP为前缀的环境变量要看具体情况，也不一定就要用"Clean Sysgen"。继续...

**（3）"Build and Sysgen"**：相当于执行命令"blddemo"，当改变了\\public目录下的代码，比如你打了WinCE的patch，你就需要用这个了。

"Rebuild and Sysgen Clean"：相当于执行命令"blddemo clean cleanplat -c"，相当于清除上一次编译生成的文件，然后重新编译\\public目录和你的工程。

**（4）"Build and Sysgen Current BSP"：**相当于执行命令"blddemo -qbsp"，仅编译\\platform目录下的代码。所以当改变了\\platform目录下的代码的时候或者说改变了BSP的代码的时候，可以用这个来编译。

**（5）"Rebuild and Clean Sysgen Current BSP"**：相当于执行命令"blddemo -qbsp -c"，相当于完全重新编译\\platform目录下要编译的代码。