summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin10/make_ver.bat28
1 files changed, 18 insertions, 10 deletions
diff --git a/bin10/make_ver.bat b/bin10/make_ver.bat
index fd5f20e332..515b8406de 100644
--- a/bin10/make_ver.bat
+++ b/bin10/make_ver.bat
@@ -17,14 +17,22 @@ goto :eof
:WriteVer
if "%OldVer%" == "%1,%2,%3,%4" (goto :eof)
-copy m_version.h.in ..\include\m_version.h
-
-echo #define MIRANDA_VERSION_FILEVERSION %1,%2,%3,%4 >>..\include\m_version.h
-echo #define MIRANDA_VERSION_STRING "%1.%2.%3.%4" >>..\include\m_version.h
-echo #define MIRANDA_VERSION_DISPLAY "%1.%2.%3 alpha build #%4" >>..\include\m_version.h
-echo #define MIRANDA_VERSION_DWORD MIRANDA_MAKE_VERSION(%1, %2, %3, %4) >>..\include\m_version.h
-echo #define MIRANDA_VERSION_CORE MIRANDA_MAKE_VERSION(%1, %2, %3, 0) >>..\include\m_version.h
-echo #define MIRANDA_VERSION_CORE_STRING "%1.%2.%3.0" >>..\include\m_version.h
-echo. >>..\include\m_version.h
-echo #endif // M_VERSION_H__ >>..\include\m_version.h
+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 alpha 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.%3.0" >> "%TempFileName%"
+echo. >> "%TempFileName%"
+echo #endif // M_VERSION_H__ >> "%TempFileName%"
+
+move /Y "%TempFileName%" ..\include\m_version.h
goto :eof