1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-01-30 19:52:17 +01:00
This commit is contained in:
Nick Hastings 2023-10-15 23:07:44 -04:00
commit d4e4e62871
2 changed files with 8 additions and 38 deletions

View File

@ -84,47 +84,17 @@ class MMSConfig(object):
def shouldIncludeSdk(self, sdk): def shouldIncludeSdk(self, sdk):
if sdk.get('source2', False) and self.productVersion.startswith('1.'): if sdk.get('source2', False) and self.productVersion.startswith('1.'):
return False return False
for cxx in self.all_targets: return True
if SdkHelpers.shouldBuildSdk(sdk, cxx):
return True
return False
def detectSDKs(self): def detectSDKs(self):
sdk_list = builder.options.sdks.split(',') sdk_list = builder.options.sdks.split(',')
use_all = sdk_list[0] == 'all' SdkHelpers.sdk_filter = self.shouldIncludeSdk
use_present = sdk_list[0] == 'present' SdkHelpers.find_sdk_path = self.findSdkPath
if sdk_list[0] == '': SdkHelpers.findSdks(builder, self.all_targets, sdk_list)
sdk_list = []
not_found = [] self.sdks = SdkHelpers.sdks
for sdk_name, sdk in SdkHelpers.getSdks(builder): self.sdk_manifests = SdkHelpers.sdk_manifests
self.sdk_manifests.append(sdk) self.sdk_targets = SdkHelpers.sdk_targets
if not self.shouldIncludeSdk(sdk):
continue
sdk_path = self.findSdkPath(sdk_name)
if sdk_path is None:
if (use_all and sdk_name != 'mock') or sdk_name in sdk_list:
raise Exception('Could not find a valid path for {0}'.format(sdk_name))
not_found.append(sdk_name)
continue
sdk['path'] = sdk_path
self.sdks[sdk_name] = sdk
if len(self.sdks) < 1 and len(sdk_list):
raise Exception('No SDKs were found, nothing to build.')
if use_present:
for sdk in not_found:
print('Warning: hl2sdk-{} was not found, and will not be included in build.'.format(sdk))
for _, sdk in self.sdks.items():
if use_all or use_present or sdk.get('name', None) in sdk_list:
for cxx in self.all_targets:
if not SdkHelpers.shouldBuildSdk(sdk, cxx):
continue
self.sdk_targets += [(sdk, cxx)]
def configure(self): def configure(self):
builder.AddConfigureFile('pushbuild.txt') builder.AddConfigureFile('pushbuild.txt')

@ -1 +1 @@
Subproject commit fa9ffa26e5c3a10870ce7364d5b73aa3a98ccd97 Subproject commit d9a8d475375415207222dc47ef8fc320bac4d59e