Unix line endings everywhere
This commit is contained in:
		
							parent
							
								
									2706b7f628
								
							
						
					
					
						commit
						38258d2a23
					
				
							
								
								
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,3 +1,3 @@ | ||||
| /build | ||||
| /extension/version_auto.h | ||||
| /breakpad | ||||
| /build | ||||
| /extension/version_auto.h | ||||
| /breakpad | ||||
|  | ||||
| @ -1,45 +1,45 @@ | ||||
| # vim: set ts=2 sw=2 tw=99 noet ft=python:  | ||||
| import os | ||||
| from ambuild.command import Command | ||||
| from ambuild.command import ShellCommand | ||||
| 
 | ||||
| try: | ||||
| 	import urllib.request as urllib | ||||
| except ImportError: | ||||
| 	import urllib2 as urllib | ||||
| 
 | ||||
| class IterateDebugInfoCommand(Command): | ||||
| 	def run(self, master, job): | ||||
| 		pdblog = open(os.path.join(AMBuild.outputFolder, 'pdblog.txt'), 'rt') | ||||
| 		for debug_info in pdblog: | ||||
| 			debug_info = os.path.join(AMBuild.outputFolder, debug_info.strip()) | ||||
| 			job.AddCommand(SymbolCommand(debug_info, symbolServer)) | ||||
| 		pdblog.close() | ||||
| 
 | ||||
| class SymbolCommand(ShellCommand): | ||||
| 	def __init__(self, debugFile, symbolServer): | ||||
| 		self.serverResponse = None | ||||
| 		self.symbolServer = symbolServer | ||||
| 		if AMBuild.target['platform'] == 'linux': | ||||
| 			cmdstring = "dump_syms {0} {1}".format(debugFile, os.path.dirname(debugFile)) | ||||
| 		elif AMBuild.target['platform'] == 'darwin': | ||||
| 			cmdstring = "dump_syms {0}".format(debugFile) | ||||
| 		elif AMBuild.target['platform'] == 'windows': | ||||
| 			cmdstring = "dump_syms.exe {0}".format(debugFile) | ||||
| 		ShellCommand.__init__(self, cmdstring) | ||||
| 	def run(self, master, job): | ||||
| 		ShellCommand.run(self, master, job) | ||||
| 		if self.stdout != None and len(self.stdout) > 0: | ||||
| 			request = urllib.Request(symbolServer, self.stdout.encode('utf-8')) | ||||
| 			request.add_header("Content-Type", "text/plain") | ||||
| 			self.serverResponse = urllib.urlopen(request).read().decode('utf-8') | ||||
| 	def spew(self, runner): | ||||
| 		if self.stderr != None and len(self.stderr) > 0: | ||||
| 			runner.PrintOut(self.stderr) | ||||
| 		if self.serverResponse != None and len(self.serverResponse) > 0: | ||||
| 			runner.PrintOut(self.serverResponse) | ||||
| 
 | ||||
| if 'BREAKPAD_SYMBOL_SERVER' in os.environ: | ||||
| 	symbolServer = os.environ['BREAKPAD_SYMBOL_SERVER'] | ||||
| 	job = AMBuild.AddJob('breakpad-symbols') | ||||
| 	job.AddCommand(IterateDebugInfoCommand()) | ||||
| # vim: set ts=2 sw=2 tw=99 noet ft=python:  | ||||
| import os | ||||
| from ambuild.command import Command | ||||
| from ambuild.command import ShellCommand | ||||
| 
 | ||||
| try: | ||||
| 	import urllib.request as urllib | ||||
| except ImportError: | ||||
| 	import urllib2 as urllib | ||||
| 
 | ||||
| class IterateDebugInfoCommand(Command): | ||||
| 	def run(self, master, job): | ||||
| 		pdblog = open(os.path.join(AMBuild.outputFolder, 'pdblog.txt'), 'rt') | ||||
| 		for debug_info in pdblog: | ||||
| 			debug_info = os.path.join(AMBuild.outputFolder, debug_info.strip()) | ||||
| 			job.AddCommand(SymbolCommand(debug_info, symbolServer)) | ||||
| 		pdblog.close() | ||||
| 
 | ||||
| class SymbolCommand(ShellCommand): | ||||
| 	def __init__(self, debugFile, symbolServer): | ||||
| 		self.serverResponse = None | ||||
| 		self.symbolServer = symbolServer | ||||
| 		if AMBuild.target['platform'] == 'linux': | ||||
| 			cmdstring = "dump_syms {0} {1}".format(debugFile, os.path.dirname(debugFile)) | ||||
| 		elif AMBuild.target['platform'] == 'darwin': | ||||
| 			cmdstring = "dump_syms {0}".format(debugFile) | ||||
| 		elif AMBuild.target['platform'] == 'windows': | ||||
| 			cmdstring = "dump_syms.exe {0}".format(debugFile) | ||||
| 		ShellCommand.__init__(self, cmdstring) | ||||
| 	def run(self, master, job): | ||||
| 		ShellCommand.run(self, master, job) | ||||
| 		if self.stdout != None and len(self.stdout) > 0: | ||||
| 			request = urllib.Request(symbolServer, self.stdout.encode('utf-8')) | ||||
| 			request.add_header("Content-Type", "text/plain") | ||||
| 			self.serverResponse = urllib.urlopen(request).read().decode('utf-8') | ||||
| 	def spew(self, runner): | ||||
| 		if self.stderr != None and len(self.stderr) > 0: | ||||
| 			runner.PrintOut(self.stderr) | ||||
| 		if self.serverResponse != None and len(self.serverResponse) > 0: | ||||
| 			runner.PrintOut(self.serverResponse) | ||||
| 
 | ||||
| if 'BREAKPAD_SYMBOL_SERVER' in os.environ: | ||||
| 	symbolServer = os.environ['BREAKPAD_SYMBOL_SERVER'] | ||||
| 	job = AMBuild.AddJob('breakpad-symbols') | ||||
| 	job.AddCommand(IterateDebugInfoCommand()) | ||||
|  | ||||
| @ -1,127 +1,127 @@ | ||||
| # vim: set ts=2 sw=2 tw=99 noet ft=python:  | ||||
| import os | ||||
| import shutil | ||||
| import ambuild.osutil as osutil | ||||
| from ambuild.command import Command | ||||
| 
 | ||||
| job = AMBuild.AddJob('package') | ||||
| 
 | ||||
| class DestroyPath(Command): | ||||
| 	def __init__(self, folder): | ||||
| 		Command.__init__(self) | ||||
| 		self.folder = folder | ||||
| 
 | ||||
| 	def destroy(self, path): | ||||
| 		entries = os.listdir(path) | ||||
| 		for entry in entries: | ||||
| 			newpath = os.path.join(path, entry) | ||||
| 			if os.path.isdir(newpath): | ||||
| 				self.destroy(newpath) | ||||
| 				os.rmdir(newpath) | ||||
| 			elif os.path.isfile(newpath): | ||||
| 				os.remove(newpath) | ||||
| 
 | ||||
