用于构建 Platform Builder 子项目的批处理文件

Batch file to build Platform Builder subproject

Here is an example of building the OS with a batch file. Here 是另一个。

我不想构建整个内核,只构建 OS 项目中包含的一个子项目。基本上与 "Build all subprojects" 所做的相同。 (并且在构建后不制作 运行 次图像。)

"Build all subprojects" 的命令行等效项是什么?

这是我在 VS2008/Platform Builder 7 中使用的示例。

它在指定的 OSDesign 中查找子项目。找到的所有项目都是使用 build -c.

构建的

可能需要根据 Platform Builder 版本和您希望实现的目标进行一些调整,但这是总体思路。

脚本留下一个 setenv.bat 文件。这可能对诊断构建错误很有用,或者可以简单地删除。

@echo off

set OSDESIGN_NAME=<YourOSDesign>
set BUILD_CONFIG=<Solution Configuration from VS2008, e.g. YourPlatform Release>

set OSDESIGN_DIR=C:\WINCE700\OSDesigns\%OSDESIGN_NAME%\%OSDESIGN_NAME%

rem Set up build environment (equivalent to clicking Build -> "Open Release Directory in Build Window" in VS2008)
"C:\Program Files (x86)\Microsoft Platform Builder.00\cepb\IdeVS\pbxmlutils" /getbuildenv /workspace "%OSDESIGN_DIR%\%OSDESIGN_NAME%.pbxml" /config "%BUILD_CONFIG%" > setenv.bat && call setenv.bat

@echo off

rem Ensure any build output is copied to the release directory
set WINCEREL=1

rem Look for subprojects in the OSDesign folder
for /d %%d in (%OSDESIGN_DIR%\*.*) do if exist "%%d\sources" (
    cd %%d
    build -c
)

pause