Dota 2 support in Ambuild scripts (bug 5656, r=asherkin).
This commit is contained in:
parent
e364937353
commit
2c7537b4cd
@ -62,6 +62,9 @@ class SM:
|
|||||||
self.possibleSdks['csgo'] = {'sdk': 'HL2SDKCSGO', 'ext': '2.csgo', 'def': '12',
|
self.possibleSdks['csgo'] = {'sdk': 'HL2SDKCSGO', 'ext': '2.csgo', 'def': '12',
|
||||||
'name': 'CSGO', 'platform': ['windows', 'linux', 'darwin'],
|
'name': 'CSGO', 'platform': ['windows', 'linux', 'darwin'],
|
||||||
'dir': 'hl2sdk-csgo'}
|
'dir': 'hl2sdk-csgo'}
|
||||||
|
self.possibleSdks['dota'] = {'sdk': 'HL2SDKDOTA', 'ext': '2.dota', 'def': '13',
|
||||||
|
'name': 'DOTA', 'platform': ['windows'],
|
||||||
|
'dir': 'hl2sdk-dota'}
|
||||||
# self.possibleSdks['portal2'] = {'sdk': 'HL2SDK-PORTAL2', 'ext': '2.portal2', 'def': '11',
|
# self.possibleSdks['portal2'] = {'sdk': 'HL2SDK-PORTAL2', 'ext': '2.portal2', 'def': '11',
|
||||||
# 'name': 'PORTAL2', 'platform': ['windows'],
|
# 'name': 'PORTAL2', 'platform': ['windows'],
|
||||||
# 'dir': 'hl2sdk-portal2'}
|
# 'dir': 'hl2sdk-portal2'}
|
||||||
@ -341,7 +344,7 @@ class SM:
|
|||||||
job.AddCommand(SymlinkCommand(link, target))
|
job.AddCommand(SymlinkCommand(link, target))
|
||||||
elif AMBuild.target['platform'] == 'windows':
|
elif AMBuild.target['platform'] == 'windows':
|
||||||
libs = ['tier0', 'tier1', 'vstdlib', 'mathlib']
|
libs = ['tier0', 'tier1', 'vstdlib', 'mathlib']
|
||||||
if sdk in ['swarm', 'csgo']:
|
if sdk in ['swarm', 'csgo', 'dota']:
|
||||||
libs.append('interfaces')
|
libs.append('interfaces')
|
||||||
for lib in libs:
|
for lib in libs:
|
||||||
libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib'
|
libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib'
|
||||||
|
@ -18,12 +18,17 @@ for i in SM.sdkInfo:
|
|||||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'common', 'protobuf-2.3.0', 'src'))
|
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'common', 'protobuf-2.3.0', 'src'))
|
||||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'public', 'engine', 'protobuf'))
|
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'public', 'engine', 'protobuf'))
|
||||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'public', 'game', 'shared', 'csgo', 'protobuf'))
|
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'public', 'game', 'shared', 'csgo', 'protobuf'))
|
||||||
|
elif i == 'dota':
|
||||||
|
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'common', 'protobuf-2.4.1', 'src'))
|
||||||
|
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'public', 'engine', 'protobuf'))
|
||||||
|
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'public', 'game', 'shared', 'protobuf'))
|
||||||
|
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache[sdk['sdk']], 'public', 'game', 'shared', 'dota', 'protobuf'))
|
||||||
|
|
||||||
extension = AMBuild.AddJob(name)
|
extension = AMBuild.AddJob(name)
|
||||||
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
||||||
SM.PreSetupHL2Job(extension, binary, i)
|
SM.PreSetupHL2Job(extension, binary, i)
|
||||||
|
|
||||||
if i == 'csgo':
|
if i in ['csgo', 'dota']:
|
||||||
if AMBuild.target['platform'] == 'linux':
|
if AMBuild.target['platform'] == 'linux':
|
||||||
link = os.path.join(os.path.join(AMBuild.outputFolder, extension.workFolder), 'libprotobuf.a')
|
link = os.path.join(os.path.join(AMBuild.outputFolder, extension.workFolder), 'libprotobuf.a')
|
||||||
target = os.path.join(os.path.join(AMBuild.cache[sdk['sdk']], 'lib', 'linux32', 'release'), 'libprotobuf.a')
|
target = os.path.join(os.path.join(AMBuild.cache[sdk['sdk']], 'lib', 'linux32', 'release'), 'libprotobuf.a')
|
||||||
@ -98,7 +103,7 @@ for i in SM.sdkInfo:
|
|||||||
'ConsoleDetours.cpp'
|
'ConsoleDetours.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
if i == 'csgo':
|
if i in ['csgo', 'dota']:
|
||||||
files.append('smn_protobuf.cpp')
|
files.append('smn_protobuf.cpp')
|
||||||
else:
|
else:
|
||||||
files.append('smn_bitbuffer.cpp')
|
files.append('smn_bitbuffer.cpp')
|
||||||
@ -112,10 +117,20 @@ for i in SM.sdkInfo:
|
|||||||
os.path.join('public', 'game', 'shared', 'csgo', 'protobuf', 'cstrike15_usermessage_helpers.cpp'),
|
os.path.join('public', 'game', 'shared', 'csgo', 'protobuf', 'cstrike15_usermessage_helpers.cpp'),
|
||||||
]
|
]
|
||||||
binary.AddSourceFiles(AMBuild.cache[sdk['sdk']], files)
|
binary.AddSourceFiles(AMBuild.cache[sdk['sdk']], files)
|
||||||
|
elif i == 'dota':
|
||||||
|
files = [
|
||||||
|
os.path.join('public', 'engine', 'protobuf', 'netmessages.pb.cc'),
|
||||||
|
os.path.join('public', 'game', 'shared', 'protobuf', 'ai_activity.pb.cc'),
|
||||||
|
os.path.join('public', 'game', 'shared', 'protobuf', 'usermessages.pb.cc'),
|
||||||
|
os.path.join('public', 'game', 'shared', 'dota', 'protobuf', 'dota_commonmessages.pb.cc'),
|
||||||
|
os.path.join('public', 'game', 'shared', 'dota', 'protobuf', 'dota_usermessages.pb.cc'),
|
||||||
|
os.path.join('public', 'game', 'shared', 'dota', 'protobuf', 'dota_usermessage_helpers.cpp'),
|
||||||
|
]
|
||||||
|
binary.AddSourceFiles(AMBuild.cache[sdk['sdk']], files)
|
||||||
|
|
||||||
SM.PostSetupHL2Job(extension, binary, i)
|
SM.PostSetupHL2Job(extension, binary, i)
|
||||||
|
|
||||||
if i == 'csgo':
|
if i in ['csgo', 'dota']:
|
||||||
if AMBuild.target['platform'] in ['linux', 'darwin']:
|
if AMBuild.target['platform'] in ['linux', 'darwin']:
|
||||||
binary.AddObjectFiles(['libprotobuf.a'])
|
binary.AddObjectFiles(['libprotobuf.a'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user