diff --git a/AMBuildScript b/AMBuildScript index 6d1fb143..ac6c7cbb 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -12,6 +12,7 @@ class AMXXConfig(object): self.hlsdk_path = None self.mysql_path = None self.generated_headers = None + self.csx_app = None def detectProductVersion(self): builder.AddConfigureFile('product.version') @@ -334,9 +335,15 @@ builder.RunBuildScripts( 'dlls/ts/tsfun/AMBuilder', 'dlls/ts/tsx/AMBuilder', 'plugins/AMBuilder', - 'support/PackageScript', ], { '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 }) diff --git a/dlls/cstrike/csx/WinCSX/AMBuilder b/dlls/cstrike/csx/WinCSX/AMBuilder new file mode 100644 index 00000000..3fdaa468 --- /dev/null +++ b/dlls/cstrike/csx/WinCSX/AMBuilder @@ -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) + diff --git a/support/PackageScript b/support/PackageScript index b166af8e..2e47ea33 100644 --- a/support/PackageScript +++ b/support/PackageScript @@ -123,6 +123,10 @@ for generated_header in AMXX.generated_headers: builder.AddCopy(generated_header, folder_map['base/addons/amxmodx/scripting/include']) 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. configs = [ 'amxx.cfg',