Closed GoogleCodeExporter closed 9 years ago
I guess so, and a date in the header would be useful also.
Currently the generator (nor the code otherwise) doesn't know its own version.
I will have to research a bit to find a good way to implement this. git
describe gives the needed info, but there is no obvious point where to run a
script to add that info to the nanopb_generator.py.
Original comment by Petteri.Aimonen
on 17 Oct 2012 at 4:42
1/
I never tried with GIT.
With tortoise svn (not so far from Git), there is a command line tool
SubWCRev.exe
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev.html
It allows to create a file, based on a template, retrieving some information
from database.
We use it to create a version.h, containing defines as figures and strings like
#define SVN_REVISION "1182"
#define SVN_LOCAL_MODS 1
#define SVN_REPOSITORY "svn://xxx..."
You should be able to create an equivalent for python.
2/
You may also use the C compiler defines like:
char compilTime[]= __DATE__ " at " __TIME__ "\0";
Original comment by cea.max....@gmail.com
on 19 Oct 2012 at 12:08
This issue was updated by revision 08391f35eeea.
Original comment by Petteri.Aimonen
on 29 Oct 2012 at 5:17
Fixed in nanopb-0.1.7
Original comment by Petteri.Aimonen
on 12 Nov 2012 at 7:33
Original issue reported on code.google.com by
cea.max....@gmail.com
on 17 Oct 2012 at 4:34