PDA

View Full Version : QT Versioning Problem with Tortoise SVN



franbogaz
2nd April 2018, 16:29
Hi, im trying to create a version.h file to get current svn commit version number into code. However i cant get anything. Here is what i did :

In qt creator from tools and options -> subversion tab -> subversion command is set to ...\SubWCRev.exe.

And from searching how to do it svn format is like that SubWCRev.exe $(SolutionDir) $(ProjectDir)\svn_version.h.tmpl $(ProjectDir)\svn_version.h

So i added these
"C:\Program Files\TortoiseSVN\bin\SubWCRev.exe"
"C:\Users\Rasih Onur Olgun\Desktop\Playground\AvrStudioTest\QtProject\U dpPacketParser"
"C:\Users\Rasih Onur Olgun\Desktop\Playground\AvrStudioTest\QtProject\U dpPacketParser\VersionInfoTemplate.SubWC"
"C:\Users\Rasih Onur Olgun\Desktop\Playground\AvrStudioTest\QtProject\U dpPacketParser\VersionInfo.h"
into qmake step as a additional arguments.

VersionInfoTemplate.SubWC is a SVN Version template which has this code in it

#ifndef _SVN_VERSION_H_
#define _SVN_VERSION_H_

#define _D_SVN_LOCAL_MODIFICATIONS "$WCMODS?YES:NO$" // 1 if there are modifications to the local working copy, 0 otherwise
#define _D_SVN_BUILD_DATE "$WCDATE$" // Commit date and time of the highest commit revision
#define _D_SVN_BUILD "$WCREV$" // Highest committed revision number in the working copy
#define _D_SVN_COMPILE_TIME "$WCNOW$" // Current system date and time


#endif


After running qmake and starting program it is saying "Cannot find file: C:\Users\Rasih Onur Olgun\Desktop\Playground\AvrStudioTest\QtProject\U dpPacketParser\VersionInfo.h."
I cant understand. This file suppose to be created right ?

What i am missing if you can help me it would be great. Thanks all.

Added after 1 35 minutes:

I solved the issue. This is how it can be done. I tried to explain if anyone gets the same errors or something about this topic.

I attached a .zip file it is libre office document explaining how to do.

Good day to all