by tangke <> 2009-06-08
在pro文件中我们可以加入
COMMIT_DATE= $$system(svn info -r HEAD . | grep 'Changed\ Date' | cut -b 19-)
!isEmpty(COMMIT_DATE){
COMMIT_DATE= 0.$${COMMIT_DATE}
}
COMMIT_DATE= '\\"$${COMMIT_DATE}\\"' # place quotes around the version string
DEFINES += COMMIT_DATE=\"$${COMMIT_DATE}\" # create a VER macro containing the version string
VERSION = $$system(svn info -r HEAD . | grep 'Changed\ Rev' | cut -b 19-)
!isEmpty(VERSION){
VERSION = 0.$${VERSION}
}
VERSTR = '\\"$${VERSION}\\"' # place quotes around the version string
DEFINES += VER=\"$${VERSTR}\" # create a VER macro containing the version string
阅读(267) | 评论(0) | 转发(0) |