Auto Version Numbering in QtCreator



  • I've asked a variation of this question in the General forum but this one is more QtCreator specific. Current experience with QtCreator has shown me that it doesn't really handle application version numbering at all.

    At the moment, I have a crude "version.h" file which contains major, minor and build numbers which then get included into an "RC" file but this only works if I perform a project "re-build" rather than just a build.

    My other forum topic asked about how to get around this but it got me thinking, wouldn't it be useful if QtCreator added some support to allow auto-version numbering or at least give the developer some control over the version information written into an application?

    Visual Studio allows the entering of a * character as part of the version string which auto-generates a version build number - it wouldn't be a massive task to do the same in QtCreator.

    Any thoughts or tips anyone? Are there plugins which may already cope with this?


  • Lifetime Qt Champion

    Hi,

    Do you mean the VERSION variable from qmake ?



  • @SGaist That's the Jasper! Is there any way of having one of the version numbers auto-incremented on every build?


  • Lifetime Qt Champion

    This stackoverflow answer might get you started.

    Note that what you are creating here is rather a build number. It might be complementary to the version number but it's not the same thing. I'd recommend keeping both separated.


  • Moderators

    @webzoid

    There is a really old thread on this topic.

    After using Gerolf's/Gisbert approach (see in first post) I have changed to this git driven approach. However, the git approach requires a restart of qmake and certainly an update in git for each new built. Possibly you are looking more into a combination of both.

    If you are more in having an integrated updating in Qt creator, I believe there is already some request in JIRA on this Feel free to check out the feature request, update and upvote for it. That is the only where you get features included. The forum here is not actively monitored for such cases.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.