summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/make_ver.bat7
-rwxr-xr-xprotocols/JabberG/src/jabber.cpp6
2 files changed, 7 insertions, 6 deletions
diff --git a/build/make_ver.bat b/build/make_ver.bat
index 40a391351e..088cf91053 100644
--- a/build/make_ver.bat
+++ b/build/make_ver.bat
@@ -3,6 +3,7 @@ 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 ('git rev-list --count HEAD') do set Revision=%%i
+for /F %%i in ('git rev-parse --short HEAD') do set Hash=%%i
rem for /F %%i in ('svnversion build.no') do set Revision=%%i
REM Fix building not-svn repository (e.g., Git mirror)
@@ -12,11 +13,11 @@ if "%Revision%" == "" (set Revision=0)
REM Fix trailing 'M', when the working copy contains modifications
if "%Revision:~-1%" == "M" (set Revision=%Revision:~0,-1%)
-for /F "tokens=1,2,3 delims= " %%i in (build.no) do call :WriteVer %%i %%j %%k %Revision%
+for /F "tokens=1,2,3 delims= " %%i in (build.no) do call :WriteVer %%i %%j %%k %Revision% %Hash%
goto :eof
:WriteVer
-echo %1.%2.%3.%4
+echo %1.%2.%3.%4.%5
if "%OldVer%" == "%1,%2,%3,%4" (goto :eof)
for /f "delims=/ tokens=1-3" %%a in ("%DATE:~4%") do (
@@ -29,7 +30,7 @@ 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_DISPLAY "%1.%2.%3 alpha build %4(#%5)" >> "%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" >> "%TempFileName%"
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp
index 184a5651d6..bc3329e506 100755
--- a/protocols/JabberG/src/jabber.cpp
+++ b/protocols/JabberG/src/jabber.cpp
@@ -196,9 +196,9 @@ extern "C" int __declspec(dllexport) Load()
return 1;
}
- MFileVersion v;
- Miranda_GetFileVersion(&v);
- mir_snwprintf(szCoreVersion, L"%d.%d.%d.%d", v[0], v[1], v[2], v[3]);
+ char mirVer[100];
+ Miranda_GetVersionText(mirVer, _countof(mirVer));
+ mir_wstrcpy(szCoreVersion, _A2T(mirVer));
CallService(MS_UTILS_GETCOUNTRYLIST, (WPARAM)&g_cbCountries, (LPARAM)&g_countries);