Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'update_version.bat')
-rw-r--r--update_version.bat27
1 files changed, 27 insertions, 0 deletions
diff --git a/update_version.bat b/update_version.bat
new file mode 100644
index 000000000..ad5d4d172
--- /dev/null
+++ b/update_version.bat
@@ -0,0 +1,27 @@
+@if not exist "%programfiles%\TortoiseSVN\bin\SubWCRev.exe" goto :x64
+
+@"%programfiles%\TortoiseSVN\bin\SubWCRev.exe" .\ include\SubWCRev.conf include\version.h
+@if %ERRORLEVEL%==6 goto :NoSubWCRev
+@if %ERRORLEVEL%==10 goto :NoSubWCRev
+@goto :eof
+
+:x64
+@if not exist "%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" goto :NoSubWCRev
+
+@"%ProgramW6432%\TortoiseSVN\bin\SubWCRev.exe" .\ include\SubWCRev.conf include\version.h
+@if %ERRORLEVEL%==6 goto :NoSubWCRev
+@if %ERRORLEVEL%==10 goto :NoSubWCRev
+@goto :eof
+
+:NoSubWCRev
+@echo NoSubWCRev
+@if exist include\version.h del include\version.h
+echo #pragma once >> include\version.h
+echo. >> include\Version.h
+echo #define DO_MAKE_STR(x) #x >> include\Version.h
+echo #define MAKE_STR(x) DO_MAKE_STR(x) >> include\Version.h
+echo. >> include\Version.h
+@echo #define VERSION_MAJOR 1 >> include\version.h
+@echo #define VERSION_MINOR 3 >> include\version.h
+@echo #define VERSION_REV 0 >> include\version.h
+@echo #define VERSION_PATCH 0 >> include\version.h