From f0f319a418e5f9742a64c35b0b956aa399c920e9 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 8 Feb 2014 21:16:41 -0800 Subject: [PATCH] Add WinCSX to AMBuild scripts. Former-commit-id: eca50829ae45c9d7bad2f0c79a95ba7a1e35c63e --- AMBuildScript | 9 ++++++++- dlls/cstrike/csx/WinCSX/AMBuilder | 22 ++++++++++++++++++++++ support/PackageScript | 4 ++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 dlls/cstrike/csx/WinCSX/AMBuilder 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',