| 	def run(self, runner, job): | ||||
| 		runner.PrintOut('rm -rf {0}/*'.format(self.folder)) | ||||
| 		self.destroy(self.folder) | ||||
| 
 | ||||
| class CreateFolders(Command): | ||||
| 	def __init__(self, folders): | ||||
| 		Command.__init__(self) | ||||
| 		self.folders = folders | ||||
| 	 | ||||
| 	def run(self, runner, job): | ||||
| 		for folder in self.folders: | ||||
| 			path = os.path.join(*folder) | ||||
| 			runner.PrintOut('mkdir {0}'.format(path)) | ||||
| 			os.makedirs(path) | ||||
| 
 | ||||
| #Shallow folder copy | ||||
| class CopyFolder(Command): | ||||
| 	def __init__(self, fromList, toList, excludes = []): | ||||
| 		Command.__init__(self) | ||||
| 		self.fromPath = os.path.join(AMBuild.sourceFolder, *fromList) | ||||
| 		self.toPath = os.path.join(*toList)  | ||||
| 		self.excludes = excludes | ||||
| 	 | ||||
| 	def run(self, runner, job): | ||||
| 		entries = os.listdir(self.fromPath) | ||||
| 		for entry in entries: | ||||
| 			if entry in self.excludes: | ||||
| 				continue | ||||
| 			path = os.path.join(self.fromPath, entry) | ||||
| 			if not os.path.isfile(path): | ||||
| 				continue | ||||
| 			runner.PrintOut('copy {0} to {1}'.format(path, self.toPath)) | ||||
| 			shutil.copy(path, self.toPath) | ||||
| 
 | ||||
| #Single file copy | ||||
| class CopyFile(Command): | ||||
| 	def __init__(self, fromFile, toPath): | ||||
| 		Command.__init__(self) | ||||
| 		self.fromFile = fromFile | ||||
| 		self.toPath = toPath | ||||
| 
 | ||||
| 	def run(self, runner, job): | ||||
| 		runner.PrintOut('copy {0} to {1}'.format(self.fromFile, self.toPath)) | ||||
| 		shutil.copy(self.fromFile, self.toPath) | ||||
| 
 | ||||
| 
 | ||||
| folders = [ | ||||
| 	['addons', 'sourcemod', 'configs'], | ||||
| 	['addons', 'sourcemod', 'gamedata'], | ||||
| 	['addons', 'sourcemod', 'extensions'], | ||||
| ] | ||||
| 
 | ||||
| #Setup | ||||
| job.AddCommand(DestroyPath(os.path.join(AMBuild.outputFolder, 'package'))) | ||||
| job.AddCommand(CreateFolders(folders)) | ||||
| 
 | ||||
| job.AddCommand(CopyFile(os.path.join(AMBuild.sourceFolder, 'accelerator.games.txt'), os.path.join('addons', 'sourcemod', 'gamedata'))) | ||||
| job.AddCommand(CopyFile(os.path.join(AMBuild.sourceFolder, 'accelerator.autoload'), os.path.join('addons', 'sourcemod', 'extensions'))) | ||||
| 
 | ||||
| bincopies = [] | ||||
| 
 | ||||
| def AddNormalLibrary(name, dest): | ||||
| 	dest = os.path.join('addons', 'sourcemod', dest) | ||||
| 	bincopies.append(CopyFile(os.path.join('..', name, name + osutil.SharedLibSuffix()), dest)) | ||||
| 	 | ||||
| 	# Each platform's version of dump_syms needs the path in a different format. | ||||
| 	if AMBuild.target['platform'] == 'linux': | ||||
| 		debug_info.append(name + '/' + name + '.so') | ||||
| 	elif AMBuild.target['platform'] == 'darwin': | ||||
| 		debug_info.append(name + '/' + name + '.dylib.dSYM') | ||||
| 	elif AMBuild.target['platform'] == 'windows': | ||||
| 		debug_info.append(name + '\\' + name + '.pdb') | ||||
| 
 | ||||
| def AddExecutable(name, dest): | ||||
| 	dest = os.path.join('addons', 'sourcemod', dest) | ||||
| 	bincopies.append(CopyFile(os.path.join('..', name, name + osutil.ExecutableSuffix()), dest)) | ||||
| 	 | ||||
| 	# Each platform's version of dump_syms needs the path in a different format. | ||||
| 	if AMBuild.target['platform'] == 'linux': | ||||
| 		debug_info.append(name + '/' + name) | ||||
| 	elif AMBuild.target['platform'] == 'darwin': | ||||
| 		debug_info.append(name + '/' + name + '.dSYM') | ||||
| 	elif AMBuild.target['platform'] == 'windows': | ||||
| 		debug_info.append(name + '\\' + name + '.pdb') | ||||
| 
 | ||||
| def AddHL2Library(name, dest): | ||||
| 	for i in SM.sdkInfo: | ||||
| 		sdk = SM.sdkInfo[i] | ||||
| 		if AMBuild.target['platform'] not in sdk['platform']: | ||||
| 			continue | ||||
| 		AddNormalLibrary(name + '.ext.' + sdk['ext'], dest) | ||||
| 
 | ||||
| debug_info = [] | ||||
| 
 | ||||
| AddNormalLibrary('accelerator.ext', 'extensions') | ||||
| AddExecutable('test-crash-dump-generation', 'configs') | ||||
| 
 | ||||
| job.AddCommandGroup(bincopies) | ||||
| 	 | ||||
| pdblog = open(os.path.join(AMBuild.outputFolder, 'pdblog.txt'), 'wt') | ||||
| for pdb in debug_info: | ||||
| 	pdblog.write(pdb + '\n') | ||||
| pdblog.close() | ||||
| 
 | ||||
| # vim: set ts=2 sw=2 tw=99 noet ft=python:  | ||||
| import os | ||||
| import shutil | ||||
| import ambuild.osutil as osutil | ||||
| from ambuild.command import Command | ||||
| 
 | ||||
| job = AMBuild.AddJob('package') | ||||
| 
 | ||||
| class DestroyPath(Command): | ||||
| 	def __init__(self, folder): | ||||
| 		Command.__init__(self) | ||||
| 		self.folder = folder | ||||
| 
 | ||||
| 	def destroy(self, path): | ||||
| 		entries = os.listdir(path) | ||||
| 		for entry in entries: | ||||
| 			newpath = os.path.join(path, entry) | ||||
| 			if os.path.isdir(newpath): | ||||
| 				self.destroy(newpath) | ||||
| 				os.rmdir(newpath) | ||||
| 			elif os.path.isfile(newpath): | ||||
| 				os.remove(newpath) | ||||
| 
 | ||||
| 	def run(self, runner, job): | ||||
| 		runner.PrintOut('rm -rf {0}/*'.format(self.folder)) | ||||
| 		self.destroy(self.folder) | ||||
| 
 | ||||
| class CreateFolders(Command): | ||||
| 	def __init__(self, folders): | ||||
| 		Command.__init__(self) | ||||
| 		self.folders = folders | ||||
| 	 | ||||
| 	def run(self, runner, job): | ||||
| 		for folder in self.folders: | ||||
| 			path = os.path.join(*folder) | ||||
| 			runner.PrintOut('mkdir {0}'.format(path)) | ||||
| 			os.makedirs(path) | ||||
| 
 | ||||
