From 0d1746ba60ff07fe1e1d7fb59bffd3d9cdd83e59 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 3 Mar 2007 08:51:47 +0000 Subject: [PATCH] added versioning to plugins --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40578 --- modules.versions | 5 +++++ plugins/include/core.inc | 6 +++++- plugins/include/version.inc | 25 +++++++++++++++++++++++++ plugins/include/version.tpl | 25 +++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 plugins/include/version.inc create mode 100644 plugins/include/version.tpl diff --git a/modules.versions b/modules.versions index b402d737..a0d7008c 100644 --- a/modules.versions +++ b/modules.versions @@ -8,6 +8,11 @@ folder = core in = sm_version.tpl out = sm_version.h +[plugins] +folder = plugins/include +in = version.tpl +out = version.inc + [jitx86] folder = sourcepawn/jit/x86 in = jit_version.tpl diff --git a/plugins/include/core.inc b/plugins/include/core.inc index 5c867e7f..f5aed571 100644 --- a/plugins/include/core.inc +++ b/plugins/include/core.inc @@ -18,10 +18,13 @@ #endif #define _core_included -#define SOURCEMOD_PLUGINAPI_VERSION 1 +#include + +#define SOURCEMOD_PLUGINAPI_VERSION 2 struct PlVers { version, + String:filevers[], }; /** @@ -37,6 +40,7 @@ enum Action public PlVers:__version = { version = SOURCEMOD_PLUGINAPI_VERSION, + filevers = SOURCEMOD_VERSION }; struct Extension diff --git a/plugins/include/version.inc b/plugins/include/version.inc new file mode 100644 index 00000000..cad96bad --- /dev/null +++ b/plugins/include/version.inc @@ -0,0 +1,25 @@ +/** + * vim: set ts=4 : + * =============================================================== + * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved. + * =============================================================== + * + * This file is part of the SourceMod/SourcePawn SDK. This file may only be used + * or modified under the Terms and Conditions of its License Agreement, which is found + * in LICENSE.txt. The Terms and Conditions for making SourceMod extensions/plugins + * may change at any time. To view the latest information, see: + * http://www.sourcemod.net/license.php + * + * Version: $Id$ + */ + +#if defined _version_included + #endinput +#endif +#define _version_included + +#define SOURCEMOD_V_MAJOR 1 +#define SOURCEMOD_V_MINOR 0 +#define SOURCEMOD_V_RELEASE 0 + +#define SOURCEMOD_VERSION "1.0.0.577" diff --git a/plugins/include/version.tpl b/plugins/include/version.tpl new file mode 100644 index 00000000..37bc352c --- /dev/null +++ b/plugins/include/version.tpl @@ -0,0 +1,25 @@ +/** + * vim: set ts=4 : + * =============================================================== + * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved. + * =============================================================== + * + * This file is part of the SourceMod/SourcePawn SDK. This file may only be used + * or modified under the Terms and Conditions of its License Agreement, which is found + * in LICENSE.txt. The Terms and Conditions for making SourceMod extensions/plugins + * may change at any time. To view the latest information, see: + * http://www.sourcemod.net/license.php + * + * Version: $Id$ + */ + +#if defined _version_included + #endinput +#endif +#define _version_included + +#define SOURCEMOD_V_MAJOR $PMAJOR$ +#define SOURCEMOD_V_MINOR $PMINOR$ +#define SOURCEMOD_V_RELEASE $PREVISION$ + +#define SOURCEMOD_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"