VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

When I build DOSBox, I usually want to replace "SVN" in the version string with the current date. I finally figured out how to automate this in OS X/macOS: add this line to your build script (if you use one) or run this command in the dosbox folder before building:

sed -i '' "s@.*AC_INIT.*@AC_INIT(dosbox,$(date +%Y.%m.%d))@g" configure.ac

I expect that a slightly different string might be needed in Linux, but I can't test that. Also in minGW, though I haven't tested it either.

Now: a question: is there a way to automate the same process in Visual Studio, replacing the corresponding VERSION line in config.h? I suppose the answer is to run a pre-build command using one of the techniques described here:

https://stackoverflow.com/questions/60034/how … mand-line-envir

But if anyone has already solved this problem, I'd be grateful to know the answer