开发者

Batch set version number for .exe and .dll files

Is there a tool that would allow me to to do something like this: thetool.exe '1.0.0.1' mydll.dll myexe.exe?

Basically I would like to automate the process of making my builds and then have a tool automatically set the versi开发者_Python百科on numbers for me.


You can use the answers to this question: How do I set the version information for an existing .exe, .dll?

verpatch /va foodll.dll %VERSION% "%FILEDESCR%" "%COMPINFO%" "%PRODINFO%" "%BUILDINFO%"

Available at http://www.codeproject.com/KB/install/VerPatch.aspx?msg=3207401

With full sources...


The version number is stored in a VERSIONINFO resource (a compiled binary resource) inside the executable. Most IDEs or compilers come with a resource compiler as well (Delphi and C++ Builder include brcc32.exe, for instance).

Unless your IDE allows you to auto-increment a version or build number as part of the build process, you'll end up needing to create the text .RC file for a VERSIONINFO resource and using your resource compiler to compile it and add it to your final executable or dll.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