| #Shallow folder copy | ||||
| class CopyFolder(Command): | ||||
| 	def __init__(self, fromList, toList, excludes = []): | ||||
| 		Command.__init__(self) | ||||
| 		self.fromPath = os.path.join(AMBuild.sourceFolder, *fromList) | ||||
| 		self.toPath = os.path.join(*toList)  | ||||
| 		self.excludes = excludes | ||||
| 	 | ||||
| 	def run(self, runner, job): | ||||
| 		entries = os.listdir(self.fromPath) | ||||
| 		for entry in entries: | ||||
| 			if entry in self.excludes: | ||||
| 				continue | ||||
| 			path = os.path.join(self.fromPath, entry) | ||||
| 			if not os.path.isfile(path): | ||||
| 				continue | ||||
| 			runner.PrintOut('copy {0} to {1}'.format(path, self.toPath)) | ||||
| 			shutil.copy(path, self.toPath) | ||||
| 
 | ||||
| #Single file copy | ||||
| class CopyFile(Command): | ||||
| 	def __init__(self, fromFile, toPath): | ||||
| 		Command.__init__(self) | ||||
| 		self.fromFile = fromFile | ||||
| 		self.toPath = toPath | ||||
| 
 | ||||
| 	def run(self, runner, job): | ||||
| 		runner.PrintOut('copy {0} to {1}'.format(self.fromFile, self.toPath)) | ||||
| 		shutil.copy(self.fromFile, self.toPath) | ||||
| 
 | ||||
| 
 | ||||
| folders = [ | ||||
| 	['addons', 'sourcemod', 'configs'], | ||||
| 	['addons', 'sourcemod', 'gamedata'], | ||||
| 	['addons', 'sourcemod', 'extensions'], | ||||
| ] | ||||
| 
 | ||||
| #Setup | ||||
| job.AddCommand(DestroyPath(os.path.join(AMBuild.outputFolder, 'package'))) | ||||
| job.AddCommand(CreateFolders(folders)) | ||||
| 
 | ||||
| job.AddCommand(CopyFile(os.path.join(AMBuild.sourceFolder, 'accelerator.games.txt'), os.path.join('addons', 'sourcemod', 'gamedata'))) | ||||
| job.AddCommand(CopyFile(os.path.join(AMBuild.sourceFolder, 'accelerator.autoload'), os.path.join('addons', 'sourcemod', 'extensions'))) | ||||
| 
 | ||||
| bincopies = [] | ||||
| 
 | ||||
| def AddNormalLibrary(name, dest): | ||||
| 	dest = os.path.join('addons', 'sourcemod', dest) | ||||
| 	bincopies.append(CopyFile(os.path.join('..', name, name + osutil.SharedLibSuffix()), dest)) | ||||
| 	 | ||||
| 	# Each platform's version of dump_syms needs the path in a different format. | ||||
| 	if AMBuild.target['platform'] == 'linux': | ||||
| 		debug_info.append(name + '/' + name + '.so') | ||||
| 	elif AMBuild.target['platform'] == 'darwin': | ||||
| 		debug_info.append(name + '/' + name + '.dylib.dSYM') | ||||
| 	elif AMBuild.target['platform'] == 'windows': | ||||
| 		debug_info.append(name + '\\' + name + '.pdb') | ||||
| 
 | ||||
| def AddExecutable(name, dest): | ||||
| 	dest = os.path.join('addons', 'sourcemod', dest) | ||||
| 	bincopies.append(CopyFile(os.path.join('..', name, name + osutil.ExecutableSuffix()), dest)) | ||||
| 	 | ||||
| 	# Each platform's version of dump_syms needs the path in a different format. | ||||
| 	if AMBuild.target['platform'] == 'linux': | ||||
| 		debug_info.append(name + '/' + name) | ||||
| 	elif AMBuild.target['platform'] == 'darwin': | ||||
| 		debug_info.append(name + '/' + name + '.dSYM') | ||||
| 	elif AMBuild.target['platform'] == 'windows': | ||||
| 		debug_info.append(name + '\\' + name + '.pdb') | ||||
| 
 | ||||
| def AddHL2Library(name, dest): | ||||
| 	for i in SM.sdkInfo: | ||||
| 		sdk = SM.sdkInfo[i] | ||||
| 		if AMBuild.target['platform'] not in sdk['platform']: | ||||
| 			continue | ||||
| 		AddNormalLibrary(name + '.ext.' + sdk['ext'], dest) | ||||
| 
 | ||||
| debug_info = [] | ||||
| 
 | ||||
| AddNormalLibrary('accelerator.ext', 'extensions') | ||||
| AddExecutable('test-crash-dump-generation', 'configs') | ||||
| 
 | ||||
| job.AddCommandGroup(bincopies) | ||||
| 	 | ||||
| pdblog = open(os.path.join(AMBuild.outputFolder, 'pdblog.txt'), 'wt') | ||||
| for pdb in debug_info: | ||||
| 	pdblog.write(pdb + '\n') | ||||
| pdblog.close() | ||||
| 
 | ||||
|  | ||||
| @ -1,56 +1,56 @@ | ||||
| # vim: set ts=2 sw=2 tw=99 noet ft=python:  | ||||
| import os | ||||
| import re | ||||
| import subprocess | ||||
| from ambuild.cache import Cache | ||||
| import ambuild.command as command | ||||
| 
 | ||||
| #Quickly try to ascertain the current repository revision | ||||
| def GetVersion(): | ||||
| 	rev = command.RunDirectCommand(AMBuild, ['git', 'rev-list', '--count', 'HEAD']).stdoutText.strip() | ||||
| 	cset = command.RunDirectCommand(AMBuild, ['git', 'log', '--pretty=format:%h', '-n', '1']).stdoutText.strip() | ||||
| 
 | ||||
| 	if not rev or not cset: | ||||
| 		raise Exception('Could not determine repository version') | ||||
| 
 | ||||
| 	return (rev, cset) | ||||
| 
 | ||||
| def PerformReversioning(): | ||||
| 	rev, cset = GetVersion() | ||||
| 	cacheFile = os.path.join(AMBuild.outputFolder, '.ambuild', 'hgcache') | ||||
| 	cache = Cache(cacheFile) | ||||
| 	if os.path.isfile(cacheFile): | ||||
| 		cache.LoadCache() | ||||
| 		if cache.HasVariable('cset') and cache['cset'] == cset: | ||||
| 			return False | ||||
| 	cache.CacheVariable('cset', cset) | ||||
| 
 | ||||
| 	productFile = open(os.path.join(AMBuild.sourceFolder, 'product.version'), 'r') | ||||
| 	productContents = productFile.read() | ||||
| 	productFile.close() | ||||
| 	m = re.match('(\d+)\.(\d+)\.(\d+)(.*)', productContents) | ||||
| 	if m == None: | ||||
| 		raise Exception('Could not detremine product version') | ||||
| 	major, minor, release, tag = m.groups() | ||||
| 
 | ||||
