var file = "buildnum.h"
var text = "#define BUILDNUMBER "
var s = CWSys.readStringFromFile(file);
if (s == undefined)
n = 1;
n = eval(s.substring(text.length)) + 1;
CWSys.writeStringToFile(file, text + n);
- Add a file called getbuildnum.h to your project containing the following code:
- Add a file called getbuildnum.c to your project containing the following code:
- Set the Build Options > Always Rebuild project property of getbuildnum.c to Yes.
- Set the User Build Step Options > Pre-Compile Command project property of getbuildnum.c to "$(StudioDir)/bin/crossscript" "load(\"$(ProjectDir)/incbuild.js\");incbuild();"
Please sign in to leave a comment.