Home » U++ Library support » U++ Core » [PROPOSAL] U++ version macro
Re: [PROPOSAL] U++ version macro [message #33151 is a reply to message #33137] |
Mon, 11 July 2011 15:54   |
 |
mirek
Messages: 14267 Registered: November 2005
|
Ultimate Member |
|
|
dolik.rce wrote on Sun, 10 July 2011 11:43 | Hi!
Sometimes I want to have an access to information about what sources were used when compiling my application (e.g. to show it in About box ). As of now, the only way to get this piece of information is to include ide/version.h and use IDE_VERSION macro. As you can see, that is not really intuitive and has some drawbacks, for example if you export project sources, the version.h won't be exported (unless you add ide package to your project, which is absurd overkill).
I propose to change the name of this version macro and also move it into Core package. Following solution should do it and maintains backward compatibility:
Add file Core/version.h:#ifndef UPP_VERSION
#define UPP_VERSION 3629
#endif Change ide/version.h to:#include<Core/version.h>
#ifndef IDE_VERSION
#define IDE_VERSION UPP_VERSION
#endif
Finally, add #include "version.h" into Core/Core.h.
What do you think?
Best regards,
Honza
|
Well, why not, but it would only work for "released" sources, not for svn....
Mirek
|
|
|
Goto Forum:
Current Time: Fri Aug 22 16:27:40 CEST 2025
Total time taken to generate the page: 0.06095 seconds
|