| 	incFolder = os.path.join(AMBuild.sourceFolder, 'extension') | ||||
| 	incFile = open(os.path.join(incFolder, 'version_auto.h'), 'w') | ||||
| 	incFile.write(""" | ||||
| #ifndef _AUTO_VERSION_INFORMATION_H_ | ||||
| #define _AUTO_VERSION_INFORMATION_H_ | ||||
| 
 | ||||
| #define SM_BUILD_TAG	 	\"{0}\" | ||||
| #define SM_BUILD_UNIQUEID	\"{1}:{2}\" SM_BUILD_TAG | ||||
| #define SM_VERSION			\"{3}.{4}.{5}\" | ||||
| #define SM_FULL_VERSION		SM_VERSION SM_BUILD_TAG | ||||
| #define SM_FILE_VERSION		{6},{7},{8},0 | ||||
| 
 | ||||
| #endif /* _AUTO_VERSION_INFORMATION_H_ */ | ||||
| 
 | ||||
| """.format(tag, rev, cset, major, minor, release, major, minor, release)) | ||||
| 	incFile.close() | ||||
| 	cache.WriteCache() | ||||
| 
 | ||||
| PerformReversioning() | ||||
| 
 | ||||
| 
 | ||||
| # vim: set ts=2 sw=2 tw=99 noet ft=python:  | ||||
| import os | ||||
| import re | ||||
| import subprocess | ||||
| from ambuild.cache import Cache | ||||
| import ambuild.command as command | ||||
| 
 | ||||
| #Quickly try to ascertain the current repository revision | ||||
| def GetVersion(): | ||||
| 	rev = command.RunDirectCommand(AMBuild, ['git', 'rev-list', '--count', 'HEAD']).stdoutText.strip() | ||||
| 	cset = command.RunDirectCommand(AMBuild, ['git', 'log', '--pretty=format:%h', '-n', '1']).stdoutText.strip() | ||||
| 
 | ||||
| 	if not rev or not cset: | ||||
| 		raise Exception('Could not determine repository version') | ||||
| 
 | ||||
| 	return (rev, cset) | ||||
| 
 | ||||
| def PerformReversioning(): | ||||
| 	rev, cset = GetVersion() | ||||
| 	cacheFile = os.path.join(AMBuild.outputFolder, '.ambuild', 'hgcache') | ||||
| 	cache = Cache(cacheFile) | ||||
| 	if os.path.isfile(cacheFile): | ||||
| 		cache.LoadCache() | ||||
| 		if cache.HasVariable('cset') and cache['cset'] == cset: | ||||
| 			return False | ||||
| 	cache.CacheVariable('cset', cset) | ||||
| 
 | ||||
| 	productFile = open(os.path.join(AMBuild.sourceFolder, 'product.version'), 'r') | ||||
| 	productContents = productFile.read() | ||||
| 	productFile.close() | ||||
| 	m = re.match('(\d+)\.(\d+)\.(\d+)(.*)', productContents) | ||||
| 	if m == None: | ||||
| 		raise Exception('Could not detremine product version') | ||||
| 	major, minor, release, tag = m.groups() | ||||
| 
 | ||||
| 	incFolder = os.path.join(AMBuild.sourceFolder, 'extension') | ||||
| 	incFile = open(os.path.join(incFolder, 'version_auto.h'), 'w') | ||||
| 	incFile.write(""" | ||||
| #ifndef _AUTO_VERSION_INFORMATION_H_ | ||||
| #define _AUTO_VERSION_INFORMATION_H_ | ||||
| 
 | ||||
| #define SM_BUILD_TAG	 	\"{0}\" | ||||
| #define SM_BUILD_UNIQUEID	\"{1}:{2}\" SM_BUILD_TAG | ||||
| #define SM_VERSION			\"{3}.{4}.{5}\" | ||||
| #define SM_FULL_VERSION		SM_VERSION SM_BUILD_TAG | ||||
| #define SM_FILE_VERSION		{6},{7},{8},0 | ||||
| 
 | ||||
| #endif /* _AUTO_VERSION_INFORMATION_H_ */ | ||||
| 
 | ||||
| """.format(tag, rev, cset, major, minor, release, major, minor, release)) | ||||
| 	incFile.close() | ||||
| 	cache.WriteCache() | ||||
| 
 | ||||
| PerformReversioning() | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -1,85 +1,85 @@ | ||||
| /**
 | ||||
|  * vim: set ts=4 : | ||||
|  * ============================================================================= | ||||
|  * SourceMod Updater Extension | ||||
|  * Copyright (C) 2004-2009 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 <http://www.gnu.org/licenses/>.
 | ||||
|  * | ||||
|  * 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 <http://www.sourcemod.net/license.php>.
 | ||||
|  * | ||||
|  * Version: $Id$ | ||||
|  */ | ||||
| 
 | ||||
| #include <assert.h> | ||||
| #include <string.h> | ||||
| #include <stdlib.h> | ||||
| #include "MemoryDownloader.h" | ||||
| 
 | ||||
| using namespace SourceMod; | ||||
| 
 | ||||
| MemoryDownloader::MemoryDownloader() : buffer(NULL), bufsize(0), bufpos(0) | ||||
| { | ||||
| } | ||||
| 
 | ||||
| MemoryDownloader::~MemoryDownloader() | ||||
| { | ||||
| 	free(buffer); | ||||
| } | ||||
| 
 | ||||
| DownloadWriteStatus MemoryDownloader::OnDownloadWrite(IWebTransfer *session, | ||||
| 													  void *userdata, | ||||
| 													  void *ptr, | ||||
| 													  size_t size, | ||||
| 													  size_t nmemb) | ||||
| { | ||||
| 	size_t total = size * nmemb; | ||||
| 
 | ||||
| 	if (bufpos + total > bufsize) | ||||
| 	{ | ||||
| 		size_t rem = (bufpos + total) - bufsize; | ||||
| 		bufsize += rem + (rem / 2); | ||||
| 		buffer = (char *)realloc(buffer, bufsize); | ||||
| 	} | ||||
| 
 | ||||
| 	assert(bufpos + total <= bufsize); | ||||
| 
 | ||||
| 	memcpy(&buffer[bufpos], ptr, total); | ||||
| 	bufpos += total; | ||||
| 
 | ||||
| 	return DownloadWrite_Okay; | ||||
| } | ||||
| 
 | ||||
| void MemoryDownloader::Reset() | ||||
| { | ||||
| 	bufpos = 0; | ||||
| } | ||||
| 
 | ||||
| char *MemoryDownloader::GetBuffer() | ||||
| { | ||||
| 	return buffer; | ||||
| } | ||||
| 
 | ||||
