From 9ecf6c2752cc8067ca5a7d62c0b9791e8723ce6d Mon Sep 17 00:00:00 2001 From: caxanga334 <10157643+caxanga334@users.noreply.github.com> Date: Tue, 22 Oct 2024 09:08:53 -0300 Subject: [PATCH] Fix Differences Between SDK/No SDK --- public/sample_ext_nosdk/AMBuildScript | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/public/sample_ext_nosdk/AMBuildScript b/public/sample_ext_nosdk/AMBuildScript index 33f166aee7..e794984715 100644 --- a/public/sample_ext_nosdk/AMBuildScript +++ b/public/sample_ext_nosdk/AMBuildScript @@ -69,25 +69,12 @@ class ExtensionConfig(object): return 'Release' def detectSDKs(self): - if builder.options.sm_path: - self.sm_root = builder.options.sm_path - else: - self.sm_root = ResolveEnvPath('SOURCEMOD112', 'sourcemod-1.12') - if not self.sm_root: - self.sm_root = ResolveEnvPath('SOURCEMOD', 'sourcemod') - if not self.sm_root: - self.sm_root = ResolveEnvPath('SOURCEMOD_DEV', 'sourcemod-central') - - if not self.sm_root or not os.path.isdir(self.sm_root): - raise Exception('Could not find a source copy of SourceMod') - self.sm_root = Normalize(self.sm_root) - if builder.options.mms_path: self.mms_root = builder.options.mms_path else: self.mms_root = ResolveEnvPath('MMSOURCE112', 'mmsource-1.12') if not self.mms_root: - self.mms_root = ResolveEnvPath('MMSOURCE', 'metamod-source') + self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'metamod-source') if not self.mms_root: self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'mmsource-central') @@ -95,6 +82,19 @@ class ExtensionConfig(object): raise Exception('Could not find a source copy of Metamod:Source') self.mms_root = Normalize(self.mms_root) + if builder.options.sm_path: + self.sm_root = builder.options.sm_path + else: + self.sm_root = ResolveEnvPath('SOURCEMOD112', 'sourcemod-1.12') + if not self.sm_root: + self.sm_root = ResolveEnvPath('SOURCEMOD_DEV', 'sourcemod') + if not self.sm_root: + self.sm_root = ResolveEnvPath('SOURCEMOD_DEV', 'sourcemod-central') + + if not self.sm_root or not os.path.isdir(self.sm_root): + raise Exception('Could not find a source copy of SourceMod') + self.sm_root = Normalize(self.sm_root) + def configure(self): allowed_archs = ['x86','x86_64']