Reputation: 14081
Qt Creator 2.5.2 on Win 7: I am using this approach ( Qt. Automatically adding version for application ) to add a VERSION number for my source code in Qt Creator.
However, since my Mercurial is installed in C:\TortoiseHg\hg
, I have to specify
VERSION = $$system(C:\TortoiseHg\hg parents --template '{latesttag}+{latesttagdistance}')
This full path is not very nice, since others might have installed in different places. The location is correctly set under Qt Creator Tools -> Options -> Version Control -> Mercurial.
Is there a chance (variable) reflecting this setting, or another workaround? Guess in order to use VERSION = $$system(hg parents --template '{latesttag}+{latesttagdistance}')
I have to globally add C:\TortoiseHg\
to PATH
- which I'd like to avoid for some reasons.
So what is the best way getting rid of the absolute path?
Upvotes: 0
Views: 477
Reputation: 13238
.pro
file is not only a QtCreator project, but qmake project file - qmake may not know what you specify in QtCreator settings. If you don't want to add path to hg.exe
to PATH
, you may want to create separate environment variable an try to use it in $$system
.
Upvotes: 1