new versioning stuff

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40572
This commit is contained in:
David Anderson 2007-03-03 07:50:01 +00:00
parent 4499f4df75
commit ddfb56c34d
15 changed files with 74 additions and 52 deletions

View File

@ -71,7 +71,7 @@ void CLogger::_NewMapFile()
} else { } else {
char date[32]; char date[32];
strftime(date, sizeof(date), "%m/%d/%Y - %H:%M:%S", curtime); 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); fclose(fp);
} }
} }
@ -218,8 +218,8 @@ void CLogger::LogMessage(const char *vafmt, ...)
if (m_DailyPrintHdr) if (m_DailyPrintHdr)
{ {
m_DailyPrintHdr = false; 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); fprintf(fp, "L %s: %s\n", date, msg);
fclose(fp); fclose(fp);
} else { } else {

View File

@ -357,10 +357,6 @@
RelativePath="..\sourcemod.h" RelativePath="..\sourcemod.h"
> >
</File> </File>
<File
RelativePath="..\svn_version.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="Interfaces" Name="Interfaces"

View File

@ -17,7 +17,7 @@
RootConsoleMenu g_RootMenu; RootConsoleMenu g_RootMenu;
ConVar sourcemod_version("sourcemod_version", SOURCEMOD_VERSION, FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY, "SourceMod Version"); ConVar sourcemod_version("sourcemod_version", SVN_FULL_VERSION, FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY, "SourceMod Version");
RootConsoleMenu::RootConsoleMenu() RootConsoleMenu::RootConsoleMenu()
{ {
@ -223,7 +223,7 @@ void RootConsoleMenu::OnRootConsoleCommand(const char *cmd, unsigned int argcoun
ConsolePrint(" http://www.sourcemod.net/"); ConsolePrint(" http://www.sourcemod.net/");
} else if (strcmp(cmd, "version") == 0) { } else if (strcmp(cmd, "version") == 0) {
ConsolePrint(" SourceMod Version Information:"); ConsolePrint(" SourceMod Version Information:");
ConsolePrint(" SourceMod Version: %s", SOURCEMOD_VERSION); ConsolePrint(" SourceMod Version: %s", SVN_FULL_VERSION);
ConsolePrint(" JIT Version: %s, %s", g_pVM->GetVMName(), g_pVM->GetVersionString()); ConsolePrint(" JIT Version: %s, %s", g_pVM->GetVMName(), g_pVM->GetVersionString());
ConsolePrint(" JIT Settings: %s", g_pVM->GetCPUOptimizations()); ConsolePrint(" JIT Settings: %s", g_pVM->GetCPUOptimizations());
ConsolePrint(" http://www.sourcemod.net/"); ConsolePrint(" http://www.sourcemod.net/");

View File

@ -18,13 +18,7 @@
* @file Contains SourceMod version information. * @file Contains SourceMod version information.
*/ */
#include "svn_version.h" #define SVN_FULL_VERSION "1.0.0.571"
#define SVN_FILE_VERSION 1,0,0,571
#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
#endif //_INCLUDE_SOURCEMOD_VERSION_H_ #endif //_INCLUDE_SOURCEMOD_VERSION_H_

24
core/sm_version.tpl Normal file
View File

@ -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_

View File

@ -102,7 +102,7 @@ const char *SourceMod_Core::GetLicense()
const char *SourceMod_Core::GetVersion() const char *SourceMod_Core::GetVersion()
{ {
return SOURCEMOD_VERSION; return SVN_FULL_VERSION;
} }
const char *SourceMod_Core::GetDate() const char *SourceMod_Core::GetDate()

View File

@ -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_

View File

@ -47,12 +47,12 @@ BEGIN
BEGIN BEGIN
VALUE "Comments", "SourceMod" VALUE "Comments", "SourceMod"
VALUE "FileDescription", "SourceMod Core" VALUE "FileDescription", "SourceMod Core"
VALUE "FileVersion", SVN_REVISION_STRING VALUE "FileVersion", SVN_FULL_VERSION
VALUE "InternalName", "sourcemod" VALUE "InternalName", "sourcemod"
VALUE "LegalCopyright", "Copyright (c) 2004-2007, AlliedModders LLC" VALUE "LegalCopyright", "Copyright (c) 2004-2007, AlliedModders LLC"
VALUE "OriginalFilename", "sourcemod_mm.dll" VALUE "OriginalFilename", "sourcemod_mm.dll"
VALUE "ProductName", "SourceMod" VALUE "ProductName", "SourceMod"
VALUE "ProductVersion", SOURCEMOD_VERSION VALUE "ProductVersion", SVN_FULL_VERSION
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

14
modules.versions Normal file
View File

@ -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

View File

@ -15,8 +15,7 @@
#ifndef _INCLUDE_JIT_VERSION_H_ #ifndef _INCLUDE_JIT_VERSION_H_
#define _INCLUDE_JIT_VERSION_H_ #define _INCLUDE_JIT_VERSION_H_
#include "svn_version.h" #define SVN_FULL_VERSION "1.0.0.431"
#define SVN_FILE_VERSION 1,0,0,431
#define JIT_VERSION "1.0.0." SVN_REVISION_STRING
#endif //_INCLUDE_JIT_VERSION_H_ #endif //_INCLUDE_JIT_VERSION_H_

View File

@ -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_

View File

@ -2332,7 +2332,7 @@ unsigned int JITX86::FunctionCount(const sp_context_t *ctx)
const char *JITX86::GetVersionString() const char *JITX86::GetVersionString()
{ {
return JIT_VERSION; return SVN_FULL_VERSION;
} }
const char *JITX86::GetCPUOptimizations() const char *JITX86::GetCPUOptimizations()

View File

@ -220,10 +220,6 @@
RelativePath="..\opcode_helpers.h" RelativePath="..\opcode_helpers.h"
> >
</File> </File>
<File
RelativePath="..\svn_version.h"
>
</File>
<File <File
RelativePath="..\ungen_opcodes.h" RelativePath="..\ungen_opcodes.h"
> >

View File

@ -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_

View File

@ -46,12 +46,12 @@ BEGIN
BEGIN BEGIN
VALUE "Comments", "SourcePawn JIT" VALUE "Comments", "SourcePawn JIT"
VALUE "FileDescription", "SourcePawn JIT/Virtual Machine" VALUE "FileDescription", "SourcePawn JIT/Virtual Machine"
VALUE "FileVersion", SVN_REVISION_STRING VALUE "FileVersion", SVN_FULL_VERSION
VALUE "InternalName", "sourcemod" VALUE "InternalName", "sourcemod"
VALUE "LegalCopyright", "Copyright (c) 2004-2007, AlliedModders LLC" VALUE "LegalCopyright", "Copyright (c) 2004-2007, AlliedModders LLC"
VALUE "OriginalFilename", "sourcepawn.jit.x86.dll" VALUE "OriginalFilename", "sourcepawn.jit.x86.dll"
VALUE "ProductName", "SourcePawn JIT" VALUE "ProductName", "SourcePawn JIT"
VALUE "ProductVersion", JIT_VERSION VALUE "ProductVersion", SVN_FULL_VERSION
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"