1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-23 16:54:14 +01:00

Split CS:S support off to a separate engine/build (bug 5369, r=asherkin).

This commit is contained in:
Nicholas Hastings 2012-08-20 14:25:29 -04:00
parent 1f0f8ed9d7
commit ca537f18b6
6 changed files with 24 additions and 10 deletions

View File

@ -13,23 +13,25 @@ class MMS:
'name': 'EPISODEONE', 'platform': ['windows', 'linux']}
self.possibleSdks['ep2'] = {'sdk': 'HL2SDKOB', 'ext': '2.ep2', 'def': '3',
'name': 'ORANGEBOX', 'platform': ['windows', 'linux']}
self.possibleSdks['ep2v'] = {'sdk': 'HL2SDKOBVALVE', 'ext': '2.ep2v', 'def': '6',
self.possibleSdks['css'] = {'sdk': 'HL2SDKCSS', 'ext': '2.css', 'def': '6',
'name': 'CSS', 'platform': ['windows', 'linux', 'darwin']}
self.possibleSdks['ep2v'] = {'sdk': 'HL2SDKOBVALVE', 'ext': '2.ep2v', 'def': '7',
'name': 'ORANGEBOXVALVE', 'platform': ['windows', 'linux', 'darwin']}
self.possibleSdks['l4d'] = {'sdk': 'HL2SDKL4D', 'ext': '2.l4d', 'def': '7',
self.possibleSdks['l4d'] = {'sdk': 'HL2SDKL4D', 'ext': '2.l4d', 'def': '8',
'name': 'LEFT4DEAD', 'platform': ['windows', 'linux', 'darwin']}
self.possibleSdks['l4d2'] = {'sdk': 'HL2SDKL4D2', 'ext': '2.l4d2', 'def': '8',
self.possibleSdks['l4d2'] = {'sdk': 'HL2SDKL4D2', 'ext': '2.l4d2', 'def': '9',
'name': 'LEFT4DEAD2', 'platform': ['windows', 'linux', 'darwin']}
self.possibleSdks['darkm'] = {'sdk': 'HL2SDK-DARKM', 'ext': '2.darkm', 'def': '2',
'name': 'DARKMESSIAH', 'platform': ['windows']}
self.possibleSdks['swarm'] = {'sdk': 'HL2SDK-SWARM', 'ext': '2.swarm', 'def': '9',
self.possibleSdks['swarm'] = {'sdk': 'HL2SDK-SWARM', 'ext': '2.swarm', 'def': '10',
'name': 'ALIENSWARM', 'platform': ['windows']}
self.possibleSdks['bgt'] = {'sdk': 'HL2SDK-BGT', 'ext': '2.bgt', 'def': '4',
'name': 'BLOODYGOODTIME', 'platform': ['windows']}
self.possibleSdks['eye'] = {'sdk': 'HL2SDK-EYE', 'ext': '2.eye', 'def': '5',
'name': 'EYE', 'platform': ['windows']}
self.possibleSdks['csgo'] = {'sdk': 'HL2SDKCSGO', 'ext': '2.csgo', 'def': '11',
self.possibleSdks['csgo'] = {'sdk': 'HL2SDKCSGO', 'ext': '2.csgo', 'def': '12',
'name': 'CSGO', 'platform': ['windows', 'linux']}
# self.possibleSdks['portal2'] = {'sdk': 'HL2SDK-PORTAL2', 'ext': '2.portal2', 'def': '10',
# self.possibleSdks['portal2'] = {'sdk': 'HL2SDK-PORTAL2', 'ext': '2.portal2', 'def': '11',
# 'name': 'PORTAL2', 'platform': ['windows']}
self.sdkInfo = { }
@ -45,6 +47,7 @@ class MMS:
envvars['HL2SDKOB'] = 'hl2sdk-ob'
envvars['HL2SDKCSGO'] = 'hl2sdk-csgo'
envvars['HL2SDKCSS'] = 'hl2sdk-css'
envvars['HL2SDKOBVALVE'] = 'hl2sdk-ob-valve'
envvars['HL2SDKL4D'] = 'hl2sdk-l4d'
envvars['HL2SDKL4D2'] = 'hl2sdk-l4d2'
@ -261,7 +264,7 @@ class MMS:
else:
staticLibs = os.path.join(sdkPath, 'lib', 'linux')
workFolder = os.path.join(AMBuild.outputFolder, job.workFolder)
if sdk in ['ep2v', 'l4d', 'l4d2', 'csgo']:
if sdk in ['css', 'ep2v', 'l4d', 'l4d2', 'csgo']:
libs = ['tier1_i486.a', 'libvstdlib.so', 'libtier0.so']
if sdk == 'csgo':
libs.insert(0, 'interfaces_i486.a')
@ -320,7 +323,7 @@ class MMS:
# We don't build for Portal 2 (yet?, ever?), but using this define in code as
# it saves trouble if we ever need to
compiler['CDEFINES'].append('SE_PORTAL2=10')
compiler['CDEFINES'].append('SE_PORTAL2=11')
paths = [['public'], ['public', 'engine'], ['public', 'mathlib'], ['public', 'vstdlib'],
['public', 'tier0'], ['public', 'tier1']]
@ -358,7 +361,7 @@ class MMS:
if not noLink:
if AMBuild.target['platform'] == 'linux':
compiler['POSTLINKFLAGS'][0:0] = ['-lm']
if sdk in ['ep2v', 'l4d', 'l4d2', 'csgo']:
if sdk in ['css', 'ep2v', 'l4d', 'l4d2', 'csgo']:
compiler['POSTLINKFLAGS'][0:0] = ['libtier0.so']
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.so']
else:

View File

@ -41,13 +41,14 @@
#define SOURCE_ENGINE_ORANGEBOX 3 /**< Orange Box Source Engine (third major SDK) */
#define SOURCE_ENGINE_LEFT4DEAD 4 /**< Left 4 Dead */
#define SOURCE_ENGINE_DARKMESSIAH 5 /**< Dark Messiah Multiplayer (based on original engine) */
#define SOURCE_ENGINE_ORANGEBOXVALVE 6 /**< Orange Box Source Engine for Valve games (TF2/DOD:S) */
#define SOURCE_ENGINE_ORANGEBOXVALVE 6 /**< Orange Box Source Engine for Valve games (TF2/DOD:S/HL2DM) */
#define SOURCE_ENGINE_LEFT4DEAD2 7 /**< Left 4 Dead 2 */
#define SOURCE_ENGINE_ALIENSWARM 8 /**< Alien Swarm */
#define SOURCE_ENGINE_BLOODYGOODTIME 9 /**< Bloody Good Time */
#define SOURCE_ENGINE_EYE 10 /**< E.Y.E Divine Cybermancy */
#define SOURCE_ENGINE_PORTAL2 11 /**< Portal 2 */
#define SOURCE_ENGINE_CSGO 12 /**< Counter-Strike: Global Offensive */
#define SOURCE_ENGINE_CSS 13 /**< Counter-Strike: Source (sometimes older version of Orange Box Valve) */
#define METAMOD_PLAPI_VERSION 15 /**< Version of this header file */
#define METAMOD_PLAPI_NAME "ISmmPlugin" /**< Name of the plugin interface */

View File

@ -121,6 +121,8 @@ bool Command_Meta(IMetamodSourceCommandInfo *info)
CONMSG(" Engine: Left 4 Dead (2008)\n");
#elif SOURCE_ENGINE == SE_ORANGEBOX
CONMSG(" Engine: Episode 2 (Orange Box, 2007)\n");
#elif SOURCE_ENGINE == SE_CSS
CONMSG(" Engine: Counter-Strike: Source (Old Valve Orange Box, 2009)\n");
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
CONMSG(" Engine: Episode 2 (Valve Orange Box, 2009)\n");
#elif SOURCE_ENGINE == SE_DARKMESSIAH

View File

@ -367,6 +367,8 @@ int BaseProvider::DetermineSourceEngine(const char *game)
return SOURCE_ENGINE_LEFT4DEAD;
#elif SOURCE_ENGINE == SE_ORANGEBOX
return SOURCE_ENGINE_ORANGEBOX;
#elif SOURCE_ENGINE == SE_CSS
return SOURCE_ENGINE_CSS;
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
return SOURCE_ENGINE_ORANGEBOXVALVE;
#elif SOURCE_ENGINE == SE_DARKMESSIAH

View File

@ -75,6 +75,7 @@ static const char *backend_names[] =
"2.ep2",
"2.bgt",
"2.eye",
"2.css",
"2.ep2v",
"2.l4d",
"2.l4d2",
@ -313,6 +314,10 @@ mm_DetermineBackend(QueryValveInterface engineFactory, const char *game_name)
{
return MMBackend_EYE;
}
else if (strcmp(game_name, "cstrike") == 0)
{
return MMBackend_CSS;
}
else
{
return MMBackend_Episode2Valve;

View File

@ -85,6 +85,7 @@ enum MetamodBackend
MMBackend_Episode2,
MMBackend_BloodyGoodTime,
MMBackend_EYE,
MMBackend_CSS,
MMBackend_Episode2Valve,
MMBackend_Left4Dead,
MMBackend_Left4Dead2,