Visual Studio with SubWCRev auto-build versioning problem

Folks, I'm using VS2010 and trying to sync the build version of my project with my Subversion repository using SubWCRev. This is all working correctly, but I can't quite get my head around one thing. My template file consists of this : #define MAJOR_VERSION 2 #define MINOR_VERSION 2 #define MICRO_VERSION 0 #define BUILD_VERSION $WCMODS?$WCREV$+1:$WCREV$$ #define QUOTE_(x) #x #define QUOTE(x) QUOTE_(x) #define BUILD_VERSION_STRING QUOTE(MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION.BUILD_VERSION) Then in my application .RC file I have : FILEVERSION MAJOR_VERSION,MINOR_VERSION,MICRO_VERSION,BUILD_VERSION PRODUCTVERSION MAJOR_VERSION,MINOR_VERSION,MICRO_VERSION,BUILD_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "080004e4" BEGIN VALUE "FileVersion", BUILD_VERSION_STRING VALUE "ProductVersion", BUILD_VERSION_STRING END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x800, 1252 END END As you can probably work out, I'm trying to up the build version by 1 if there's modified code so that the build version in the EXE will match the Subversion revision number when I do a release and check the code in. The problem is that BUILD_VERSION gets expanded to x+1 or x+0 which then appears in the BUILD_VERSION_STRING as "" which is not quite what I intended. Does anyone with a little more experience with this know a way to achieve my aim? Thanks in advance

以上就是Visual Studio with SubWCRev auto-build versioning problem的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HBuilder

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准