@echo off

setlocal
set /p VERSION=<..\version
set OUTPUT_FILE=version.h

echo /* > %OUTPUT_FILE%
echo  * anytun version info >> %OUTPUT_FILE%
echo  * >> %OUTPUT_FILE%
echo  * this file was created automatically >> %OUTPUT_FILE%
echo  * do not edit this file directly >> %OUTPUT_FILE%
echo  * use win32/make_version_h.bat instead >> %OUTPUT_FILE%
echo  */ >> %OUTPUT_FILE%
echo. >> %OUTPUT_FILE%
echo #ifndef ANYTUN_version_h_INCLUDED >> %OUTPUT_FILE%
echo #define ANYTUN_version_h_INCLUDED >> %OUTPUT_FILE%
echo. >> %OUTPUT_FILE%
echo #define VERSION_STRING_0 " version %VERSION%" >> %OUTPUT_FILE%
echo #define VERSION_STRING_1 "built on %COMPUTERNAME%, %DATE% %TIME%" >> %OUTPUT_FILE%
echo. >> %OUTPUT_FILE%
echo #endif >> %OUTPUT_FILE%