| size_t MemoryDownloader::GetSize() | ||||
| { | ||||
| 	return bufpos; | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * vim: set ts=4 : | ||||
|  * ============================================================================= | ||||
|  * SourceMod Updater Extension | ||||
|  * Copyright (C) 2004-2009 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 <http://www.gnu.org/licenses/>.
 | ||||
|  * | ||||
|  * 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 <http://www.sourcemod.net/license.php>.
 | ||||
|  * | ||||
|  * Version: $Id$ | ||||
|  */ | ||||
| 
 | ||||
| #include <assert.h> | ||||
| #include <string.h> | ||||
| #include <stdlib.h> | ||||
| #include "MemoryDownloader.h" | ||||
| 
 | ||||
| using namespace SourceMod; | ||||
| 
 | ||||
| MemoryDownloader::MemoryDownloader() : buffer(NULL), bufsize(0), bufpos(0) | ||||
| { | ||||
| } | ||||
| 
 | ||||
| MemoryDownloader::~MemoryDownloader() | ||||
| { | ||||
| 	free(buffer); | ||||
| } | ||||
| 
 | ||||
| DownloadWriteStatus MemoryDownloader::OnDownloadWrite(IWebTransfer *session, | ||||
| 													  void *userdata, | ||||
| 													  void *ptr, | ||||
| 													  size_t size, | ||||
| 													  size_t nmemb) | ||||
| { | ||||
| 	size_t total = size * nmemb; | ||||
| 
 | ||||
| 	if (bufpos + total > bufsize) | ||||
| 	{ | ||||
| 		size_t rem = (bufpos + total) - bufsize; | ||||
| 		bufsize += rem + (rem / 2); | ||||
| 		buffer = (char *)realloc(buffer, bufsize); | ||||
| 	} | ||||
| 
 | ||||
| 	assert(bufpos + total <= bufsize); | ||||
| 
 | ||||
| 	memcpy(&buffer[bufpos], ptr, total); | ||||
| 	bufpos += total; | ||||
| 
 | ||||
| 	return DownloadWrite_Okay; | ||||
| } | ||||
| 
 | ||||
| void MemoryDownloader::Reset() | ||||
| { | ||||
| 	bufpos = 0; | ||||
| } | ||||
| 
 | ||||
| char *MemoryDownloader::GetBuffer() | ||||
| { | ||||
| 	return buffer; | ||||
| } | ||||
| 
 | ||||
| size_t MemoryDownloader::GetSize() | ||||
| { | ||||
| 	return bufpos; | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -1,62 +1,62 @@ | ||||
| /**
 | ||||
|  * vim: set ts=4 : | ||||
|  * ============================================================================= | ||||
|  * SourceMod Updater Extension | ||||
|  * Copyright (C) 2004-2009 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 <http://www.gnu.org/licenses/>.
 | ||||
|  * | ||||
|  * 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 <http://www.sourcemod.net/license.php>.
 | ||||
|  * | ||||
|  * Version: $Id$ | ||||
|  */ | ||||
| 
 | ||||
| #ifndef _INCLUDE_SOURCEMOD_UPDATER_MEMORY_DOWNLOADER_H_ | ||||
| #define _INCLUDE_SOURCEMOD_UPDATER_MEMORY_DOWNLOADER_H_ | ||||
| 
 | ||||
| #include <IWebternet.h> | ||||
| 
 | ||||
| namespace SourceMod | ||||
| { | ||||
| 	class MemoryDownloader : public ITransferHandler | ||||
| 	{ | ||||
| 	public: | ||||
| 		MemoryDownloader(); | ||||
| 		~MemoryDownloader(); | ||||
| 	public: | ||||
| 		DownloadWriteStatus OnDownloadWrite(IWebTransfer *session, | ||||
| 			void *userdata, | ||||
| 			void *ptr, | ||||
| 			size_t size, | ||||
| 			size_t nmemb); | ||||
| 	public: | ||||
| 		void Reset(); | ||||
| 		char *GetBuffer(); | ||||
| 		size_t GetSize(); | ||||
| 	private: | ||||
| 		char *buffer; | ||||
| 		size_t bufsize; | ||||
| 		size_t bufpos; | ||||
| 	}; | ||||
| } | ||||
| 
 | ||||
| #endif /* _INCLUDE_SOURCEMOD_UPDATER_MEMORY_DOWNLOADER_H_ */ | ||||
| 
 | ||||
| /**
 | ||||
|  * vim: set ts=4 : | ||||
|  * ============================================================================= | ||||
|  * SourceMod Updater Extension | ||||
|  * Copyright (C) 2004-2009 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 <http://www.gnu.org/licenses/>.
 | ||||
|  * | ||||
|  * 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 <http://www.sourcemod.net/license.php>.
 | ||||
|  * | ||||
|  * Version: $Id$ | ||||
|  */ | ||||
| 
 | ||||
| #ifndef _INCLUDE_SOURCEMOD_UPDATER_MEMORY_DOWNLOADER_H_ | ||||
| #define _INCLUDE_SOURCEMOD_UPDATER_MEMORY_DOWNLOADER_H_ | ||||
| 
 | ||||
| #include <IWebternet.h> | ||||
| 
 | ||||
| namespace SourceMod | ||||
| { | ||||
| 	class MemoryDownloader : public ITransferHandler | ||||
| 	{ | ||||
| 	public: | ||||
| 		MemoryDownloader(); | ||||
| 		~MemoryDownloader(); | ||||
| 	public: | ||||
| 		DownloadWriteStatus OnDownloadWrite(IWebTransfer *session, | ||||
| 			void *userdata, | ||||
| 			void *ptr, | ||||
| 			size_t size, | ||||
| 			size_t nmemb); | ||||
| 	public: | ||||
| 		void Reset(); | ||||
| 		char *GetBuffer(); | ||||
| 		size_t GetSize(); | ||||
| 	private: | ||||
| 		char *buffer; | ||||
| 		size_t bufsize; | ||||
| 		size_t bufpos; | ||||
| 	}; | ||||
| } | ||||
| 
 | ||||
| #endif /* _INCLUDE_SOURCEMOD_UPDATER_MEMORY_DOWNLOADER_H_ */ | ||||
| 
 | ||||
|  | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -1,109 +1,109 @@ | ||||
| /**
 | ||||
|  * ============================================================================= | ||||
|  * Accelerator Extension | ||||
|  * Copyright (C) 2009-2010 Asher Baker (asherkin).  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 <http://www.gnu.org/licenses/>.
 | ||||
|  * | ||||
|  */ | ||||
| 
 | ||||
| #ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_ | ||||
| #define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_ | ||||
| 
 | ||||
| /**
 | ||||
|  * @file extension.hpp | ||||
|  * @brief Accelerator extension code header. | ||||
|  */ | ||||
| 
 | ||||
| #include "smsdk_ext.h" | ||||
| 
 | ||||
| /**
 | ||||
|  * @brief Sample implementation of the SDK Extension. | ||||
|  * Note: Uncomment one of the pre-defined virtual functions in order to use it. | ||||
|  */ | ||||
| class Accelerator : public SDKExtension | ||||
| { | ||||
| public: | ||||
| 	/**
 | ||||
| 	 * @brief This is called after the initial loading sequence has been processed. | ||||
| 	 * | ||||
| 	 * @param error		Error message buffer. | ||||
| 	 * @param maxlength	Size of error message buffer. | ||||
| 	 * @param late		Whether or not the module was loaded after map load. | ||||
| 	 * @return			True to succeed loading, false to fail. | ||||
| 	 */ | ||||
| 	virtual bool SDK_OnLoad(char *error, size_t maxlen, bool late); | ||||
| 	 | ||||
| 	/**
 | ||||
| 	 * @brief This is called right before the extension is unloaded. | ||||
| 	 */ | ||||
| 	virtual void SDK_OnUnload(); | ||||
| 
 | ||||
| 	/**
 | ||||
| 	 * @brief Called when the pause state is changed. | ||||
| 	 */ | ||||
| 	//virtual void SDK_OnPauseChange(bool paused);
 | ||||
| 
 | ||||
| 	/**
 | ||||
| 	 * @brief this is called when Core wants to know if your extension is working. | ||||
| 	 * | ||||
| 	 * @param error		Error message buffer. | ||||
| 	 * @param maxlength	Size of error message buffer. | ||||
| 	 * @return			True if working, false otherwise. | ||||
| 	 */ | ||||
| 	//virtual bool QueryRunning(char *error, size_t maxlen);
 | ||||
| public: | ||||
| #if defined SMEXT_CONF_METAMOD | ||||
| 	/**
 | ||||
| 	 * @brief Called when Metamod is attached, before the extension version is called. | ||||
| 	 * | ||||
| 	 * @param error			Error buffer. | ||||
| 	 * @param maxlength		Maximum size of error buffer. | ||||
| 	 * @param late			Whether or not Metamod considers this a late load. | ||||
| 	 * @return				True to succeed, false to fail. | ||||
| 	 */ | ||||
| 	//virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late);
 | ||||
| 
 | ||||
| 	/**
 | ||||
| 	 * @brief Called when Metamod is detaching, after the extension version is called. | ||||
| 	 * NOTE: By default this is blocked unless sent from SourceMod. | ||||
| 	 * | ||||
| 	 * @param error			Error buffer. | ||||
| 	 * @param maxlength		Maximum size of error buffer. | ||||
| 	 * @return				True to succeed, false to fail. | ||||
| 	 */ | ||||
| 	//virtual bool SDK_OnMetamodUnload(char *error, size_t maxlen);
 | ||||
| 
 | ||||
| 	/**
 | ||||
| 	 * @brief Called when Metamod's pause state is changing. | ||||
| 	 * NOTE: By default this is blocked unless sent from SourceMod. | ||||
| 	 * | ||||
| 	 * @param paused		Pause state being set. | ||||
| 	 * @param error			Error buffer. | ||||
| 	 * @param maxlength		Maximum size of error buffer. | ||||
| 	 * @return				True to succeed, false to fail. | ||||
| 	 */ | ||||
| 	//virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlen);
 | ||||
| #endif | ||||
| 	/**
 | ||||
| 	 * @brief Called on server activation before plugins receive the OnServerLoad forward. | ||||
| 	 *  | ||||
| 	 * @param pEdictList		Edicts list. | ||||
| 	 * @param edictCount		Number of edicts in the list. | ||||
| 	 * @param clientMax			Maximum number of clients allowed in the server. | ||||
| 	 */ | ||||
| 	virtual void OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax); | ||||
| }; | ||||
| 
 | ||||
| #endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
 | ||||
| /**
 | ||||
|  * ============================================================================= | ||||
|  * Accelerator Extension | ||||
|  * Copyright (C) 2009-2010 Asher Baker (asherkin).  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 <http://www.gnu.org/licenses/>.
 | ||||
|  * | ||||
|  */ | ||||
| 
 | ||||
| #ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_ | ||||
| #define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_ | ||||
| 
 | ||||
| /**
 | ||||
|  * @file extension.hpp | ||||
|  * @brief Accelerator extension code header. | ||||
|  */ | ||||
| 
 | ||||
| #include "smsdk_ext.h" | ||||
| 
 | ||||
| /**
 | ||||
|  * @brief Sample implementation of the SDK Extension. | ||||
|  * Note: Uncomment one of the pre-defined virtual functions in order to use it. | ||||
|  */ | ||||
| class Accelerator : public SDKExtension | ||||
| { | ||||
| public: | ||||
| 	/**
 | ||||
| 	 * @brief This is called after the initial loading sequence has been processed. | ||||
| 	 * | ||||
| 	 * @param error		Error message buffer. | ||||
| 	 * @param maxlength	Size of error message buffer. | ||||
| 	 * @param late		Whether or not the module was loaded after map load. | ||||
| 	 * @return			True to succeed loading, false to fail. | ||||
| 	 */ | ||||
| 	virtual bool SDK_OnLoad(char *error, size_t maxlen, bool late); | ||||
| 	 | ||||
| 	/**
 | ||||
| 	 * @brief This is called right before the extension is unloaded. | ||||
| 	 */ | ||||
| 	virtual void SDK_OnUnload(); | ||||
| 
 | ||||
| 	/**
 | ||||
| 	 * @brief Called when the pause state is changed. | ||||
| 	 */ | ||||
| 	//virtual void SDK_OnPauseChange(bool paused);
 | ||||
| 
 | ||||
| 	/**
 | ||||
| 	 * @brief this is called when Core wants to know if your extension is working. | ||||
| 	 * | ||||
| 	 * @param error		Error message buffer. | ||||
| 	 * @param maxlength	Size of error message buffer. | ||||
| 	 * @return			True if working, false otherwise. | ||||
| 	 */ | ||||
| 	//virtual bool QueryRunning(char *error, size_t maxlen);
 | ||||
| public: | ||||
| #if defined SMEXT_CONF_METAMOD | ||||
| 	/**
 | ||||
| 	 * @brief Called when Metamod is attached, before the extension version is called. | ||||
| 	 * | ||||
| 	 * @param error			Error buffer. | ||||
| 	 * @param maxlength		Maximum size of error buffer. | ||||
| 	 * @param late			Whether or not Metamod considers this a late load. | ||||
| 	 * @return				True to succeed, false to fail. | ||||
| 	 */ | ||||
| 	//virtual bool SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late);
 | ||||
| 
 | ||||
| 	/**
 | ||||
| 	 * @brief Called when Metamod is detaching, after the extension version is called. | ||||
| 	 * NOTE: By default this is blocked unless sent from SourceMod. | ||||
| 	 * | ||||
| 	 * @param error			Error buffer. | ||||
| 	 * @param maxlength		Maximum size of error buffer. | ||||
| 	 * @return				True to succeed, false to fail. | ||||
| 	 */ | ||||
| 	//virtual bool SDK_OnMetamodUnload(char *error, size_t maxlen);
 | ||||
| 
 | ||||
| 	/**
 | ||||
| 	 * @brief Called when Metamod's pause state is changing. | ||||
| 	 * NOTE: By default this is blocked unless sent from SourceMod. | ||||
| 	 * | ||||
| 	 * @param paused		Pause state being set. | ||||
| 	 * @param error			Error buffer. | ||||
| 	 * @param maxlength		Maximum size of error buffer. | ||||
| 	 * @return				True to succeed, false to fail. | ||||
| 	 */ | ||||
| 	//virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlen);
 | ||||
| #endif | ||||
| 	/**
 | ||||
| 	 * @brief Called on server activation before plugins receive the OnServerLoad forward. | ||||
| 	 *  | ||||
| 	 * @param pEdictList		Edicts list. | ||||
| 	 * @param edictCount		Number of edicts in the list. | ||||
| 	 * @param clientMax			Maximum number of clients allowed in the server. | ||||
| 	 */ | ||||
| 	virtual void OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax); | ||||
| }; | ||||
| 
 | ||||
