From cf716c4049adbe57131f6650f30dff6de9cfa456 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 12 Mar 2007 22:33:43 +0000 Subject: [PATCH] added tsfun and added a --modules option to the versionchanger script --- dlls/ts/tsfun/amxxmodule.cpp | 2 +- dlls/ts/tsfun/moduleconfig.h | 4 +++- dlls/ts/tsfun/svn_version.h | 9 +++++++++ dlls/ts/tsfun/svn_version.tpl | 9 +++++++++ modules.versions | 5 +++++ versionchanger.pl | 20 ++++++++++++++++++++ 6 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 dlls/ts/tsfun/svn_version.h create mode 100644 dlls/ts/tsfun/svn_version.tpl diff --git a/dlls/ts/tsfun/amxxmodule.cpp b/dlls/ts/tsfun/amxxmodule.cpp index 73d69197..4dd235ac 100755 --- a/dlls/ts/tsfun/amxxmodule.cpp +++ b/dlls/ts/tsfun/amxxmodule.cpp @@ -2771,7 +2771,7 @@ void ValidateMacros_DontCallThis_Smiley() MF_FindLibrary(NULL, LibType_Class); MF_AddLibraries(NULL, LibType_Class, NULL); MF_RemoveLibraries(NULL); - MF_OverrideNatives(NULL); + MF_OverrideNatives(NULL, ""); } #endif diff --git a/dlls/ts/tsfun/moduleconfig.h b/dlls/ts/tsfun/moduleconfig.h index b29bde13..2add7899 100755 --- a/dlls/ts/tsfun/moduleconfig.h +++ b/dlls/ts/tsfun/moduleconfig.h @@ -3,9 +3,11 @@ #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ +#include "svn_version.h" + // Module info #define MODULE_NAME "TSFun Wrapper" -#define MODULE_VERSION "1.76" +#define MODULE_VERSION SVN_VERSION #define MODULE_AUTHOR "AMX Mod X Dev Team" #define MODULE_URL "http://www.amxmodx.org" #define MODULE_LOGTAG "TSFUN" diff --git a/dlls/ts/tsfun/svn_version.h b/dlls/ts/tsfun/svn_version.h new file mode 100644 index 00000000..ce42667c --- /dev/null +++ b/dlls/ts/tsfun/svn_version.h @@ -0,0 +1,9 @@ +#ifndef _INCLUDE_SVN_VERSION_H_ +#define _INCLUDE_SVN_VERSION_H_ + +/** This file is auto-generated by build scripts. Do not edit it unless you know what you're doing. */ +/** Do not commit the generated .h file, as it will only mess up SVN revision numbers. */ + +#define SVN_VERSION "1.8.0.2989" + +#endif //_INCLUDE_SVN_VERSION_H_ diff --git a/dlls/ts/tsfun/svn_version.tpl b/dlls/ts/tsfun/svn_version.tpl new file mode 100644 index 00000000..bf1d0d23 --- /dev/null +++ b/dlls/ts/tsfun/svn_version.tpl @@ -0,0 +1,9 @@ +#ifndef _INCLUDE_SVN_VERSION_H_ +#define _INCLUDE_SVN_VERSION_H_ + +/** This file is auto-generated by build scripts. Do not edit it unless you know what you're doing. */ +/** Do not commit the generated .h file, as it will only mess up SVN revision numbers. */ + +#define SVN_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$LOCAL_BUILD$" + +#endif //_INCLUDE_SVN_VERSION_H_ diff --git a/modules.versions b/modules.versions index b7139e81..f131d94a 100644 --- a/modules.versions +++ b/modules.versions @@ -91,4 +91,9 @@ out = svn_version.h [tsx] folder = dlls/ts/tsx in = svn_version.tpl +out = svn_version.h + +[tsfun] +folder = dlls/ts/tsfun +in = svn_version.tpl out = svn_version.h \ No newline at end of file diff --git a/versionchanger.pl b/versionchanger.pl index a8457e93..9dffd2d2 100644 --- a/versionchanger.pl +++ b/versionchanger.pl @@ -9,6 +9,7 @@ our %arguments = 'build' => undef, 'svnrev' => 'global', 'path' => '', + 'modules' => '', ); my $arg; @@ -19,6 +20,20 @@ foreach $arg (@ARGV) $arguments{$arg[0]} = $arg[1]; } +our (%allowed); +if ($arguments{'modules'} ne "") +{ + my @l = split(/,/, $arguments{'modules'}); + my $i; + + for ($i=0; $i<=$#l; $i++) + { + $allowed{$l[$i]} = 1; + } +} else { + $allowed{'*'} = 1; +} + #Set up path info if ($arguments{'path'} ne "") { @@ -102,6 +117,10 @@ while ( ($cur_module, $mod_i) = each(%modules) ) { next; } + if (!$allowed{'*'} && !$allowed{$cur_module}) + { + next; + } #Prepare path my %mod = %{$mod_i}; my $infile = $mod{'in'}; @@ -163,3 +182,4 @@ sub GetRevision } return $rev; } +