[Qt-creator] How call a build script when building QTCreator project?
Daniel Molkentin
daniel.molkentin at nokia.com
Tue Mar 31 16:20:38 CEST 2009
Hi Ed,
ext Ed Sutton schrieb:
> I have a build script that increments a build number in my version
> header file. I want to call the script every time I build a project in
> QTCreator. My concern, possibly unfounded, was that QTCreator may
> automatically regenerate any changes I may make to the Makefile. Where
> is the best place to put the call to the build script?
Add a custom step in Projects -> Build Settings -> Build steps. If you
put it inbetween the "QMake" and the "Make" step, it inserts your number
_after_ the Makefile gets regenerated by qmake, but _before_ make gets
executed. You should never rely on the Makefile in a qmake project. It
will be regenerated. Does your project check for changes in the Makefile
to judge wether the build number should be incremented? I don't see the
relevance of Makefile recreation without a bit more background
information :-).
If your project is not qmake-based (and you do not not plan to change
that), have a look at the current git version of Creator which supports
generic (== Makefile-based) projects.
HTH,
Daniel
--
Daniel Molkentin, Software Engineer,
Nokia Qt Software, www.qtsoftware.com
Rudower Chaussee 13, DE-12489 Berlin
More information about the Qt-creator-old
mailing list