| #endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
 | ||||
|  | ||||
| @ -1,81 +1,81 @@ | ||||
| /**
 | ||||
|  * ============================================================================= | ||||
|  * Accelerator Extension | ||||
|  * Copyright (C) 2011 Asher Baker (asherkin).  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 <http://www.gnu.org/licenses/>.
 | ||||
|  * | ||||
|  * 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 <http://www.sourcemod.net/license.php>.
 | ||||
|  */ | ||||
| 
 | ||||
| #ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ | ||||
| #define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ | ||||
| 
 | ||||
| /**
 | ||||
|  * @file smsdk_config.hpp | ||||
|  * @brief Contains macros for configuring basic extension information. | ||||
|  */ | ||||
| 
 | ||||
|  #include "version.h" // SM_FULL_VERSION | ||||
| 
 | ||||
| /* Basic information exposed publicly */ | ||||
| #define SMEXT_CONF_NAME			"Accelerator" | ||||
| #define SMEXT_CONF_DESCRIPTION	"SRCDS Crash Handler" | ||||
| #define SMEXT_CONF_VERSION		SM_FULL_VERSION | ||||
| #define SMEXT_CONF_AUTHOR		"Asher \"asherkin\" Baker" | ||||
| #define SMEXT_CONF_URL			"https://crash.limetech.org/"
 | ||||
