Delphi MSBuild 从命令行构建配置
Delphi 2009 使用构建配置.创建新项目时,您有两个默认构建配置调试"和发布".
Delphi 2009 uses build configurations. When you create a new project you have two default build configurations "Debug" and "Release".
现在我问自己如何使用 MSBuild(自 2007 版以来由 Delphi 支持)自动构建.
Now I asked myself how to automate builds using MSBuild (which is supported by Delphi since version 2007).
您可以在某些 Delphi 项目目录的RAD Studio 命令提示符"中启动msbuild"命令,它将构建默认构建配置(Delphi IDE 中最后激活的构建配置).
You can start the "msbuild" command in the "RAD Studio Command Prompt" in some Delphi project directory and it will build the default build configuration (the last activated build configuration inside the Delphi IDE).
现在,我想通过命令行参数指定某个(非默认)构建配置.
Now, I want to specify a certain (non-default) build configuration by a command line parameter.
Delphi 帮助断言参数是 [/p:configuration=
The Delphi help asserts that the parameter is [/p:configuration=<configuration name
>], which is wrong (Delphi 2009, Help Update 1)!
正确的方法是什么?
现在,如果要更改构建配置,则必须添加参数
/p:config=
Now, if you want to change the build configuration you have to add the parameter
/p:config=<BUILD_CONFIG_NAME
>
例如:
C:ProjectsTestDelphiApp001>msbuild /target:Build /p:config=Release
或
C:ProjectsTestDelphiApp001>msbuild /target:Build /p:config=Debug
复制自原始问题";请注意社区维基.