From ddfb56c34d40986ccbb0d86f43033a7462dfd5cd Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 3 Mar 2007 07:50:01 +0000 Subject: [PATCH] new versioning stuff --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40572 --- core/CLogger.cpp | 6 +++--- core/msvc8/sourcemod_mm.vcproj | 4 ---- core/sm_srvcmds.cpp | 4 ++-- core/sm_version.h | 10 ++-------- core/sm_version.tpl | 24 ++++++++++++++++++++++++ core/sourcemm_api.cpp | 2 +- core/svn_version.h | 11 ----------- core/version.rc | 4 ++-- modules.versions | 14 ++++++++++++++ sourcepawn/jit/x86/jit_version.h | 5 ++--- sourcepawn/jit/x86/jit_version.tpl | 21 +++++++++++++++++++++ sourcepawn/jit/x86/jit_x86.cpp | 2 +- sourcepawn/jit/x86/msvc8/jit-x86.vcproj | 4 ---- sourcepawn/jit/x86/svn_version.h | 11 ----------- sourcepawn/jit/x86/version.rc | 4 ++-- 15 files changed, 74 insertions(+), 52 deletions(-) create mode 100644 core/sm_version.tpl delete mode 100644 core/svn_version.h create mode 100644 modules.versions create mode 100644 sourcepawn/jit/x86/jit_version.tpl delete mode 100644 sourcepawn/jit/x86/svn_version.h diff --git a/core/CLogger.cpp b/core/CLogger.cpp index 04962c68..545256dc 100644 --- a/core/CLogger.cpp +++ b/core/CLogger.cpp @@ -71,7 +71,7 @@ void CLogger::_NewMapFile() } else { char date[32]; strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime); - fprintf(fp, "L %s: SourceMod log file started (file \"logs_%02d%02d%03d.log\") (Version \"%s\")\n", date, curtime->tm_mon + 1, curtime->tm_mday, i, SOURCEMOD_VERSION); + fprintf(fp, "L %s: SourceMod log file started (file \"logs_%02d%02d%03d.log\") (Version \"%s\")\n", date, curtime->tm_mon + 1, curtime->tm_mday, i, SVN_FULL_VERSION); fclose(fp); } } @@ -218,8 +218,8 @@ void CLogger::LogMessage(const char *vafmt, ...) if (m_DailyPrintHdr) { m_DailyPrintHdr = false; - fprintf(fp, "L %s: SourceMod log file session started (file \"logs_%02d%02d.log\") (Version \"%s\")\n", date, curtime->tm_mon + 1, curtime->tm_mday, SOURCEMOD_VERSION); - } + fprintf(fp, "L %s: SourceMod log file session started (file \"logs_%02d%02d.log\") (Version \"%s\")\n", date, curtime->tm_mon + 1, curtime->tm_mday, SVN_FULL_VERSION); + } fprintf(fp, "L %s: %s\n", date, msg); fclose(fp); } else { diff --git a/core/msvc8/sourcemod_mm.vcproj b/core/msvc8/sourcemod_mm.vcproj index c05a59b0..ca4676c8 100644 --- a/core/msvc8/sourcemod_mm.vcproj +++ b/core/msvc8/sourcemod_mm.vcproj @@ -357,10 +357,6 @@ RelativePath="..\sourcemod.h" > - - GetVMName(), g_pVM->GetVersionString()); ConsolePrint(" JIT Settings: %s", g_pVM->GetCPUOptimizations()); ConsolePrint(" http://www.sourcemod.net/"); diff --git a/core/sm_version.h b/core/sm_version.h index ca273dd3..f43e3372 100644 --- a/core/sm_version.h +++ b/core/sm_version.h @@ -18,13 +18,7 @@ * @file Contains SourceMod version information. */ -#include "svn_version.h" - -#define SOURCEMOD_V_MAJOR 1 -#define SOURCEMOD_V_MINOR 0 -#define SOURCEMOD_V_REV 0 - -#define SOURCEMOD_VERSION "1.0.0." SVN_REVISION_STRING -#define SOURCEMOD_FILEVERS 1,0,0,0 +#define SVN_FULL_VERSION "1.0.0.571" +#define SVN_FILE_VERSION 1,0,0,571 #endif //_INCLUDE_SOURCEMOD_VERSION_H_ diff --git a/core/sm_version.tpl b/core/sm_version.tpl new file mode 100644 index 00000000..a0f33049 --- /dev/null +++ b/core/sm_version.tpl @@ -0,0 +1,24 @@ +/** + * =============================================================== + * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved. + * =============================================================== + * + * This file is not open source and may not be copied without explicit + * written permission of AlliedModders LLC. This file may not be redistributed + * in whole or significant part. + * For information, see LICENSE.txt or http://www.sourcemod.net/license.php + * + * Version: $Id$ + */ + +#ifndef _INCLUDE_SOURCEMOD_VERSION_H_ +#define _INCLUDE_SOURCEMOD_VERSION_H_ + +/** + * @file Contains SourceMod version information. + */ + +#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$" +#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$ + +#endif //_INCLUDE_SOURCEMOD_VERSION_H_ diff --git a/core/sourcemm_api.cpp b/core/sourcemm_api.cpp index 3856b907..1374bba5 100644 --- a/core/sourcemm_api.cpp +++ b/core/sourcemm_api.cpp @@ -102,7 +102,7 @@ const char *SourceMod_Core::GetLicense() const char *SourceMod_Core::GetVersion() { - return SOURCEMOD_VERSION; + return SVN_FULL_VERSION; } const char *SourceMod_Core::GetDate() diff --git a/core/svn_version.h b/core/svn_version.h deleted file mode 100644 index 97147a48..00000000 --- a/core/svn_version.h +++ /dev/null @@ -1,11 +0,0 @@ -/** This file is autogenerated by build scripts */ - -#ifndef _INCLUDE_SVN_VERSION_H_ -#define _INCLUDE_SVN_VERSION_H_ - -#define SVN_REVISION 468 -#define SVN_REVISION_STRING "468" -#define SVN_FILE_VERSION 1,0,0,468 - -#endif //_INCLUDE_SVN_VERSION_H_ - diff --git a/core/version.rc b/core/version.rc index 5e6c1bfe..2a9e0860 100644 --- a/core/version.rc +++ b/core/version.rc @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "SourceMod" VALUE "FileDescription", "SourceMod Core" - VALUE "FileVersion", SVN_REVISION_STRING + VALUE "FileVersion", SVN_FULL_VERSION VALUE "InternalName", "sourcemod" VALUE "LegalCopyright", "Copyright (c) 2004-2007, AlliedModders LLC" VALUE "OriginalFilename", "sourcemod_mm.dll" VALUE "ProductName", "SourceMod" - VALUE "ProductVersion", SOURCEMOD_VERSION + VALUE "ProductVersion", SVN_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/modules.versions b/modules.versions new file mode 100644 index 00000000..671cb640 --- /dev/null +++ b/modules.versions @@ -0,0 +1,14 @@ +[PRODUCT] +major = 1 +minor = 0 +revision = 0 + +[core] +folder = core +in = sm_version.tpl +out = sm_version.h + +[jitx86] +folder = sourcepawn/jit/x86 +in = jit_version.tpl +out = jit_version.h diff --git a/sourcepawn/jit/x86/jit_version.h b/sourcepawn/jit/x86/jit_version.h index 01b7f602..f0db73f2 100644 --- a/sourcepawn/jit/x86/jit_version.h +++ b/sourcepawn/jit/x86/jit_version.h @@ -15,8 +15,7 @@ #ifndef _INCLUDE_JIT_VERSION_H_ #define _INCLUDE_JIT_VERSION_H_ -#include "svn_version.h" - -#define JIT_VERSION "1.0.0." SVN_REVISION_STRING +#define SVN_FULL_VERSION "1.0.0.431" +#define SVN_FILE_VERSION 1,0,0,431 #endif //_INCLUDE_JIT_VERSION_H_ diff --git a/sourcepawn/jit/x86/jit_version.tpl b/sourcepawn/jit/x86/jit_version.tpl new file mode 100644 index 00000000..6b7c221b --- /dev/null +++ b/sourcepawn/jit/x86/jit_version.tpl @@ -0,0 +1,21 @@ +/** + * ================================================================ + * SourcePawn (C)2004-2007 AlliedModders LLC. All rights reserved. + * ================================================================ + * + * This file is not open source and may not be copied without explicit + * written permission of AlliedModders LLC. This file may not be redistributed + * in whole or significant part. + * For information, see LICENSE.txt or http://www.sourcemod.net/license.php + * + * Version: $Id$ + */ + + +#ifndef _INCLUDE_JIT_VERSION_H_ +#define _INCLUDE_JIT_VERSION_H_ + +#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$LOCAL_BUILD$" +#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$LOCAL_BUILD$ + +#endif //_INCLUDE_JIT_VERSION_H_ diff --git a/sourcepawn/jit/x86/jit_x86.cpp b/sourcepawn/jit/x86/jit_x86.cpp index 35da47a2..7c9e5e89 100644 --- a/sourcepawn/jit/x86/jit_x86.cpp +++ b/sourcepawn/jit/x86/jit_x86.cpp @@ -2332,7 +2332,7 @@ unsigned int JITX86::FunctionCount(const sp_context_t *ctx) const char *JITX86::GetVersionString() { - return JIT_VERSION; + return SVN_FULL_VERSION; } const char *JITX86::GetCPUOptimizations() diff --git a/sourcepawn/jit/x86/msvc8/jit-x86.vcproj b/sourcepawn/jit/x86/msvc8/jit-x86.vcproj index 8a44c16f..f2972a94 100644 --- a/sourcepawn/jit/x86/msvc8/jit-x86.vcproj +++ b/sourcepawn/jit/x86/msvc8/jit-x86.vcproj @@ -220,10 +220,6 @@ RelativePath="..\opcode_helpers.h" > - - diff --git a/sourcepawn/jit/x86/svn_version.h b/sourcepawn/jit/x86/svn_version.h deleted file mode 100644 index 27a49005..00000000 --- a/sourcepawn/jit/x86/svn_version.h +++ /dev/null @@ -1,11 +0,0 @@ -/** This file is autogenerated by build scripts */ - -#ifndef _INCLUDE_SVN_VERSION_H_ -#define _INCLUDE_SVN_VERSION_H_ - -#define SVN_REVISION 408 -#define SVN_REVISION_STRING "408" -#define SVN_FILE_VERSION 1,0,0,408 - -#endif //_INCLUDE_SVN_VERSION_H_ - diff --git a/sourcepawn/jit/x86/version.rc b/sourcepawn/jit/x86/version.rc index f3caeb14..60a7087f 100644 --- a/sourcepawn/jit/x86/version.rc +++ b/sourcepawn/jit/x86/version.rc @@ -46,12 +46,12 @@ BEGIN BEGIN VALUE "Comments", "SourcePawn JIT" VALUE "FileDescription", "SourcePawn JIT/Virtual Machine" - VALUE "FileVersion", SVN_REVISION_STRING + VALUE "FileVersion", SVN_FULL_VERSION VALUE "InternalName", "sourcemod" VALUE "LegalCopyright", "Copyright (c) 2004-2007, AlliedModders LLC" VALUE "OriginalFilename", "sourcepawn.jit.x86.dll" VALUE "ProductName", "SourcePawn JIT" - VALUE "ProductVersion", JIT_VERSION + VALUE "ProductVersion", SVN_FULL_VERSION END END BLOCK "VarFileInfo"