From 9e1c048e206d4e91d03ef8978bf61a6af654fc3b Mon Sep 17 00:00:00 2001 From: erorcun Date: Fri, 12 Feb 2021 01:49:09 +0300 Subject: Remove version text, add toggleable debug info(with commit hash!) --- printHash.bat | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 printHash.bat (limited to 'printHash.bat') diff --git a/printHash.bat b/printHash.bat new file mode 100644 index 00000000..ef1cd9d6 --- /dev/null +++ b/printHash.bat @@ -0,0 +1,26 @@ +@echo off + +REM creates version.h with HEAD commit hash +REM params: $1=full path to output file (usually points version.h) + +setlocal enableextensions enabledelayedexpansion + +cd /d "%~dp0" + +break> %1 + + %1 + +where git +if "%errorlevel%" == "0" ( goto :havegit ) else ( goto :writeending ) + +:havegit +for /f %%v in ('git rev-parse --short HEAD') do set version=%%v +> %1 + +:writeending + +echo ^" >> %1 +echo const char* g_GIT_SHA1 = GIT_SHA1; >> %1 + +EXIT /B \ No newline at end of file -- cgit v1.2.3