Delphi MSBuild 从命令行构建配置 [英] Delphi MSBuild Build Configurations From Command Line

查看:38
本文介绍了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=>],这是错误(Delphi 2009,Help Update 1)!

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

<小时>

复制自原始问题";请注意社区维基.

这篇关于Delphi MSBuild 从命令行构建配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