ref: 02f19c26f17e43f3b8ac6cfe15a3d8a622f8ef07
dir: /win32/genversion.bat/
@echo off
for /f %%v in ('git describe --tags --match "v*"') do set version=%%v
set version_out=#define %2 "%version%"
echo %version_out% > %1_temp
echo n | comp %1_temp %1 > NUL 2> NUL
if not errorlevel 1 goto exit
copy /y %1_temp %1
:exit
del %1_temp