diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-12-07 13:32:49 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-12-07 13:32:49 +0000 |
commit | f6c508b4207c399015c3ed5880ec544a8cd12559 (patch) | |
tree | 72477eb4c4cfa5ad9ecb29f599a91dc0d5a7ebed /build | |
parent | eafbbac58b6a159c6c67f81d8093213e174b1672 (diff) |
- final libs adaptation for MSVC 2012
- pre-build stuff moved to 'build' folder
git-svn-id: http://svn.miranda-ng.org/main/trunk@2685 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'build')
-rw-r--r-- | build/build.no | 1 | ||||
-rw-r--r-- | build/m_version.h.in | 29 | ||||
-rw-r--r-- | build/make_ver.bat | 38 |
3 files changed, 68 insertions, 0 deletions
diff --git a/build/build.no b/build/build.no new file mode 100644 index 0000000000..22192ebf92 --- /dev/null +++ b/build/build.no @@ -0,0 +1 @@ +0 93 5
\ No newline at end of file diff --git a/build/m_version.h.in b/build/m_version.h.in new file mode 100644 index 0000000000..8412e357e4 --- /dev/null +++ b/build/m_version.h.in @@ -0,0 +1,29 @@ +/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2010 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#ifndef M_VERSION_H__
+#define M_VERSION_H__
+
+#ifndef MIRANDA_MAKE_VERSION
+#define MIRANDA_MAKE_VERSION(a,b,c,d) (((((DWORD)(a))&0xFF)<<24)|((((DWORD)(b))&0xFF)<<16)|((((DWORD)(c))&0xFF)<<8)|(((DWORD)(d))&0xFF))
+#endif
+
diff --git a/build/make_ver.bat b/build/make_ver.bat new file mode 100644 index 0000000000..52c080aed3 --- /dev/null +++ b/build/make_ver.bat @@ -0,0 +1,38 @@ +@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)
+echo %OldVer%
+
+for /F "tokens=1,2" %%i in ('svn info build.no') do call :AddBuild %%i %%j
+goto :eof
+
+:AddBuild
+if (%1) == (Revision:) (
+ for /F "tokens=1,2,3 delims= " %%i in (build.no) do call :WriteVer %%i %%j %%k %2
+ )
+
+goto :eof
+
+:WriteVer
+if "%OldVer%" == "%1,%2,%3,%4" (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 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
|