Add WinCSX to AMBuild scripts.

This commit is contained in:
David Anderson 2014-02-08 21:16:41 -08:00
parent 3d9c34eff6
commit eca50829ae
3 changed files with 34 additions and 1 deletions

View File

@ -12,6 +12,7 @@ class AMXXConfig(object):
self.hlsdk_path = None self.hlsdk_path = None
self.mysql_path = None self.mysql_path = None
self.generated_headers = None self.generated_headers = None
self.csx_app = None
def detectProductVersion(self): def detectProductVersion(self):
builder.AddConfigureFile('product.version') builder.AddConfigureFile('product.version')
@ -334,9 +335,15 @@ builder.RunBuildScripts(
'dlls/ts/tsfun/AMBuilder', 'dlls/ts/tsfun/AMBuilder',
'dlls/ts/tsx/AMBuilder', 'dlls/ts/tsx/AMBuilder',
'plugins/AMBuilder', 'plugins/AMBuilder',
'support/PackageScript',
], ],
{ {
'AMXX': AMXX 'AMXX': AMXX
} }
) )
# The csstats.dat reader is Windows-only.
if builder.target_platform == 'windows':
builder.RunScript('dlls/cstrike/csx/WinCSX/AMBuilder', { 'AMXX': AMXX })
# Finally, do packaging.
builder.RunScript('support/PackageScript', { 'AMXX': AMXX })

View File

@ -0,0 +1,22 @@
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
import os.path
binary = AMXX.Program(builder, 'WinCSX')
binary.compiler.includes += [
os.path.join(builder.currentSourcePath, 'resources'),
]
binary.compiler.defines += ['_MBCS']
binary.compiler.linkflags += [
'comctl32.lib',
]
binary.sources = [
'CRank.cpp',
'WinCSX.cpp',
'stdafx.cpp',
'resources/WinCSX.rc',
]
AMXX.csx_app = builder.Add(binary)

View File

@ -123,6 +123,10 @@ for generated_header in AMXX.generated_headers:
builder.AddCopy(generated_header, folder_map['base/addons/amxmodx/scripting/include']) builder.AddCopy(generated_header, folder_map['base/addons/amxmodx/scripting/include'])
break break
# Copy WinCSX.
if builder.target_platform == 'windows':
builder.AddCopy(AMXX.csx_app.binary, folder_map['cstrike/addons/amxmodx/data'])
# Copy configuration files for each mod. # Copy configuration files for each mod.
configs = [ configs = [
'amxx.cfg', 'amxx.cfg',