diff --git a/AMBuildScript b/AMBuildScript index 2953dd2d..95906b06 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -9,18 +9,16 @@ class SM: #Build SDK info self.sdkInfo = { } - if AMBuild.target['platform'] != 'darwin': - self.sdkInfo['ep1'] = {'sdk': 'HL2SDK', 'ext': '1.ep1', 'def': '1', - 'name': 'EPISODEONE'} - self.sdkInfo['ep2'] = {'sdk': 'HL2SDKOB', 'ext': '2.ep2', 'def': '3', - 'name': 'ORANGEBOX'} + self.sdkInfo['ep1'] = {'sdk': 'HL2SDK', 'ext': '1.ep1', 'def': '1', + 'name': 'EPISODEONE'} + self.sdkInfo['ep2'] = {'sdk': 'HL2SDKOB', 'ext': '2.ep2', 'def': '3', + 'name': 'ORANGEBOX'} self.sdkInfo['ep2v'] = {'sdk': 'HL2SDKOBVALVE', 'ext': '2.ep2v', 'def': '4', 'name': 'ORANGEBOXVALVE'} - if AMBuild.target['platform'] != 'darwin': - self.sdkInfo['l4d'] = {'sdk': 'HL2SDKL4D', 'ext': '2.l4d', 'def': '5', - 'name': 'LEFT4DEAD'} - self.sdkInfo['l4d2'] = {'sdk': 'HL2SDKL4D2', 'ext': '2.l4d2', 'def': '6', - 'name': 'LEFT4DEAD2'} + self.sdkInfo['l4d'] = {'sdk': 'HL2SDKL4D', 'ext': '2.l4d', 'def': '5', + 'name': 'LEFT4DEAD'} + self.sdkInfo['l4d2'] = {'sdk': 'HL2SDKL4D2', 'ext': '2.l4d2', 'def': '6', + 'name': 'LEFT4DEAD2'} if AMBuild.target['platform'] == 'windows': self.sdkInfo['darkm'] = {'sdk': 'HL2SDK-DARKM', 'ext': '2.darkm', 'def': '2', 'name': 'DARKMESSIAH'} @@ -31,16 +29,14 @@ class SM: #Detect variables envvars = { 'MMSOURCE18': 'mmsource-1.8', + 'HL2SDK': 'hl2sdk', + 'HL2SDKOB': 'hl2sdk-ob', + 'HL2SDKL4D': 'hl2sdk-l4d', 'HL2SDKOBVALVE': 'hl2sdk-ob-valve', + 'HL2SDKL4D2': 'hl2sdk-l4d2', 'MYSQL5': 'mysql-5.0' } - if AMBuild.target['platform'] != 'darwin': - envvars['HL2SDK'] = 'hl2sdk' - envvars['HL2SDKOB'] = 'hl2sdk-ob' - envvars['HL2SDKL4D'] = 'hl2sdk-l4d' - envvars['HL2SDKL4D2'] = 'hl2sdk-l4d2' - #Dark Messiah is Windows-only if AMBuild.target['platform'] == 'windows': envvars['HL2SDK-DARKM'] = 'hl2sdk-darkm' diff --git a/extensions/cstrike/AMBuilder b/extensions/cstrike/AMBuilder index 200bd967..89c33d19 100644 --- a/extensions/cstrike/AMBuilder +++ b/extensions/cstrike/AMBuilder @@ -1,22 +1,21 @@ # vim: set ts=2 sw=2 tw=99 noet ft=python: import os -if 'ep1' in SM.sdkInfo: - sdk = SM.sdkInfo['ep1'] - compiler = SM.DefaultHL2Compiler('extensions/cstrike', 'ep1') +sdk = SM.sdkInfo['ep1'] +compiler = SM.DefaultHL2Compiler('extensions/cstrike', 'ep1') - name = 'game.cstrike.ext.' + sdk['ext'] - extension = AMBuild.AddJob(name) - binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler) - SM.PreSetupHL2Job(extension, binary, 'ep1') - binary.AddSourceFiles('extensions/cstrike', [ - 'extension.cpp', - 'natives.cpp', - 'RegNatives.cpp', - 'timeleft.cpp', - 'sdk/smsdk_ext.cpp' - ]) - SM.PostSetupHL2Job(extension, binary, 'ep1') - SM.AutoVersion('extensions/cstrike', binary) - binary.SendToJob() +name = 'game.cstrike.ext.' + sdk['ext'] +extension = AMBuild.AddJob(name) +binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler) +SM.PreSetupHL2Job(extension, binary, 'ep1') +binary.AddSourceFiles('extensions/cstrike', [ + 'extension.cpp', + 'natives.cpp', + 'RegNatives.cpp', + 'timeleft.cpp', + 'sdk/smsdk_ext.cpp' + ]) +SM.PostSetupHL2Job(extension, binary, 'ep1') +SM.AutoVersion('extensions/cstrike', binary) +binary.SendToJob()