Only build OB-Valve binaries on Mac OS X right now (bug 4392, r=ds).

This commit is contained in:
David Anderson 2010-05-11 23:48:39 -05:00
parent fe8e0b0e0a
commit ab9750f8b2
2 changed files with 33 additions and 28 deletions

View File

@ -9,16 +9,18 @@ class SM:
#Build SDK info
self.sdkInfo = { }
self.sdkInfo['ep1'] = {'sdk': 'HL2SDK', 'ext': '1.ep1', 'def': '1',
'name': 'EPISODEONE'}
self.sdkInfo['ep2'] = {'sdk': 'HL2SDKOB', 'ext': '2.ep2', 'def': '3',
'name': 'ORANGEBOX'}
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['ep2v'] = {'sdk': 'HL2SDKOBVALVE', 'ext': '2.ep2v', 'def': '4',
'name': 'ORANGEBOXVALVE'}
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'] != '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'}
if AMBuild.target['platform'] == 'windows':
self.sdkInfo['darkm'] = {'sdk': 'HL2SDK-DARKM', 'ext': '2.darkm', 'def': '2',
'name': 'DARKMESSIAH'}
@ -29,14 +31,16 @@ 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'

View File

@ -1,21 +1,22 @@
# vim: set ts=2 sw=2 tw=99 noet ft=python:
import os
sdk = SM.sdkInfo['ep1']
compiler = SM.DefaultHL2Compiler('extensions/cstrike', 'ep1')
if 'ep1' in SM.sdkInfo:
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()