Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

AutoVersioning Plugin

<< < (5/41) > >>

killerbot:

--- Quote from: tiwag on June 29, 2007, 12:39:05 pm ---
--- Quote from: killerbot on June 28, 2007, 11:13:55 pm ---suggestions :
 - don't use defines (bad, preprocessor and ancient C shit)
 - use static const int or something like that
 - put them in a special namespace to avoid collisions

--- End quote ---

don't be too harsh please  :P

this C shit is still widely used in the embedded world
with which I'm working daily.  :shock:

and i can assure you, i don't feel sucked myself because of that  8)

--- End quote ---

I do embedded stuff too, but luckily already C++, my C days are a while ago now ;-)

But also in C: you can have static const, which is still better then defines.
I think C99 also has namespaces but I am not sure though. But then your embedded compiler needs to be rather up to date ...

JGM:
Fixed the problem,

It seems that the wxString operator<< have a bug handling long variables. First I was using some wxString Printf function to acquire the version functions from the ini file to convert them from long to string and then switched to just put the long values in the wxString<< operator. But now back again to Printf and is working fine. :)

If somebody have suggestions please post them  :D

Updated again the attachment in the first post to have this update.

raph:
Could you add an option to detect the revision number of the project and put it in version.h (like cb does)?
It would be nice to have autorevision's functionality built into codeblocks :D

JGM:

--- Quote from: raph on July 05, 2007, 12:53:04 pm ---Could you add an option to detect the revision number of the project and put it in version.h (like cb does)?
It would be nice to have autorevision's functionality built into codeblocks :D

--- End quote ---

Theres already a variable declared "static long REVISION = 0;", it increments randomly up to 30 10 (now is editable using the scheme editor) every time some file in the project has been modified. Thats what you mean :?: Or is something else?

raph:
No, I mean revision number of a version control system as codeblocks does it with svn (see sourcecode of autoversion in codeblocks_source_dir/src/build_tools/autorevision how it can be parsed).
Every time you do a "svn commit", the revision number is increased.
This guarantees, that there really are changes to the project that justify an incrementation of the version number and makes the project's version information much more meaningful.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version