| #define SMEXT_CONF_LOGTAG		"CRASH" | ||||
| #define SMEXT_CONF_LICENSE		"GPL" | ||||
| #define SMEXT_CONF_DATESTRING	__DATE__ | ||||
| 
 | ||||
| /** 
 | ||||
|  * @brief Exposes plugin's main interface. | ||||
|  */ | ||||
| #define SMEXT_LINK(name) SDKExtension *g_pExtensionIface = name; | ||||
| 
 | ||||
| /**
 | ||||
|  * @brief Sets whether or not this plugin required Metamod. | ||||
|  * NOTE: Uncomment to enable, comment to disable. | ||||
|  */ | ||||
| //#define SMEXT_CONF_METAMOD		
 | ||||
| 
 | ||||
| /** Enable interfaces you want to use here by uncommenting lines */ | ||||
| //#define SMEXT_ENABLE_FORWARDSYS
 | ||||
| //#define SMEXT_ENABLE_HANDLESYS
 | ||||
| //#define SMEXT_ENABLE_PLAYERHELPERS
 | ||||
| //#define SMEXT_ENABLE_DBMANAGER
 | ||||
| #define SMEXT_ENABLE_GAMECONF | ||||
| //#define SMEXT_ENABLE_MEMUTILS
 | ||||
| #define SMEXT_ENABLE_GAMEHELPERS | ||||
| //#define SMEXT_ENABLE_TIMERSYS
 | ||||
| #define SMEXT_ENABLE_THREADER | ||||
| #define SMEXT_ENABLE_LIBSYS | ||||
| //#define SMEXT_ENABLE_MENUS
 | ||||
| //#define SMEXT_ENABLE_ADTFACTORY
 | ||||
| #define SMEXT_ENABLE_PLUGINSYS | ||||
| //#define SMEXT_ENABLE_ADMINSYS
 | ||||
| //#define SMEXT_ENABLE_TEXTPARSERS
 | ||||
| //#define SMEXT_ENABLE_USERMSGS
 | ||||
| //#define SMEXT_ENABLE_TRANSLATOR
 | ||||
| //#define SMEXT_ENABLE_NINVOKE
 | ||||
| #define SMEXT_ENABLE_ROOTCONSOLEMENU | ||||
| 
 | ||||
| #endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
 | ||||
| /**
 | ||||
|  * ============================================================================= | ||||
|  * Accelerator Extension | ||||
|  * Copyright (C) 2011 Asher Baker (asherkin).  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 <http://www.gnu.org/licenses/>.
 | ||||
|  * | ||||
|  * 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 <http://www.sourcemod.net/license.php>.
 | ||||
|  */ | ||||
| 
 | ||||
| #ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ | ||||
| #define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ | ||||
| 
 | ||||
| /**
 | ||||
|  * @file smsdk_config.hpp | ||||
|  * @brief Contains macros for configuring basic extension information. | ||||
|  */ | ||||
| 
 | ||||
|  #include "version.h" // SM_FULL_VERSION | ||||
| 
 | ||||
| /* Basic information exposed publicly */ | ||||
| #define SMEXT_CONF_NAME			"Accelerator" | ||||
| #define SMEXT_CONF_DESCRIPTION	"SRCDS Crash Handler" | ||||
| #define SMEXT_CONF_VERSION		SM_FULL_VERSION | ||||
| #define SMEXT_CONF_AUTHOR		"Asher \"asherkin\" Baker" | ||||
| #define SMEXT_CONF_URL			"https://crash.limetech.org/"
 | ||||
| #define SMEXT_CONF_LOGTAG		"CRASH" | ||||
| #define SMEXT_CONF_LICENSE		"GPL" | ||||
| #define SMEXT_CONF_DATESTRING	__DATE__ | ||||
| 
 | ||||
| /** 
 | ||||
|  * @brief Exposes plugin's main interface. | ||||
|  */ | ||||
| #define SMEXT_LINK(name) SDKExtension *g_pExtensionIface = name; | ||||
| 
 | ||||
| /**
 | ||||
|  * @brief Sets whether or not this plugin required Metamod. | ||||
|  * NOTE: Uncomment to enable, comment to disable. | ||||
|  */ | ||||
| //#define SMEXT_CONF_METAMOD		
 | ||||
| 
 | ||||
| /** Enable interfaces you want to use here by uncommenting lines */ | ||||
| //#define SMEXT_ENABLE_FORWARDSYS
 | ||||
| //#define SMEXT_ENABLE_HANDLESYS
 | ||||
| //#define SMEXT_ENABLE_PLAYERHELPERS
 | ||||
| //#define SMEXT_ENABLE_DBMANAGER
 | ||||
| #define SMEXT_ENABLE_GAMECONF | ||||
| //#define SMEXT_ENABLE_MEMUTILS
 | ||||
| #define SMEXT_ENABLE_GAMEHELPERS | ||||
| //#define SMEXT_ENABLE_TIMERSYS
 | ||||
| #define SMEXT_ENABLE_THREADER | ||||
| #define SMEXT_ENABLE_LIBSYS | ||||
| //#define SMEXT_ENABLE_MENUS
 | ||||
| //#define SMEXT_ENABLE_ADTFACTORY
 | ||||
| #define SMEXT_ENABLE_PLUGINSYS | ||||
| //#define SMEXT_ENABLE_ADMINSYS
 | ||||
| //#define SMEXT_ENABLE_TEXTPARSERS
 | ||||
