diff options
author | watcherhd <watcherhd@gmail.com> | 2017-08-05 18:28:13 +0300 |
---|---|---|
committer | watcherhd <watcherhd@gmail.com> | 2017-08-05 18:28:13 +0300 |
commit | 760c3ae475b4b39b486f72c7adb8c1f1d83b440f (patch) | |
tree | e3e08ebf880462db266321b8e1528f11d1b71cdf /tools/build_scripts/build | |
parent | 6b3e2962bcf7917e0593da3f5c3605e923889fe2 (diff) |
build scripts for those who are willing to keep it all going
Diffstat (limited to 'tools/build_scripts/build')
-rw-r--r-- | tools/build_scripts/build/make_ver_stable.bat | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/build_scripts/build/make_ver_stable.bat b/tools/build_scripts/build/make_ver_stable.bat new file mode 100644 index 0000000000..cedff11a3b --- /dev/null +++ b/tools/build_scripts/build/make_ver_stable.bat @@ -0,0 +1,32 @@ +@echo off +cd /d %~dp0 + +for /F "tokens=2,3" %%i in (..\include\m_version.h) do if "%%i"=="MIRANDA_VERSION_FILEVERSION" (set OldVer=%%j) +for /F %%i in ('svnversion m_version.h.in') do set Revision=%%i +for /F "tokens=3 delims= " %%l in (build.no) do (set /a "ver3=%%l+1") +for /F "tokens=1,2,3 delims= " %%i in (build.no) do call :WriteVer %%i %%j %%k %Revision% %ver3% +goto :eof + +:WriteVer +echo %1.%2.%3.%4.%5 +if "%OldVer%" == "%1,%2,%3,%4,%5" (goto :eof) + +for /f "delims=/ tokens=1-3" %%a in ("%DATE:~4%") do ( + for /f "delims=:. tokens=1-4" %%m in ("%TIME: =0%") do ( + set TempFileName=%TEMP%\basename-%%c-%%b-%%a-%%m%%n%%o%%p + ) +) + +copy m_version.h.in "%TempFileName%" + +echo #define MIRANDA_VERSION_FILEVERSION %1,%2,%3,%4 >> "%TempFileName%" +echo #define MIRANDA_VERSION_STRING "%1.%2.%3.%4" >> "%TempFileName%" +echo #define MIRANDA_VERSION_DISPLAY "%1.%2.%3 build #%4" >> "%TempFileName%" +echo #define MIRANDA_VERSION_DWORD MIRANDA_MAKE_VERSION(%1, %2, %3, %4) >> "%TempFileName%" +echo #define MIRANDA_VERSION_CORE MIRANDA_MAKE_VERSION(%1, %2, %3, 0) >> "%TempFileName%" +echo #define MIRANDA_VERSION_CORE_STRING "%1.%2.%5" >> "%TempFileName%" +echo. >> "%TempFileName%" +echo #endif // M_VERSION_H__ >> "%TempFileName%" + +move /Y "%TempFileName%" ..\include\m_version.h +goto :eof |