Fix build against released MM:S branches (#1607)

`SOURCE_ENGINE_MOCK` is part of the MM:S API and only available in 1.12
which is the dev branch of MM:S. We can build the mock SM build without
it anyway, but this is still a little gross as it is just missing loader
support which could be confusing.

This also changes AMBuildScript to first look for a checkout of MM:S
1.11 which has been the stable branch for a while, 1.10 is still allowed
as a fallback as that seems to still build without issue.
This commit is contained in:
Asher Baker 2021-10-25 19:42:51 +01:00 committed by GitHub
parent 3332da3489
commit a343410793
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -197,6 +197,8 @@ class SMConfig(object):
if builder.options.mms_path: if builder.options.mms_path:
self.mms_root = builder.options.mms_path self.mms_root = builder.options.mms_path
else: else:
self.mms_root = ResolveEnvPath('MMSOURCE111', 'mmsource-1.11')
if not self.mms_root:
self.mms_root = ResolveEnvPath('MMSOURCE110', 'mmsource-1.10') self.mms_root = ResolveEnvPath('MMSOURCE110', 'mmsource-1.10')
if not self.mms_root: if not self.mms_root:
self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'metamod-source') self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'metamod-source')

View File

@ -334,11 +334,13 @@ DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, co
filename = FILENAME_1_6_DOI; filename = FILENAME_1_6_DOI;
break; break;
} }
#ifdef SOURCE_ENGINE_MOCK
case SOURCE_ENGINE_MOCK: case SOURCE_ENGINE_MOCK:
{ {
filename = FILENAME_1_6_MOCK; filename = FILENAME_1_6_MOCK;
break; break;
} }
#endif
default: default:
{ {
return NULL; return NULL;