从命令行增加Delphi XE项目版本号 [英] Incrementing Delphi XE project version number from command line

查看:57
本文介绍了从命令行增加Delphi XE项目版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Delphi XE项目,我试图在使用MSBuild构建该程序之前更改该程序的版本号.版本号信息位于DPROJ文件中,但是如果我更改这些值,则版本号不会更改.我认为这样做的原因是,当您在IDE中更改版本号时,Delphi会将更改保存到DPROJ和RES文件中.

I have a Delphi XE project and I'm trying to change the version number of the program before building it with MSBuild. Version number information is located in the DPROJ file but if I change these values the version number does not change. I think the reason for this is that when you change version number in the IDE, Delphi saves the changes to both DPROJ and RES files.

是否可以通过DPROJ文件中的更改从命令行编译RES文件?我发现了这个问题,建议保存版本号在INC文件中并将其包含到项目中,但是与仅在DPROJ中进行更改相比,这感觉要复杂一些.

Is there a way to compile the RES file from the command line with the changes in DPROJ file? I found this question which suggested saving the version number in an INC file and including that to the project but this feels a bit more complex solution compared to just making changes in DPROJ.

推荐答案

我最终通过

I ended up solving my problem with this answer. First I unchecked "Include version information in project" in Project Options and added VersionInformation.rc with dummy data. When my build batch file is executed, it generates the correct RC file and because that RC file is added in to the Delphi project, MSBuild uses the contained information for built executable.

这篇关于从命令行增加Delphi XE项目版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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