Support for AMBuild.
authordvander@linux32.localdomain
Sat Apr 16 00:41:25 2011 -0700 (2011-04-16)
changeset 5941feee1fac07
parent 58 69989a9e83ff
child 60 3494bfad2033
Support for AMBuild.
AMBuildScript
AMBuilder
PackageScript
buildbot/Versioning
configure.py
cssdm_config.cpp
cssdm_main.cpp
cssdm_main.h
cssdm_utils.cpp
cssdm_version.h
msvc8/sm_cssdm.sln
msvc8/sm_cssdm.vcproj
product.version
version.rc
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/AMBuildScript	Sat Apr 16 00:41:25 2011 -0700
     1.3 @@ -0,0 +1,322 @@
     1.4 +# vim: set ts=2 sw=2 tw=99 noet ft=python:
     1.5 +import os
     1.6 +import sys
     1.7 +from ambuild.command import SymlinkCommand
     1.8 +
     1.9 +class CSSDM:
    1.10 +	def __init__(self):
    1.11 +		self.compiler = Cpp.Compiler()
    1.12 +
    1.13 +		#Build SDK info
    1.14 +		self.sdkInfo = { }
    1.15 +		self.sdkInfo['ep2v'] =  {'sdk': 'HL2SDKOBVALVE',   'ext': '16.ep2v',  'def': '5',
    1.16 +		                         'name': 'ORANGEBOXVALVE', 'platform': ['windows', 'linux', 'darwin']}
    1.17 +
    1.18 +		if AMBuild.mode == 'config':
    1.19 +			#Detect compilers
    1.20 +			self.compiler.DetectAll(AMBuild)
    1.21 +
    1.22 +			#Detect variables
    1.23 +			envvars = { 'MMSOURCE18': 'mmsource-1.8' }
    1.24 +			if AMBuild.target['platform'] == 'darwin':
    1.25 +				envvars['SOURCEMOD'] = 'sourcemod-1.4'
    1.26 +			else:
    1.27 +				envvars['SOURCEMOD'] = 'sourcemod-1.3'
    1.28 +			envvars['SOURCEMOD-BIN'] = 'sourcemod-bin'
    1.29 +			envvars['HL2SDKOBVALVE'] = 'hl2sdk-ob-valve'
    1.30 +
    1.31 +			#Must have a path for each envvar (file a bug if you don't like this)
    1.32 +			for i in envvars:
    1.33 +				if i in os.environ:
    1.34 +					path = os.environ[i]
    1.35 +					if not os.path.isdir(path):
    1.36 +						raise Exception('Path for {0} was not found: {1}'.format(i, path))
    1.37 +				else:
    1.38 +					head = os.getcwd()
    1.39 +					oldhead = None
    1.40 +					while head != None and head != oldhead:
    1.41 +						path = os.path.join(head, envvars[i])
    1.42 +						if os.path.isdir(path):
    1.43 +							break
    1.44 +						oldhead = head
    1.45 +						head, tail = os.path.split(head)
    1.46 +					if head == None or head == oldhead:
    1.47 +						raise Exception('Could not find a valid path for {0}'.format(i))
    1.48 +				AMBuild.cache.CacheVariable(i, path)
    1.49 +
    1.50 +			#Set up defines
    1.51 +			cxx = self.compiler.cxx
    1.52 +			if isinstance(cxx, Cpp.GCC):
    1.53 +				self.vendor = 'gcc'
    1.54 +				self.compiler.AddToListVar('CDEFINES', 'stricmp=strcasecmp')
    1.55 +				self.compiler.AddToListVar('CDEFINES', '_stricmp=strcasecmp')
    1.56 +				self.compiler.AddToListVar('CDEFINES', '_snprintf=snprintf')
    1.57 +				self.compiler.AddToListVar('CDEFINES', '_vsnprintf=vsnprintf')
    1.58 +				self.compiler.AddToListVar('CFLAGS', '-pipe')
    1.59 +				self.compiler.AddToListVar('CFLAGS', '-fno-strict-aliasing')
    1.60 +				if cxx.majorVersion >= 4:
    1.61 +					self.compiler.AddToListVar('CFLAGS', '-fvisibility=hidden')
    1.62 +					self.compiler.AddToListVar('CXXFLAGS', '-fvisibility-inlines-hidden')
    1.63 +				self.compiler.AddToListVar('CFLAGS', '-Wall')
    1.64 +				self.compiler.AddToListVar('CFLAGS', '-Werror')
    1.65 +				self.compiler.AddToListVar('CFLAGS', '-Wno-uninitialized')
    1.66 +				self.compiler.AddToListVar('CFLAGS', '-Wno-invalid-offsetof')
    1.67 +				self.compiler.AddToListVar('CFLAGS', '-Wno-unused')
    1.68 +				self.compiler.AddToListVar('CFLAGS', '-Wno-switch')
    1.69 +				self.compiler.AddToListVar('CFLAGS', '-mfpmath=sse')
    1.70 +				self.compiler.AddToListVar('CFLAGS', '-msse')
    1.71 +				self.compiler.AddToListVar('CFLAGS', '-m32')
    1.72 +				self.compiler.AddToListVar('POSTLINKFLAGS', '-m32')
    1.73 +				self.compiler.AddToListVar('CFLAGS', '-static-libgcc')
    1.74 +				self.compiler.AddToListVar('CXXFLAGS', '-fno-exceptions')
    1.75 +				self.compiler.AddToListVar('CXXFLAGS', '-fno-rtti')
    1.76 +				self.compiler.AddToListVar('CXXFLAGS', '-fno-threadsafe-statics')
    1.77 +				self.compiler.AddToListVar('CXXFLAGS', '-Wno-non-virtual-dtor')
    1.78 +				self.compiler.AddToListVar('CDEFINES', 'HAVE_STDINT_H')
    1.79 +			elif isinstance(cxx, Cpp.MSVC):
    1.80 +				self.vendor = 'msvc'
    1.81 +				if AMBuild.options.debug == '1':
    1.82 +					self.compiler.AddToListVar('CFLAGS', '/MTd')
    1.83 +					self.compiler.AddToListVar('POSTLINKFLAGS', '/NODEFAULTLIB:libcmt')
    1.84 +				else:
    1.85 +					self.compiler.AddToListVar('CFLAGS', '/MT')
    1.86 +				self.compiler.AddToListVar('CDEFINES', '_CRT_SECURE_NO_DEPRECATE')
    1.87 +				self.compiler.AddToListVar('CDEFINES', '_CRT_SECURE_NO_WARNINGS')
    1.88 +				self.compiler.AddToListVar('CDEFINES', '_CRT_NONSTDC_NO_DEPRECATE')
    1.89 +				self.compiler.AddToListVar('CXXFLAGS', '/EHsc')
    1.90 +				self.compiler.AddToListVar('CXXFLAGS', '/GR-')
    1.91 +				self.compiler.AddToListVar('CFLAGS', '/W3')
    1.92 +				self.compiler.AddToListVar('CFLAGS', '/nologo')
    1.93 +				self.compiler.AddToListVar('CFLAGS', '/Zi')
    1.94 +				self.compiler.AddToListVar('CXXFLAGS', '/TP')
    1.95 +				self.compiler.AddToListVar('POSTLINKFLAGS', '/DEBUG')
    1.96 +				self.compiler.AddToListVar('POSTLINKFLAGS', '/MACHINE:X86')
    1.97 +				self.compiler.AddToListVar('POSTLINKFLAGS', '/SUBSYSTEM:WINDOWS')
    1.98 +				self.compiler.AddToListVar('POSTLINKFLAGS', 'kernel32.lib')
    1.99 +				self.compiler.AddToListVar('POSTLINKFLAGS', 'user32.lib')
   1.100 +				self.compiler.AddToListVar('POSTLINKFLAGS', 'gdi32.lib')
   1.101 +				self.compiler.AddToListVar('POSTLINKFLAGS', 'winspool.lib')
   1.102 +				self.compiler.AddToListVar('POSTLINKFLAGS', 'comdlg32.lib')
   1.103 +				self.compiler.AddToListVar('POSTLINKFLAGS', 'advapi32.lib')
   1.104 +				self.compiler.AddToListVar('POSTLINKFLAGS', 'shell32.lib')
   1.105 +				self.compiler.AddToListVar('POSTLINKFLAGS', 'ole32.lib')
   1.106 +				self.compiler.AddToListVar('POSTLINKFLAGS', 'oleaut32.lib')
   1.107 +				self.compiler.AddToListVar('POSTLINKFLAGS', 'uuid.lib')
   1.108 +				self.compiler.AddToListVar('POSTLINKFLAGS', 'odbc32.lib')
   1.109 +				self.compiler.AddToListVar('POSTLINKFLAGS', 'odbccp32.lib')
   1.110 +
   1.111 +			#Optimization
   1.112 +			if AMBuild.options.opt == '1':
   1.113 +				self.compiler.AddToListVar('CDEFINES', 'NDEBUG')
   1.114 +				if self.vendor == 'gcc':
   1.115 +					self.compiler.AddToListVar('CFLAGS', '-O3')
   1.116 +				elif self.vendor == 'msvc':
   1.117 +					self.compiler.AddToListVar('CFLAGS', '/Ox')
   1.118 +					self.compiler.AddToListVar('POSTLINKFLAGS', '/OPT:ICF')
   1.119 +					self.compiler.AddToListVar('POSTLINKFLAGS', '/OPT:REF')
   1.120 +
   1.121 +			#Debugging
   1.122 +			if AMBuild.options.debug == '1':
   1.123 +				self.compiler.AddToListVar('CDEFINES', 'DEBUG')
   1.124 +				self.compiler.AddToListVar('CDEFINES', '_DEBUG')
   1.125 +				if self.vendor == 'gcc':
   1.126 +					self.compiler.AddToListVar('CFLAGS', '-g3')
   1.127 +				elif self.vendor == 'msvc':
   1.128 +					self.compiler.AddToListVar('CFLAGS', '/Od')
   1.129 +					self.compiler.AddToListVar('CFLAGS', '/RTC1')
   1.130 +
   1.131 +			#Platform-specifics
   1.132 +			if AMBuild.target['platform'] == 'linux':
   1.133 +				self.compiler.AddToListVar('CDEFINES', '_LINUX')
   1.134 +			elif AMBuild.target['platform'] == 'darwin':
   1.135 +				self.compiler.AddToListVar('CFLAGS', ['-isysroot',
   1.136 +				                                      '/Developer/SDKs/MacOSX10.5.sdk'])
   1.137 +				self.compiler.AddToListVar('POSTLINKFLAGS', '-mmacosx-version-min=10.5')
   1.138 +				self.compiler.AddToListVar('POSTLINKFLAGS', ['-arch', 'i386'])
   1.139 +				self.compiler.AddToListVar('POSTLINKFLAGS', '-lstdc++')
   1.140 +
   1.141 +				# For OS X dylib versioning
   1.142 +				import re
   1.143 +				productFile = open(os.path.join(AMBuild.sourceFolder, 'product.version'), 'r')
   1.144 +				productContents = productFile.read()
   1.145 +				productFile.close()
   1.146 +				m = re.match('(\d+)\.(\d+)\.(\d+).*', productContents)
   1.147 +				if m == None:
   1.148 +					self.version = '1.0.0'
   1.149 +				else:
   1.150 +					major, minor, release = m.groups()
   1.151 +					self.version = '{0}.{1}.{2}'.format(major, minor, release)
   1.152 +				AMBuild.cache.CacheVariable('version', self.version)
   1.153 +			elif AMBuild.target['platform'] == 'windows':
   1.154 +				self.compiler.AddToListVar('CDEFINES', 'WIN32')
   1.155 +				self.compiler.AddToListVar('CDEFINES', '_WINDOWS')
   1.156 +
   1.157 +			#Finish up
   1.158 +			self.compiler.AddToListVar('CDEFINES', 'CSSDM_GENERATED_BUILD')
   1.159 +			self.compiler.AddToListVar('CINCLUDES',
   1.160 +			                           os.path.join(AMBuild.outputFolder, 'includes'))
   1.161 +			self.compiler.ToConfig(AMBuild, 'compiler')
   1.162 +			AMBuild.cache.CacheVariable('vendor', self.vendor)
   1.163 +			self.targetMap = { }
   1.164 +			AMBuild.cache.CacheVariable('targetMap', self.targetMap)
   1.165 +		else:
   1.166 +			self.compiler.FromConfig(AMBuild, 'compiler')
   1.167 +			self.targetMap = AMBuild.cache['targetMap']
   1.168 +
   1.169 +		if AMBuild.target['platform'] == 'windows':
   1.170 +			self.compiler.AddToListVar('RCINCLUDES', os.path.join(AMBuild.sourceFolder, 'public'))
   1.171 +			self.compiler.AddToListVar('RCINCLUDES',
   1.172 +			                           os.path.join(AMBuild.outputFolder, 'includes'))
   1.173 +		self.mmsPath = AMBuild.cache['MMSOURCE18']
   1.174 +		self.smSourcePath = AMBuild.cache['SOURCEMOD']
   1.175 +		self.smBinPath = AMBuild.cache['SOURCEMOD-BIN']
   1.176 +
   1.177 +	def DefaultCompiler(self):
   1.178 +		compiler = self.compiler.Clone()
   1.179 +		compiler['CXXINCLUDES'].append(os.path.join(self.mmsPath, 'core', 'sourcehook'))
   1.180 +		return compiler
   1.181 +
   1.182 +	def JobMatters(self, jobname):
   1.183 +		file = sys._getframe().f_code.co_filename
   1.184 +		if AMBuild.mode == 'config':
   1.185 +			self.targetMap[jobname] = file
   1.186 +			return True
   1.187 +		if len(AMBuild.args) == 0:
   1.188 +			return True
   1.189 +		if not jobname in AMBuild.args:
   1.190 +			return False
   1.191 +
   1.192 +	def AutoVersion(self, folder, binary):
   1.193 +		if AMBuild.target['platform'] == 'windows':
   1.194 +			env = {'RCDEFINES': ['BINARY_NAME="' + binary.binaryFile + '"', 'CSSDM_GENERATED_BUILD']}
   1.195 +			binary.AddResourceFile(os.path.join(folder, 'version.rc' ), env)
   1.196 +		elif AMBuild.target['platform'] == 'darwin' and isinstance(binary, Cpp.LibraryBuilder):
   1.197 +			binary.compiler['POSTLINKFLAGS'].extend(['-compatibility_version', '1.0.0'])
   1.198 +			binary.compiler['POSTLINKFLAGS'].extend(['-current_version', AMBuild.cache['version']])
   1.199 +		else:
   1.200 +			return
   1.201 +
   1.202 +	def PreSetupHL2Job(self, job, builder, sdk):
   1.203 +		info = self.sdkInfo[sdk]
   1.204 +		sdkPath = AMBuild.cache[info['sdk']]
   1.205 +		if AMBuild.target['platform'] == 'linux':
   1.206 +			if sdk == 'ep1':
   1.207 +				staticLibs = os.path.join(sdkPath, 'linux_sdk')
   1.208 +			else:
   1.209 +				staticLibs = os.path.join(sdkPath, 'lib', 'linux')
   1.210 +			workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
   1.211 +			if sdk in ['ep2v', 'l4d', 'l4d2']:
   1.212 +				for i in ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.so', 'libtier0.so']:
   1.213 +					link = os.path.join(workFolder, i)
   1.214 +					target = os.path.join(staticLibs, i)
   1.215 +					try:
   1.216 +						os.lstat(link)
   1.217 +					except:
   1.218 +						job.AddCommand(SymlinkCommand(link, target))
   1.219 +			else:
   1.220 +				for i in ['tier1_i486.a', 'mathlib_i486.a', 'vstdlib_i486.so', 'tier0_i486.so']:
   1.221 +					link = os.path.join(workFolder, i)
   1.222 +					target = os.path.join(staticLibs, i)
   1.223 +					try:
   1.224 +						os.lstat(link)
   1.225 +					except:
   1.226 +						job.AddCommand(SymlinkCommand(link, target))
   1.227 +		elif AMBuild.target['platform'] == 'darwin':
   1.228 +			staticLibs = os.path.join(sdkPath, 'lib', 'mac')
   1.229 +			workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
   1.230 +			for i in ['tier1_i486.a', 'mathlib_i486.a', 'libvstdlib.dylib', 'libtier0.dylib']:
   1.231 +				link = os.path.join(workFolder, i)
   1.232 +				target = os.path.join(staticLibs, i)
   1.233 +				try:
   1.234 +					os.lstat(link)
   1.235 +				except:
   1.236 +					job.AddCommand(SymlinkCommand(link, target))
   1.237 +		elif AMBuild.target['platform'] == 'windows':
   1.238 +			libs = ['tier0', 'tier1', 'vstdlib', 'mathlib']
   1.239 +			if sdk == 'swarm':
   1.240 +				libs.append('interfaces')
   1.241 +			for lib in libs:
   1.242 +				libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib'
   1.243 +				builder.RebuildIfNewer(libPath)
   1.244 +				builder['POSTLINKFLAGS'].append(libPath)
   1.245 +
   1.246 +	def PostSetupHL2Job(self, job, builder, sdk):
   1.247 +		if AMBuild.target['platform'] in ['linux', 'darwin']:
   1.248 +			builder.AddObjectFiles(['tier1_i486.a', 'mathlib_i486.a'])
   1.249 +
   1.250 +	def DefaultHL2Compiler(self, path, sdk, noLink = False, oldMms = '-legacy'):
   1.251 +		compiler = self.DefaultCompiler()
   1.252 +
   1.253 +		mms = 'core'
   1.254 +		if sdk == 'ep1':
   1.255 +			mms += oldMms
   1.256 +
   1.257 +		compiler['CXXINCLUDES'].append(os.path.join(self.mmsPath, mms))
   1.258 +		compiler['CXXINCLUDES'].append(os.path.join(self.mmsPath, mms, 'sourcehook'))
   1.259 +		compiler['CXXINCLUDES'].append(os.path.join(self.smSourcePath, 'public'))
   1.260 +		compiler['CXXINCLUDES'].append(os.path.join(self.smSourcePath, 'public/extensions'))
   1.261 +		compiler['CXXINCLUDES'].append(os.path.join(self.smSourcePath, 'public/sourcepawn'))
   1.262 +
   1.263 +		info = self.sdkInfo
   1.264 +		compiler['CDEFINES'].extend(['SE_' + info[i]['name'] + '=' + info[i]['def'] for i in info])
   1.265 +
   1.266 +		paths = [['public'], ['public', 'engine'], ['public', 'mathlib'], ['public', 'vstdlib'],
   1.267 +						 ['public', 'tier0'], ['public', 'tier1']]
   1.268 +		if sdk == 'ep1' or sdk == 'darkm':
   1.269 +			paths.append(['public', 'dlls'])
   1.270 +			paths.append(['game_shared'])
   1.271 +		else:
   1.272 +			paths.append(['public', 'game', 'server'])
   1.273 +			paths.append(['game', 'shared'])
   1.274 +			paths.append(['game', 'server'])
   1.275 +			paths.append(['common'])
   1.276 +
   1.277 +		info = self.sdkInfo[sdk]
   1.278 +		sdkPath = AMBuild.cache[info['sdk']]
   1.279 +
   1.280 +		compiler['CDEFINES'].append('SOURCE_ENGINE=' + info['def'])
   1.281 +
   1.282 +		if sdk == 'swarm' and AMBuild.target['platform'] == 'windows':
   1.283 +			compiler['CDEFINES'].extend(['COMPILER_MSVC', 'COMPILER_MSVC32'])
   1.284 +
   1.285 +		if sdk == 'ep1':
   1.286 +			if AMBuild.target['platform'] == 'linux':
   1.287 +				staticLibs = os.path.join(sdkPath, 'linux_sdk')
   1.288 +		else:
   1.289 +			if AMBuild.target['platform'] == 'linux':
   1.290 +				staticLibs = os.path.join(sdkPath, 'lib', 'linux')
   1.291 +			elif AMBuild.target['platform'] == 'darwin':
   1.292 +				staticLibs = os.path.join(sdkPath, 'lib', 'mac')
   1.293 +
   1.294 +		for i in paths:
   1.295 +			compiler['CXXINCLUDES'].append(os.path.join(sdkPath, *i))
   1.296 +
   1.297 +		if not noLink:
   1.298 +			if AMBuild.target['platform'] == 'linux':
   1.299 +				compiler['POSTLINKFLAGS'][0:0] = ['-lm']
   1.300 +				if sdk in ['ep2v', 'l4d', 'l4d2']:
   1.301 +					compiler['POSTLINKFLAGS'][0:0] = ['libtier0.so']
   1.302 +					compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.so']
   1.303 +				else:
   1.304 +					compiler['POSTLINKFLAGS'][0:0] = ['tier0_i486.so']
   1.305 +					compiler['POSTLINKFLAGS'][0:0] = ['vstdlib_i486.so']
   1.306 +			elif AMBuild.target['platform'] == 'darwin':
   1.307 +				compiler['POSTLINKFLAGS'][0:0] = ['libtier0.dylib']
   1.308 +				compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.dylib']
   1.309 +
   1.310 +		return compiler
   1.311 +
   1.312 +cssdm = CSSDM()
   1.313 +globals = {
   1.314 +	'CSSDM': cssdm
   1.315 +}
   1.316 +
   1.317 +AMBuild.Include(os.path.join('buildbot', 'Versioning'), globals)
   1.318 +
   1.319 +FileList = [
   1.320 +		['AMBuilder'],
   1.321 +	]
   1.322 +
   1.323 +for parts in FileList:
   1.324 +	AMBuild.Include(os.path.join(*parts), globals)
   1.325 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/AMBuilder	Sat Apr 16 00:41:25 2011 -0700
     2.3 @@ -0,0 +1,28 @@
     2.4 +# vim: set ts=2 sw=2 tw=99 noet ft=python: 
     2.5 +import os
     2.6 +
     2.7 +sdk = CSSDM.sdkInfo['ep2v']
     2.8 +
     2.9 +compiler = CSSDM.DefaultHL2Compiler('.', 'ep2v')
    2.10 +compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'sdk'))
    2.11 +
    2.12 +name = 'cssdm.ext.' + sdk['ext']
    2.13 +extension = AMBuild.AddJob(name)
    2.14 +binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
    2.15 +CSSDM.PreSetupHL2Job(extension, binary, 'ep2v')
    2.16 +binary.AddSourceFiles('.', [
    2.17 +	'cssdm_callbacks.cpp',
    2.18 +	'cssdm_config.cpp',
    2.19 +	'cssdm_ctrl.cpp',
    2.20 +	'cssdm_detours.cpp',
    2.21 +	'cssdm_events.cpp',
    2.22 +	'cssdm_ffa.cpp',
    2.23 +	'cssdm_main.cpp',
    2.24 +	'cssdm_players.cpp',
    2.25 +	'cssdm_utils.cpp',
    2.26 +	'cssdm_weapons.cpp',
    2.27 +	])
    2.28 +CSSDM.PostSetupHL2Job(extension, binary, 'ep2v')
    2.29 +CSSDM.AutoVersion('.', binary)
    2.30 +binary.SendToJob()
    2.31 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/PackageScript	Sat Apr 16 00:41:25 2011 -0700
     3.3 @@ -0,0 +1,120 @@
     3.4 +# vim: set ts=2 sw=2 tw=99 noet ft=python: 
     3.5 +import os
     3.6 +import shutil
     3.7 +import ambuild.osutil as osutil
     3.8 +from ambuild.command import Command
     3.9 +
    3.10 +job = AMBuild.AddJob('package')
    3.11 +
    3.12 +class DestroyPath(Command):
    3.13 +	def __init__(self, folder):
    3.14 +		Command.__init__(self)
    3.15 +		self.folder = folder
    3.16 +
    3.17 +	def destroy(self, path):
    3.18 +		entries = os.listdir(path)
    3.19 +		for entry in entries:
    3.20 +			newpath = os.path.join(path, entry)
    3.21 +			if os.path.isdir(newpath):
    3.22 +				self.destroy(newpath)
    3.23 +				os.rmdir(newpath)
    3.24 +			elif os.path.isfile(newpath):
    3.25 +				os.remove(newpath)
    3.26 +
    3.27 +	def run(self, runner, job):
    3.28 +		runner.PrintOut('rm -rf {0}/*'.format(self.folder))
    3.29 +		self.destroy(self.folder)
    3.30 +
    3.31 +class CreateFolders(Command):
    3.32 +	def __init__(self, folders):
    3.33 +		Command.__init__(self)
    3.34 +		self.folders = folders
    3.35 +	
    3.36 +	def run(self, runner, job):
    3.37 +		for folder in self.folders:
    3.38 +			path = os.path.join(*folder)
    3.39 +			runner.PrintOut('mkdir {0}'.format(path))
    3.40 +			os.makedirs(path)
    3.41 +
    3.42 +#Shallow folder copy
    3.43 +class CopyFolder(Command):
    3.44 +	def __init__(self, fromList, toList, excludes = []):
    3.45 +		Command.__init__(self)
    3.46 +		self.fromPath = os.path.join(AMBuild.sourceFolder, *fromList)
    3.47 +		self.toPath = os.path.join(*toList) 
    3.48 +		self.excludes = excludes
    3.49 +	
    3.50 +	def run(self, runner, job):
    3.51 +		entries = os.listdir(self.fromPath)
    3.52 +		for entry in entries:
    3.53 +			if entry in self.excludes:
    3.54 +				continue
    3.55 +			path = os.path.join(self.fromPath, entry)
    3.56 +			if not os.path.isfile(path):
    3.57 +				continue
    3.58 +			runner.PrintOut('copy {0} to {1}'.format(path, self.toPath))
    3.59 +			shutil.copy(path, self.toPath)
    3.60 +
    3.61 +#Single file copy
    3.62 +class CopyFile(Command):
    3.63 +	def __init__(self, fromFile, toPath):
    3.64 +		Command.__init__(self)
    3.65 +		self.fromFile = fromFile
    3.66 +		self.toPath = toPath
    3.67 +
    3.68 +	def run(self, runner, job):
    3.69 +		runner.PrintOut('copy {0} to {1}'.format(self.fromFile, self.toPath))
    3.70 +		shutil.copy(self.fromFile, self.toPath)
    3.71 +
    3.72 +
    3.73 +folders = [['addons', 'metamod'],
    3.74 +				   ['addons', 'stripper'],
    3.75 +					 ['addons', 'stripper', 'bin'],
    3.76 +					 ['addons', 'stripper', 'dumps'],
    3.77 +					 ['addons', 'stripper', 'maps']]
    3.78 +
    3.79 +#Setup
    3.80 +job.AddCommand(DestroyPath(os.path.join(AMBuild.outputFolder, 'package')))
    3.81 +job.AddCommand(CreateFolders(folders))
    3.82 +
    3.83 +#Copiy Files
    3.84 +job.AddCommand(CopyFile(os.path.join(AMBuild.sourceFolder, 'de_dust.cfg'),
    3.85 +                        os.path.join('addons', 'stripper', 'maps')))
    3.86 +job.AddCommand(CopyFile(os.path.join(AMBuild.sourceFolder, 'global_filters.cfg'),
    3.87 +                        os.path.join('addons', 'stripper')))
    3.88 +job.AddCommand(CopyFile(os.path.join(AMBuild.sourceFolder, 'stripper.vdf'),
    3.89 +                        os.path.join('addons', 'metamod')))
    3.90 +
    3.91 +bincopies = []
    3.92 +
    3.93 +def AddNormalLibrary(name, dest):
    3.94 +	dest = os.path.join('addons', 'stripper', dest)
    3.95 +	bincopies.append(CopyFile(os.path.join('..', name, name + osutil.SharedLibSuffix()), dest))
    3.96 +	pdb_list.append(name + '\\' + name + '.pdb')
    3.97 +
    3.98 +def AddHL2Library(name, dest):
    3.99 +	for i in Stripper.sdkInfo:
   3.100 +		sdk = Stripper.sdkInfo[i]
   3.101 +		if AMBuild.target['platform'] not in sdk['platform']:
   3.102 +			continue
   3.103 +		AddNormalLibrary(name + '.' + sdk['ext'], dest)
   3.104 +
   3.105 +pdb_list = []
   3.106 +
   3.107 +# Copy loader binaries
   3.108 +if AMBuild.target['platform'] == 'linux':
   3.109 +	AddNormalLibrary('stripper_mm_i486', 'bin')
   3.110 +else:
   3.111 +	AddNormalLibrary('stripper_mm', 'bin')
   3.112 +AddNormalLibrary('stripper.core', 'bin')
   3.113 +AddHL2Library('stripper', 'bin')
   3.114 +
   3.115 +job.AddCommandGroup(bincopies)
   3.116 +
   3.117 +if AMBuild.target['platform'] == 'windows':
   3.118 +	pdblog = open(os.path.join(AMBuild.outputFolder, 'pdblog.txt'), 'wt')
   3.119 +	for pdb in pdb_list:
   3.120 +		pdblog.write(pdb + '\n')
   3.121 +	pdblog.close()
   3.122 +
   3.123 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/buildbot/Versioning	Sat Apr 16 00:41:25 2011 -0700
     4.3 @@ -0,0 +1,57 @@
     4.4 +# vim: set ts=2 sw=2 tw=99 noet ft=python: 
     4.5 +import os
     4.6 +import re
     4.7 +import subprocess
     4.8 +from ambuild.cache import Cache
     4.9 +import ambuild.command as command
    4.10 +
    4.11 +#Quickly try to ascertain the current repository revision
    4.12 +def GetVersion():
    4.13 +	args = ['hg', 'parent', '-R', AMBuild.sourceFolder]
    4.14 +	p = command.RunDirectCommand(AMBuild, args)
    4.15 +	m = re.match('changeset:\s+(\d+):(.+)', p.stdoutText)
    4.16 +	if m == None:
    4.17 +		raise Exception('Could not determine repository version')
    4.18 +	return m.groups()
    4.19 +
    4.20 +def PerformReversioning():
    4.21 +	rev, cset = GetVersion()
    4.22 +	cacheFile = os.path.join(AMBuild.outputFolder, '.ambuild', 'hgcache')
    4.23 +	cache = Cache(cacheFile)
    4.24 +	if os.path.isfile(cacheFile):
    4.25 +		cache.LoadCache()
    4.26 +		if cache.HasVariable('cset') and cache['cset'] == cset:
    4.27 +			return False
    4.28 +	cache.CacheVariable('cset', cset)
    4.29 +
    4.30 +	productFile = open(os.path.join(AMBuild.sourceFolder, 'product.version'), 'r')
    4.31 +	productContents = productFile.read()
    4.32 +	productFile.close()
    4.33 +	m = re.match('(\d+)\.(\d+)\.(\d+)(.*)', productContents)
    4.34 +	if m == None:
    4.35 +		raise Exception('Could not detremine product version')
    4.36 +	major, minor, release, tag = m.groups()
    4.37 +
    4.38 +	incFolder = os.path.join(AMBuild.outputFolder, 'includes')
    4.39 +	if not os.path.isdir(incFolder):
    4.40 +		os.makedirs(incFolder)
    4.41 +	incFile = open(os.path.join(incFolder, 'cssdm_version_auto.h'), 'w')
    4.42 +	incFile.write("""
    4.43 +#ifndef _CSSDM_AUTO_VERSION_INFORMATION_H_
    4.44 +#define _CSSDM_AUTO_VERSION_INFORMATION_H_
    4.45 +
    4.46 +#define CSSDM_BUILD_STRING 		\"{0}\"
    4.47 +#define CSSDM_BUILD_UNIQUEID		\"{1}:{2}\" CSSDM_BUILD_STRING
    4.48 +#define CSSDM_FULL_VERSION		\"{3}.{4}.{5}\" CSSDM_BUILD_STRING
    4.49 +#define CSSDM_FILE_VERSION		{6},{7},{8},0
    4.50 +
    4.51 +#endif /* _CSSDM_AUTO_VERSION_INFORMATION_H_ */
    4.52 +
    4.53 +""".format(tag, rev, cset, major, minor, release, major, minor, release))
    4.54 +	incFile.close()
    4.55 +
    4.56 +	cache.WriteCache()
    4.57 +
    4.58 +PerformReversioning()
    4.59 +
    4.60 +
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/configure.py	Sat Apr 16 00:41:25 2011 -0700
     5.3 @@ -0,0 +1,10 @@
     5.4 +# vim: set ts=2 sw=2 tw=99 noet:
     5.5 +import sys
     5.6 +import ambuild.runner as runner
     5.7 +
     5.8 +run = runner.Runner()
     5.9 +run.options.add_option('--enable-debug', action='store_const', const='1', dest='debug',
    5.10 +                       help='Enable debugging symbols')
    5.11 +run.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt',
    5.12 +                       help='Enable optimization')
    5.13 +run.Configure(sys.path[0])
     6.1 --- a/cssdm_config.cpp	Sun Sep 05 23:28:46 2010 -0700
     6.2 +++ b/cssdm_config.cpp	Sat Apr 16 00:41:25 2011 -0700
     6.3 @@ -30,6 +30,7 @@
     6.4  #include "cssdm_ffa.h"
     6.5  #include "cssdm_callbacks.h"
     6.6  #include "cssdm_headers.h"
     6.7 +#include "cssdm_version.h"
     6.8  
     6.9  static void ChangeStatus(IConVar *cvar, const char *value, float flOldValue);
    6.10  static void ChangeFFAStatus(IConVar *cvar, const char *value, float flOldValue);
    6.11 @@ -38,7 +39,7 @@
    6.12  ConVar cssdm_ragdoll_time("cssdm_ragdoll_time", "2", 0, "Sets ragdoll stay time", true, 0.0, true, 20.0);
    6.13  ConVar cssdm_respawn_wait("cssdm_respawn_wait", "0.75", 0, "Sets respawn wait time");
    6.14  ConVar cssdm_allow_c4("cssdm_allow_c4", "0", 0, "Sets whether C4 is allowed");
    6.15 -ConVar cssdm_version("cssdm_version", SMEXT_CONF_VERSION, FCVAR_REPLICATED|FCVAR_NOTIFY, "CS:S DM Version");
    6.16 +ConVar cssdm_version("cssdm_version", CSSDM_FULL_VERSION, FCVAR_REPLICATED|FCVAR_NOTIFY, "CS:S DM Version");
    6.17  ConVar cssdm_enabled("cssdm_enabled", 
    6.18  					 "1", 
    6.19  					 FCVAR_REPLICATED|FCVAR_NOTIFY, 
     7.1 --- a/cssdm_main.cpp	Sun Sep 05 23:28:46 2010 -0700
     7.2 +++ b/cssdm_main.cpp	Sat Apr 16 00:41:25 2011 -0700
     7.3 @@ -36,6 +36,7 @@
     7.4  #include "cssdm_callbacks.h"
     7.5  #include "cssdm_weapons.h"
     7.6  #include "cssdm_detours.h"
     7.7 +#include "cssdm_version.h"
     7.8  
     7.9  SH_DECL_HOOK3_void(IServerGameDLL, ServerActivate, SH_NOATTRIB, 0, edict_t *, int, int);
    7.10  SH_DECL_HOOK0_void(IServerGameDLL, LevelShutdown, SH_NOATTRIB, 0)
    7.11 @@ -264,3 +265,9 @@
    7.12  		bintools = NULL;
    7.13  	}
    7.14  }
    7.15 +
    7.16 +const char *Deathmatch::GetExtensionVerString()
    7.17 +{
    7.18 +	return CSSDM_FULL_VERSION;
    7.19 +}
    7.20 +
     8.1 --- a/cssdm_main.h	Sun Sep 05 23:28:46 2010 -0700
     8.2 +++ b/cssdm_main.h	Sat Apr 16 00:41:25 2011 -0700
     8.3 @@ -50,6 +50,7 @@
     8.4  	virtual bool QueryRunning(char *error, size_t maxlength);
     8.5  	bool QueryInterfaceDrop(SMInterface *pInterface);
     8.6  	void NotifyInterfaceDrop(SMInterface *pInterface);
     8.7 +	const char *GetExtensionVerString();
     8.8  public:
     8.9  	virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlength, bool late);
    8.10  	//virtual bool SDK_OnMetamodUnload(char *error, size_t maxlength);
     9.1 --- a/cssdm_utils.cpp	Sun Sep 05 23:28:46 2010 -0700
     9.2 +++ b/cssdm_utils.cpp	Sat Apr 16 00:41:25 2011 -0700
     9.3 @@ -139,7 +139,7 @@
     9.4  
     9.5  bool DM_CheckSerial(edict_t *pEdict, int serial)
     9.6  {
     9.7 -	int new_serial = (serial & (1 << NUM_NETWORKED_EHANDLE_SERIAL_NUMBER_BITS) - 1);
     9.8 +	int new_serial = (serial & ((1 << NUM_NETWORKED_EHANDLE_SERIAL_NUMBER_BITS) - 1));
     9.9  	return (pEdict->m_NetworkSerialNumber == new_serial);
    9.10  }
    9.11  
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/cssdm_version.h	Sat Apr 16 00:41:25 2011 -0700
    10.3 @@ -0,0 +1,52 @@
    10.4 +/**
    10.5 + * vim: set ts=4 :
    10.6 + * =============================================================================
    10.7 + * SourceMod
    10.8 + * Copyright (C) 2004-2008 AlliedModders LLC.  All rights reserved.
    10.9 + * =============================================================================
   10.10 + *
   10.11 + * This program is free software; you can redistribute it and/or modify it under
   10.12 + * the terms of the GNU General Public License, version 3.0, as published by the
   10.13 + * Free Software Foundation.
   10.14 + * 
   10.15 + * This program is distributed in the hope that it will be useful, but WITHOUT
   10.16 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
   10.17 + * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
   10.18 + * details.
   10.19 + *
   10.20 + * You should have received a copy of the GNU General Public License along with
   10.21 + * this program.  If not, see <http://www.gnu.org/licenses/>.
   10.22 + *
   10.23 + * As a special exception, AlliedModders LLC gives you permission to link the
   10.24 + * code of this program (as well as its derivative works) to "Half-Life 2," the
   10.25 + * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
   10.26 + * by the Valve Corporation.  You must obey the GNU General Public License in
   10.27 + * all respects for all other code used.  Additionally, AlliedModders LLC grants
   10.28 + * this exception to all derivative works.  AlliedModders LLC defines further
   10.29 + * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
   10.30 + * or <http://www.sourcemod.net/license.php>.
   10.31 + *
   10.32 + * Version: $Id$
   10.33 + */
   10.34 +
   10.35 +#ifndef _INCLUDE_CSSDM_VERSION_INFORMATION_H_
   10.36 +#define _INCLUDE_CSSDM_VERSION_INFORMATION_H_
   10.37 +
   10.38 +/**
   10.39 + * @file Contains SourceMod version information.
   10.40 + * @brief This file will redirect to an autogenerated version if being compiled via
   10.41 + * the build scripts.
   10.42 + */
   10.43 +
   10.44 +#if defined CSSDM_GENERATED_BUILD
   10.45 +#include <cssdm_version_auto.h>
   10.46 +#else
   10.47 +#define CSSDM_BUILD_STRING		"-pdev"
   10.48 +#define CSSDM_BUILD_UNIQUEID	"nn:y" CSSDM_BUILD_STRING
   10.49 +#define CSSDM_FULL_VERSION		"2.1.3" CSSDM_BUILD_STRING
   10.50 +#define CSSDM_FILE_VERSION		2,1,3,0
   10.51 +#endif
   10.52 +#define CSSDM_BUILD_TIMESTAMP	__DATE__ " " __TIME__
   10.53 +
   10.54 +#endif /* _INCLUDE_CSSDM_VERSION_INFORMATION_H_ */
   10.55 +
    11.1 --- a/msvc8/sm_cssdm.sln	Sun Sep 05 23:28:46 2010 -0700
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,20 +0,0 @@
    11.4 -
    11.5 -Microsoft Visual Studio Solution File, Format Version 9.00
    11.6 -# Visual Studio 2005
    11.7 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sm_cssdm", "sm_cssdm.vcproj", "{B3E797CF-4E77-4C9D-B8A8-7589B6902206}"
    11.8 -EndProject
    11.9 -Global
   11.10 -	GlobalSection(SolutionConfigurationPlatforms) = preSolution
   11.11 -		Debug|Win32 = Debug|Win32
   11.12 -		Release|Win32 = Release|Win32
   11.13 -	EndGlobalSection
   11.14 -	GlobalSection(ProjectConfigurationPlatforms) = postSolution
   11.15 -		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug|Win32.ActiveCfg = Debug|Win32
   11.16 -		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Debug|Win32.Build.0 = Debug|Win32
   11.17 -		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.ActiveCfg = Release|Win32
   11.18 -		{B3E797CF-4E77-4C9D-B8A8-7589B6902206}.Release|Win32.Build.0 = Release|Win32
   11.19 -	EndGlobalSection
   11.20 -	GlobalSection(SolutionProperties) = preSolution
   11.21 -		HideSolutionNode = FALSE
   11.22 -	EndGlobalSection
   11.23 -EndGlobal
    12.1 --- a/msvc8/sm_cssdm.vcproj	Sun Sep 05 23:28:46 2010 -0700
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,320 +0,0 @@
    12.4 -<?xml version="1.0" encoding="Windows-1252"?>
    12.5 -<VisualStudioProject
    12.6 -	ProjectType="Visual C++"
    12.7 -	Version="8.00"
    12.8 -	Name="sm_cssdm"
    12.9 -	ProjectGUID="{B3E797CF-4E77-4C9D-B8A8-7589B6902206}"
   12.10 -	RootNamespace="sm_cssdm"
   12.11 -	Keyword="Win32Proj"
   12.12 -	>
   12.13 -	<Platforms>
   12.14 -		<Platform
   12.15 -			Name="Win32"
   12.16 -		/>
   12.17 -	</Platforms>
   12.18 -	<ToolFiles>
   12.19 -	</ToolFiles>
   12.20 -	<Configurations>
   12.21 -		<Configuration
   12.22 -			Name="Debug|Win32"
   12.23 -			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
   12.24 -			IntermediateDirectory="$(ConfigurationName)"
   12.25 -			ConfigurationType="2"
   12.26 -			CharacterSet="2"
   12.27 -			>
   12.28 -			<Tool
   12.29 -				Name="VCPreBuildEventTool"
   12.30 -			/>
   12.31 -			<Tool
   12.32 -				Name="VCCustomBuildTool"
   12.33 -			/>
   12.34 -			<Tool
   12.35 -				Name="VCXMLDataGeneratorTool"
   12.36 -			/>
   12.37 -			<Tool
   12.38 -				Name="VCWebServiceProxyGeneratorTool"
   12.39 -			/>
   12.40 -			<Tool
   12.41 -				Name="VCMIDLTool"
   12.42 -			/>
   12.43 -			<Tool
   12.44 -				Name="VCCLCompilerTool"
   12.45 -				Optimization="0"
   12.46 -				AdditionalIncludeDirectories="..\sdk;&quot;$(SOURCEMOD)\public&quot;;&quot;$(SOURCEMOD)\public\extensions&quot;;&quot;$(SOURCEMOD)\public\sourcepawn&quot;;&quot;$(HL2SDKOBVALVE)\game\shared&quot;;&quot;$(HL2SDKOBVALVE)\public\game\server&quot;;&quot;$(HL2SDKOBVALVE)\game\server&quot;;&quot;$(HL2SDKOBVALVE)\public&quot;;&quot;$(HL2SDKOBVALVE)\public\engine&quot;;&quot;$(HL2SDKOBVALVE)\public\tier0&quot;;&quot;$(HL2SDKOBVALVE)\public\tier1&quot;;&quot;$(HL2SDKOBVALVE)\public\vstdlib&quot;;&quot;$(HL2SDKOBVALVE)\tier1&quot;;&quot;$(MMSOURCE18)&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
   12.47 -				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
   12.48 -				MinimalRebuild="true"
   12.49 -				BasicRuntimeChecks="3"
   12.50 -				RuntimeLibrary="1"
   12.51 -				RuntimeTypeInfo="false"
   12.52 -				UsePrecompiledHeader="0"
   12.53 -				WarningLevel="3"
   12.54 -				Detect64BitPortabilityProblems="false"
   12.55 -				DebugInformationFormat="4"
   12.56 -			/>
   12.57 -			<Tool
   12.58 -				Name="VCManagedResourceCompilerTool"
   12.59 -			/>
   12.60 -			<Tool
   12.61 -				Name="VCResourceCompilerTool"
   12.62 -			/>
   12.63 -			<Tool
   12.64 -				Name="VCPreLinkEventTool"
   12.65 -			/>
   12.66 -			<Tool
   12.67 -				Name="VCLinkerTool"
   12.68 -				AdditionalDependencies="$(HL2SDKOBVALVE)\lib\public\tier1.lib $(HL2SDKOBVALVE)\lib\public\vstdlib.lib $(HL2SDKOBVALVE)\lib\public\tier0.lib"
   12.69 -				OutputFile="$(OutDir)\cssdm.ext.dll"
   12.70 -				LinkIncremental="2"
   12.71 -				IgnoreDefaultLibraryNames="LIBCMT"
   12.72 -				GenerateDebugInformation="true"
   12.73 -				SubSystem="2"
   12.74 -				TargetMachine="1"
   12.75 -			/>
   12.76 -			<Tool
   12.77 -				Name="VCALinkTool"
   12.78 -			/>
   12.79 -			<Tool
   12.80 -				Name="VCManifestTool"
   12.81 -			/>
   12.82 -			<Tool
   12.83 -				Name="VCXDCMakeTool"
   12.84 -			/>
   12.85 -			<Tool
   12.86 -				Name="VCBscMakeTool"
   12.87 -			/>
   12.88 -			<Tool
   12.89 -				Name="VCFxCopTool"
   12.90 -			/>
   12.91 -			<Tool
   12.92 -				Name="VCAppVerifierTool"
   12.93 -			/>
   12.94 -			<Tool
   12.95 -				Name="VCWebDeploymentTool"
   12.96 -			/>
   12.97 -			<Tool
   12.98 -				Name="VCPostBuildEventTool"
   12.99 -			/>
  12.100 -		</Configuration>
  12.101 -		<Configuration
  12.102 -			Name="Release|Win32"
  12.103 -			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
  12.104 -			IntermediateDirectory="$(ConfigurationName)"
  12.105 -			ConfigurationType="2"
  12.106 -			CharacterSet="2"
  12.107 -			WholeProgramOptimization="1"
  12.108 -			>
  12.109 -			<Tool
  12.110 -				Name="VCPreBuildEventTool"
  12.111 -			/>
  12.112 -			<Tool
  12.113 -				Name="VCCustomBuildTool"
  12.114 -			/>
  12.115 -			<Tool
  12.116 -				Name="VCXMLDataGeneratorTool"
  12.117 -			/>
  12.118 -			<Tool
  12.119 -				Name="VCWebServiceProxyGeneratorTool"
  12.120 -			/>
  12.121 -			<Tool
  12.122 -				Name="VCMIDLTool"
  12.123 -			/>
  12.124 -			<Tool
  12.125 -				Name="VCCLCompilerTool"
  12.126 -				AdditionalIncludeDirectories="..\sdk;&quot;$(SOURCEMOD)\public&quot;;&quot;$(SOURCEMOD)\public\extensions&quot;;&quot;$(SOURCEMOD)\public\sourcepawn&quot;;&quot;$(HL2SDKOBVALVE)\game\shared&quot;;&quot;$(HL2SDKOBVALVE)\public\game\server&quot;;&quot;$(HL2SDKOBVALVE)\game\server&quot;;&quot;$(HL2SDKOBVALVE)\public&quot;;&quot;$(HL2SDKOBVALVE)\public\engine&quot;;&quot;$(HL2SDKOBVALVE)\public\tier0&quot;;&quot;$(HL2SDKOBVALVE)\public\tier1&quot;;&quot;$(HL2SDKOBVALVE)\public\vstdlib&quot;;&quot;$(HL2SDKOBVALVE)\tier1&quot;;&quot;$(MMSOURCE18)&quot;;&quot;$(MMSOURCE18)\core&quot;;&quot;$(MMSOURCE18)\core\sourcehook&quot;"
  12.127 -				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD"
  12.128 -				RuntimeLibrary="0"
  12.129 -				RuntimeTypeInfo="false"
  12.130 -				UsePrecompiledHeader="0"
  12.131 -				WarningLevel="3"
  12.132 -				Detect64BitPortabilityProblems="false"
  12.133 -				DebugInformationFormat="3"
  12.134 -			/>
  12.135 -			<Tool
  12.136 -				Name="VCManagedResourceCompilerTool"
  12.137 -			/>
  12.138 -			<Tool
  12.139 -				Name="VCResourceCompilerTool"
  12.140 -			/>
  12.141 -			<Tool
  12.142 -				Name="VCPreLinkEventTool"
  12.143 -			/>
  12.144 -			<Tool
  12.145 -				Name="VCLinkerTool"
  12.146 -				AdditionalDependencies="$(HL2SDKOBVALVE)\lib\public\tier1.lib $(HL2SDKOBVALVE)\lib\public\vstdlib.lib $(HL2SDKOBVALVE)\lib\public\tier0.lib"
  12.147 -				OutputFile="$(OutDir)\cssdm.ext.dll"
  12.148 -				LinkIncremental="1"
  12.149 -				GenerateDebugInformation="true"
  12.150 -				SubSystem="2"
  12.151 -				OptimizeReferences="2"
  12.152 -				EnableCOMDATFolding="2"
  12.153 -				TargetMachine="1"
  12.154 -			/>
  12.155 -			<Tool
  12.156 -				Name="VCALinkTool"
  12.157 -			/>
  12.158 -			<Tool
  12.159 -				Name="VCManifestTool"
  12.160 -			/>
  12.161 -			<Tool
  12.162 -				Name="VCXDCMakeTool"
  12.163 -			/>
  12.164 -			<Tool
  12.165 -				Name="VCBscMakeTool"
  12.166 -			/>
  12.167 -			<Tool
  12.168 -				Name="VCFxCopTool"
  12.169 -			/>
  12.170 -			<Tool
  12.171 -				Name="VCAppVerifierTool"
  12.172 -			/>
  12.173 -			<Tool
  12.174 -				Name="VCWebDeploymentTool"
  12.175 -			/>
  12.176 -			<Tool
  12.177 -				Name="VCPostBuildEventTool"
  12.178 -			/>
  12.179 -		</Configuration>
  12.180 -	</Configurations>
  12.181 -	<References>
  12.182 -	</References>
  12.183 -	<Files>
  12.184 -		<Filter
  12.185 -			Name="Source Files"
  12.186 -			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
  12.187 -			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
  12.188 -			>
  12.189 -			<File
  12.190 -				RelativePath="..\cssdm_callbacks.cpp"
  12.191 -				>
  12.192 -			</File>
  12.193 -			<File
  12.194 -				RelativePath="..\cssdm_config.cpp"
  12.195 -				>
  12.196 -			</File>
  12.197 -			<File
  12.198 -				RelativePath="..\cssdm_ctrl.cpp"
  12.199 -				>
  12.200 -			</File>
  12.201 -			<File
  12.202 -				RelativePath="..\cssdm_detours.cpp"
  12.203 -				>
  12.204 -			</File>
  12.205 -			<File
  12.206 -				RelativePath="..\cssdm_events.cpp"
  12.207 -				>
  12.208 -			</File>
  12.209 -			<File
  12.210 -				RelativePath="..\cssdm_ffa.cpp"
  12.211 -				>
  12.212 -				<FileConfiguration
  12.213 -					Name="Debug|Win32"
  12.214 -					>
  12.215 -					<Tool
  12.216 -						Name="VCCLCompilerTool"
  12.217 -						ExpandAttributedSource="false"
  12.218 -						AssemblerOutput="0"
  12.219 -					/>
  12.220 -				</FileConfiguration>
  12.221 -			</File>
  12.222 -			<File
  12.223 -				RelativePath="..\cssdm_main.cpp"
  12.224 -				>
  12.225 -			</File>
  12.226 -			<File
  12.227 -				RelativePath="..\cssdm_players.cpp"
  12.228 -				>
  12.229 -			</File>
  12.230 -			<File
  12.231 -				RelativePath="..\cssdm_utils.cpp"
  12.232 -				>
  12.233 -			</File>
  12.234 -			<File
  12.235 -				RelativePath="..\cssdm_weapons.cpp"
  12.236 -				>
  12.237 -			</File>
  12.238 -		</Filter>
  12.239 -		<Filter
  12.240 -			Name="Header Files"
  12.241 -			Filter="h;hpp;hxx;hm;inl;inc;xsd"
  12.242 -			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
  12.243 -			>
  12.244 -			<File
  12.245 -				RelativePath="..\cssdm_callbacks.h"
  12.246 -				>
  12.247 -			</File>
  12.248 -			<File
  12.249 -				RelativePath="..\cssdm_config.h"
  12.250 -				>
  12.251 -			</File>
  12.252 -			<File
  12.253 -				RelativePath="..\cssdm_ctrl.h"
  12.254 -				>
  12.255 -			</File>
  12.256 -			<File
  12.257 -				RelativePath="..\cssdm_detours.h"
  12.258 -				>
  12.259 -			</File>
  12.260 -			<File
  12.261 -				RelativePath="..\cssdm_events.h"
  12.262 -				>
  12.263 -			</File>
  12.264 -			<File
  12.265 -				RelativePath="..\cssdm_ffa.h"
  12.266 -				>
  12.267 -			</File>
  12.268 -			<File
  12.269 -				RelativePath="..\cssdm_headers.h"
  12.270 -				>
  12.271 -			</File>
  12.272 -			<File
  12.273 -				RelativePath="..\cssdm_includesdk.h"
  12.274 -				>
  12.275 -			</File>
  12.276 -			<File
  12.277 -				RelativePath="..\cssdm_main.h"
  12.278 -				>
  12.279 -			</File>
  12.280 -			<File
  12.281 -				RelativePath="..\cssdm_players.h"
  12.282 -				>
  12.283 -			</File>
  12.284 -			<File
  12.285 -				RelativePath="..\cssdm_utils.h"
  12.286 -				>
  12.287 -			</File>
  12.288 -			<File
  12.289 -				RelativePath="..\cssdm_weapons.h"
  12.290 -				>
  12.291 -			</File>
  12.292 -		</Filter>
  12.293 -		<Filter
  12.294 -			Name="Resource Files"
  12.295 -			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
  12.296 -			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
  12.297 -			>
  12.298 -			<File
  12.299 -				RelativePath="..\version.rc"
  12.300 -				>
  12.301 -			</File>
  12.302 -		</Filter>
  12.303 -		<Filter
  12.304 -			Name="SourceMod SDK"
  12.305 -			UniqueIdentifier="{31958233-BB2D-4e41-A8F9-CE8A4684F436}"
  12.306 -			>
  12.307 -			<File
  12.308 -				RelativePath="..\sdk\smsdk_config.h"
  12.309 -				>
  12.310 -			</File>
  12.311 -			<File
  12.312 -				RelativePath="..\sdk\smsdk_ext.cpp"
  12.313 -				>
  12.314 -			</File>
  12.315 -			<File
  12.316 -				RelativePath="..\sdk\smsdk_ext.h"
  12.317 -				>
  12.318 -			</File>
  12.319 -		</Filter>
  12.320 -	</Files>
  12.321 -	<Globals>
  12.322 -	</Globals>
  12.323 -</VisualStudioProject>
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/product.version	Sat Apr 16 00:41:25 2011 -0700
    13.3 @@ -0,0 +1,1 @@
    13.4 +2.1.3-dev
    14.1 --- a/version.rc	Sun Sep 05 23:28:46 2010 -0700
    14.2 +++ b/version.rc	Sat Apr 16 00:41:25 2011 -0700
    14.3 @@ -44,12 +44,12 @@
    14.4          BEGIN
    14.5              VALUE "Comments", "CS:S DM"
    14.6              VALUE "FileDescription", "CS:S DM"
    14.7 -            VALUE "FileVersion", "2.1.2"
    14.8 +            VALUE "FileVersion", CSSDM_FULL_VERSION
    14.9              VALUE "InternalName", "cssdm"
   14.10              VALUE "LegalCopyright", "Copyright (c) 2004-2010, AlliedModders LLC and David 'BAILOPAN' Anderson"
   14.11              VALUE "OriginalFilename", "cssdm.ext.dll"
   14.12              VALUE "ProductName", "CS:S DM"
   14.13 -            VALUE "ProductVersion", "2.1.2"
   14.14 +            VALUE "ProductVersion", CSSDM_FULL_VERSION
   14.15          END
   14.16      END
   14.17      BLOCK "VarFileInfo"