[英]project version in .exe-filename
I just tested the auto-versioning plugin and was wondering whether it is possible to put the project's version into the output exe's filename. 我刚刚测试了自动版本控制插件,并且想知道是否可以将项目的版本放入输出exe的文件名中。
So eg the output could look like this: 因此,例如,输出可能如下所示:
myProject_0.11.8.exe
Being able to have the compile-time-date in the filename would be nice aswell: 能够在文件名中包含compile-time-date也是一件好事:
myProject_2013_12_16.exe
Is that possible? 那可能吗?
You can add the following to the output filename variable: 您可以将以下内容添加到输出文件名变量:
add $(TODAY)
or $(NOW_)
or $(NOW_L)
, placing it between the end of the filename and the .exe
part and you will add the compile date and time (including seconds). 添加
$(TODAY)
或$(NOW_)
或$(NOW_L)
,将其放在文件名的末尾和.exe
部分之间,您将添加编译日期和时间(包括秒)。
To add the version number you need a few steps (there may be an easier way however I don't know one and would love to hear it:) 要添加版本号,您需要执行几个步骤(可能有一种更简单的方法,但是我不知道,并且很想听听它:)
First go to Global Compiler Settings >> #defines
and add #version = RC_VERSION
thusly: 首先转到
Global Compiler Settings >> #defines
然后添加#version = RC_VERSION
:
Then in your project options go to: 然后在您的项目选项中转到:
I use today and the version number as that means you only get one exe per day and version, whereas using NOW
gives an exe per minute difference and NOW_L
gives an exe per second of difference. 我今天使用的是版本号,这意味着您每天和每个版本只获得一个exe,而使用
NOW
则每分钟差异一个exe,而使用NOW_L
则每秒差异一个exe。
I have uploaded a sample project at Test Project on my website http://www.dark-arts.tk (work in progress). 我已经在网站http://www.dark-arts.tk上的“ 测试项目”中上传了一个示例项目(正在进行中)。
NB : remember to do this for each build you want formatted this way! 注意 :请记住对您要以此格式进行格式化的每个版本执行此操作!
Hope this helps, and let me know if you need more info:) 希望这会有所帮助,如果您需要更多信息,请告诉我:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.