【问题标题】:Batch file to build Platform Builder subproject用于构建 Platform Builder 子项目的批处理文件
【发布时间】:2017-05-12 19:36:27
【问题描述】:

Here 是使用批处理文件构建操作系统的示例。 Here 是另一个。

我不想构建整个内核,只是包含在 OS 项目中的一个子项目。基本上与“构建所有子项目”所做的相同。 (并且在构建后不制作运行时映像。)

“构建所有子项目”的命令行等效项是什么?

【问题讨论】:

    标签: platform-builder


    【解决方案1】:

    这是我在 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\7.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
    

    【讨论】:

    • 谢谢,这正是我想要的。修改操作系统批量构建就足够了:将“blddemo clean -q”替换为“set WINCEREL=1, cd , build -c”
    猜你喜欢
    • 2021-12-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-15
    • 1970-01-01
    • 2021-11-18
    相关资源
    最近更新 更多