[SOLVED] Build Date - Mac OSX
-
wrote on 25 Nov 2014, 23:22 last edited by
Hi,
When I build my project, I set a variable so I get the current Date and Time (will be show in the "About my app" Dialog)
On Windows, I use this:
@#DEFINES += BUILDDATE=(DATE)
#DEFINES += BUILDTIME=(TIME)@Works fine for Windows, but on MacOSX, i'd like to get the BuildDate and time also, but the code above is not working, is there any solution to do this on Mac also? Thanks!
-
DATE and TIME macros are defined in ISO C standard, they are supported by all compilers. It should work on Mac OS. However, I think you are trying to use them in the .pro file, right?
An important thing is to remember that those macros are invoked at compilation time of a given file, not at linking time of the whole application. So if you are not doing a clean reabuild, you might end up with an older date.
-
wrote on 26 Nov 2014, 15:33 last edited by
Hey sierdzio thanks for your reply,
Yes I was trying to use them in the .pro file.
On OS X it was weirdly giving error into another object "[Audio.h] Error 2" - at compile time when theses 2 lines are not commented.I'm also thinking just using a Global QString that I will update on major new version manually. that way it can have a uniform format, because (DATE) use the english date.
i.e:
BUILDATE = "20/09/2014"Thank you!
-
wrote on 26 Nov 2014, 18:30 last edited by
Solved
@//have to edit every new release
const static QString date_released = "26/11/2014";@
2/4