From d3f0a14867f7ebc6db27279e44618d84fd95a846 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 30 Aug 2009 00:21:42 -0700 Subject: [PATCH] Imported support for new build system. --- core/logic/svn_version.h | 44 --- core/logic/svn_version.tpl | 44 --- core/sm_version.h | 48 --- core/sm_version.tpl | 48 --- core/version.rc | 10 +- extensions/bintools/extension.cpp | 14 +- extensions/bintools/extension.h | 2 + extensions/bintools/sdk/smsdk_config.h | 5 +- extensions/bintools/svn_version.h | 44 --- extensions/bintools/svn_version.tpl | 44 --- extensions/bintools/version.rc | 10 +- extensions/clientprefs/extension.cpp | 9 + extensions/clientprefs/extension.h | 3 + extensions/clientprefs/sdk/smsdk_config.h | 6 +- extensions/clientprefs/svn_version.h | 44 --- extensions/clientprefs/svn_version.tpl | 44 --- extensions/clientprefs/version.rc | 10 +- extensions/cstrike/extension.cpp | 12 + extensions/cstrike/extension.h | 3 + extensions/cstrike/sdk/smsdk_config.h | 6 +- extensions/cstrike/svn_version.h | 44 --- extensions/cstrike/svn_version.tpl | 44 --- extensions/cstrike/version.rc | 10 +- extensions/curl/extension.cpp | 12 + extensions/curl/extension.h | 2 + extensions/curl/sdk/smsdk_config.h | 5 +- extensions/curl/svn_version.h | 44 --- extensions/curl/svn_version.tpl | 44 --- extensions/curl/version.rc | 10 +- extensions/geoip/extension.cpp | 12 + extensions/geoip/extension.h | 3 + extensions/geoip/sdk/smsdk_config.h | 5 +- extensions/geoip/svn_version.h | 44 --- extensions/geoip/svn_version.tpl | 44 --- extensions/geoip/version.rc | 10 +- extensions/mysql/extension.cpp | 12 + extensions/mysql/extension.h | 2 + extensions/mysql/sdk/smsdk_config.h | 6 +- extensions/mysql/svn_version.h | 44 --- extensions/mysql/svn_version.tpl | 44 --- extensions/mysql/version.rc | 10 +- extensions/regex/extension.cpp | 12 +- extensions/regex/extension.h | 3 + extensions/regex/sdk/smsdk_config.h | 6 +- extensions/regex/svn_version.h | 44 --- extensions/regex/svn_version.tpl | 44 --- extensions/regex/version.rc | 10 +- extensions/sdktools/extension.cpp | 10 +- extensions/sdktools/extension.h | 2 + extensions/sdktools/sdk/smsdk_config.h | 6 +- extensions/sdktools/svn_version.h | 44 --- extensions/sdktools/svn_version.tpl | 44 --- extensions/sdktools/version.rc | 10 +- extensions/sqlite/extension.cpp | 12 + extensions/sqlite/extension.h | 3 + extensions/sqlite/sdk/smsdk_config.h | 6 +- extensions/sqlite/svn_version.h | 44 --- extensions/sqlite/svn_version.tpl | 44 --- extensions/sqlite/version.rc | 10 +- extensions/tf2/extension.cpp | 11 + extensions/tf2/extension.h | 3 + extensions/tf2/sdk/smsdk_config.h | 6 +- extensions/tf2/svn_version.h | 44 --- extensions/tf2/svn_version.tpl | 44 --- extensions/tf2/version.rc | 10 +- extensions/topmenus/extension.cpp | 11 + extensions/topmenus/extension.h | 3 + extensions/topmenus/sdk/smsdk_config.h | 6 +- extensions/topmenus/svn_version.h | 44 --- extensions/topmenus/svn_version.tpl | 44 --- extensions/topmenus/version.rc | 10 +- extensions/updater/Updater.cpp | 4 +- extensions/updater/extension.cpp | 12 + extensions/updater/extension.h | 2 + extensions/updater/sdk/smsdk_config.h | 5 +- extensions/updater/svn_version.h | 44 --- extensions/updater/svn_version.tpl | 44 --- extensions/updater/version.rc | 10 +- loader/svn_version.h | 48 --- loader/svn_version.tpl | 48 --- loader/version.rc | 10 +- modules.versions | 90 ----- product.version | 2 +- sourcepawn/compiler/libpawnc.rc | 10 +- sourcepawn/compiler/pawncc.c | 5 + sourcepawn/compiler/sc1.c | 78 ++-- sourcepawn/compiler/sc2.c | 31 +- sourcepawn/compiler/sclinux.h | 1 - sourcepawn/compiler/svn_version.h | 27 -- sourcepawn/compiler/svn_version.tpl | 27 -- sourcepawn/compiler/zlib/crc32.c | 1 + sourcepawn/compiler/zlib/deflate.c | 1 + sourcepawn/compiler/zlib/infback.c | 1 + sourcepawn/compiler/zlib/inffast.c | 1 + sourcepawn/compiler/zlib/inflate.c | 1 + sourcepawn/compiler/zlib/inftrees.c | 1 + sourcepawn/compiler/zlib/trees.c | 1 + sourcepawn/compiler/zlib/zutil.c | 1 + sourcepawn/jit/engine2.cpp | 4 +- sourcepawn/jit/jit_version.h | 40 -- sourcepawn/jit/jit_version.tpl | 40 -- sourcepawn/jit/version.rc | 10 +- sourcepawn/jit/x86/jit_x86.cpp | 1 - sourcepawn/jit/zlib/crc32.c | 1 + sourcepawn/jit/zlib/deflate.c | 1 + sourcepawn/jit/zlib/infback.c | 1 + sourcepawn/jit/zlib/inffast.c | 1 + sourcepawn/jit/zlib/inflate.c | 1 + sourcepawn/jit/zlib/inftrees.c | 1 + sourcepawn/jit/zlib/trees.c | 1 + sourcepawn/jit/zlib/zutil.c | 1 + tools/buildbot/bootstrap.pl | 117 +++--- tools/buildbot/package.pl | 7 +- tools/buildbot/startbuild.pl | 32 +- tools/buildbot/symstore.pl | 9 +- tools/builder/ABuilder.cs | 202 ---------- tools/builder/AssemblyInfo.cs | 58 --- tools/builder/Config.cs | 111 ------ tools/builder/LinuxBuilder.cs | 141 ------- tools/builder/Main.cs | 56 --- tools/builder/Makefile | 15 - tools/builder/Package.cs | 108 ------ tools/builder/PkgCore.cs | 440 ---------------------- tools/builder/Win32Builder.cs | 132 ------- tools/builder/build-linux.cfg | 4 - tools/builder/build-win32.cfg | 3 - tools/builder/builder.csproj | 121 ------ tools/builder/builder.sln | 19 - tools/versionchanger.pl | 140 ------- 129 files changed, 406 insertions(+), 3409 deletions(-) delete mode 100755 core/logic/svn_version.h delete mode 100755 core/logic/svn_version.tpl delete mode 100644 core/sm_version.h delete mode 100644 core/sm_version.tpl delete mode 100644 extensions/bintools/svn_version.h delete mode 100644 extensions/bintools/svn_version.tpl delete mode 100644 extensions/clientprefs/svn_version.h delete mode 100644 extensions/clientprefs/svn_version.tpl delete mode 100644 extensions/cstrike/svn_version.h delete mode 100644 extensions/cstrike/svn_version.tpl delete mode 100644 extensions/curl/svn_version.h delete mode 100644 extensions/curl/svn_version.tpl delete mode 100644 extensions/geoip/svn_version.h delete mode 100644 extensions/geoip/svn_version.tpl delete mode 100644 extensions/mysql/svn_version.h delete mode 100644 extensions/mysql/svn_version.tpl delete mode 100644 extensions/regex/svn_version.h delete mode 100644 extensions/regex/svn_version.tpl delete mode 100644 extensions/sdktools/svn_version.h delete mode 100644 extensions/sdktools/svn_version.tpl delete mode 100644 extensions/sqlite/svn_version.h delete mode 100644 extensions/sqlite/svn_version.tpl delete mode 100644 extensions/tf2/svn_version.h delete mode 100644 extensions/tf2/svn_version.tpl delete mode 100644 extensions/topmenus/svn_version.h delete mode 100644 extensions/topmenus/svn_version.tpl delete mode 100644 extensions/updater/svn_version.h delete mode 100644 extensions/updater/svn_version.tpl delete mode 100644 loader/svn_version.h delete mode 100644 loader/svn_version.tpl delete mode 100644 modules.versions delete mode 100644 sourcepawn/compiler/svn_version.h delete mode 100644 sourcepawn/compiler/svn_version.tpl delete mode 100644 sourcepawn/jit/jit_version.h delete mode 100644 sourcepawn/jit/jit_version.tpl delete mode 100644 tools/builder/ABuilder.cs delete mode 100644 tools/builder/AssemblyInfo.cs delete mode 100644 tools/builder/Config.cs delete mode 100644 tools/builder/LinuxBuilder.cs delete mode 100644 tools/builder/Main.cs delete mode 100644 tools/builder/Makefile delete mode 100644 tools/builder/Package.cs delete mode 100644 tools/builder/PkgCore.cs delete mode 100644 tools/builder/Win32Builder.cs delete mode 100644 tools/builder/build-linux.cfg delete mode 100644 tools/builder/build-win32.cfg delete mode 100644 tools/builder/builder.csproj delete mode 100644 tools/builder/builder.sln delete mode 100644 tools/versionchanger.pl diff --git a/core/logic/svn_version.h b/core/logic/svn_version.h deleted file mode 100755 index a94274a9..00000000 --- a/core/logic/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod GeoIP Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_GEOIP_VERSION_H_ -#define _INCLUDE_GEOIP_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_GEOIP_VERSION_H_ diff --git a/core/logic/svn_version.tpl b/core/logic/svn_version.tpl deleted file mode 100755 index 35da7293..00000000 --- a/core/logic/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod GeoIP Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_LOGIC_VERSION_H_ -#define _INCLUDE_LOGIC_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_LOGIC_VERSION_H_ diff --git a/core/sm_version.h b/core/sm_version.h deleted file mode 100644 index 4f2a1193..00000000 --- a/core/sm_version.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SOURCEMOD_VERSION_H_ -#define _INCLUDE_SOURCEMOD_VERSION_H_ - -/** - * @file Contains SourceMod version information. - */ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_SOURCEMOD_VERSION_H_ diff --git a/core/sm_version.tpl b/core/sm_version.tpl deleted file mode 100644 index 6b28661a..00000000 --- a/core/sm_version.tpl +++ /dev/null @@ -1,48 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SOURCEMOD_VERSION_H_ -#define _INCLUDE_SOURCEMOD_VERSION_H_ - -/** - * @file Contains SourceMod version information. - */ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_SOURCEMOD_VERSION_H_ diff --git a/core/version.rc b/core/version.rc index 0e8331d8..3d3631d1 100644 --- a/core/version.rc +++ b/core/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "sm_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "SourceMod" VALUE "FileDescription", "SourceMod Core" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "sourcemod" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/extensions/bintools/extension.cpp b/extensions/bintools/extension.cpp index 276e1f5e..235878a4 100644 --- a/extensions/bintools/extension.cpp +++ b/extensions/bintools/extension.cpp @@ -1,5 +1,5 @@ /** - * vim: set ts=4 : + * vim: set ts=4 sw=4 tw=99 noet: * ============================================================================= * SourceMod BinTools Extension * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. @@ -29,6 +29,7 @@ * Version: $Id$ */ +#include #include "extension.h" #include "CallMaker.h" @@ -54,3 +55,14 @@ bool BinTools::SDK_OnLoad(char *error, size_t maxlength, bool late) return true; } + +const char *BinTools::GetVersion() +{ + return SM_FULL_VERSION; +} + +const char *BinTools::GetDate() +{ + return SM_BUILD_TIMESTAMP; +} + diff --git a/extensions/bintools/extension.h b/extensions/bintools/extension.h index 2bdbdb0c..d920c94f 100644 --- a/extensions/bintools/extension.h +++ b/extensions/bintools/extension.h @@ -81,6 +81,8 @@ public: * @return True if working, false otherwise. */ //virtual bool QueryRunning(char *error, size_t maxlength); + const char *GetVersion(); + const char *GetDate(); public: #if defined SMEXT_CONF_METAMOD /** diff --git a/extensions/bintools/sdk/smsdk_config.h b/extensions/bintools/sdk/smsdk_config.h index 39424418..a20c2f7c 100644 --- a/extensions/bintools/sdk/smsdk_config.h +++ b/extensions/bintools/sdk/smsdk_config.h @@ -31,7 +31,6 @@ #ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ #define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ -#include "svn_version.h" /** * @file smsdk_config.h @@ -41,12 +40,12 @@ /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "BinTools" #define SMEXT_CONF_DESCRIPTION "Low-level C/C++ Calling API" -#define SMEXT_CONF_VERSION SVN_FULL_VERSION +#define SMEXT_CONF_VERSION "" #define SMEXT_CONF_AUTHOR "AlliedModders LLC" #define SMEXT_CONF_URL "http://www.sourcemod.net/" #define SMEXT_CONF_LOGTAG "SAMPLE" #define SMEXT_CONF_LICENSE "GPL" -#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__ +#define SMEXT_CONF_DATESTRING "" /** * @brief Exposes plugin's main interface. diff --git a/extensions/bintools/svn_version.h b/extensions/bintools/svn_version.h deleted file mode 100644 index 226db0a9..00000000 --- a/extensions/bintools/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod BinTools Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_BINTOOLS_VERSION_H_ -#define _INCLUDE_BINTOOLS_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_BINTOOLS_VERSION_H_ diff --git a/extensions/bintools/svn_version.tpl b/extensions/bintools/svn_version.tpl deleted file mode 100644 index 603604fc..00000000 --- a/extensions/bintools/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod BinTools Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_BINTOOLS_VERSION_H_ -#define _INCLUDE_BINTOOLS_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_BINTOOLS_VERSION_H_ diff --git a/extensions/bintools/version.rc b/extensions/bintools/version.rc index efb8e991..a8e9f049 100644 --- a/extensions/bintools/version.rc +++ b/extensions/bintools/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "BinTools Extension" VALUE "FileDescription", "SourceMod BinTools Extension" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "SourceMod BinTools Extension" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod BinTools Extension" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/extensions/clientprefs/extension.cpp b/extensions/clientprefs/extension.cpp index 126761d0..688f9905 100644 --- a/extensions/clientprefs/extension.cpp +++ b/extensions/clientprefs/extension.cpp @@ -29,6 +29,7 @@ * Version: $Id$ */ +#include #include "extension.h" /** @@ -430,5 +431,13 @@ bool Translate(char *buffer, return true; } +const char *ClientPrefs::GetVersion() +{ + return SM_FULL_VERSION; +} +const char *ClientPrefs::GetDate() +{ + return SM_BUILD_TIMESTAMP; +} diff --git a/extensions/clientprefs/extension.h b/extensions/clientprefs/extension.h index 89e57031..9bd2d178 100644 --- a/extensions/clientprefs/extension.h +++ b/extensions/clientprefs/extension.h @@ -84,6 +84,9 @@ public: virtual void NotifyInterfaceDrop(SMInterface *pInterface); + const char *GetVersion(); + const char *GetDate(); + void DatabaseConnect(); bool AddQueryToQueue(TQueryOp *query); diff --git a/extensions/clientprefs/sdk/smsdk_config.h b/extensions/clientprefs/sdk/smsdk_config.h index 2cd8c6ea..dcee6314 100644 --- a/extensions/clientprefs/sdk/smsdk_config.h +++ b/extensions/clientprefs/sdk/smsdk_config.h @@ -37,17 +37,15 @@ * @brief Contains macros for configuring basic extension information. */ -#include "svn_version.h" - /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "Client Preferences" #define SMEXT_CONF_DESCRIPTION "Saves client preference settings" -#define SMEXT_CONF_VERSION SVN_FULL_VERSION +#define SMEXT_CONF_VERSION "" #define SMEXT_CONF_AUTHOR "AlliedModders" #define SMEXT_CONF_URL "http://www.sourcemod.net/" #define SMEXT_CONF_LOGTAG "CLIENTPREFS" #define SMEXT_CONF_LICENSE "GPL" -#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__ +#define SMEXT_CONF_DATESTRING "" /** * @brief Exposes plugin's main interface. diff --git a/extensions/clientprefs/svn_version.h b/extensions/clientprefs/svn_version.h deleted file mode 100644 index ce587705..00000000 --- a/extensions/clientprefs/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod SDKTools Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_CLIENTPREFS_VERSION_H_ -#define _INCLUDE_CLIENTPREFS_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_CLIENTPREFS_VERSION_H_ diff --git a/extensions/clientprefs/svn_version.tpl b/extensions/clientprefs/svn_version.tpl deleted file mode 100644 index 326eca01..00000000 --- a/extensions/clientprefs/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod SDKTools Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_CLIENTPREFS_VERSION_H_ -#define _INCLUDE_CLIENTPREFS_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_CLIENTPREFS_VERSION_H_ diff --git a/extensions/clientprefs/version.rc b/extensions/clientprefs/version.rc index 2a9f2806..e8ae08a8 100644 --- a/extensions/clientprefs/version.rc +++ b/extensions/clientprefs/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "Client Preferences Extension" VALUE "FileDescription", "SourceMod Client Preferences Extension" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "SourceMod Client Preferences Extension" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod Client Preferences Extension" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/extensions/cstrike/extension.cpp b/extensions/cstrike/extension.cpp index 345fb884..8cbd5e40 100644 --- a/extensions/cstrike/extension.cpp +++ b/extensions/cstrike/extension.cpp @@ -29,6 +29,7 @@ * Version: $Id$ */ +#include #include "extension.h" #include "RegNatives.h" #include "timeleft.h" @@ -250,3 +251,14 @@ bool CStrike::ProcessCommandTarget(cmd_target_info_t *info) return true; } + +const char *CStrike::GetVersion() +{ + return SM_FULL_VERSION; +} + +const char *CStrike::GetDate() +{ + return SM_BUILD_TIMESTAMP; +} + diff --git a/extensions/cstrike/extension.h b/extensions/cstrike/extension.h index 20a866a1..12c7dce0 100644 --- a/extensions/cstrike/extension.h +++ b/extensions/cstrike/extension.h @@ -86,6 +86,9 @@ public: void NotifyInterfaceDrop(SMInterface *pInterface); bool QueryInterfaceDrop(SMInterface *pInterface); + + const char *GetVersion(); + const char *GetDate(); public: bool ProcessCommandTarget(cmd_target_info_t *info); public: diff --git a/extensions/cstrike/sdk/smsdk_config.h b/extensions/cstrike/sdk/smsdk_config.h index d3860fa2..a522b074 100644 --- a/extensions/cstrike/sdk/smsdk_config.h +++ b/extensions/cstrike/sdk/smsdk_config.h @@ -37,17 +37,15 @@ * @brief Contains macros for configuring basic extension information. */ -#include "svn_version.h" - /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "CS:S Tools" #define SMEXT_CONF_DESCRIPTION "CS:S extended functionality" -#define SMEXT_CONF_VERSION SVN_FULL_VERSION +#define SMEXT_CONF_VERSION "" #define SMEXT_CONF_AUTHOR "AlliedModders LLC" #define SMEXT_CONF_URL "http://www.sourcemod.net/" #define SMEXT_CONF_LOGTAG "CSTRIKE" #define SMEXT_CONF_LICENSE "GPL" -#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__ +#define SMEXT_CONF_DATESTRING "" /** * @brief Exposes plugin's main interface. diff --git a/extensions/cstrike/svn_version.h b/extensions/cstrike/svn_version.h deleted file mode 100644 index 9a11376f..00000000 --- a/extensions/cstrike/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod Counter-Strike:Source Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SDKTOOLS_VERSION_H_ -#define _INCLUDE_SDKTOOLS_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_SDKTOOLS_VERSION_H_ diff --git a/extensions/cstrike/svn_version.tpl b/extensions/cstrike/svn_version.tpl deleted file mode 100644 index fa07e088..00000000 --- a/extensions/cstrike/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod Counter-Strike:Source Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SDKTOOLS_VERSION_H_ -#define _INCLUDE_SDKTOOLS_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_SDKTOOLS_VERSION_H_ diff --git a/extensions/cstrike/version.rc b/extensions/cstrike/version.rc index 9f941b75..7bf56997 100644 --- a/extensions/cstrike/version.rc +++ b/extensions/cstrike/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "SourceMod CS:S Extension" VALUE "FileDescription", "SourceMod CS:S Extension" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "SourceMod CS:S Extension" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod CS:S Extension" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/extensions/curl/extension.cpp b/extensions/curl/extension.cpp index e97f03d9..1f4a9c62 100644 --- a/extensions/curl/extension.cpp +++ b/extensions/curl/extension.cpp @@ -29,6 +29,7 @@ * Version: $Id$ */ +#include #include "extension.h" #include #include @@ -74,3 +75,14 @@ void CurlExt::SDK_OnUnload() { curl_global_cleanup(); } + +const char *CurlExt::GetVersion() +{ + return SM_FULL_VERSION; +} + +const char *CurlExt::GetDate() +{ + return SM_BUILD_TIMESTAMP; +} + diff --git a/extensions/curl/extension.h b/extensions/curl/extension.h index 76bc1fa1..ae7fad3c 100644 --- a/extensions/curl/extension.h +++ b/extensions/curl/extension.h @@ -81,6 +81,8 @@ public: * @return True if working, false otherwise. */ //virtual bool QueryRunning(char *error, size_t maxlength); + const char *GetVersion(); + const char *GetDate(); public: #if defined SMEXT_CONF_METAMOD /** diff --git a/extensions/curl/sdk/smsdk_config.h b/extensions/curl/sdk/smsdk_config.h index dc37eac1..ee2fbdf2 100644 --- a/extensions/curl/sdk/smsdk_config.h +++ b/extensions/curl/sdk/smsdk_config.h @@ -31,7 +31,6 @@ #ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ #define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ -#include "svn_version.h" /** * @file smsdk_config.h @@ -41,12 +40,12 @@ /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "Webternet" #define SMEXT_CONF_DESCRIPTION "Extension for interacting with URLs" -#define SMEXT_CONF_VERSION SVN_FULL_VERSION +#define SMEXT_CONF_VERSION "" #define SMEXT_CONF_AUTHOR "AlliedModders LLC" #define SMEXT_CONF_URL "http://www.sourcemod.net/" #define SMEXT_CONF_LOGTAG "WEB" #define SMEXT_CONF_LICENSE "GPL" -#define SMEXT_CONF_DATESTRING __DATE__ +#define SMEXT_CONF_DATESTRING "" /** * @brief Exposes plugin's main interface. diff --git a/extensions/curl/svn_version.h b/extensions/curl/svn_version.h deleted file mode 100644 index a94274a9..00000000 --- a/extensions/curl/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod GeoIP Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_GEOIP_VERSION_H_ -#define _INCLUDE_GEOIP_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_GEOIP_VERSION_H_ diff --git a/extensions/curl/svn_version.tpl b/extensions/curl/svn_version.tpl deleted file mode 100644 index 679a3732..00000000 --- a/extensions/curl/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod GeoIP Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_GEOIP_VERSION_H_ -#define _INCLUDE_GEOIP_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_GEOIP_VERSION_H_ diff --git a/extensions/curl/version.rc b/extensions/curl/version.rc index f57045e3..407550ce 100644 --- a/extensions/curl/version.rc +++ b/extensions/curl/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "Webternet Extension" VALUE "FileDescription", "SourceMod Webternet Extension" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "SourceMod Webternet Extension" VALUE "LegalCopyright", "Copyright (c) 2004-2009, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod Webternet Extension" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/extensions/geoip/extension.cpp b/extensions/geoip/extension.cpp index e65485a7..a1b4eb1b 100644 --- a/extensions/geoip/extension.cpp +++ b/extensions/geoip/extension.cpp @@ -29,6 +29,7 @@ * Version: $Id$ */ +#include #include "extension.h" #include "GeoIP.h" @@ -67,6 +68,16 @@ void GeoIP_Extension::SDK_OnUnload() gi = NULL; } +const char *GeoIP_Extension::GetVersion() +{ + return SM_FULL_VERSION; +} + +const char *GeoIP_Extension::GetDate() +{ + return SM_BUILD_TIMESTAMP; +} + /******************************* * * * GEOIP NATIVE IMPLEMENTATIONS * @@ -131,3 +142,4 @@ const sp_nativeinfo_t geoip_natives[] = {"GeoipCountry", sm_Geoip_Country}, {NULL, NULL}, }; + diff --git a/extensions/geoip/extension.h b/extensions/geoip/extension.h index ff978e53..b06b225a 100644 --- a/extensions/geoip/extension.h +++ b/extensions/geoip/extension.h @@ -62,6 +62,9 @@ public: */ virtual void SDK_OnUnload(); + const char *GetVersion(); + const char *GetDate(); + /** * @brief This is called once all known extensions have been loaded. * Note: It is is a good idea to add natives here, if any are provided. diff --git a/extensions/geoip/sdk/smsdk_config.h b/extensions/geoip/sdk/smsdk_config.h index aeb9b32f..fa147344 100644 --- a/extensions/geoip/sdk/smsdk_config.h +++ b/extensions/geoip/sdk/smsdk_config.h @@ -31,7 +31,6 @@ #ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ #define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ -#include "svn_version.h" /** * @file smsdk_config.h @@ -41,12 +40,12 @@ /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "GeoIP" #define SMEXT_CONF_DESCRIPTION "Geographical IP information" -#define SMEXT_CONF_VERSION SVN_FULL_VERSION +#define SMEXT_CONF_VERSION "" #define SMEXT_CONF_AUTHOR "AlliedModders LLC" #define SMEXT_CONF_URL "http://www.sourcemod.net/" #define SMEXT_CONF_LOGTAG "GEOIP" #define SMEXT_CONF_LICENSE "GPL" -#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__ +#define SMEXT_CONF_DATESTRING "" /** * @brief Exposes plugin's main interface. diff --git a/extensions/geoip/svn_version.h b/extensions/geoip/svn_version.h deleted file mode 100644 index a94274a9..00000000 --- a/extensions/geoip/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod GeoIP Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_GEOIP_VERSION_H_ -#define _INCLUDE_GEOIP_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_GEOIP_VERSION_H_ diff --git a/extensions/geoip/svn_version.tpl b/extensions/geoip/svn_version.tpl deleted file mode 100644 index 679a3732..00000000 --- a/extensions/geoip/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod GeoIP Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_GEOIP_VERSION_H_ -#define _INCLUDE_GEOIP_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_GEOIP_VERSION_H_ diff --git a/extensions/geoip/version.rc b/extensions/geoip/version.rc index 8fe65d23..a94221f4 100644 --- a/extensions/geoip/version.rc +++ b/extensions/geoip/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "GeoIP Extension" VALUE "FileDescription", "SourceMod GeoIP Extension" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "SourceMod GeoIP Extension" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod GeoIP Extension" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/extensions/mysql/extension.cpp b/extensions/mysql/extension.cpp index 5607ef12..6e344cb5 100644 --- a/extensions/mysql/extension.cpp +++ b/extensions/mysql/extension.cpp @@ -29,6 +29,7 @@ * Version: $Id$ */ +#include #include "extension.h" #include "mysql/MyDriver.h" #include @@ -58,3 +59,14 @@ void DBI_MySQL::SDK_OnUnload() //:TODO: is this needed? //mysql_library_end(); } + +const char *DBI_MySQL::GetVersion() +{ + return SM_FULL_VERSION; +} + +const char *DBI_MySQL::GetDate() +{ + return SM_BUILD_TIMESTAMP; +} + diff --git a/extensions/mysql/extension.h b/extensions/mysql/extension.h index 489c5f68..e9a3feea 100644 --- a/extensions/mysql/extension.h +++ b/extensions/mysql/extension.h @@ -81,6 +81,8 @@ public: * @return True if working, false otherwise. */ //virtual bool QueryRunning(char *error, size_t maxlength); + const char *GetVersion(); + const char *GetDate(); public: #if defined SMEXT_CONF_METAMOD /** diff --git a/extensions/mysql/sdk/smsdk_config.h b/extensions/mysql/sdk/smsdk_config.h index 48ac2c2a..047ec0b9 100644 --- a/extensions/mysql/sdk/smsdk_config.h +++ b/extensions/mysql/sdk/smsdk_config.h @@ -37,17 +37,15 @@ * @brief Contains macros for configuring basic extension information. */ -#include "svn_version.h" - /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "MySQL-DBI" #define SMEXT_CONF_DESCRIPTION "MySQL driver implementation for DBI" -#define SMEXT_CONF_VERSION SVN_FULL_VERSION +#define SMEXT_CONF_VERSION "" #define SMEXT_CONF_AUTHOR "AlliedModders LLC" #define SMEXT_CONF_URL "http://www.sourcemod.net/" #define SMEXT_CONF_LOGTAG "MYSQL" #define SMEXT_CONF_LICENSE "GPL" -#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__ +#define SMEXT_CONF_DATESTRING "" /** * @brief Exposes plugin's main interface. diff --git a/extensions/mysql/svn_version.h b/extensions/mysql/svn_version.h deleted file mode 100644 index 1e56eb0e..00000000 --- a/extensions/mysql/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod MySQL Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_MYSQLEXT_VERSION_H_ -#define _INCLUDE_MYSQLEXT_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_MYSQLEXT_VERSION_H_ diff --git a/extensions/mysql/svn_version.tpl b/extensions/mysql/svn_version.tpl deleted file mode 100644 index 4badc53e..00000000 --- a/extensions/mysql/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod MySQL Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_MYSQLEXT_VERSION_H_ -#define _INCLUDE_MYSQLEXT_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_MYSQLEXT_VERSION_H_ diff --git a/extensions/mysql/version.rc b/extensions/mysql/version.rc index c50198d4..382e98c6 100644 --- a/extensions/mysql/version.rc +++ b/extensions/mysql/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "MySQL Extension" VALUE "FileDescription", "SourceMod MySQL Extension" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "SourceMod MySQL Extension" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod MySQL Extension" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/extensions/regex/extension.cpp b/extensions/regex/extension.cpp index ee7d173a..53c9153e 100644 --- a/extensions/regex/extension.cpp +++ b/extensions/regex/extension.cpp @@ -29,8 +29,8 @@ * Version: $Id$ */ +#include #include "extension.h" - #include #include "pcre.h" #include "CRegEx.h" @@ -63,6 +63,16 @@ void RegexExtension::SDK_OnUnload() } +const char *RegexExtension::GetVersion() +{ + return SM_FULL_VERSION; +} + +const char *RegexExtension::GetDate() +{ + return SM_BUILD_TIMESTAMP; +} + static cell_t CompileRegex(IPluginContext *pCtx, const cell_t *params) { char *regex; diff --git a/extensions/regex/extension.h b/extensions/regex/extension.h index 681dade1..d90498e5 100644 --- a/extensions/regex/extension.h +++ b/extensions/regex/extension.h @@ -62,6 +62,9 @@ public: */ virtual void SDK_OnUnload(); + const char *GetVersion(); + const char *GetDate(); + /** * @brief This is called once all known extensions have been loaded. * Note: It is is a good idea to add natives here, if any are provided. diff --git a/extensions/regex/sdk/smsdk_config.h b/extensions/regex/sdk/smsdk_config.h index 719ed0c7..b7fc3df1 100644 --- a/extensions/regex/sdk/smsdk_config.h +++ b/extensions/regex/sdk/smsdk_config.h @@ -32,8 +32,6 @@ #ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ #define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ -#include "svn_version.h" - /** * @file smsdk_config.h * @brief Contains macros for configuring basic extension information. @@ -42,12 +40,12 @@ /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "Regex" #define SMEXT_CONF_DESCRIPTION "Provides regex natives for plugins" -#define SMEXT_CONF_VERSION SVN_FULL_VERSION +#define SMEXT_CONF_VERSION "" #define SMEXT_CONF_AUTHOR "AlliedModders LLC" #define SMEXT_CONF_URL "http://www.sourcemod.net/" #define SMEXT_CONF_LOGTAG "REGEX" #define SMEXT_CONF_LICENSE "GPL" -#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__ +#define SMEXT_CONF_DATESTRING "" /** * @brief Exposes plugin's main interface. diff --git a/extensions/regex/svn_version.h b/extensions/regex/svn_version.h deleted file mode 100644 index cdf22ca4..00000000 --- a/extensions/regex/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod Regular Expressions Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_REGEXEXT_VERSION_H_ -#define _INCLUDE_REGEXEXT_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_REGEXEXT_VERSION_H_ diff --git a/extensions/regex/svn_version.tpl b/extensions/regex/svn_version.tpl deleted file mode 100644 index 727d54ce..00000000 --- a/extensions/regex/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod Regular Expressions Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_REGEXEXT_VERSION_H_ -#define _INCLUDE_REGEXEXT_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_REGEXEXT_VERSION_H_ diff --git a/extensions/regex/version.rc b/extensions/regex/version.rc index 3f9ad39c..f072babb 100644 --- a/extensions/regex/version.rc +++ b/extensions/regex/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "SourceMod Regular Expression Extension" VALUE "FileDescription", "SourceMod Regular Expression Extension" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "SourceMod Regular Expression Extension" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod Regular Expression Extension" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/extensions/sdktools/extension.cpp b/extensions/sdktools/extension.cpp index 2e54f6b2..56c89118 100644 --- a/extensions/sdktools/extension.cpp +++ b/extensions/sdktools/extension.cpp @@ -29,6 +29,7 @@ * Version: $Id$ */ +#include #include "extension.h" #include #include "vcallbuilder.h" @@ -382,9 +383,14 @@ bool SDKTools::ProcessCommandTarget(cmd_target_info_t *info) return true; } -void SDKTools::OnClientPutInServer(int client) +const char *SDKTools::GetVersion() { - g_Hooks.OnClientPutInServer(client); + return SM_FULL_VERSION; +} + +const char *SDKTools::GetDate() +{ + return SM_BUILD_TIMESTAMP; } class SDKTools_API : public ISDKTools diff --git a/extensions/sdktools/extension.h b/extensions/sdktools/extension.h index 22e1d411..20f4e850 100644 --- a/extensions/sdktools/extension.h +++ b/extensions/sdktools/extension.h @@ -73,6 +73,8 @@ public: //public SDKExtension virtual bool QueryInterfaceDrop(SMInterface *pInterface); virtual void NotifyInterfaceDrop(SMInterface *pInterface); virtual void OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax); + const char *GetVersion(); + const char *GetDate(); public: #if defined SMEXT_CONF_METAMOD virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late); diff --git a/extensions/sdktools/sdk/smsdk_config.h b/extensions/sdktools/sdk/smsdk_config.h index e5f0de91..d845b34b 100644 --- a/extensions/sdktools/sdk/smsdk_config.h +++ b/extensions/sdktools/sdk/smsdk_config.h @@ -37,17 +37,15 @@ * @brief Contains macros for configuring basic extension information. */ -#include "svn_version.h" - /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "SDK Tools" #define SMEXT_CONF_DESCRIPTION "Source SDK Tools" -#define SMEXT_CONF_VERSION SVN_FULL_VERSION +#define SMEXT_CONF_VERSION "" #define SMEXT_CONF_AUTHOR "AlliedModders LLC" #define SMEXT_CONF_URL "http://www.sourcemod.net/" #define SMEXT_CONF_LOGTAG "SDKTOOLS" #define SMEXT_CONF_LICENSE "GPL" -#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__ +#define SMEXT_CONF_DATESTRING "" /** * @brief Exposes plugin's main interface. diff --git a/extensions/sdktools/svn_version.h b/extensions/sdktools/svn_version.h deleted file mode 100644 index 98b5e689..00000000 --- a/extensions/sdktools/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod SDKTools Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SDKTOOLS_VERSION_H_ -#define _INCLUDE_SDKTOOLS_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_SDKTOOLS_VERSION_H_ diff --git a/extensions/sdktools/svn_version.tpl b/extensions/sdktools/svn_version.tpl deleted file mode 100644 index e197ac1c..00000000 --- a/extensions/sdktools/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod SDKTools Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SDKTOOLS_VERSION_H_ -#define _INCLUDE_SDKTOOLS_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_SDKTOOLS_VERSION_H_ diff --git a/extensions/sdktools/version.rc b/extensions/sdktools/version.rc index ffd0c54d..fb6a62a3 100644 --- a/extensions/sdktools/version.rc +++ b/extensions/sdktools/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "SDKTools Extension" VALUE "FileDescription", "SourceMod SDKTools Extension" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "SourceMod SDKTools Extension" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod SDKTools Extension" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/extensions/sqlite/extension.cpp b/extensions/sqlite/extension.cpp index 960f86bf..829dc278 100644 --- a/extensions/sqlite/extension.cpp +++ b/extensions/sqlite/extension.cpp @@ -29,6 +29,7 @@ * Version: $Id$ */ +#include #include "extension.h" #include "driver/SqDriver.h" @@ -70,3 +71,14 @@ size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...) return len; } } + +const char *SqliteExt::GetVersion() +{ + return SM_FULL_VERSION; +} + +const char *SqliteExt::GetDate() +{ + return SM_BUILD_TIMESTAMP; +} + diff --git a/extensions/sqlite/extension.h b/extensions/sqlite/extension.h index c6f89db9..033060b6 100644 --- a/extensions/sqlite/extension.h +++ b/extensions/sqlite/extension.h @@ -62,6 +62,9 @@ public: */ virtual void SDK_OnUnload(); + const char *GetVersion(); + const char *GetDate(); + /** * @brief This is called once all known extensions have been loaded. * Note: It is is a good idea to add natives here, if any are provided. diff --git a/extensions/sqlite/sdk/smsdk_config.h b/extensions/sqlite/sdk/smsdk_config.h index 8911183b..2f6cb852 100644 --- a/extensions/sqlite/sdk/smsdk_config.h +++ b/extensions/sqlite/sdk/smsdk_config.h @@ -32,8 +32,6 @@ #ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ #define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ -#include "svn_version.h" - /** * @file smsdk_config.h * @brief Contains macros for configuring basic extension information. @@ -42,12 +40,12 @@ /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "SQLite" #define SMEXT_CONF_DESCRIPTION "SQLite Driver" -#define SMEXT_CONF_VERSION SVN_FULL_VERSION +#define SMEXT_CONF_VERSION "" #define SMEXT_CONF_AUTHOR "AlliedModders LLC" #define SMEXT_CONF_URL "http://www.sourcemod.net/" #define SMEXT_CONF_LOGTAG "SQLITE" #define SMEXT_CONF_LICENSE "GPL" -#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__ +#define SMEXT_CONF_DATESTRING "" /** * @brief Exposes plugin's main interface. diff --git a/extensions/sqlite/svn_version.h b/extensions/sqlite/svn_version.h deleted file mode 100644 index 1d81807e..00000000 --- a/extensions/sqlite/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod SQLite Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SQLITEEXT_VERSION_H_ -#define _INCLUDE_SQLITEEXT_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_SQLITEEXT_VERSION_H_ diff --git a/extensions/sqlite/svn_version.tpl b/extensions/sqlite/svn_version.tpl deleted file mode 100644 index 566c386c..00000000 --- a/extensions/sqlite/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod SQLite Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SQLITEEXT_VERSION_H_ -#define _INCLUDE_SQLITEEXT_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_SQLITEEXT_VERSION_H_ diff --git a/extensions/sqlite/version.rc b/extensions/sqlite/version.rc index 4d39e024..7c93cd4c 100644 --- a/extensions/sqlite/version.rc +++ b/extensions/sqlite/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "SQLite Extension" VALUE "FileDescription", "SourceMod SQLite Extension" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "SourceMod SQLite Extension" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod SQLite Extension" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/extensions/tf2/extension.cpp b/extensions/tf2/extension.cpp index a7a5f09f..bf644d35 100644 --- a/extensions/tf2/extension.cpp +++ b/extensions/tf2/extension.cpp @@ -29,6 +29,7 @@ * Version: $Id$ */ +#include #include "extension.h" #include "util.h" #include "RegNatives.h" @@ -115,6 +116,16 @@ bool TF2Tools::SDK_OnLoad(char *error, size_t maxlength, bool late) return true; } +const char *TF2Tools::GetVersion() +{ + return SM_FULL_VERSION; +} + +const char *TF2Tools::GetDate() +{ + return SM_BUILD_TIMESTAMP; +} + bool TF2Tools::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late) { GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER); diff --git a/extensions/tf2/extension.h b/extensions/tf2/extension.h index ac94d966..5fcf6cfe 100644 --- a/extensions/tf2/extension.h +++ b/extensions/tf2/extension.h @@ -86,6 +86,9 @@ public: //SDKExtension void NotifyInterfaceDrop(SMInterface *pInterface); bool QueryInterfaceDrop(SMInterface *pInterface); + + const char *GetVersion(); + const char *GetDate(); public: //ICommandTargetProcessor bool ProcessCommandTarget(cmd_target_info_t *info); public: //IConCommandBaseAccessor diff --git a/extensions/tf2/sdk/smsdk_config.h b/extensions/tf2/sdk/smsdk_config.h index fe342bd2..971372bc 100644 --- a/extensions/tf2/sdk/smsdk_config.h +++ b/extensions/tf2/sdk/smsdk_config.h @@ -37,17 +37,15 @@ * @brief Contains macros for configuring basic extension information. */ -#include "svn_version.h" - /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "TF2 Tools" #define SMEXT_CONF_DESCRIPTION "TF2 extended functionality" -#define SMEXT_CONF_VERSION SVN_FULL_VERSION +#define SMEXT_CONF_VERSION "" #define SMEXT_CONF_AUTHOR "AlliedModders LLC" #define SMEXT_CONF_URL "http://www.sourcemod.net/" #define SMEXT_CONF_LOGTAG "TF2" #define SMEXT_CONF_LICENSE "GPL" -#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__ +#define SMEXT_CONF_DATESTRING "" /** * @brief Exposes plugin's main interface. diff --git a/extensions/tf2/svn_version.h b/extensions/tf2/svn_version.h deleted file mode 100644 index 0b4343e8..00000000 --- a/extensions/tf2/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod Team Fortress 2 Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SDKTOOLS_VERSION_H_ -#define _INCLUDE_SDKTOOLS_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_SDKTOOLS_VERSION_H_ diff --git a/extensions/tf2/svn_version.tpl b/extensions/tf2/svn_version.tpl deleted file mode 100644 index bf0be39f..00000000 --- a/extensions/tf2/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod Team Fortress 2 Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SDKTOOLS_VERSION_H_ -#define _INCLUDE_SDKTOOLS_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_SDKTOOLS_VERSION_H_ diff --git a/extensions/tf2/version.rc b/extensions/tf2/version.rc index ba3aeace..9dcf930a 100644 --- a/extensions/tf2/version.rc +++ b/extensions/tf2/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "SourceMod TF2 Extension" VALUE "FileDescription", "SourceMod TF2 Extension" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "SourceMod TF2 Extension" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod TF2 Extension" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/extensions/topmenus/extension.cpp b/extensions/topmenus/extension.cpp index eb2e7579..784866c5 100644 --- a/extensions/topmenus/extension.cpp +++ b/extensions/topmenus/extension.cpp @@ -29,6 +29,7 @@ * Version: $Id$ */ +#include #include "extension.h" #include "TopMenuManager.h" #include "smn_topmenus.h" @@ -64,3 +65,13 @@ void TopMenuExtension::SDK_OnUnload() plsys->RemovePluginsListener(&g_TopMenus); } +const char *TopMenuExtension::GetVersion() +{ + return SM_FULL_VERSION; +} + +const char *TopMenuExtension::GetDate() +{ + return SM_BUILD_TIMESTAMP; +} + diff --git a/extensions/topmenus/extension.h b/extensions/topmenus/extension.h index f5d94769..f0ccea9e 100644 --- a/extensions/topmenus/extension.h +++ b/extensions/topmenus/extension.h @@ -61,6 +61,9 @@ public: * @brief This is called right before the extension is unloaded. */ virtual void SDK_OnUnload(); + + const char *GetVersion(); + const char *GetDate(); }; #endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_ diff --git a/extensions/topmenus/sdk/smsdk_config.h b/extensions/topmenus/sdk/smsdk_config.h index c119c5a7..140733b2 100644 --- a/extensions/topmenus/sdk/smsdk_config.h +++ b/extensions/topmenus/sdk/smsdk_config.h @@ -37,17 +37,15 @@ * @brief Contains macros for configuring basic extension information. */ -#include "svn_version.h" - /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "Top Menus" #define SMEXT_CONF_DESCRIPTION "Creates sorted nested menus" -#define SMEXT_CONF_VERSION SVN_FULL_VERSION +#define SMEXT_CONF_VERSION "" #define SMEXT_CONF_AUTHOR "AlliedModders" #define SMEXT_CONF_URL "http://www.sourcemod.net/" #define SMEXT_CONF_LOGTAG "TOPMENUS" #define SMEXT_CONF_LICENSE "GPLv3" -#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__ +#define SMEXT_CONF_DATESTRING "" /** * @brief Exposes plugin's main interface. diff --git a/extensions/topmenus/svn_version.h b/extensions/topmenus/svn_version.h deleted file mode 100644 index 5e705ae8..00000000 --- a/extensions/topmenus/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod TopMenus Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SQLITEEXT_VERSION_H_ -#define _INCLUDE_SQLITEEXT_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_SQLITEEXT_VERSION_H_ diff --git a/extensions/topmenus/svn_version.tpl b/extensions/topmenus/svn_version.tpl deleted file mode 100644 index 9405f327..00000000 --- a/extensions/topmenus/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod TopMenus Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SQLITEEXT_VERSION_H_ -#define _INCLUDE_SQLITEEXT_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_SQLITEEXT_VERSION_H_ diff --git a/extensions/topmenus/version.rc b/extensions/topmenus/version.rc index be0703e8..f86f2721 100644 --- a/extensions/topmenus/version.rc +++ b/extensions/topmenus/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "TopMenus Extension" VALUE "FileDescription", "SourceMod TopMenus Extension" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "SourceMod TopMenus Extension" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod TopMenus Extension" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/extensions/updater/Updater.cpp b/extensions/updater/Updater.cpp index 54572301..8fbae98e 100644 --- a/extensions/updater/Updater.cpp +++ b/extensions/updater/Updater.cpp @@ -29,6 +29,7 @@ * Version: $Id$ */ +#include #include #include "extension.h" #include "Updater.h" @@ -355,7 +356,7 @@ void UpdateReader::PerformUpdate(const char *url) xfer = webternet->CreateSession(); xfer->SetFailOnHTTPError(true); - form->AddString("version", SVN_FULL_VERSION); + form->AddString("version", SM_FULL_VERSION); form->AddString("build", SM_BUILD_UNIQUEID); unsigned int num_files = 0; @@ -401,3 +402,4 @@ UpdatePart *UpdateReader::DetachParts() return first; } + diff --git a/extensions/updater/extension.cpp b/extensions/updater/extension.cpp index f58339e8..f9258c44 100644 --- a/extensions/updater/extension.cpp +++ b/extensions/updater/extension.cpp @@ -29,6 +29,7 @@ * Version: $Id$ */ +#include #include #include #include @@ -245,3 +246,14 @@ void AddUpdateError(const char *fmt, ...) update_errors.push_back(new String(buffer)); } + +const char *SmUpdater::GetVersion() +{ + return SM_FULL_VERSION; +} + +const char *SmUpdater::GetDate() +{ + return SM_BUILD_TIMESTAMP; +} + diff --git a/extensions/updater/extension.h b/extensions/updater/extension.h index 3029c994..fb772a5b 100644 --- a/extensions/updater/extension.h +++ b/extensions/updater/extension.h @@ -54,6 +54,8 @@ public: /* SDKExtension */ public: /* IExtension */ bool QueryInterfaceDrop(SMInterface *pInterface); void NotifyInterfaceDrop(SMInterface *pInterface); + const char *GetVersion(); + const char *GetDate(); public: /* IThread */ void RunThread(IThreadHandle *pHandle); void OnTerminate(IThreadHandle *pHandle, bool cancel); diff --git a/extensions/updater/sdk/smsdk_config.h b/extensions/updater/sdk/smsdk_config.h index fda8eb95..900a70f4 100644 --- a/extensions/updater/sdk/smsdk_config.h +++ b/extensions/updater/sdk/smsdk_config.h @@ -31,7 +31,6 @@ #ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ #define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ -#include "svn_version.h" /** * @file smsdk_config.h @@ -41,12 +40,12 @@ /* Basic information exposed publicly */ #define SMEXT_CONF_NAME "Automatic Updater" #define SMEXT_CONF_DESCRIPTION "Updates SourceMod gamedata files" -#define SMEXT_CONF_VERSION SVN_FULL_VERSION +#define SMEXT_CONF_VERSION "" #define SMEXT_CONF_AUTHOR "AlliedModders LLC" #define SMEXT_CONF_URL "http://www.sourcemod.net/" #define SMEXT_CONF_LOGTAG "UPDATER" #define SMEXT_CONF_LICENSE "GPL" -#define SMEXT_CONF_DATESTRING __DATE__ +#define SMEXT_CONF_DATESTRING "" /** * @brief Exposes plugin's main interface. diff --git a/extensions/updater/svn_version.h b/extensions/updater/svn_version.h deleted file mode 100644 index f2e4eee6..00000000 --- a/extensions/updater/svn_version.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod GeoIP Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_UPDATER_VERSION_H_ -#define _INCLUDE_UPDATER_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_UPDATER_VERSION_H_ diff --git a/extensions/updater/svn_version.tpl b/extensions/updater/svn_version.tpl deleted file mode 100644 index b7c5b638..00000000 --- a/extensions/updater/svn_version.tpl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod GeoIP Extension - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_UPDATER_VERSION_H_ -#define _INCLUDE_UPDATER_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_UPDATER_VERSION_H_ diff --git a/extensions/updater/version.rc b/extensions/updater/version.rc index 4cff2cfb..2f1fba61 100644 --- a/extensions/updater/version.rc +++ b/extensions/updater/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "Automatic Updater" VALUE "FileDescription", "SourceMod Automatic Updater" - VALUE "FileVersion", SVN_FILE_VERSION + VALUE "FileVersion", SM_FILE_VERSION VALUE "InternalName", "SourceMod Updater Extension" VALUE "LegalCopyright", "Copyright (c) 2004-2009, AlliedModders LLC" VALUE "OriginalFilename", BINARY_NAME VALUE "ProductName", "SourceMod Updater Extension" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/loader/svn_version.h b/loader/svn_version.h deleted file mode 100644 index 4f2a1193..00000000 --- a/loader/svn_version.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SOURCEMOD_VERSION_H_ -#define _INCLUDE_SOURCEMOD_VERSION_H_ - -/** - * @file Contains SourceMod version information. - */ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_SOURCEMOD_VERSION_H_ diff --git a/loader/svn_version.tpl b/loader/svn_version.tpl deleted file mode 100644 index 6b28661a..00000000 --- a/loader/svn_version.tpl +++ /dev/null @@ -1,48 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -/** - * Autogenerated by build scripts - */ - -#ifndef _INCLUDE_SOURCEMOD_VERSION_H_ -#define _INCLUDE_SOURCEMOD_VERSION_H_ - -/** - * @file Contains SourceMod version information. - */ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_SOURCEMOD_VERSION_H_ diff --git a/loader/version.rc b/loader/version.rc index ebd54169..f21a42a1 100644 --- a/loader/version.rc +++ b/loader/version.rc @@ -9,7 +9,7 @@ // #include "winres.h" -#include "svn_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -47,12 +47,12 @@ BEGIN BEGIN VALUE "Comments", "SourceMod Loader" VALUE "FileDescription", "SourceMod Loader" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "sourcemod" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", "sourcemod_mm.dll" VALUE "ProductName", "SourceMod Loader" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/modules.versions b/modules.versions deleted file mode 100644 index fd00b3d2..00000000 --- a/modules.versions +++ /dev/null @@ -1,90 +0,0 @@ -[PRODUCT] -major = 1 -minor = 3 -revision = 0 - -[core] -folder = core -in = sm_version.tpl -out = sm_version.h - -[plugins] -folder = plugins/include -in = version.tpl -out = version.inc - -[jitx86] -folder = sourcepawn/jit -in = jit_version.tpl -out = jit_version.h - -[geoip] -folder = extensions/geoip -in = svn_version.tpl -out = svn_version.h - -[compiler] -folder = sourcepawn/compiler -in = svn_version.tpl -out = svn_version.h - -[bintools] -folder = extensions/bintools -in = svn_version.tpl -out = svn_version.h - -[sdktools] -folder = extensions/sdktools -in = svn_version.tpl -out = svn_version.h - -[mysql] -folder = extensions/mysql -in = svn_version.tpl -out = svn_version.h - -[sqlite] -folder = extensions/sqlite -in = svn_version.tpl -out = svn_version.h - -[cstrike] -folder = extensions/cstrike -in = svn_version.tpl -out = svn_version.h - -[loader] -folder = loader -in = svn_version.tpl -out = svn_version.h - -[topmenus] -folder = extensions/topmenus -in = svn_version.tpl -out = svn_version.h - -[regex] -folder = extensions/regex -in = svn_version.tpl -out = svn_version.h - -[tf2] -folder = extensions/tf2 -in = svn_version.tpl -out = svn_version.h - -[clientprefs] -folder = extensions/clientprefs -in = svn_version.tpl -out = svn_version.h - -[curl] -folder = extensions/curl -in = svn_version.tpl -out = svn_version.h - -[updater] -folder = extensions/updater -in = svn_version.tpl -out = svn_version.h - diff --git a/product.version b/product.version index f0bb29e7..b6bb93f7 100644 --- a/product.version +++ b/product.version @@ -1 +1 @@ -1.3.0 +1.3.0-dev diff --git a/sourcepawn/compiler/libpawnc.rc b/sourcepawn/compiler/libpawnc.rc index f84f9c93..e47c3306 100644 --- a/sourcepawn/compiler/libpawnc.rc +++ b/sourcepawn/compiler/libpawnc.rc @@ -4,7 +4,7 @@ #else # include #endif -#include "svn_version.h" +#include AppIcon ICON "pawn.ico" @@ -19,8 +19,8 @@ AppIcon ICON "pawn.ico" #define VERSIONPRODUCTNAME "smcomp\0" VS_VERSION_INFO VERSIONINFO -FILEVERSION SVN_FILE_VERSION -PRODUCTVERSION SVN_FILE_VERSION +FILEVERSION SM_FILE_VERSION +PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x0000003FL FILEFLAGS 0 #if defined(WIN32) @@ -36,12 +36,12 @@ BEGIN BEGIN VALUE "CompanyName", "(C)1998-2006 ITB CompuPhase, AlliedModders LLC\0" VALUE "FileDescription", VERSIONDESCRIPTION - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", VERSIONNAME VALUE "LegalCopyright", "(C)1998-2006 ITB CompuPhase, AlliedModders LLC\0" VALUE "OriginalFilename", VERSIONNAME VALUE "ProductName", VERSIONPRODUCTNAME - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END diff --git a/sourcepawn/compiler/pawncc.c b/sourcepawn/compiler/pawncc.c index 5701ca49..8d591a26 100644 --- a/sourcepawn/compiler/pawncc.c +++ b/sourcepawn/compiler/pawncc.c @@ -8,6 +8,11 @@ #include "amxdbg.h" #include "osdefs.h" #include "zlib/zlib.h" +#if defined LINUX +#include +#elif defined WIN32 +#include +#endif enum FileSections { diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index bc7e6cb4..a92688b2 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -38,6 +38,7 @@ #if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ #include #include /* from BinReloc, see www.autopackage.org */ + #include #endif #if defined FORTIFY @@ -65,7 +66,7 @@ #include "lstring.h" #include "sc.h" -#include "svn_version.h" +#include #include "sctracker.h" #define VERSION_STR "3.2.3636" #define VERSION_INT 0x0302 @@ -172,7 +173,7 @@ static int *wqptr; /* pointer to next entry */ static HWND hwndFinish = 0; #endif -SC_VDECL int glbstringread = 0; +int glbstringread = 0; char g_tmpfile[_MAX_PATH] = {0}; /* "main" of the compiler @@ -805,24 +806,17 @@ SC_FUNC void set_extension(char *filename,char *extension,int force) strcat(filename,extension); } -static const char *option_value(const char *optptr,char **argv,int argc,int *arg) +static const char *option_value(const char *optptr) { - const char *ptr; - - if (*(optptr+1)=='=' || *(optptr+1)==':') - ptr=optptr+2; - else - ptr=optptr+1; - - if (strlen(ptr)==0 && *arg!=argc-1) - ptr=argv[++*arg]; - - return ptr; + return (*(optptr+1)=='=' || *(optptr+1)==':') ? optptr+2 : optptr+1; } -static int toggle_option(const char *optptr,int option) +static int toggle_option(const char *optptr, int option) { - switch ((*(optptr+1)=='=' || *(optptr+1)==':') ? *(optptr+2) : *(optptr+1)) { + switch (*option_value(optptr)) { + case '\0': + option=!option; + break; case '-': option=FALSE; break; @@ -860,7 +854,7 @@ static void parseoptions(int argc,char **argv,char *oname,char *ename,char *pnam ptr=&argv[arg][1]; switch (*ptr) { case 'A': - i=atoi(option_value(ptr,argv,argc,&arg)); + i=atoi(option_value(ptr)); if ((i % sizeof(cell))==0) sc_dataalign=i; else @@ -883,11 +877,11 @@ static void parseoptions(int argc,char **argv,char *oname,char *ename,char *pnam break; #endif case 'c': - strlcpy(codepage,option_value(ptr,argv,argc,&arg),MAXCODEPAGE); /* set name of codepage */ + strlcpy(codepage,option_value(ptr),MAXCODEPAGE); /* set name of codepage */ break; #if defined dos_setdrive case 'D': /* set active directory */ - ptr=option_value(ptr,argv,argc,&arg); + ptr=option_value(ptr); if (ptr[1]==':') dos_setdrive(toupper(*ptr)-'A'+1); /* set active drive */ chdir(ptr); @@ -895,7 +889,7 @@ static void parseoptions(int argc,char **argv,char *oname,char *ename,char *pnam #endif #if 0 /* not allowed to change for SourceMod */ case 'd': - switch (*option_value(ptr,argv,argc,&arg)) { + switch (*option_value(ptr)) { case '0': sc_debug=0; break; @@ -916,17 +910,17 @@ static void parseoptions(int argc,char **argv,char *oname,char *ename,char *pnam break; #endif case 'e': - strlcpy(ename,option_value(ptr,argv,argc,&arg),_MAX_PATH); /* set name of error file */ + strlcpy(ename,option_value(ptr),_MAX_PATH); /* set name of error file */ break; #if defined __WIN32__ || defined _WIN32 || defined _Windows case 'H': - hwndFinish=(HWND)atoi(option_value(ptr,argv,argc,&arg)); + hwndFinish=(HWND)atoi(option_value(ptr)); if (!IsWindow(hwndFinish)) hwndFinish=(HWND)0; break; #endif case 'i': - strlcpy(str,option_value(ptr,argv,argc,&arg),sizeof str); /* set name of include directory */ + strlcpy(str,option_value(ptr),sizeof str); /* set name of include directory */ i=strlen(str); if (i>0) { if (str[i-1]!=DIRSEP_CHAR) { @@ -942,22 +936,21 @@ static void parseoptions(int argc,char **argv,char *oname,char *ename,char *pnam sc_listing=TRUE; /* skip second pass & code generation */ break; case 'o': - strlcpy(oname,option_value(ptr,argv,argc,&arg),_MAX_PATH); /* set name of (binary) output file */ + strlcpy(oname,option_value(ptr),_MAX_PATH); /* set name of (binary) output file */ break; case 'O': - pc_optimize=*option_value(ptr,argv,argc,&arg) - '0'; + pc_optimize=*option_value(ptr) - '0'; if (pc_optimize=sOPTIMIZE_NUMBER || pc_optimize==sOPTIMIZE_NOMACRO) about(); break; case 'p': - strlcpy(pname,option_value(ptr,argv,argc,&arg),_MAX_PATH); /* set name of implicit include file */ + strlcpy(pname,option_value(ptr),_MAX_PATH); /* set name of implicit include file */ break; #if !defined SC_LIGHT case 'r': - strlcpy(rname,option_value(ptr,argv,argc,&arg),_MAX_PATH); /* set name of report file */ + strlcpy(rname,option_value(ptr),_MAX_PATH); /* set name of report file */ sc_makereport=TRUE; -#if 0 /* dead code due to option_value change to allow spaces between option and value */ - if (strlen(rname)>0) { + if (strlen(rname)>0) { set_extension(rname,".xml",FALSE); } else if ((name=get_sourcefile(0))!=NULL) { assert(strlen(rname)==0); @@ -970,29 +963,28 @@ static void parseoptions(int argc,char **argv,char *oname,char *ename,char *pnam strcpy(rname,ptr); set_extension(rname,".xml",TRUE); } /* if */ -#endif break; #endif case 'S': - i=atoi(option_value(ptr,argv,argc,&arg)); + i=atoi(option_value(ptr)); if (i>32) pc_stksize=(cell)i; /* stack size has minimum size */ else about(); break; case 's': - skipinput=atoi(option_value(ptr,argv,argc,&arg)); + skipinput=atoi(option_value(ptr)); break; case 't': - sc_tabsize=atoi(option_value(ptr,argv,argc,&arg)); + sc_tabsize=atoi(option_value(ptr)); break; case 'v': - verbosity= isdigit(*option_value(ptr,argv,argc,&arg)) ? atoi(option_value(ptr,argv,argc,&arg)) : 2; + verbosity= isdigit(*option_value(ptr)) ? atoi(option_value(ptr)) : 2; if (sc_asmfile && verbosity>1) verbosity=1; break; case 'w': - i=(int)strtol(option_value(ptr,argv,argc,&arg),(char **)&ptr,10); + i=(int)strtol(option_value(ptr),(char **)&ptr,10); if (*ptr=='-') pc_enablewarning(i,0); else if (*ptr=='+') @@ -1002,13 +994,13 @@ static void parseoptions(int argc,char **argv,char *oname,char *ename,char *pnam break; case 'X': if (*(ptr+1)=='D') { - i=atoi(option_value(ptr+1,argv,argc,&arg)); + i=atoi(option_value(ptr+1)); if (i>64) pc_amxram=(cell)i; /* abstract machine data/stack has minimum size */ else about(); } else { - i=atoi(option_value(ptr,argv,argc,&arg)); + i=atoi(option_value(ptr)); if (i>64) pc_amxlimit=(cell)i;/* abstract machine has minimum size */ else @@ -1235,8 +1227,8 @@ static void setconfig(char *root) static void setcaption(void) { - pc_printf("SourcePawn Compiler " SVN_FULL_VERSION "\n"); - pc_printf("Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2009 AlliedModders, LLC\n\n"); + pc_printf("SourcePawn Compiler " SM_FULL_VERSION "\n"); + pc_printf("Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC\n\n"); } static void about(void) @@ -1276,7 +1268,7 @@ static void about(void) pc_printf(" 2 full optimizations\n"); pc_printf(" -p set name of \"prefix\" file\n"); #if !defined SC_LIGHT - pc_printf(" -r write cross reference report to console or to specified file\n"); + pc_printf(" -r[name] write cross reference report to console or to specified file\n"); #endif pc_printf(" -S stack/heap size in cells (default=%d)\n",(int)pc_stksize); pc_printf(" -s skip lines from the input file\n"); @@ -1287,7 +1279,7 @@ static void about(void) pc_printf(" -XD abstract machine data/stack size limit in bytes\n"); pc_printf(" -\\ use '\\' for escape characters\n"); pc_printf(" -^ use '^' for escape characters\n"); - pc_printf(" -;<+/-> require a semicolon to end each statement (default=%c)\n", sc_needsemicolon ? '+' : '-'); + pc_printf(" -;[+/-] require a semicolon to end each statement (default=%c)\n", sc_needsemicolon ? '+' : '-'); #if 0 /* not allowed in SourceMod */ pc_printf(" -([+/-] require parantheses for function invocation (default=%c)\n", optproccall ? '-' : '+'); #endif @@ -1298,8 +1290,8 @@ static void about(void) pc_printf("equivalent.\n"); #endif pc_printf("\nOptions with a value may optionally separate the value from the option letter\n"); - pc_printf("with a colon (\":\"), an equal sign (\"=\"), or a space (\" \"). That is, the options \"-d0\", \"-d=0\",\n"); - pc_printf("\"-d:0\", and \"-d 0\" are all equivalent. \"-;\" is an exception to this and cannot use a space.\n"); + pc_printf("with a colon (\":\") or an equal sign (\"=\"). That is, the options \"-d0\", \"-d=0\"\n"); + pc_printf("and \"-d:0\" are all equivalent.\n"); } /* if */ norun = 1; longjmp(errbuf,3); /* user abort */ diff --git a/sourcepawn/compiler/sc2.c b/sourcepawn/compiler/sc2.c index cb9a90ba..21bcccd3 100644 --- a/sourcepawn/compiler/sc2.c +++ b/sourcepawn/compiler/sc2.c @@ -58,6 +58,13 @@ static short skiplevel; /* level at which we started skipping (including nested static unsigned char term_expr[] = ""; static int listline=-1; /* "current line" for the list file */ +#if defined __GNUC__ +static double pow10(double d) +{ + return pow(10, d); +} +#endif + /* pushstk & popstk * @@ -602,26 +609,6 @@ static int htoi(cell *val,const unsigned char *curptr) return (int)(ptr-curptr); } -#if defined __GNUC__ -static double pow10(int value) -{ - double res=1.0; - while (value>=4) { - res*=10000.0; - value-=5; - } /* while */ - while (value>=2) { - res*=100.0; - value-=2; - } /* while */ - while (value>=1) { - res*=10.0; - value-=1; - } /* while */ - return res; -} -#endif - /* ftoi * * Attempts to interpret a numeric symbol as a rational number, either as @@ -954,7 +941,7 @@ static int command(void) if (skiplevel==iflevel) preproc_expr(&val,NULL); /* get, but ignore the expression */ else - lptr=strchr(lptr,'\0'); + lptr=(unsigned char*)strchr((char*)lptr,'\0'); } /* if */ } else { /* previous conditions were all FALSE */ @@ -965,7 +952,7 @@ static int command(void) if (skiplevel==iflevel) { preproc_expr(&val,NULL); /* get value (or 0 on error) */ } else { - lptr=strchr(lptr,'\0'); + lptr=(unsigned char*)strchr((char*)lptr,'\0'); val=0; } /* if */ ifstack[iflevel-1]=(char)(val ? PARSEMODE : SKIPMODE); diff --git a/sourcepawn/compiler/sclinux.h b/sourcepawn/compiler/sclinux.h index 868539ea..a3b15b4b 100644 --- a/sourcepawn/compiler/sclinux.h +++ b/sourcepawn/compiler/sclinux.h @@ -16,7 +16,6 @@ */ #include "getch.h" -#define stricmp(a,b) strcasecmp(a,b) #define strnicmp(a,b,c) strncasecmp(a,b,c) /* diff --git a/sourcepawn/compiler/svn_version.h b/sourcepawn/compiler/svn_version.h deleted file mode 100644 index 42d57b8e..00000000 --- a/sourcepawn/compiler/svn_version.h +++ /dev/null @@ -1,27 +0,0 @@ -/** - * vim: set ts=4 : - * =============================================================== - * SourceMod (C)2004-2008 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 SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_SOURCEMOD_VERSION_H_ diff --git a/sourcepawn/compiler/svn_version.tpl b/sourcepawn/compiler/svn_version.tpl deleted file mode 100644 index 902b4393..00000000 --- a/sourcepawn/compiler/svn_version.tpl +++ /dev/null @@ -1,27 +0,0 @@ -/** - * vim: set ts=4 : - * =============================================================== - * SourceMod (C)2004-2008 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 SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_SOURCEMOD_VERSION_H_ diff --git a/sourcepawn/compiler/zlib/crc32.c b/sourcepawn/compiler/zlib/crc32.c index 32814c20..5e8c44be 100644 --- a/sourcepawn/compiler/zlib/crc32.c +++ b/sourcepawn/compiler/zlib/crc32.c @@ -19,6 +19,7 @@ one thread to use crc32(). */ +#include #ifdef MAKECRCH # include # ifndef DYNAMIC_CRC_TABLE diff --git a/sourcepawn/compiler/zlib/deflate.c b/sourcepawn/compiler/zlib/deflate.c index 529f716b..f58dee25 100644 --- a/sourcepawn/compiler/zlib/deflate.c +++ b/sourcepawn/compiler/zlib/deflate.c @@ -49,6 +49,7 @@ /* @(#) $Id$ */ +#include #include "deflate.h" const char deflate_copyright[] = diff --git a/sourcepawn/compiler/zlib/infback.c b/sourcepawn/compiler/zlib/infback.c index 1e03e1ba..0056928e 100644 --- a/sourcepawn/compiler/zlib/infback.c +++ b/sourcepawn/compiler/zlib/infback.c @@ -10,6 +10,7 @@ inflate_fast() can be used with either inflate.c or infback.c. */ +#include #include "zutil.h" #include "inftrees.h" #include "inflate.h" diff --git a/sourcepawn/compiler/zlib/inffast.c b/sourcepawn/compiler/zlib/inffast.c index fa31cad9..20ef523d 100644 --- a/sourcepawn/compiler/zlib/inffast.c +++ b/sourcepawn/compiler/zlib/inffast.c @@ -3,6 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +#include #include "zutil.h" #include "inftrees.h" #include "inflate.h" diff --git a/sourcepawn/compiler/zlib/inflate.c b/sourcepawn/compiler/zlib/inflate.c index 33ea9029..f4606b62 100644 --- a/sourcepawn/compiler/zlib/inflate.c +++ b/sourcepawn/compiler/zlib/inflate.c @@ -80,6 +80,7 @@ * The history for versions after 1.2.0 are in ChangeLog in zlib distribution. */ +#include #include "zutil.h" #include "inftrees.h" #include "inflate.h" diff --git a/sourcepawn/compiler/zlib/inftrees.c b/sourcepawn/compiler/zlib/inftrees.c index 38ded81c..a1406443 100644 --- a/sourcepawn/compiler/zlib/inftrees.c +++ b/sourcepawn/compiler/zlib/inftrees.c @@ -3,6 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +#include #include "zutil.h" #include "inftrees.h" diff --git a/sourcepawn/compiler/zlib/trees.c b/sourcepawn/compiler/zlib/trees.c index 7a048028..6ca02864 100644 --- a/sourcepawn/compiler/zlib/trees.c +++ b/sourcepawn/compiler/zlib/trees.c @@ -33,6 +33,7 @@ /* #define GEN_TREES_H */ +#include #include "deflate.h" #ifdef DEBUG diff --git a/sourcepawn/compiler/zlib/zutil.c b/sourcepawn/compiler/zlib/zutil.c index 0f4bd787..56e552f4 100644 --- a/sourcepawn/compiler/zlib/zutil.c +++ b/sourcepawn/compiler/zlib/zutil.c @@ -5,6 +5,7 @@ /* @(#) $Id$ */ +#include #include "zutil.h" #ifndef NO_DUMMY_DECL diff --git a/sourcepawn/jit/engine2.cpp b/sourcepawn/jit/engine2.cpp index ad4aa9a8..9044aae6 100644 --- a/sourcepawn/jit/engine2.cpp +++ b/sourcepawn/jit/engine2.cpp @@ -1,9 +1,9 @@ +#include #include #include #include #include "engine2.h" #include "x86/jit_x86.h" -#include "jit_version.h" #include "zlib/zlib.h" #include "BaseRuntime.h" #include "sp_vm_engine.h" @@ -149,7 +149,7 @@ const char *SourcePawnEngine2::GetEngineName() const char *SourcePawnEngine2::GetVersionString() { - return SVN_FULL_VERSION; + return SM_FULL_VERSION; } IProfiler *SourcePawnEngine2::GetProfiler() diff --git a/sourcepawn/jit/jit_version.h b/sourcepawn/jit/jit_version.h deleted file mode 100644 index 5bd945d1..00000000 --- a/sourcepawn/jit/jit_version.h +++ /dev/null @@ -1,40 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_JIT_VERSION_H_ -#define _INCLUDE_JIT_VERSION_H_ - -#define SM_BUILD_STRING "-dev" -#define SM_BUILD_UNIQUEID "2650:5d34bc3edbfa" SM_BUILD_STRING -#define SVN_FULL_VERSION "1.3.0" SM_BUILD_STRING -#define SVN_FILE_VERSION 1,3,0,0 - -#endif //_INCLUDE_JIT_VERSION_H_ diff --git a/sourcepawn/jit/jit_version.tpl b/sourcepawn/jit/jit_version.tpl deleted file mode 100644 index a154d6d4..00000000 --- a/sourcepawn/jit/jit_version.tpl +++ /dev/null @@ -1,40 +0,0 @@ -/** - * vim: set ts=4 : - * ============================================================================= - * SourceMod - * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. - * ============================================================================= - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, version 3.0, as published by the - * Free Software Foundation. - * - * 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, see . - * - * As a special exception, AlliedModders LLC gives you permission to link the - * code of this program (as well as its derivative works) to "Half-Life 2," the - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software - * by the Valve Corporation. You must obey the GNU General Public License in - * all respects for all other code used. Additionally, AlliedModders LLC grants - * this exception to all derivative works. AlliedModders LLC defines further - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), - * or . - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_JIT_VERSION_H_ -#define _INCLUDE_JIT_VERSION_H_ - -#define SM_BUILD_STRING "$BUILD_STRING$" -#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING -#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING -#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0 - -#endif //_INCLUDE_JIT_VERSION_H_ diff --git a/sourcepawn/jit/version.rc b/sourcepawn/jit/version.rc index 5aa4d331..5e05f84e 100644 --- a/sourcepawn/jit/version.rc +++ b/sourcepawn/jit/version.rc @@ -8,7 +8,7 @@ // #include "winres.h" -#include "jit_version.h" +#include ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION SVN_FILE_VERSION - PRODUCTVERSION SVN_FILE_VERSION + FILEVERSION SM_FILE_VERSION + PRODUCTVERSION SM_FILE_VERSION FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -46,12 +46,12 @@ BEGIN BEGIN VALUE "Comments", "SourcePawn JIT" VALUE "FileDescription", "SourcePawn JIT/Virtual Machine" - VALUE "FileVersion", SVN_FULL_VERSION + VALUE "FileVersion", SM_FULL_VERSION VALUE "InternalName", "sourcemod" VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC" VALUE "OriginalFilename", "sourcepawn.jit.x86.dll" VALUE "ProductName", "SourcePawn JIT" - VALUE "ProductVersion", SVN_FULL_VERSION + VALUE "ProductVersion", SM_FULL_VERSION END END BLOCK "VarFileInfo" diff --git a/sourcepawn/jit/x86/jit_x86.cpp b/sourcepawn/jit/x86/jit_x86.cpp index 27ad9e09..60e7a933 100644 --- a/sourcepawn/jit/x86/jit_x86.cpp +++ b/sourcepawn/jit/x86/jit_x86.cpp @@ -35,7 +35,6 @@ #include "jit_x86.h" #include "opcode_helpers.h" #include -#include "../jit_version.h" #include "../sp_vm_engine.h" #include "../engine2.h" #include "../BaseRuntime.h" diff --git a/sourcepawn/jit/zlib/crc32.c b/sourcepawn/jit/zlib/crc32.c index 32814c20..5e8c44be 100644 --- a/sourcepawn/jit/zlib/crc32.c +++ b/sourcepawn/jit/zlib/crc32.c @@ -19,6 +19,7 @@ one thread to use crc32(). */ +#include #ifdef MAKECRCH # include # ifndef DYNAMIC_CRC_TABLE diff --git a/sourcepawn/jit/zlib/deflate.c b/sourcepawn/jit/zlib/deflate.c index 529f716b..f58dee25 100644 --- a/sourcepawn/jit/zlib/deflate.c +++ b/sourcepawn/jit/zlib/deflate.c @@ -49,6 +49,7 @@ /* @(#) $Id$ */ +#include #include "deflate.h" const char deflate_copyright[] = diff --git a/sourcepawn/jit/zlib/infback.c b/sourcepawn/jit/zlib/infback.c index 1e03e1ba..0056928e 100644 --- a/sourcepawn/jit/zlib/infback.c +++ b/sourcepawn/jit/zlib/infback.c @@ -10,6 +10,7 @@ inflate_fast() can be used with either inflate.c or infback.c. */ +#include #include "zutil.h" #include "inftrees.h" #include "inflate.h" diff --git a/sourcepawn/jit/zlib/inffast.c b/sourcepawn/jit/zlib/inffast.c index fa31cad9..20ef523d 100644 --- a/sourcepawn/jit/zlib/inffast.c +++ b/sourcepawn/jit/zlib/inffast.c @@ -3,6 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +#include #include "zutil.h" #include "inftrees.h" #include "inflate.h" diff --git a/sourcepawn/jit/zlib/inflate.c b/sourcepawn/jit/zlib/inflate.c index 33ea9029..f4606b62 100644 --- a/sourcepawn/jit/zlib/inflate.c +++ b/sourcepawn/jit/zlib/inflate.c @@ -80,6 +80,7 @@ * The history for versions after 1.2.0 are in ChangeLog in zlib distribution. */ +#include #include "zutil.h" #include "inftrees.h" #include "inflate.h" diff --git a/sourcepawn/jit/zlib/inftrees.c b/sourcepawn/jit/zlib/inftrees.c index 38ded81c..a1406443 100644 --- a/sourcepawn/jit/zlib/inftrees.c +++ b/sourcepawn/jit/zlib/inftrees.c @@ -3,6 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +#include #include "zutil.h" #include "inftrees.h" diff --git a/sourcepawn/jit/zlib/trees.c b/sourcepawn/jit/zlib/trees.c index 7a048028..6ca02864 100644 --- a/sourcepawn/jit/zlib/trees.c +++ b/sourcepawn/jit/zlib/trees.c @@ -33,6 +33,7 @@ /* #define GEN_TREES_H */ +#include #include "deflate.h" #ifdef DEBUG diff --git a/sourcepawn/jit/zlib/zutil.c b/sourcepawn/jit/zlib/zutil.c index 0f4bd787..56e552f4 100644 --- a/sourcepawn/jit/zlib/zutil.c +++ b/sourcepawn/jit/zlib/zutil.c @@ -5,6 +5,7 @@ /* @(#) $Id$ */ +#include #include "zutil.h" #ifndef NO_DUMMY_DECL diff --git a/tools/buildbot/bootstrap.pl b/tools/buildbot/bootstrap.pl index 9cb2b585..eab7c803 100755 --- a/tools/buildbot/bootstrap.pl +++ b/tools/buildbot/bootstrap.pl @@ -1,4 +1,5 @@ #!/usr/bin/perl +# vim: set ts=2 sw=2 tw=99 noet: use strict; use Cwd; @@ -9,88 +10,62 @@ chdir($path); require 'helpers.pm'; -chdir(Build::PathFormat('../builder')); -if ($^O eq "linux") -{ - Build::Command('make clean'); - Build::Command('make'); -} -else -{ - Build::Command('"' . $ENV{'VC9BUILDER'} . '" /rebuild builder.csproj Release'); - Build::Command('move ' . Build::PathFormat('bin/Release/builder.exe') . ' .'); -} - -die "Unable to build builder tool!\n" unless -e 'builder.exe'; - -#Go back to main source dir. -chdir(Build::PathFormat('../..')); +#Go back above build dir +chdir(Build::PathFormat('../../..')); #Get the source path. our ($root) = getcwd(); +my $reconf = 0; + #Create output folder if it doesn't exist. if (!(-d 'OUTPUT')) { - mkdir('OUTPUT') or die("Failed to create output folder: $!\n"); + mkdir('OUTPUT') or die("Failed to create output folder: $!\n"); + $reconf = 1; +} else { + if (-f 'OUTPUT/sentinel') { + my @s = stat('OUTPUT/sentinel'); + my $mtime = $s[9]; + my @files = ('build/pushbuild.txt', 'build/AMBuildScript', 'build/product.version'); + my ($i); + for ($i = 0; $i <= $#files; $i++) { + if (IsNewer($files[$i], $mtime)) { + $reconf = 1; + last; + } + } + } else { + $reconf = 1; + } } -#Write the configuration file. -open(CONF, '>build.cfg') or die("Failed to write build.cfg: $!\n"); -print CONF "OutputBase = " . Build::PathFormat($root . '/OUTPUT') . "\n"; -print CONF "SourceBase = $root\n"; -if ($^O eq "linux") -{ - print CONF "BuilderPath = /usr/bin/make\n"; -} -else -{ - print CONF "BuilderPath = " . $ENV{'VC9BUILDER'} . "\n"; - print CONF "PDBLog = $root\\OUTPUT\\pdblog.txt\n"; -} -close(CONF); - -#Do the annoying revision bumping. -#Linux needs some help here. -if ($^O eq "linux") -{ - Build::Command("flip -u modules.versions"); - Build::Command("flip -u tools/versionchanger.pl"); - Build::Command("chmod +x tools/versionchanger.pl"); -} -my ($build_type); -$build_type = Build::GetBuildType(Build::PathFormat('tools/buildbot/build_type')); -if ($build_type == "dev") -{ - Build::Command(Build::PathFormat('tools/versionchanger.pl') . ' --buildstring="-dev"'); +if ($reconf) { + chdir('OUTPUT'); + my ($result); + print "Attempting to reconfigure...\n"; + if ($^O eq "linux") { + $result = `CC=gcc-4.1 CXX=gcc-4.1 python3.1 ../build/configure.py --enable-optimize`; + } else { + $result = `C:\\Python31\\Python.exe ..\\build\\configure.py --enable-optimize`; + } + print "$result\n"; + if ($? != 0) { + die('Could not configure!'); + } + open(FILE, '>sentinel'); + print FILE "this is nothing.\n"; + close(FILE); } -#Bootstrap extensions that have complex dependencies +sub IsNewer +{ + my ($file, $time) = (@_); -if ($^O eq "linux") -{ - BuildLibCurl_Linux(); -} -else -{ - BuildLibCurl_Win32(); + my @s = stat($file); + my $mtime = $s[9]; + return $mtime > $time; } -sub BuildLibCurl_Win32 -{ - chdir("extensions\\curl\\curl-src\\lib"); - Build::Command('"' . $ENV{'VC9BUILDER'} . '" /rebuild build_libcurl.vcproj "LIB Release"'); - die "Unable to find libcurl.lib!\n" unless (-f "LIB-Release\\libcurl.lib"); - chdir("..\\..\\..\\.."); -} +exit(0); + -sub BuildLibCurl_Linux -{ - chdir("extensions/curl/curl-src"); - Build::Command("mkdir -p Release"); - Build::Command("chmod +x configure"); - chdir("Release"); - Build::Command("../configure --enable-static --disable-shared --disable-ldap --without-ssl --without-zlib"); - Build::Command("make"); - die "Unable to find libcurl.a!\n" unless (-f "lib/.libs/libcurl.a"); - chdir("../../../.."); -} diff --git a/tools/buildbot/package.pl b/tools/buildbot/package.pl index 88c276b2..559eacf5 100755 --- a/tools/buildbot/package.pl +++ b/tools/buildbot/package.pl @@ -27,12 +27,13 @@ chdir($path); require 'helpers.pm'; #Switch to the output folder. -chdir(Build::PathFormat('../../OUTPUT/base')); +chdir(Build::PathFormat('../../../OUTPUT/package')); my ($version); -$version = Build::ProductVersion(Build::PathFormat('../../product.version')); -$version .= '-hg' . Build::HgRevNum('../..'); +$version = Build::ProductVersion(Build::PathFormat('../../build/product.version')); +$version =~ s/-dev//g; +$version .= '-hg' . Build::HgRevNum('../../build'); my ($filename); $filename = 'sourcemod-' . $version; diff --git a/tools/buildbot/startbuild.pl b/tools/buildbot/startbuild.pl index 924e1c93..649da1de 100755 --- a/tools/buildbot/startbuild.pl +++ b/tools/buildbot/startbuild.pl @@ -1,4 +1,5 @@ #!/usr/bin/perl +# vim: set ts=2 sw=2 tw=99 noet: use File::Basename; @@ -7,33 +8,20 @@ chdir($path); require 'helpers.pm'; -chdir('..'); -chdir('..'); +chdir('../../../OUTPUT'); -my ($cmd, $output); - -$cmd = Build::PathFormat('tools/builder/builder.exe') . ' build.cfg'; # 2>&1'; - -if ($^O eq "linux") -{ - $cmd = 'mono ' . $cmd; +if ($^O eq "linux") { + system("python3.1 build.py 2>&1"); +} else { + system("C:\\Python31\\python.exe build.py 2>&1"); } -system($cmd); - -if ($? == -1) +if ($? != 0) { - die "Build failed: $!\n"; -} -elsif ($^O eq "linux" and $? & 127) -{ - die "Build died :(\n"; -} -elsif ($? >> 8 != 0) -{ - die "Build failed with exit code: " . ($? >> 8) . "\n"; + die "Build failed: $!\n"; } else { - exit(0); + exit(0); } + diff --git a/tools/buildbot/symstore.pl b/tools/buildbot/symstore.pl index 9c2369c0..c16c3355 100755 --- a/tools/buildbot/symstore.pl +++ b/tools/buildbot/symstore.pl @@ -12,7 +12,7 @@ chdir('..'); our $SSH = 'ssh -i ../../smpvkey'; -open(PDBLOG, 'OUTPUT/pdblog.txt') or die "Could not open pdblog.txt: $!\n"; +open(PDBLOG, '../OUTPUT/pdblog.txt') or die "Could not open pdblog.txt: $!\n"; #Sync us up with the main symbol store rsync('sourcemod@alliedmods.net:~/public_html/symbols/', '..\\..\\symstore'); @@ -20,16 +20,17 @@ rsync('sourcemod@alliedmods.net:~/public_html/symbols/', '..\\..\\symstore'); #Get version info my ($version); $version = Build::ProductVersion(Build::PathFormat('product.version')); +$version =~ s/-dev//g; $version .= '-hg' . Build::HgRevNum('.'); my ($build_type); $build_type = Build::GetBuildType(Build::PathFormat('tools/buildbot/build_type')); -if ($build_type == "dev") +if ($build_type eq "dev") { $build_type = "buildbot"; } -elsif ($build_type == "rel") +elsif ($build_type eq "rel") { $build_type = "release"; } @@ -40,7 +41,7 @@ while () $line = $_; $line =~ s/\.pdb/\*/; chomp $line; - Build::Command("symstore add /r /f \"$line\" /s ..\\..\\symstore /t \"SourceMod\" /v \"$version\" /c \"$build_type\""); + Build::Command("symstore add /r /f \"..\\OUTPUT\\$line\" /s ..\\..\\symstore /t \"SourceMod\" /v \"$version\" /c \"$build_type\""); } close(PDBLOG); diff --git a/tools/builder/ABuilder.cs b/tools/builder/ABuilder.cs deleted file mode 100644 index dd2a34fa..00000000 --- a/tools/builder/ABuilder.cs +++ /dev/null @@ -1,202 +0,0 @@ -using System; -using System.IO; -using System.Diagnostics; - -namespace builder -{ - public abstract class ABuilder - { - public Config cfg; - - public ABuilder() - { - } - - public abstract bool BuildLibrary(Package pkg, Library lib); - - public abstract string GetPawnCompilerName(); - - public bool CompilePlugin(Package pkg, Plugin pl) - { - string local_dir = Config.PathFormat("{0}/{1}/addons/sourcemod/scripting", cfg.pkg_path, pkg.GetBaseFolder()); - - string filepath = null; - if (pl.Folder != null) - { - filepath = Config.PathFormat("{0}/{1}", pl.Folder, pl.Source); - } - else - { - filepath = pl.Source; - } - - ProcessStartInfo info = new ProcessStartInfo(); - info.WorkingDirectory = local_dir; - info.FileName = Config.PathFormat("{0}/{1}", local_dir, GetPawnCompilerName()); - info.Arguments = filepath + ".sp"; - info.UseShellExecute = false; - info.RedirectStandardOutput = true; - info.RedirectStandardError = true; - - Process p = Process.Start(info); - string output = p.StandardOutput.ReadToEnd() + "\n"; - output += p.StandardError.ReadToEnd(); - p.WaitForExit(); - p.Close(); - - Console.WriteLine(output); - - string binary = Config.PathFormat("{0}/{1}/addons/sourcemod/scripting/{2}.smx", cfg.pkg_path, pkg.GetBaseFolder(), pl.Source); - if (!File.Exists(binary)) - { - Console.WriteLine("Could not find binary: " + binary); - return false; - } - - string new_loc; - if (pl.disabled) - { - new_loc = Config.PathFormat("{0}/{1}/addons/sourcemod/plugins/disabled/{2}.smx", cfg.pkg_path, pkg.GetBaseFolder(), pl.Source); - } - else - { - new_loc = Config.PathFormat("{0}/{1}/addons/sourcemod/plugins/{2}.smx", cfg.pkg_path, pkg.GetBaseFolder(), pl.Source); - } - - try - { - if (File.Exists(new_loc)) - { - File.Delete(new_loc); - } - File.Move(binary, new_loc); - } - catch (System.Exception e) - { - Console.WriteLine(e.Message); - return false; - } - - return true; - } - - public bool CopyFile(Package pkg, string source, string dest) - { - string from = Config.PathFormat("{0}/{1}", - cfg.source_path, - source); - string to = Config.PathFormat("{0}/{1}/{2}", - cfg.pkg_path, - pkg.GetBaseFolder(), - dest); - - File.Copy(from, to, true); - - return true; - } - - /** dest can be null to mean root base folder */ - public void CopyFolder(Package pkg, string source, string dest, string [] omits) - { - string from_base = Config.PathFormat("{0}/{1}", cfg.source_path, source); - string to_base = null; - - if (dest == null) - { - to_base = Config.PathFormat("{0}/{1}", - cfg.pkg_path, - pkg.GetBaseFolder()); - } - else - { - to_base = Config.PathFormat("{0}/{1}/{2}", - cfg.pkg_path, - pkg.GetBaseFolder(), - dest); - } - - string [] files = Directory.GetFiles(from_base); - string file; - - for (int i=0; i. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] diff --git a/tools/builder/Config.cs b/tools/builder/Config.cs deleted file mode 100644 index d5096219..00000000 --- a/tools/builder/Config.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace builder -{ - [Flags] - public enum BasePlatform - { - Platform_Windows, - Platform_Linux - }; - - public class Config - { - public string source_path; - public string pkg_path; - public string builder_path; - public string build_options; - public string pdb_log_file; - public builder.BasePlatform Platform; - - public Config() - { - if ((int)System.Environment.OSVersion.Platform == 128) - { - Platform = BasePlatform.Platform_Linux; - } - else - { - Platform = BasePlatform.Platform_Windows; - } - } - - public static string PathFormat(string format, params string [] args) - { - string temp = string.Format(format, args); - return temp.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar); - } - - public bool ReadFromFile(string file) - { - bool read = true; - StreamReader sr = null; - try - { - sr = new StreamReader(file); - - string line; - string delim = "\t \n\r\v"; - string split = "="; - - while ( (line = sr.ReadLine()) != null ) - { - line = line.Trim(delim.ToCharArray()); - if (line.Length < 1 || line[0] == ';') - { - continue; - } - string [] s = line.Split(split.ToCharArray()); - string key, val = ""; - if (s.GetLength(0) >= 1) - { - key = s[0]; - if (s.GetLength(0) >= 2) - { - for (int i=1; i"); - return; - } - - Config cfg = new Config(); - if (!cfg.ReadFromFile(args[0])) - { - return; - } - - /* :TODO: Add path validation */ - - ABuilder bld = null; - - if (cfg.Platform == BasePlatform.Platform_Linux) - { - bld = new LinuxBuilder(cfg); - } - else if (cfg.Platform == BasePlatform.Platform_Windows) - { - bld = new Win32Builder(cfg); - /* Do not delete this file anymore. We don't support rebuilds, and thus the file - * is guaranteed to be wiped by buildbot. - */ - /*if (cfg.pdb_log_file != null && File.Exists(cfg.pdb_log_file)) - { - File.Delete(cfg.pdb_log_file); - }*/ - } - - try - { - bld.BuildPackage(new PkgCore()); - } - catch (System.Exception e) - { - Console.WriteLine("Build failed, exception: " + e.Message); - Environment.Exit(1); - } - - Environment.Exit(0); - } - } -} diff --git a/tools/builder/Makefile b/tools/builder/Makefile deleted file mode 100644 index 0e888927..00000000 --- a/tools/builder/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -CS = mcs -NAME = builder -BINARY = $(NAME).exe - -OBJECTS = ABuilder.cs AssemblyInfo.cs Config.cs LinuxBuilder.cs Win32Builder.cs \ - Package.cs PkgCore.cs Main.cs - -default: all - -all: $(OBJECTS) - $(CS) $(OBJECTS) -out:$(BINARY) - -clean: - rm -rf $(BINARY) - diff --git a/tools/builder/Package.cs b/tools/builder/Package.cs deleted file mode 100644 index 8e79e596..00000000 --- a/tools/builder/Package.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; - -namespace builder -{ - public enum ReleaseMode : int - { - ReleaseMode_Release, - ReleaseMode_Debug, - }; - - public enum BuildMode : int - { - BuildMode_Simple, - BuildMode_OldMetamod, - BuildMode_DarkMessiah, - BuildMode_Episode1, - BuildMode_Episode2, - BuildMode_Episode2Valve, - BuildMode_Left4Dead - }; - - public class Library - { - public Library() - { - has_platform_ext = false; - is_executable = false; - release_mode = ReleaseMode.ReleaseMode_Release; - build_mode = BuildMode.BuildMode_Simple; - platform = BasePlatform.Platform_Linux | BasePlatform.Platform_Windows; - } - public string binary_name; /* Name of binary */ - public string source_path; /* Local path to library build scripts */ - public ReleaseMode release_mode; /* Release mode */ - public BuildMode build_mode; /* Build mode */ - public string package_path; /* Final relative path */ - public bool has_platform_ext; /* Add extra platform extension? */ - public string vcproj_name; /* Project file, NULL for standard */ - public bool is_executable; /* If this is an EXE instead of a DLL */ - public BasePlatform platform; /* Platforms for which the binary should be built */ - }; - - public class Plugin - { - public Plugin(string file) - { - Source = file; - disabled = false; - } - public Plugin (string file, string folder) - { - Source = file; - Folder = folder; - disabled = false; - } - public Plugin (string file, bool is_disabled) - { - Source = file; - disabled = is_disabled; - } - public string Folder; /* Source folder relative to scripting (null for default) */ - public string Source; /* Source file name */ - public bool disabled; /* Is the plugin disabled? */ - }; - - public abstract class Package - { - /** - * Must return the root compression point. - */ - public abstract void GetCompressBases(ref string path, ref string folder); - - /** - * Must return the base package output folder. - */ - public abstract string GetBaseFolder(); - - /** - * Must return the list of folders to create. - */ - public abstract string [] GetFolders(); - - /** - * Called when file to file copies must be performed - */ - public abstract void OnCopyFiles(ABuilder builder); - - /** - * Called when dir to dir copies must be performed - */ - public abstract void OnCopyFolders(ABuilder builder); - - /** - * Called to build libraries - */ - public abstract Library [] GetLibraries(); - - /** - * Called to get package name - */ - public abstract string GetPackageName(); - - /** - * Called to get a plugin list - */ - public abstract Plugin [] GetPlugins(); - } -} diff --git a/tools/builder/PkgCore.cs b/tools/builder/PkgCore.cs deleted file mode 100644 index 1a78065f..00000000 --- a/tools/builder/PkgCore.cs +++ /dev/null @@ -1,440 +0,0 @@ -using System; -using System.Collections; - -namespace builder -{ - public class PkgCore : Package - { - private ArrayList libraries; - private ArrayList plugins; - private ArrayList folders; - - public PkgCore() - { - } - - public override string GetBaseFolder() - { - return "base"; - } - - public override void GetCompressBases(ref string path, ref string folder) - { - path = "base"; - folder = "addons"; - } - - public override string GetPackageName() - { - return "sourcemod-core"; - } - - /** - * Must return the list of folders to create. - */ - public override string [] GetFolders() - { - if (folders != null) - { - return (string [])folders.ToArray(typeof(string)); - } - - folders = new ArrayList(); - - folders.Add("addons/sourcemod/bin"); - folders.Add("addons/sourcemod/plugins/disabled"); - folders.Add("addons/sourcemod/gamedata"); - folders.Add("addons/sourcemod/gamedata/core.games"); - folders.Add("addons/sourcemod/gamedata/sdktools.games"); - folders.Add("addons/sourcemod/configs/geoip"); - folders.Add("addons/sourcemod/translations"); - folders.Add("addons/sourcemod/logs"); - folders.Add("addons/sourcemod/extensions"); - folders.Add("addons/sourcemod/data"); - folders.Add("addons/sourcemod/scripting/include"); - folders.Add("addons/sourcemod/scripting/admin-flatfile"); - folders.Add("addons/sourcemod/scripting/adminmenu"); - folders.Add("addons/sourcemod/scripting/testsuite"); - folders.Add("cfg/sourcemod"); - folders.Add("addons/sourcemod/configs/sql-init-scripts"); - folders.Add("addons/sourcemod/configs/sql-init-scripts/mysql"); - folders.Add("addons/sourcemod/configs/sql-init-scripts/sqlite"); - folders.Add("addons/sourcemod/scripting/basecommands"); - folders.Add("addons/sourcemod/scripting/basecomm"); - folders.Add("addons/sourcemod/scripting/funvotes"); - folders.Add("addons/sourcemod/scripting/basevotes"); - folders.Add("addons/sourcemod/scripting/basebans"); - folders.Add("addons/sourcemod/scripting/funcommands"); - folders.Add("addons/sourcemod/extensions/auto.1.ep1"); - folders.Add("addons/sourcemod/extensions/auto.2.darkm"); - //folders.Add("addons/sourcemod/extensions/auto.2.ep1"); - folders.Add("addons/sourcemod/extensions/auto.2.ep2"); - folders.Add("addons/sourcemod/extensions/auto.2.ep2valve"); - folders.Add("addons/sourcemod/extensions/auto.2.l4d"); - folders.Add("addons/sourcemod/scripting/playercommands"); - folders.Add("addons/metamod"); - - return (string [])folders.ToArray(typeof(string)); - } - - /** - * Called when file to file copies must be performed - */ - public override void OnCopyFiles(ABuilder builder) - { - builder.CopyFile(this, "sourcepawn/batchtool/compile.exe", "addons/sourcemod/scripting/compile.exe"); - } - - /** - * Called when dir to dir copies must be performed - */ - public override void OnCopyFolders(ABuilder builder) - { - builder.CopyFolder(this, "configs", "addons/sourcemod/configs", null); - builder.CopyFolder(this, "configs/geoip", "addons/sourcemod/configs/geoip", null); - builder.CopyFolder(this, "configs/cfg", "cfg/sourcemod", null); - builder.CopyFolder(this, "configs/metamod", "addons/metamod", null); - builder.CopyFolder(this, - "configs/sql-init-scripts", - "addons/sourcemod/configs/sql-init-scripts", - null); - builder.CopyFolder(this, - "configs/sql-init-scripts/mysql", - "addons/sourcemod/configs/sql-init-scripts/mysql", - null); - builder.CopyFolder(this, - "configs/sql-init-scripts/sqlite", - "addons/sourcemod/configs/sql-init-scripts/sqlite", - null); - - string [] plugin_omits = new string[1]; - plugin_omits[0] = "spcomp.exe"; - - string [] include_omits = new string[1]; - include_omits[0] = "version.tpl"; - - builder.CopyFolder(this, "gamedata", "addons/sourcemod/gamedata", null); - builder.CopyFolder(this, "gamedata/sdktools.games", "addons/sourcemod/gamedata/sdktools.games", null); - builder.CopyFolder(this, "gamedata/core.games", "addons/sourcemod/gamedata/core.games", null); - builder.CopyFolder(this, "plugins", "addons/sourcemod/scripting", plugin_omits); - builder.CopyFolder(this, "plugins/include", "addons/sourcemod/scripting/include", include_omits); - builder.CopyFolder(this, "translations", "addons/sourcemod/translations", null); - builder.CopyFolder(this, "public/licenses", "addons/sourcemod", null); - builder.CopyFolder(this, "plugins/admin-flatfile", "addons/sourcemod/scripting/admin-flatfile", null); - builder.CopyFolder(this, "plugins/adminmenu", "addons/sourcemod/scripting/adminmenu", null); - builder.CopyFolder(this, "plugins/testsuite", "addons/sourcemod/scripting/testsuite", null); - builder.CopyFolder(this, "plugins/basecommands", "addons/sourcemod/scripting/basecommands", null); - builder.CopyFolder(this, "plugins/basecomm", "addons/sourcemod/scripting/basecomm", null); - builder.CopyFolder(this, "plugins/funvotes", "addons/sourcemod/scripting/funvotes", null); - builder.CopyFolder(this, "plugins/basevotes", "addons/sourcemod/scripting/basevotes", null); - builder.CopyFolder(this, "plugins/basebans", "addons/sourcemod/scripting/basebans", null); - builder.CopyFolder(this, "plugins/funcommands", "addons/sourcemod/scripting/funcommands", null); - builder.CopyFolder(this, "plugins/playercommands", "addons/sourcemod/scripting/playercommands", null); - } - - /** - * Called to build libraries - */ - public override Library [] GetLibraries() - { - if (libraries != null) - { - return (Library [])libraries.ToArray(typeof(Library)); - } - - libraries = new ArrayList(); - - Library lib = new Library(); - lib.package_path = "addons/sourcemod/bin"; - lib.source_path = "loader"; - lib.binary_name = "sourcemod_mm"; - lib.vcproj_name = "loader"; - lib.build_mode = BuildMode.BuildMode_Simple; - lib.has_platform_ext = true; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/bin"; - lib.source_path = "core/logic"; - lib.binary_name = "sourcemod.logic"; - lib.vcproj_name = "logic"; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/bin"; - lib.source_path = "core"; - lib.binary_name = "sourcemod.1.ep1"; - lib.vcproj_name = "sourcemod_mm"; - lib.build_mode = BuildMode.BuildMode_OldMetamod; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/bin"; - lib.source_path = "core"; - lib.binary_name = "sourcemod.2.darkm"; - lib.vcproj_name = "sourcemod_mm"; - lib.build_mode = BuildMode.BuildMode_DarkMessiah; - lib.platform = BasePlatform.Platform_Windows; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/bin"; - lib.source_path = "core"; - lib.binary_name = "sourcemod.2.ep2"; - lib.vcproj_name = "sourcemod_mm"; - lib.build_mode = BuildMode.BuildMode_Episode2; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/bin"; - lib.source_path = "core"; - lib.binary_name = "sourcemod.2.ep2valve"; - lib.vcproj_name = "sourcemod_mm"; - lib.build_mode = BuildMode.BuildMode_Episode2Valve; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/bin"; - lib.source_path = "core"; - lib.binary_name = "sourcemod.2.ep2valve"; - lib.vcproj_name = "sourcemod_mm"; - lib.build_mode = BuildMode.BuildMode_Episode2Valve; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/bin"; - lib.source_path = "core"; - lib.binary_name = "sourcemod.2.l4d"; - lib.vcproj_name = "sourcemod_mm"; - lib.build_mode = BuildMode.BuildMode_Left4Dead; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/bin"; - lib.source_path = "sourcepawn/jit"; - lib.binary_name = "sourcepawn.jit.x86"; - lib.vcproj_name = "jit-x86"; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/scripting"; - lib.source_path = "sourcepawn/compiler"; - lib.binary_name = "spcomp"; - lib.is_executable = true; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions"; - lib.source_path = "extensions/geoip"; - lib.binary_name = "geoip.ext"; - lib.vcproj_name = "geoip"; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.1.ep1"; - lib.source_path = "extensions/bintools"; - lib.binary_name = "bintools.ext"; - lib.vcproj_name = "bintools"; - lib.build_mode = BuildMode.BuildMode_OldMetamod; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.2.darkm"; - lib.source_path = "extensions/bintools"; - lib.binary_name = "bintools.ext"; - lib.vcproj_name = "bintools"; - lib.build_mode = BuildMode.BuildMode_DarkMessiah; - lib.platform = BasePlatform.Platform_Windows; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.2.ep2"; - lib.source_path = "extensions/bintools"; - lib.binary_name = "bintools.ext"; - lib.vcproj_name = "bintools"; - lib.build_mode = BuildMode.BuildMode_Episode2; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.2.ep2valve"; - lib.source_path = "extensions/bintools"; - lib.binary_name = "bintools.ext"; - lib.vcproj_name = "bintools"; - lib.build_mode = BuildMode.BuildMode_Episode2Valve; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.2.ep2valve"; - lib.source_path = "extensions/bintools"; - lib.binary_name = "bintools.ext"; - lib.vcproj_name = "bintools"; - lib.build_mode = BuildMode.BuildMode_Episode2Valve; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.2.l4d"; - lib.source_path = "extensions/bintools"; - lib.binary_name = "bintools.ext"; - lib.vcproj_name = "bintools"; - lib.build_mode = BuildMode.BuildMode_Left4Dead; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions"; - lib.source_path = "extensions/mysql"; - lib.binary_name = "dbi.mysql.ext"; - lib.vcproj_name = "sm_mysql"; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.1.ep1"; - lib.source_path = "extensions/sdktools"; - lib.binary_name = "sdktools.ext"; - lib.vcproj_name = "sdktools"; - lib.build_mode = BuildMode.BuildMode_OldMetamod; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.2.darkm"; - lib.source_path = "extensions/sdktools"; - lib.binary_name = "sdktools.ext"; - lib.vcproj_name = "sdktools"; - lib.build_mode = BuildMode.BuildMode_DarkMessiah; - lib.platform = BasePlatform.Platform_Windows; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.2.ep2"; - lib.source_path = "extensions/sdktools"; - lib.binary_name = "sdktools.ext"; - lib.vcproj_name = "sdktools"; - lib.build_mode = BuildMode.BuildMode_Episode2; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.2.ep2valve"; - lib.source_path = "extensions/sdktools"; - lib.binary_name = "sdktools.ext"; - lib.vcproj_name = "sdktools"; - lib.build_mode = BuildMode.BuildMode_Episode2Valve; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.2.ep2valve"; - lib.source_path = "extensions/sdktools"; - lib.binary_name = "sdktools.ext"; - lib.vcproj_name = "sdktools"; - lib.build_mode = BuildMode.BuildMode_Episode2Valve; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.2.l4d"; - lib.source_path = "extensions/sdktools"; - lib.binary_name = "sdktools.ext"; - lib.vcproj_name = "sdktools"; - lib.build_mode = BuildMode.BuildMode_Left4Dead; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions"; - lib.source_path = "extensions/sqlite"; - lib.binary_name = "dbi.sqlite.ext"; - lib.vcproj_name = "sm_sqlite"; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.1.ep1"; - lib.source_path = "extensions/cstrike"; - lib.binary_name = "game.cstrike.ext"; - lib.vcproj_name = "cstrike"; - lib.build_mode = BuildMode.BuildMode_OldMetamod; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions"; - lib.source_path = "extensions/topmenus"; - lib.binary_name = "topmenus.ext"; - lib.vcproj_name = "topmenus"; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions/auto.2.ep2valve"; - lib.source_path = "extensions/tf2"; - lib.binary_name = "game.tf2.ext"; - lib.vcproj_name = "tf2"; - lib.build_mode = BuildMode.BuildMode_Episode2Valve; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions"; - lib.source_path = "extensions/regex"; - lib.binary_name = "regex.ext"; - lib.vcproj_name = "regex"; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions"; - lib.source_path = "extensions/clientprefs"; - lib.binary_name = "clientprefs.ext"; - lib.vcproj_name = "clientprefs"; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions"; - lib.source_path = "extensions/curl"; - lib.binary_name = "webternet.ext"; - lib.vcproj_name = "curl"; - libraries.Add(lib); - - lib = new Library(); - lib.package_path = "addons/sourcemod/extensions"; - lib.source_path = "extensions/updater"; - lib.binary_name = "updater.ext"; - lib.vcproj_name = "updater"; - libraries.Add(lib); - - return (Library [])libraries.ToArray(typeof(Library)); - } - - /** - * Called to build plugins - */ - public override Plugin [] GetPlugins() - { - if (plugins != null) - { - return (Plugin [])plugins.ToArray(typeof(Plugin)); - } - - plugins = new ArrayList(); - - plugins.Add(new Plugin("admin-flatfile", "admin-flatfile")); - plugins.Add(new Plugin("adminhelp")); - plugins.Add(new Plugin("antiflood")); - plugins.Add(new Plugin("basecommands")); - plugins.Add(new Plugin("reservedslots")); - plugins.Add(new Plugin("basetriggers")); - plugins.Add(new Plugin("nextmap")); - plugins.Add(new Plugin("basechat")); - plugins.Add(new Plugin("funcommands")); - plugins.Add(new Plugin("basevotes")); - plugins.Add(new Plugin("funvotes")); - plugins.Add(new Plugin("admin-sql-prefetch", true)); - plugins.Add(new Plugin("admin-sql-threaded", true)); - plugins.Add(new Plugin("sql-admin-manager", true)); - plugins.Add(new Plugin("basebans")); - plugins.Add(new Plugin("mapchooser", true)); - plugins.Add(new Plugin("basecomm")); - plugins.Add(new Plugin("randomcycle", true)); - plugins.Add(new Plugin("rockthevote", true)); - plugins.Add(new Plugin("adminmenu")); - plugins.Add(new Plugin("playercommands")); - plugins.Add(new Plugin("clientprefs")); - plugins.Add(new Plugin("nominations", true)); - plugins.Add(new Plugin("sounds")); - - return (Plugin [])plugins.ToArray(typeof(Plugin)); - } - } -} - diff --git a/tools/builder/Win32Builder.cs b/tools/builder/Win32Builder.cs deleted file mode 100644 index b418dde3..00000000 --- a/tools/builder/Win32Builder.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System; -using System.IO; -using System.Diagnostics; - -namespace builder -{ - public class Win32Builder : ABuilder - { - public Win32Builder(Config _cfg) - { - cfg = _cfg; - } - - public override string GetPawnCompilerName() - { - return "spcomp.exe"; - } - - public override bool BuildLibrary(Package pkg, Library lib) - { - ProcessStartInfo info = new ProcessStartInfo(); - - string path = Config.PathFormat("{0}/{1}/msvc9", - cfg.source_path, - lib.source_path); - - /* PlatformExt ignored for us */ - string binName = lib.binary_name + (lib.is_executable ? ".exe" : ".dll"); - - string config_name = "Unknown"; - - if (lib.release_mode == ReleaseMode.ReleaseMode_Release) - { - config_name = "Release"; - } - else if (lib.release_mode == ReleaseMode.ReleaseMode_Debug) - { - config_name = "Debug"; - } - - if (lib.build_mode == BuildMode.BuildMode_DarkMessiah) - { - config_name = config_name + " - Dark Messiah"; - } - if (lib.build_mode == BuildMode.BuildMode_Episode1) - { - config_name = config_name + " - Episode 1"; - } - else if (lib.build_mode == BuildMode.BuildMode_Episode2) - { - config_name = config_name + " - Orange Box"; - } - else if (lib.build_mode == BuildMode.BuildMode_Episode2Valve) - { - config_name = config_name + " - Orange Box Valve"; - } - else if (lib.build_mode == BuildMode.BuildMode_Episode2Valve) - { - config_name = config_name + " - Orange Box Valve"; - } - else if (lib.build_mode == BuildMode.BuildMode_OldMetamod) - { - config_name = config_name + " - Old Metamod"; - } - else if (lib.build_mode == BuildMode.BuildMode_Left4Dead) - { - config_name = config_name + " - Left 4 Dead"; - } - - string binpath = Config.PathFormat("{0}/{1}/{2}", - path, - config_name, - binName); - - if (File.Exists(binpath)) - { - File.Delete(binpath); - } - - string project_file = null; - if (lib.vcproj_name != null) - { - project_file = lib.vcproj_name + ".vcproj"; - } - else - { - project_file = lib.binary_name + ".vcproj"; - } - - info.WorkingDirectory = path; - info.FileName = cfg.builder_path; - info.UseShellExecute = false; - info.RedirectStandardOutput = true; - info.RedirectStandardError = true; - - if (cfg.build_options != null) - { - info.Arguments = cfg.build_options + " "; - } - - info.Arguments += "/rebuild \"" + project_file + "\" \"" + config_name + "\""; - - Process p = Process.Start(info); - Console.WriteLine(p.StandardOutput.ReadToEnd()); - p.WaitForExit(); - p.Close(); - - if (!File.Exists(binpath)) - { - return false; - } - - path = Config.PathFormat("{0}/{1}/{2}/{3}", - cfg.pkg_path, - pkg.GetBaseFolder(), - lib.package_path, - binName); - File.Copy(binpath, path, true); - - /* On Windows we optionally log the PDB path */ - if (!lib.is_executable && cfg.pdb_log_file != null) - { - FileStream fs = File.Open(cfg.pdb_log_file, FileMode.Append, FileAccess.Write); - StreamWriter sw = new StreamWriter(fs); - sw.WriteLine(binpath.Replace(".dll", ".pdb")); - sw.Close(); - } - - return true; - } - } -} diff --git a/tools/builder/build-linux.cfg b/tools/builder/build-linux.cfg deleted file mode 100644 index edec9b66..00000000 --- a/tools/builder/build-linux.cfg +++ /dev/null @@ -1,4 +0,0 @@ -OutputBase = /home/dvander/bin -SourceBase = /home/dvander/sourcemod/trunk -BuilderPath = /usr/bin/make - diff --git a/tools/builder/build-win32.cfg b/tools/builder/build-win32.cfg deleted file mode 100644 index a560006e..00000000 --- a/tools/builder/build-win32.cfg +++ /dev/null @@ -1,3 +0,0 @@ -OutputBase = c:\real\done -SourceBase = r:\sourcemod\trunk -BuilderPath = C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.com diff --git a/tools/builder/builder.csproj b/tools/builder/builder.csproj deleted file mode 100644 index f7de7e19..00000000 --- a/tools/builder/builder.csproj +++ /dev/null @@ -1,121 +0,0 @@ - - - Local - 8.0.30729 - 2.0 - {BFC4EB78-4C3E-4C81-8EAD-5A1A2F126512} - Debug - AnyCPU - - - - - builder - - - JScript - Grid - IE50 - false - Exe - builder - OnBuildSuccess - - - - - 0.0 - - - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - - - false - false - false - false - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - false - - - true - false - false - false - 4 - none - prompt - - - - System - - - System.Data - - - System.XML - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - \ No newline at end of file diff --git a/tools/builder/builder.sln b/tools/builder/builder.sln deleted file mode 100644 index 51bc1f44..00000000 --- a/tools/builder/builder.sln +++ /dev/null @@ -1,19 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "builder", "builder.csproj", "{BFC4EB78-4C3E-4C81-8EAD-5A1A2F126512}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BFC4EB78-4C3E-4C81-8EAD-5A1A2F126512}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BFC4EB78-4C3E-4C81-8EAD-5A1A2F126512}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BFC4EB78-4C3E-4C81-8EAD-5A1A2F126512}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BFC4EB78-4C3E-4C81-8EAD-5A1A2F126512}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/tools/versionchanger.pl b/tools/versionchanger.pl deleted file mode 100644 index ce5f6f62..00000000 --- a/tools/versionchanger.pl +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/perl - -our %arguments = -( - 'config' => 'modules.versions', - 'major' => '1', - 'minor' => '0', - 'revision' => '0', - 'build' => undef, - 'path' => '', - 'buildstring' => '', -); - -my $arg; -foreach $arg (@ARGV) -{ - $arg =~ s/--//; - @arg = split(/=/, $arg); - $arguments{$arg[0]} = $arg[1]; -} - -#Set up path info -if ($arguments{'path'} ne "") -{ - if (!(-d $arguments{'path'})) - { - die "Unable to find path: " . $arguments{'path'} ."\n"; - } - chdir($arguments{'path'}); -} - -if (!open(CONFIG, $arguments{'config'})) -{ - die "Unable to open config file for reading: " . $arguments{'config'} . "\n"; -} - -our %modules; -my $cur_module = undef; -my $line; -while () -{ - chomp; - $line = $_; - if ($line =~ /^\[([^\]]+)\]$/) - { - $cur_module = $1; - next; - } - if (!$cur_module) - { - next; - } - if ($line =~ /^([^=]+) = (.+)$/) - { - $modules{$cur_module}{$1} = $2; - } -} - -close(CONFIG); - -#Copy global configuration options... -if (exists($modules{'PRODUCT'})) -{ - if (exists($modules{'PRODUCT'}{'major'})) - { - $arguments{'major'} = $modules{'PRODUCT'}{'major'}; - } - if (exists($modules{'PRODUCT'}{'minor'})) - { - $arguments{'minor'} = $modules{'PRODUCT'}{'minor'}; - } - if (exists($modules{'PRODUCT'}{'revision'})) - { - $arguments{'revision'} = $modules{'PRODUCT'}{'revision'}; - } -} - -#Get the global SVN revision if we have none -my $rev; -if ($arguments{'build'} == undef) -{ - my ($text); - $text = `hg identif -n -i`; - chomp $text; - $text =~ s/\+//g; - my ($id,$num) = split(/ /, $text); - $rev = "$num:$id"; -} -else -{ - $rev = int($arguments{'build'}); -} - -my $major = $arguments{'major'}; -my $minor = $arguments{'minor'}; -my $revision = $arguments{'revision'}; -my $buildstr = $arguments{'buildstring'}; - -#Go through everything now -my $mod_i; -while ( ($cur_module, $mod_i) = each(%modules) ) -{ - #Skip the magic one - if ($cur_module eq "PRODUCT") - { - next; - } - #Prepare path - my %mod = %{$mod_i}; - my $infile = $mod{'in'}; - my $outfile = $mod{'out'}; - if ($mod{'folder'}) - { - if (!(-d $mod{'folder'})) - { - die "Folder " . $mod{'folder'} . " not found.\n"; - } - $infile = $mod{'folder'} . '/' . $infile; - $outfile = $mod{'folder'} . '/' . $outfile; - } - if (!(-f $infile)) - { - die "File $infile is not a file.\n"; - } - #Start rewriting - open(INFILE, $infile) or die "Could not open file for reading: $infile\n"; - open(OUTFILE, '>'.$outfile) or die "Could not open file for writing: $outfile\n"; - while () - { - s/\$PMAJOR\$/$major/g; - s/\$PMINOR\$/$minor/g; - s/\$PREVISION\$/$revision/g; - s/\$BUILD_ID\$/$rev/g; - s/\$BUILD_STRING\$/$buildstr/g; - print OUTFILE $_; - } - close(OUTFILE); - close(INFILE); -} -