project version in .exe-filename

纵饮孤独 提交于 2020-01-03 06:08:13

问题


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.

So e.g. 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:

myProject_2013_12_16.exe

Is that possible?


回答1:


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).

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:

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.

File Link

I have uploaded a sample project at Test Project on my website http://www.dark-arts.tk (work in progress).

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:)



来源:https://stackoverflow.com/questions/20612106/project-version-in-exe-filename

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!