| //#define SMEXT_ENABLE_USERMSGS
 | ||||
| //#define SMEXT_ENABLE_TRANSLATOR
 | ||||
| //#define SMEXT_ENABLE_NINVOKE
 | ||||
| #define SMEXT_ENABLE_ROOTCONSOLEMENU | ||||
| 
 | ||||
| #endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
 | ||||
|  | ||||
| @ -1,27 +1,27 @@ | ||||
| #ifndef _INCLUDE_VERSION_INFORMATION_H_ | ||||
| #define _INCLUDE_VERSION_INFORMATION_H_ | ||||
| 
 | ||||
| /**
 | ||||
|  * @file Contains version information. | ||||
|  * @brief This file will redirect to an autogenerated version if being compiled via | ||||
|  * the build scripts. | ||||
|  */ | ||||
| 
 | ||||
| #if defined SM_GENERATED_BUILD | ||||
| #include "version_auto.h" | ||||
| #else | ||||
| 
 | ||||
| #ifndef SM_GENERATED_BUILD | ||||
| #undef BINARY_NAME | ||||
| #define BINARY_NAME "accelerator.ext.dll\0" | ||||
| #endif | ||||
| 
 | ||||
| #define SM_BUILD_TAG		"-manual" | ||||
| #define SM_BUILD_UNIQUEID	"[MANUAL BUILD]" | ||||
| #define SM_VERSION			"2.3.3" | ||||
| #define SM_FULL_VERSION		SM_VERSION SM_BUILD_TAG | ||||
| #define SM_FILE_VERSION		2,3,3,0 | ||||
| 
 | ||||
| #endif | ||||
| 
 | ||||
| #endif /* _INCLUDE_VERSION_INFORMATION_H_ */ | ||||
| #ifndef _INCLUDE_VERSION_INFORMATION_H_ | ||||
| #define _INCLUDE_VERSION_INFORMATION_H_ | ||||
| 
 | ||||
| /**
 | ||||
|  * @file Contains version information. | ||||
|  * @brief This file will redirect to an autogenerated version if being compiled via | ||||
|  * the build scripts. | ||||
|  */ | ||||
| 
 | ||||
| #if defined SM_GENERATED_BUILD | ||||
| #include "version_auto.h" | ||||
| #else | ||||
| 
 | ||||
| #ifndef SM_GENERATED_BUILD | ||||
| #undef BINARY_NAME | ||||
| #define BINARY_NAME "accelerator.ext.dll\0" | ||||
| #endif | ||||
| 
 | ||||
| #define SM_BUILD_TAG		"-manual" | ||||
| #define SM_BUILD_UNIQUEID	"[MANUAL BUILD]" | ||||
| #define SM_VERSION			"2.3.3" | ||||
| #define SM_FULL_VERSION		SM_VERSION SM_BUILD_TAG | ||||
| #define SM_FILE_VERSION		2,3,3,0 | ||||
| 
 | ||||
| #endif | ||||
| 
 | ||||
| #endif /* _INCLUDE_VERSION_INFORMATION_H_ */ | ||||
|  | ||||
| @ -1,45 +1,45 @@ | ||||
| #include "winres.h" | ||||
| 
 | ||||
| #include <version.h> | ||||
| 
 | ||||
| #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) | ||||
| LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US | ||||
| #pragma code_page(1252) | ||||
| #endif | ||||
| 
 | ||||
| #ifndef SM_GENERATED_BUILD | ||||
| #define BINARY_NAME "accelerator.ext.dll\0" | ||||
| #endif | ||||
| 
 | ||||
| VS_VERSION_INFO VERSIONINFO | ||||
|  FILEVERSION SM_FILE_VERSION | ||||
|  PRODUCTVERSION SM_FILE_VERSION | ||||
|  FILEFLAGSMASK 0x17L | ||||
| #ifdef _DEBUG | ||||
|  FILEFLAGS 0x1L | ||||
| #else | ||||
|  FILEFLAGS 0x0L | ||||
| #endif | ||||
|  FILEOS 0x4L | ||||
|  FILETYPE 0x2L | ||||
|  FILESUBTYPE 0x0L | ||||
| BEGIN | ||||
|     BLOCK "StringFileInfo" | ||||
|     BEGIN | ||||
|         BLOCK "040904b0" | ||||
|         BEGIN | ||||
|             VALUE "Comments", "Accelerator Extension" | ||||
|             VALUE "FileDescription", "SourceMod Accelerator Extension" | ||||
|             VALUE "FileVersion", SM_BUILD_UNIQUEID | ||||
|             VALUE "InternalName", "Accelerator" | ||||
|             VALUE "LegalCopyright", "Copyright (c) 2012, Asher Baker" | ||||
|             VALUE "OriginalFilename", BINARY_NAME | ||||
|             VALUE "ProductName", "Accelerator Extension" | ||||
|             VALUE "ProductVersion", SM_FULL_VERSION | ||||
|         END | ||||
|     END | ||||
|     BLOCK "VarFileInfo" | ||||
|     BEGIN | ||||
|         VALUE "Translation", 0x0409, 0x04B0 | ||||
|     END | ||||
| END | ||||
| #include "winres.h" | ||||
| 
 | ||||
| #include <version.h> | ||||
| 
 | ||||
| #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) | ||||
| LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US | ||||
| #pragma code_page(1252) | ||||
| #endif | ||||
| 
 | ||||
| #ifndef SM_GENERATED_BUILD | ||||
| #define BINARY_NAME "accelerator.ext.dll\0" | ||||
| #endif | ||||
| 
 | ||||
| VS_VERSION_INFO VERSIONINFO | ||||
|  FILEVERSION SM_FILE_VERSION | ||||
|  PRODUCTVERSION SM_FILE_VERSION | ||||
|  FILEFLAGSMASK 0x17L | ||||
| #ifdef _DEBUG | ||||
|  FILEFLAGS 0x1L | ||||
| #else | ||||
|  FILEFLAGS 0x0L | ||||
| #endif | ||||
|  FILEOS 0x4L | ||||
|  FILETYPE 0x2L | ||||
|  FILESUBTYPE 0x0L | ||||
| BEGIN | ||||
|     BLOCK "StringFileInfo" | ||||
|     BEGIN | ||||
|         BLOCK "040904b0" | ||||
|         BEGIN | ||||
|             VALUE "Comments", "Accelerator Extension" | ||||
|             VALUE "FileDescription", "SourceMod Accelerator Extension" | ||||
|             VALUE "FileVersion", SM_BUILD_UNIQUEID | ||||
|             VALUE "InternalName", "Accelerator" | ||||
|             VALUE "LegalCopyright", "Copyright (c) 2012, Asher Baker" | ||||
|             VALUE "OriginalFilename", BINARY_NAME | ||||
|             VALUE "ProductName", "Accelerator Extension" | ||||
|             VALUE "ProductVersion", SM_FULL_VERSION | ||||
|         END | ||||
|     END | ||||
|     BLOCK "VarFileInfo" | ||||
|     BEGIN | ||||
|         VALUE "Translation", 0x0409, 0x04B0 | ||||
|     END | ||||
| END | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user