问题描述
多个重复项:
我在Windows Server上使用TortoiseSVN和SVN Service作为服务运行。
I'm using TortoiseSVN with SVN Service running as a service on a windows server.
我希望在提交项目时或之后更新项目中的版本/内部版本号。以便在项目上的正确版本/构建将反映在日志文件,资源表,帮助>关于其他...等地方。
I would like the version / build number in the project to be updated as or after the project is committed. So that the correct version / build on the project will be reflected in several places such as log files, Resource tables, Help > About Etc...
谢谢...
推荐答案
您可以在制作EXE,安装文件等之前,在构建脚本和其他位置执行此操作-
You can do this in the build script and other places right before you make EXEs, install files, etc -
我要做的就是将其添加到我的rc文件的模板文件中,使用宏替换,然后在以下步骤的预构建步骤中添加对SubWCRev的调用:我的EXE项目。
What I did to add it to my resources/version info was make a template file for my rc file, use the macro substitution, then add a call to SubWCRev in the prebuild step of my EXE's project.
请参见
是可用于此目的的工具。
SubWCRev is a tool you can use for this.
$ WCREV $是被替换为当前svn版本的宏。
$WCREV$ is the macro that gets replaced with the current svn revision.
每个模板文件都在SVN信息库,但是从中生成了要编译/解释的实际文件。因此,在生成每个生成的输出(exe,安装程序,发行说明等)之前,您将运行subwcrev工具并替换宏。
Each template file is in the SVN repository but the actual files that get compiled/interpreted are generated from those. So just prior to building each generated output (exe, installer, release notes, etc) you would run the subwcrev tool and replace the macros.
这篇关于使用TortoiseSVN对内部版本号进行版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!