如何让MSBuild完成相当于dcc32 -b的Delphi项目的完整构建? [英] How can I get MSBuild to do a full build of a Delphi project equivalent to dcc32 -b?

查看:157
本文介绍了如何让MSBuild完成相当于dcc32 -b的Delphi项目的完整构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何让MSBuild完成相当于dcc32 -b的Delphi项目的完整构建?

How can I get MSBuild to do a full build of a Delphi project equivalent to dcc32 -b?

我有两个项目正在尝试构建,第一个使用一些条件定义,它们通过msbuild传递给dcc32。然而,一些常见的单位似乎被第一组条件所困扰,所以第二个项目是不正确的。

I've got two projects I'm trying to build, the first one uses some conditional defines, which are getting passed via msbuild to the dcc32. However, some common units appear to be stuck with the first set of conditionals, so the second project is built improperly.

推荐答案

我相信它是 / t:rebuild ,msbuild输出列出所有dcu的删除文件:...,然后构建项目。

I believe it's /t:rebuild, the msbuild output lists "Deleting file: ..." for all the dcu's, then builds the project.

我使用一个批处理文件来调用msbuild来构建delphi项目,对于Delphi 2007和Delphi 2009(其中只有%BDS%的路径不同):

I use a batch file to call msbuild to build delphi projects, for Delphi 2007 and Delphi 2009 (which just has a different path for %BDS%):

set DCC_Quiet=true
set BDS=%ProgramFiles%\CodeGear\RAD Studio\5.0
set MSBuildBinPath=%WinDir%\Microsoft.NET\Framework\v2.0.50727

call %MSBuildBinPath%\msbuild /nologo /t:rebuild /p:config=Release %1 %2 %3 %4 %5

[请注意,从这个问题,对于ReleaseBuild Configuration,Delphi 2009是 / p:config = Release ,Delphi 2007是 / p:Configuration = Release ]

[Note, from this question, for Release "Build Configuration", Delphi 2009 is /p:config=Release, and Delphi 2007 is /p:Configuration=Release]

这篇关于如何让MSBuild完成相当于dcc32 -b的Delphi项目的完整构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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