Implement git support in gensvnrevision tool and related changes in code.

gvnrevision still support svn version generation and have addition options now (see sources).
gensvnrevision/svn_revision.h and other svn reference will fixed later.
Now version strings include commit date/time that can be used in git case for fast find git commit without using git hash most time.
In chat ".server info" output git hash can be copied by shift-click in chat and then copied to cliboard if need.
This commit is contained in:
VladimirMangos 2008-10-25 14:29:06 +04:00
parent a0ab11bb17
commit 0874856e34
6 changed files with 248 additions and 52 deletions

View file

@ -24,13 +24,12 @@
#endif
#include "Platform/Define.h"
#include "svn_revision.h"
#ifndef _VERSION
#if PLATFORM == PLATFORM_WINDOWS
# define _VERSION "0.12.0-SVN" " (Revision " SVN_REVISION ")"
# define _VERSION(REVD,REVT,REV) "0.12.0-SVN" " (" REVD " " REVT " Revision " REV ")"
#else
# define _VERSION "@VERSION@" " (Revision " SVN_REVISION ")"
# define _VERSION(REVD,REVT,REV) "@VERSION@" " (" REVD " " REVT " Revision " REV ")"
#endif
#endif
@ -56,18 +55,20 @@
#if PLATFORM == PLATFORM_WINDOWS
# ifdef _WIN64
# define _FULLVERSION _PACKAGENAME "/" _VERSION " (Win64," _ENDIAN_STRING ")"
# define _ENDIAN_PLATFORM "Win64 (" _ENDIAN_STRING ")"
# else
# define _FULLVERSION _PACKAGENAME "/" _VERSION " (Win32," _ENDIAN_STRING ")"
# define _ENDIAN_PLATFORM "Win32 (" _ENDIAN_STRING ")"
# endif
# define _MANGOSD_CONFIG SYSCONFDIR"mangosd.conf"
# define _REALMD_CONFIG SYSCONFDIR"realmd.conf"
#else
# define _FULLVERSION _PACKAGENAME "/" _VERSION " (Unix," _ENDIAN_STRING ")"
# define _ENDIAN_PLATFORM "Unix (" _ENDIAN_STRING ")"
# define _MANGOSD_CONFIG SYSCONFDIR"mangosd.conf"
# define _REALMD_CONFIG SYSCONFDIR"realmd.conf"
#endif
#define _FULLVERSION(REVD,REVT,REV) _PACKAGENAME "/" _VERSION(REVD,REVT,REV) " for " _ENDIAN_PLATFORM
#define DEFAULT_PLAYER_LIMIT 100
#define DEFAULT_WORLDSERVER_PORT 8085 //8129
#define DEFAULT_REALMSERVER_PORT 3724