diff --git a/AMBuildScript b/AMBuildScript index 662447bc..5955c504 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -62,6 +62,9 @@ class SM: self.possibleSdks['csgo'] = {'sdk': 'HL2SDKCSGO', 'ext': '2.csgo', 'def': '12', 'name': 'CSGO', 'platform': ['windows', 'linux', 'darwin'], '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', # 'name': 'PORTAL2', 'platform': ['windows'], # 'dir': 'hl2sdk-portal2'} @@ -341,7 +344,7 @@ class SM: job.AddCommand(SymlinkCommand(link, target)) elif AMBuild.target['platform'] == 'windows': libs = ['tier0', 'tier1', 'vstdlib', 'mathlib'] - if sdk in ['swarm', 'csgo']: + if sdk in ['swarm', 'csgo', 'dota']: libs.append('interfaces') for lib in libs: libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib' diff --git a/core/AMBuilder b/core/AMBuilder index a3740e12..bc318a0f 100644 --- a/core/AMBuilder +++ b/core/AMBuilder @@ -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']], 'public', 'engine', '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) binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler) SM.PreSetupHL2Job(extension, binary, i) - if i == 'csgo': + if i in ['csgo', 'dota']: if AMBuild.target['platform'] == 'linux': 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') @@ -98,7 +103,7 @@ for i in SM.sdkInfo: 'ConsoleDetours.cpp' ] - if i == 'csgo': + if i in ['csgo', 'dota']: files.append('smn_protobuf.cpp') else: 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'), ] 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) - if i == 'csgo': + if i in ['csgo', 'dota']: if AMBuild.target['platform'] in ['linux', 'darwin']: binary.AddObjectFiles(['libprotobuf.a'])